diff --git a/Minecraft Client/Assets/Content/Inventory/Bricks.png b/Minecraft Client/Assets/Content/Inventory/Bricks.png new file mode 100644 index 0000000..76b00ca Binary files /dev/null and b/Minecraft Client/Assets/Content/Inventory/Bricks.png differ diff --git a/Minecraft Client/Assets/Content/Inventory/Bricks.png.meta b/Minecraft Client/Assets/Content/Inventory/Bricks.png.meta new file mode 100644 index 0000000..60b649b --- /dev/null +++ b/Minecraft Client/Assets/Content/Inventory/Bricks.png.meta @@ -0,0 +1,108 @@ +fileFormatVersion: 2 +guid: f57283d516574a1409455a2b33859cf0 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 0 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Minecraft Client/Assets/Content/Inventory/Cobblestone.png b/Minecraft Client/Assets/Content/Inventory/Cobblestone.png new file mode 100644 index 0000000..c265be7 Binary files /dev/null and b/Minecraft Client/Assets/Content/Inventory/Cobblestone.png differ diff --git a/Minecraft Client/Assets/Content/Inventory/Cobblestone.png.meta b/Minecraft Client/Assets/Content/Inventory/Cobblestone.png.meta new file mode 100644 index 0000000..7734bdd --- /dev/null +++ b/Minecraft Client/Assets/Content/Inventory/Cobblestone.png.meta @@ -0,0 +1,108 @@ +fileFormatVersion: 2 +guid: 9cc0e072410155649995525a7fde86f3 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 0 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Minecraft Client/Assets/Scenes/Game.unity b/Minecraft Client/Assets/Scenes/Game.unity index df7a923..6419f63 100644 --- a/Minecraft Client/Assets/Scenes/Game.unity +++ b/Minecraft Client/Assets/Scenes/Game.unity @@ -1610,7 +1610,7 @@ MonoBehaviour: m_EditorClassIdentifier: material: {fileID: 2100000, guid: f4343d4c3fcbdb94b9db1c71ca64ba0a, type: 2} playerPrefab: {fileID: 4093383343133656139, guid: f648243c6b14d514d92cde4ec433276b, type: 3} - worldSize: 0 + worldSize: 20 player: {fileID: 1789911870} deadScreen: {fileID: 1849105196} pauseScreen: {fileID: 622656467} @@ -1645,6 +1645,12 @@ MonoBehaviour: - name: Glass textures: 030303030303 transparent: 1 + - name: Brick + textures: 0b0b0b0b0b0b + transparent: 0 + - name: Cobblestone + textures: 080808080808 + transparent: 0 --- !u!1 &965289403 GameObject: m_ObjectHideFlags: 0 @@ -3668,6 +3674,8 @@ MonoBehaviour: - {fileID: 21300000, guid: b72adb17f9f9dc849868363fd2fbe6ab, type: 3} - {fileID: 21300000, guid: 24951cc96c828c44c93a0c91b9687b11, type: 3} - {fileID: 21300000, guid: 9720360232ff9ee45b79475a071933b0, type: 3} + - {fileID: 21300000, guid: f57283d516574a1409455a2b33859cf0, type: 3} + - {fileID: 21300000, guid: 9cc0e072410155649995525a7fde86f3, type: 3} highlight: {fileID: 1538641651} --- !u!33 &2317136213949272296 MeshFilter: diff --git a/Minecraft Client/Assets/Scripts/Game/Chunk.cs b/Minecraft Client/Assets/Scripts/Game/Chunk.cs index 5a7f53e..32ae7f4 100644 --- a/Minecraft Client/Assets/Scripts/Game/Chunk.cs +++ b/Minecraft Client/Assets/Scripts/Game/Chunk.cs @@ -87,14 +87,19 @@ public class Chunk y + Data.faceChecks[f].y, z + Data.faceChecks[f].z + chunkPosition.z * Data.chunkWidth)))) { - for (int v = 0; v < 6; v++) + if(!world.IsBlockTransparent(world.GetBlockID(new Vector3(x + chunkPosition.x * Data.chunkWidth, + y, + z + chunkPosition.z * Data.chunkWidth)))) { - vertices.Add(Data.vertices[Data.triangles[f, v]] + new Vector3(x, y, z)); - triangles.Add(triangleIndex); - triangleIndex++; + for (int v = 0; v < 6; v++) + { + vertices.Add(Data.vertices[Data.triangles[f, v]] + new Vector3(x, y, z)); + triangles.Add(triangleIndex); + triangleIndex++; + } + + AddUV(textures[f]); } - - AddUV(textures[f]); } } } diff --git a/Minecraft Client/Assets/Scripts/Game/Hotbar.cs b/Minecraft Client/Assets/Scripts/Game/Hotbar.cs index 1a8d467..0e6b7af 100644 --- a/Minecraft Client/Assets/Scripts/Game/Hotbar.cs +++ b/Minecraft Client/Assets/Scripts/Game/Hotbar.cs @@ -14,11 +14,19 @@ public class Hotbar : MonoBehaviour private void Start() { - //change later: + hotBarItems[0] = 10; + hotBarItems[1] = 11; + hotBarItems[2] = 3; + hotBarItems[3] = 4; + hotBarItems[4] = 5; + hotBarItems[5] = 2; + hotBarItems[6] = 7; + hotBarItems[7] = 8; + hotBarItems[8] = 9; + for (int i = 0; i < 9; i++) { - itemSlots[i].sprite = itemIcons[i]; - hotBarItems[i] = (byte)(i + 1); + itemSlots[i].sprite = itemIcons[hotBarItems[i] - 1]; } } diff --git a/Minecraft Client/ProjectSettings/ProjectSettings.asset b/Minecraft Client/ProjectSettings/ProjectSettings.asset index 0d63105..15b051d 100644 --- a/Minecraft Client/ProjectSettings/ProjectSettings.asset +++ b/Minecraft Client/ProjectSettings/ProjectSettings.asset @@ -605,7 +605,7 @@ PlayerSettings: additionalCompilerArguments: {} platformArchitecture: {} scriptingBackend: - Standalone: 1 + Standalone: 0 il2cppCompilerConfiguration: {} managedStrippingLevel: {} incrementalIl2cppBuild: {} diff --git a/Minecraft Client/ProjectSettings/SceneTemplateSettings.json b/Minecraft Client/ProjectSettings/SceneTemplateSettings.json new file mode 100644 index 0000000..6f3e60f --- /dev/null +++ b/Minecraft Client/ProjectSettings/SceneTemplateSettings.json @@ -0,0 +1,167 @@ +{ + "templatePinStates": [], + "dependencyTypeInfos": [ + { + "userAdded": false, + "type": "UnityEngine.AnimationClip", + "ignore": false, + "defaultInstantiationMode": 0, + "supportsModification": true + }, + { + "userAdded": false, + "type": "UnityEditor.Animations.AnimatorController", + "ignore": false, + "defaultInstantiationMode": 0, + "supportsModification": true + }, + { + "userAdded": false, + "type": "UnityEngine.AnimatorOverrideController", + "ignore": false, + "defaultInstantiationMode": 0, + "supportsModification": true + }, + { + "userAdded": false, + "type": "UnityEditor.Audio.AudioMixerController", + "ignore": false, + "defaultInstantiationMode": 0, + "supportsModification": true + }, + { + "userAdded": false, + "type": "UnityEngine.ComputeShader", + "ignore": true, + "defaultInstantiationMode": 1, + "supportsModification": true + }, + { + "userAdded": false, + "type": "UnityEngine.Cubemap", + "ignore": false, + "defaultInstantiationMode": 0, + "supportsModification": true + }, + { + "userAdded": false, + "type": "UnityEngine.GameObject", + "ignore": false, + "defaultInstantiationMode": 0, + "supportsModification": true + }, + { + "userAdded": false, + "type": "UnityEditor.LightingDataAsset", + "ignore": false, + "defaultInstantiationMode": 0, + "supportsModification": false + }, + { + "userAdded": false, + "type": "UnityEngine.LightingSettings", + "ignore": false, + "defaultInstantiationMode": 0, + "supportsModification": true + }, + { + "userAdded": false, + "type": "UnityEngine.Material", + "ignore": false, + "defaultInstantiationMode": 0, + "supportsModification": true + }, + { + "userAdded": false, + "type": "UnityEditor.MonoScript", + "ignore": true, + "defaultInstantiationMode": 1, + "supportsModification": true + }, + { + "userAdded": false, + "type": "UnityEngine.PhysicMaterial", + "ignore": false, + "defaultInstantiationMode": 0, + "supportsModification": true + }, + { + "userAdded": false, + "type": "UnityEngine.PhysicsMaterial2D", + "ignore": false, + "defaultInstantiationMode": 0, + "supportsModification": true + }, + { + "userAdded": false, + "type": "UnityEngine.Rendering.PostProcessing.PostProcessProfile", + "ignore": false, + "defaultInstantiationMode": 0, + "supportsModification": true + }, + { + "userAdded": false, + "type": "UnityEngine.Rendering.PostProcessing.PostProcessResources", + "ignore": false, + "defaultInstantiationMode": 0, + "supportsModification": true + }, + { + "userAdded": false, + "type": "UnityEngine.Rendering.VolumeProfile", + "ignore": false, + "defaultInstantiationMode": 0, + "supportsModification": true + }, + { + "userAdded": false, + "type": "UnityEditor.SceneAsset", + "ignore": false, + "defaultInstantiationMode": 0, + "supportsModification": false + }, + { + "userAdded": false, + "type": "UnityEngine.Shader", + "ignore": true, + "defaultInstantiationMode": 1, + "supportsModification": true + }, + { + "userAdded": false, + "type": "UnityEngine.ShaderVariantCollection", + "ignore": true, + "defaultInstantiationMode": 1, + "supportsModification": true + }, + { + "userAdded": false, + "type": "UnityEngine.Texture", + "ignore": false, + "defaultInstantiationMode": 0, + "supportsModification": true + }, + { + "userAdded": false, + "type": "UnityEngine.Texture2D", + "ignore": false, + "defaultInstantiationMode": 0, + "supportsModification": true + }, + { + "userAdded": false, + "type": "UnityEngine.Timeline.TimelineAsset", + "ignore": false, + "defaultInstantiationMode": 0, + "supportsModification": true + } + ], + "defaultDependencyTypeInfo": { + "userAdded": false, + "type": "", + "ignore": false, + "defaultInstantiationMode": 1, + "supportsModification": true + }, + "newSceneOverride": 0 +} \ No newline at end of file