From 073db47d157db351d6389af56f3422bc1ae41d3b Mon Sep 17 00:00:00 2001 From: Owen Grenney Date: Tue, 27 Dec 2022 10:47:46 +0000 Subject: [PATCH] Basic stuff --- README.md | 9 +- mcdiverge-logo.png | Bin 0 -> 32109 bytes patches_merged/credits.txt.patch | 11 + patches_merged/customres.txt.patch | 13 + patches_merged/gui/creative_items.txt.patch | 25 + .../gui/creative_items_wip.txt.patch | 8 + .../mcdiverge/BlockBlaster.java.patch | 54 ++ .../mcdiverge/BlockRefabricator.java.patch | 27 + .../mcdiverge/BlockSpeleothem.java.patch | 93 ++++ .../mcdiverge/CreateWorldInfo.java.patch | 31 ++ .../mcdiverge/FurnaceRecipe.java.patch | 29 ++ .../mcdiverge/FurnaceRecipeManager.java.patch | 70 +++ .../mcdiverge/GuiCreative.java.patch | 135 +++++ .../mcdiverge/GuiCredits.java.patch | 51 ++ .../mcdiverge/GuiRecipeGuide.java.patch | 137 +++++ .../mcdiverge/GuiRefabricator.java.patch | 46 ++ .../mcdiverge/InventoryReadonly.java.patch | 131 +++++ .../bluestaggo/mcdiverge/ItemCharm.java.patch | 34 ++ .../bluestaggo/mcdiverge/ItemMagic.java.patch | 33 ++ .../mcdiverge/ItemQuiver.java.patch | 42 ++ .../mcdiverge/ItemRepairKit.java.patch | 34 ++ .../mcdiverge/ItemSlimeShoes.java.patch | 17 + .../bluestaggo/mcdiverge/ItemStaff.java.patch | 45 ++ .../mcdiverge/ItemTooltip.java.patch | 344 +++++++++++++ .../mcdiverge/ItemWardingRing.java.patch | 16 + .../bluestaggo/mcdiverge/Pair.java.patch | 27 + .../TileEntityRefabricator.java.patch | 120 +++++ .../mcdiverge/WorldGenSpeleothems.java.patch | 53 ++ .../net/minecraft/client/Minecraft.java.patch | 284 +++++++++++ .../server/MinecraftServer.java.patch | 75 +++ .../net/minecraft/src/Block.java.patch | 215 ++++++++ .../minecraft/src/BlockBookshelf.java.patch | 14 + .../net/minecraft/src/BlockFurnace.java.patch | 28 ++ .../net/minecraft/src/BlockGrass.java.patch | 16 + .../net/minecraft/src/BlockJukeBox.java.patch | 20 + .../net/minecraft/src/BlockLeaves.java.patch | 165 ++++++ .../net/minecraft/src/BlockLog.java.patch | 79 +++ .../minecraft/src/BlockObsidian.java.patch | 14 + .../net/minecraft/src/BlockOre.java.patch | 47 ++ .../minecraft/src/BlockRedstoneOre.java.patch | 36 ++ .../net/minecraft/src/BlockReed.java.patch | 16 + .../net/minecraft/src/BlockStairs.java.patch | 19 + .../net/minecraft/src/BlockStep.java.patch | 131 +++++ .../net/minecraft/src/BlockStone.java.patch | 48 ++ .../net/minecraft/src/ChunkCache.java.patch | 12 + .../src/ChunkProviderGenerate.java.patch | 163 ++++++ .../src/CraftingInventoryPlayerCB.java.patch | 30 ++ .../CraftingInventoryWorkbenchCB.java.patch | 27 + .../minecraft/src/CraftingManager.java.patch | 194 +++++++ .../minecraft/src/CraftingRecipe.java.patch | 89 ++++ .../net/minecraft/src/Entity.java.patch | 41 ++ .../net/minecraft/src/EntityAnimal.java.patch | 10 + .../minecraft/src/EntityChicken.java.patch | 12 + .../net/minecraft/src/EntityCow.java.patch | 13 + .../src/EntityFallingSand.java.patch | 39 ++ .../minecraft/src/EntityFlameFX.java.patch | 11 + .../net/minecraft/src/EntityItem.java.patch | 20 + .../net/minecraft/src/EntityLiving.java.patch | 86 ++++ .../src/EntityOtherPlayerMP.java.patch | 28 ++ .../minecraft/src/EntityPickupFX.java.patch | 11 + .../net/minecraft/src/EntityPig.java.patch | 10 + .../net/minecraft/src/EntityPlayer.java.patch | 250 +++++++++ .../minecraft/src/EntityPlayerSP.java.patch | 73 +++ .../net/minecraft/src/EntitySheep.java.patch | 11 + .../minecraft/src/EntitySnowball.java.patch | 314 ++++++++++++ .../minecraft/src/EntityTracker.java.patch | 11 + .../src/EntityTrackerEntry.java.patch | 11 + .../net/minecraft/src/GameSettings.java.patch | 315 ++++++++++++ .../net/minecraft/src/GuiButton.java.patch | 22 + .../net/minecraft/src/GuiContainer.java.patch | 101 ++++ .../minecraft/src/GuiCreateWorld.java.patch | 137 +++++ .../minecraft/src/GuiDeleteWorld.java.patch | 35 ++ .../net/minecraft/src/GuiFurnace.java.patch | 11 + .../net/minecraft/src/GuiIngame.java.patch | 122 +++++ .../net/minecraft/src/GuiInventory.java.patch | 71 +++ .../net/minecraft/src/GuiMainMenu.java.patch | 190 +++++++ .../net/minecraft/src/GuiOptions.java.patch | 73 +++ .../net/minecraft/src/GuiScreen.java.patch | 34 ++ .../minecraft/src/GuiSelectWorld.java.patch | 126 +++++ .../net/minecraft/src/GuiTextField.java.patch | 103 ++++ .../net/minecraft/src/IAnimal.java.patch | 7 + .../net/minecraft/src/IAnimals.java.patch | 7 + .../net/minecraft/src/IMobs.java.patch | 8 + .../net/minecraft/src/IWorldAccess.java.patch | 11 + .../minecraft/src/InventoryPlayer.java.patch | 120 +++++ .../net/minecraft/src/Item.java.patch | 251 ++++++++++ .../net/minecraft/src/ItemArmor.java.patch | 47 ++ .../net/minecraft/src/ItemAxe.java.patch | 40 ++ .../net/minecraft/src/ItemBlock.java.patch | 11 + .../net/minecraft/src/ItemBow.java.patch | 36 ++ .../minecraft/src/ItemEquipable.java.patch | 19 + .../net/minecraft/src/ItemFood.java.patch | 33 ++ .../net/minecraft/src/ItemHoe.java.patch | 27 + .../src/ItemInWorldManager.java.patch | 21 + .../net/minecraft/src/ItemPickaxe.java.patch | 97 ++++ .../net/minecraft/src/ItemRecord.java.patch | 37 ++ .../net/minecraft/src/ItemReed.java.patch | 14 + .../net/minecraft/src/ItemRenderer.java.patch | 30 ++ .../net/minecraft/src/ItemSnowball.java.patch | 11 + .../net/minecraft/src/ItemSpade.java.patch | 31 ++ .../net/minecraft/src/ItemStack.java.patch | 100 ++++ .../net/minecraft/src/ItemSword.java.patch | 42 ++ .../net/minecraft/src/ItemTool.java.patch | 43 ++ .../net/minecraft/src/MapGenCaves.java.patch | 34 ++ .../net/minecraft/src/MathHelper.java.patch | 13 + .../minecraft/src/MovementInput.java.patch | 10 + .../src/MovementInputFromOptions.java.patch | 25 + .../minecraft/src/PanelCrashReport.java.patch | 19 + .../minecraft/src/PlayerController.java.patch | 18 + .../src/PlayerControllerSP.java.patch | 38 ++ .../minecraft/src/PropertyManager.java.patch | 29 ++ .../minecraft/src/RecipesCrafting.java.patch | 16 + .../minecraft/src/RecipesIngots.java.patch | 30 ++ .../net/minecraft/src/RecipesTools.java.patch | 25 + .../minecraft/src/RecipesWeapons.java.patch | 20 + .../net/minecraft/src/RenderBlocks.java.patch | 474 ++++++++++++++++++ .../net/minecraft/src/RenderEngine.java.patch | 10 + .../net/minecraft/src/RenderGlobal.java.patch | 45 ++ .../net/minecraft/src/RenderItem.java.patch | 33 ++ .../net/minecraft/src/RenderLiving.java.patch | 39 ++ .../minecraft/src/RenderMinecart.java.patch | 14 + .../net/minecraft/src/RenderPlayer.java.patch | 59 +++ .../minecraft/src/RenderSnowball.java.patch | 11 + .../minecraft/src/RenderTNTPrimed.java.patch | 19 + .../src/ServerConfigurationManager.java.patch | 25 + .../net/minecraft/src/Session.java.patch | 39 ++ .../net/minecraft/src/SlotArmor.java.patch | 11 + .../minecraft/src/SlotInventory.java.patch | 20 + .../net/minecraft/src/SoundManager.java.patch | 133 +++++ .../src/ThreadDownloadResources.java.patch | 50 ++ .../net/minecraft/src/TileEntity.java.patch | 17 + .../src/TileEntityFurnace.java.patch | 193 +++++++ .../net/minecraft/src/World.java.patch | 204 ++++++++ .../minecraft/src/WorldGenDungeons.java.patch | 223 ++++++++ .../minecraft/src/WorldGenMinable.java.patch | 43 ++ .../net/minecraft/src/WorldManager.java.patch | 11 + .../net/minecraft/src/WorldServer.java.patch | 23 + patches_merged/title/splashes.txt.patch | 257 ++++++++++ 138 files changed, 8919 insertions(+), 2 deletions(-) create mode 100644 mcdiverge-logo.png create mode 100644 patches_merged/credits.txt.patch create mode 100644 patches_merged/customres.txt.patch create mode 100644 patches_merged/gui/creative_items.txt.patch create mode 100644 patches_merged/gui/creative_items_wip.txt.patch create mode 100644 patches_merged/io/github/bluestaggo/mcdiverge/BlockBlaster.java.patch create mode 100644 patches_merged/io/github/bluestaggo/mcdiverge/BlockRefabricator.java.patch create mode 100644 patches_merged/io/github/bluestaggo/mcdiverge/BlockSpeleothem.java.patch create mode 100644 patches_merged/io/github/bluestaggo/mcdiverge/CreateWorldInfo.java.patch create mode 100644 patches_merged/io/github/bluestaggo/mcdiverge/FurnaceRecipe.java.patch create mode 100644 patches_merged/io/github/bluestaggo/mcdiverge/FurnaceRecipeManager.java.patch create mode 100644 patches_merged/io/github/bluestaggo/mcdiverge/GuiCreative.java.patch create mode 100644 patches_merged/io/github/bluestaggo/mcdiverge/GuiCredits.java.patch create mode 100644 patches_merged/io/github/bluestaggo/mcdiverge/GuiRecipeGuide.java.patch create mode 100644 patches_merged/io/github/bluestaggo/mcdiverge/GuiRefabricator.java.patch create mode 100644 patches_merged/io/github/bluestaggo/mcdiverge/InventoryReadonly.java.patch create mode 100644 patches_merged/io/github/bluestaggo/mcdiverge/ItemCharm.java.patch create mode 100644 patches_merged/io/github/bluestaggo/mcdiverge/ItemMagic.java.patch create mode 100644 patches_merged/io/github/bluestaggo/mcdiverge/ItemQuiver.java.patch create mode 100644 patches_merged/io/github/bluestaggo/mcdiverge/ItemRepairKit.java.patch create mode 100644 patches_merged/io/github/bluestaggo/mcdiverge/ItemSlimeShoes.java.patch create mode 100644 patches_merged/io/github/bluestaggo/mcdiverge/ItemStaff.java.patch create mode 100644 patches_merged/io/github/bluestaggo/mcdiverge/ItemTooltip.java.patch create mode 100644 patches_merged/io/github/bluestaggo/mcdiverge/ItemWardingRing.java.patch create mode 100644 patches_merged/io/github/bluestaggo/mcdiverge/Pair.java.patch create mode 100644 patches_merged/io/github/bluestaggo/mcdiverge/TileEntityRefabricator.java.patch create mode 100644 patches_merged/io/github/bluestaggo/mcdiverge/WorldGenSpeleothems.java.patch create mode 100644 patches_merged/net/minecraft/client/Minecraft.java.patch create mode 100644 patches_merged/net/minecraft/server/MinecraftServer.java.patch create mode 100644 patches_merged/net/minecraft/src/Block.java.patch create mode 100644 patches_merged/net/minecraft/src/BlockBookshelf.java.patch create mode 100644 patches_merged/net/minecraft/src/BlockFurnace.java.patch create mode 100644 patches_merged/net/minecraft/src/BlockGrass.java.patch create mode 100644 patches_merged/net/minecraft/src/BlockJukeBox.java.patch create mode 100644 patches_merged/net/minecraft/src/BlockLeaves.java.patch create mode 100644 patches_merged/net/minecraft/src/BlockLog.java.patch create mode 100644 patches_merged/net/minecraft/src/BlockObsidian.java.patch create mode 100644 patches_merged/net/minecraft/src/BlockOre.java.patch create mode 100644 patches_merged/net/minecraft/src/BlockRedstoneOre.java.patch create mode 100644 patches_merged/net/minecraft/src/BlockReed.java.patch create mode 100644 patches_merged/net/minecraft/src/BlockStairs.java.patch create mode 100644 patches_merged/net/minecraft/src/BlockStep.java.patch create mode 100644 patches_merged/net/minecraft/src/BlockStone.java.patch create mode 100644 patches_merged/net/minecraft/src/ChunkCache.java.patch create mode 100644 patches_merged/net/minecraft/src/ChunkProviderGenerate.java.patch create mode 100644 patches_merged/net/minecraft/src/CraftingInventoryPlayerCB.java.patch create mode 100644 patches_merged/net/minecraft/src/CraftingInventoryWorkbenchCB.java.patch create mode 100644 patches_merged/net/minecraft/src/CraftingManager.java.patch create mode 100644 patches_merged/net/minecraft/src/CraftingRecipe.java.patch create mode 100644 patches_merged/net/minecraft/src/Entity.java.patch create mode 100644 patches_merged/net/minecraft/src/EntityAnimal.java.patch create mode 100644 patches_merged/net/minecraft/src/EntityChicken.java.patch create mode 100644 patches_merged/net/minecraft/src/EntityCow.java.patch create mode 100644 patches_merged/net/minecraft/src/EntityFallingSand.java.patch create mode 100644 patches_merged/net/minecraft/src/EntityFlameFX.java.patch create mode 100644 patches_merged/net/minecraft/src/EntityItem.java.patch create mode 100644 patches_merged/net/minecraft/src/EntityLiving.java.patch create mode 100644 patches_merged/net/minecraft/src/EntityOtherPlayerMP.java.patch create mode 100644 patches_merged/net/minecraft/src/EntityPickupFX.java.patch create mode 100644 patches_merged/net/minecraft/src/EntityPig.java.patch create mode 100644 patches_merged/net/minecraft/src/EntityPlayer.java.patch create mode 100644 patches_merged/net/minecraft/src/EntityPlayerSP.java.patch create mode 100644 patches_merged/net/minecraft/src/EntitySheep.java.patch create mode 100644 patches_merged/net/minecraft/src/EntitySnowball.java.patch create mode 100644 patches_merged/net/minecraft/src/EntityTracker.java.patch create mode 100644 patches_merged/net/minecraft/src/EntityTrackerEntry.java.patch create mode 100644 patches_merged/net/minecraft/src/GameSettings.java.patch create mode 100644 patches_merged/net/minecraft/src/GuiButton.java.patch create mode 100644 patches_merged/net/minecraft/src/GuiContainer.java.patch create mode 100644 patches_merged/net/minecraft/src/GuiCreateWorld.java.patch create mode 100644 patches_merged/net/minecraft/src/GuiDeleteWorld.java.patch create mode 100644 patches_merged/net/minecraft/src/GuiFurnace.java.patch create mode 100644 patches_merged/net/minecraft/src/GuiIngame.java.patch create mode 100644 patches_merged/net/minecraft/src/GuiInventory.java.patch create mode 100644 patches_merged/net/minecraft/src/GuiMainMenu.java.patch create mode 100644 patches_merged/net/minecraft/src/GuiOptions.java.patch create mode 100644 patches_merged/net/minecraft/src/GuiScreen.java.patch create mode 100644 patches_merged/net/minecraft/src/GuiSelectWorld.java.patch create mode 100644 patches_merged/net/minecraft/src/GuiTextField.java.patch create mode 100644 patches_merged/net/minecraft/src/IAnimal.java.patch create mode 100644 patches_merged/net/minecraft/src/IAnimals.java.patch create mode 100644 patches_merged/net/minecraft/src/IMobs.java.patch create mode 100644 patches_merged/net/minecraft/src/IWorldAccess.java.patch create mode 100644 patches_merged/net/minecraft/src/InventoryPlayer.java.patch create mode 100644 patches_merged/net/minecraft/src/Item.java.patch create mode 100644 patches_merged/net/minecraft/src/ItemArmor.java.patch create mode 100644 patches_merged/net/minecraft/src/ItemAxe.java.patch create mode 100644 patches_merged/net/minecraft/src/ItemBlock.java.patch create mode 100644 patches_merged/net/minecraft/src/ItemBow.java.patch create mode 100644 patches_merged/net/minecraft/src/ItemEquipable.java.patch create mode 100644 patches_merged/net/minecraft/src/ItemFood.java.patch create mode 100644 patches_merged/net/minecraft/src/ItemHoe.java.patch create mode 100644 patches_merged/net/minecraft/src/ItemInWorldManager.java.patch create mode 100644 patches_merged/net/minecraft/src/ItemPickaxe.java.patch create mode 100644 patches_merged/net/minecraft/src/ItemRecord.java.patch create mode 100644 patches_merged/net/minecraft/src/ItemReed.java.patch create mode 100644 patches_merged/net/minecraft/src/ItemRenderer.java.patch create mode 100644 patches_merged/net/minecraft/src/ItemSnowball.java.patch create mode 100644 patches_merged/net/minecraft/src/ItemSpade.java.patch create mode 100644 patches_merged/net/minecraft/src/ItemStack.java.patch create mode 100644 patches_merged/net/minecraft/src/ItemSword.java.patch create mode 100644 patches_merged/net/minecraft/src/ItemTool.java.patch create mode 100644 patches_merged/net/minecraft/src/MapGenCaves.java.patch create mode 100644 patches_merged/net/minecraft/src/MathHelper.java.patch create mode 100644 patches_merged/net/minecraft/src/MovementInput.java.patch create mode 100644 patches_merged/net/minecraft/src/MovementInputFromOptions.java.patch create mode 100644 patches_merged/net/minecraft/src/PanelCrashReport.java.patch create mode 100644 patches_merged/net/minecraft/src/PlayerController.java.patch create mode 100644 patches_merged/net/minecraft/src/PlayerControllerSP.java.patch create mode 100644 patches_merged/net/minecraft/src/PropertyManager.java.patch create mode 100644 patches_merged/net/minecraft/src/RecipesCrafting.java.patch create mode 100644 patches_merged/net/minecraft/src/RecipesIngots.java.patch create mode 100644 patches_merged/net/minecraft/src/RecipesTools.java.patch create mode 100644 patches_merged/net/minecraft/src/RecipesWeapons.java.patch create mode 100644 patches_merged/net/minecraft/src/RenderBlocks.java.patch create mode 100644 patches_merged/net/minecraft/src/RenderEngine.java.patch create mode 100644 patches_merged/net/minecraft/src/RenderGlobal.java.patch create mode 100644 patches_merged/net/minecraft/src/RenderItem.java.patch create mode 100644 patches_merged/net/minecraft/src/RenderLiving.java.patch create mode 100644 patches_merged/net/minecraft/src/RenderMinecart.java.patch create mode 100644 patches_merged/net/minecraft/src/RenderPlayer.java.patch create mode 100644 patches_merged/net/minecraft/src/RenderSnowball.java.patch create mode 100644 patches_merged/net/minecraft/src/RenderTNTPrimed.java.patch create mode 100644 patches_merged/net/minecraft/src/ServerConfigurationManager.java.patch create mode 100644 patches_merged/net/minecraft/src/Session.java.patch create mode 100644 patches_merged/net/minecraft/src/SlotArmor.java.patch create mode 100644 patches_merged/net/minecraft/src/SlotInventory.java.patch create mode 100644 patches_merged/net/minecraft/src/SoundManager.java.patch create mode 100644 patches_merged/net/minecraft/src/ThreadDownloadResources.java.patch create mode 100644 patches_merged/net/minecraft/src/TileEntity.java.patch create mode 100644 patches_merged/net/minecraft/src/TileEntityFurnace.java.patch create mode 100644 patches_merged/net/minecraft/src/World.java.patch create mode 100644 patches_merged/net/minecraft/src/WorldGenDungeons.java.patch create mode 100644 patches_merged/net/minecraft/src/WorldGenMinable.java.patch create mode 100644 patches_merged/net/minecraft/src/WorldManager.java.patch create mode 100644 patches_merged/net/minecraft/src/WorldServer.java.patch create mode 100644 patches_merged/title/splashes.txt.patch diff --git a/README.md b/README.md index cfd16ae..404c458 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,7 @@ -# MCDiverge -Minecraft Diverge, a Minecraft Alpha 1.1.2_01 mod that takes the game towards a different direction. +

+ +

+ +Minecraft Diverge is a Minecraft Alpha 1.1.2_01 mod that takes the game towards a different direction. It provides extra content for the late game and more creative power. + +This is the Github repository for Minecraft Diverge, where users can submit issues and downlad new versions. The source code for Minecraft Diverge is partially available in the form of patch files from Retro-MCP version 1.0 pre3. diff --git a/mcdiverge-logo.png b/mcdiverge-logo.png new file mode 100644 index 0000000000000000000000000000000000000000..23339b831ce571d3937d47350c7f5feb05169957 GIT binary patch literal 32109 zcmeGD_cvT`)ISa@(V~|S(R*)0L><8(dXI>n%mj%E!4QlVy+ju++K3)Ri8i_<2GM!z zh9DTdcfKe0eSiLi=ci{aYt33`opYRXoqg@SUu8!b8E8@7eQ*~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%RG@Yl~WY+eB2;Aihj#w<@vJ&ku|RlW8UUOdY14! zv==`8#h69!phEkAJ;&%u6>f6}crYp@Pm$wJcCn7If*+KEfA?=kirAaK3hq(Biv9== zanq2AB_7b*&$Stp9r+yr`Te9%^qq$|vj#-<(Fq``Yc}`pnKgU|J{%|%0W|WNX`wgR z9enneazdWTt%>b8i~wEx(hp|KzXNEW#L^eK?erUB7%B9$aQuk}5Ct2+w!5E1CEG6* zNTEZDyer_a(|^kPg(!9@S%J{m)950!EmUJ2dA%aF8iFk{^*#;5)W3nhDG=m^oqR2~ zz0-y*(>y-fTSzlGINi_G&CBbi@5#~M6uGq#A6W}2@B$ksBQ94(RuuL0^yt$N-Qoa} z{>SNk`=G(?)DSnA+~Iml$_=l`>pJbaE<)z@42IQ=?=J1NyD!V|EeE<0*I3#UiS1Ll z z4!2VN!=L^A{qsE8YvMLhfxXG3U?6{K6R5(83r0~n6|(VN*wxBcE zeUo-(?84)N>)#D|9E7*lkqX6py(%>e26r4-*`IH-`RW${BWr5fCN6C+#f(h3>B@g{ zt^d`h{?CSp4Emio)-Zy3@ZM-`qT)D0 zFF5m=ksyP5nwbzG(xzhh-C^PC$PLFbaHHXA6GsDtF;b(R{lRAO#6nj|R9a!O8CjWS z(0{{3_~$f@PRH8uZhV0Pd$XyK(0*jz8~e104eTp;nuXl4#n9+6zR)*`IkRZ#U$Zw1$QG5`Po literal 0 HcmV?d00001 diff --git a/patches_merged/credits.txt.patch b/patches_merged/credits.txt.patch new file mode 100644 index 0000000..876fe0d --- /dev/null +++ b/patches_merged/credits.txt.patch @@ -0,0 +1,11 @@ +--- /dev/null ++++ b/credits.txt +@@ -1,0 +1,8 @@ ++CREDITS ++--- ++Minecraft: Mojang ++Minecraft Diverge: BlueStag ++Extra MCDiverge music: C418, Noski (Youtube) ++Modding support: Modification Station ++--- ++Github: https://github.com/BlueStaggo/MCDiverge diff --git a/patches_merged/customres.txt.patch b/patches_merged/customres.txt.patch new file mode 100644 index 0000000..624a98d --- /dev/null +++ b/patches_merged/customres.txt.patch @@ -0,0 +1,13 @@ +--- /dev/null ++++ b/customres.txt +@@ -1,0 +1,10 @@ ++/resources/newmusic/diverge/cave1.ogg ++/resources/newmusic/diverge/cave2.ogg ++/resources/newmusic/diverge/cave3.ogg ++/resources/newmusic/diverge/cave4.ogg ++/resources/newmusic/diverge/title1.ogg ++/resources/newmusic/diverge/title2.ogg ++/resources/newmusic/diverge/title3.ogg ++/resources/newmusic/diverge/title4.ogg ++/resources/newsound/diverge/wand.ogg ++/resources/streaming/diverge/magnet.ogg diff --git a/patches_merged/gui/creative_items.txt.patch b/patches_merged/gui/creative_items.txt.patch new file mode 100644 index 0000000..522a423 --- /dev/null +++ b/patches_merged/gui/creative_items.txt.patch @@ -0,0 +1,25 @@ +--- /dev/null ++++ b/gui/creative_items.txt +@@ -1,0 +1,22 @@ ++002#0 003#0 001#0 001#1 001#2 004#0 004#1 004#2 ++016#0 015#0 014#0 056#0 073#0 021#0 021#1 021#2 ++000#0 000#0 000#0 000#0 000#0 044#0 044#1 044#2 ++000#0 042#0 041#0 057#0 000#0 044#3 044#4 044#5 ++012#0 013#0 080#0 079#0 078#0 044#6 044#7 044#8 ++006#0 017#0 005#0 053#0 023#0 067#0 000#0 000#0 ++045#0 044#9 000#0 082#0 338#0 081#0 037#0 038#0 ++331#0 076#0 050#0 049#0 324#0 330#0 039#0 040#0 ++020#0 019#0 018#0 047#0 048#0 046#0 077#0 070#0 ++058#0 061#0 054#0 084#0 085#0 323#0 069#0 072#0 ++000#0 000#0 000#0 000#0 000#0 000#0 000#0 000#0 ++268#0 269#0 270#0 271#0 298#0 299#0 300#0 301#0 ++272#0 273#0 274#0 275#0 302#0 303#0 304#0 305#0 ++267#0 256#0 257#0 258#0 306#0 307#0 308#0 309#0 ++283#0 284#0 285#0 286#0 314#0 315#0 316#0 317#0 ++276#0 277#0 278#0 279#0 310#0 311#0 312#0 313#0 ++290#0 291#0 292#0 294#0 293#0 295#0 296#0 297#0 ++280#0 288#0 289#0 287#0 260#0 322#0 319#0 320#0 ++344#0 332#0 281#0 282#0 325#0 326#0 327#0 335#0 ++329#0 333#0 334#0 318#0 336#0 337#0 261#0 262#0 ++328#0 342#0 343#0 066#0 339#0 340#0 341#0 259#0 ++263#0 265#0 266#0 264#0 345#0 346#0 321#0 000#0 diff --git a/patches_merged/gui/creative_items_wip.txt.patch b/patches_merged/gui/creative_items_wip.txt.patch new file mode 100644 index 0000000..5671dbf --- /dev/null +++ b/patches_merged/gui/creative_items_wip.txt.patch @@ -0,0 +1,8 @@ +--- /dev/null ++++ b/gui/creative_items_wip.txt +@@ -1,0 +1,5 @@ ++-- Stone ++001#0 001#1 001#2 004#0 004#1 004#2 048#0 049#0 ++021#0 021#1 021#2 044#0 044#1 044#2 044#3 044#4 ++044#5 044#6 044#7 044#8 067#0 067#4 067#8 016#0 ++015#0 014#0 056#0 073#0 diff --git a/patches_merged/io/github/bluestaggo/mcdiverge/BlockBlaster.java.patch b/patches_merged/io/github/bluestaggo/mcdiverge/BlockBlaster.java.patch new file mode 100644 index 0000000..02ed6c2 --- /dev/null +++ b/patches_merged/io/github/bluestaggo/mcdiverge/BlockBlaster.java.patch @@ -0,0 +1,54 @@ +--- /dev/null ++++ b/io/github/bluestaggo/mcdiverge/BlockBlaster.java +@@ -1,0 +1,51 @@ ++package io.github.bluestaggo.mcdiverge; ++ ++import java.util.Random; ++ ++import net.minecraft.src.*; ++ ++public class BlockBlaster extends BlockFurnace { ++ public BlockBlaster(int i1, boolean z2) { ++ super(i1, z2, Material.iron); ++ this.blockIndexInTexture = textureXY(14, 2); ++ } ++ ++ public int idDropped(int i1, Random random2) { ++ return Block.blasterIdle.blockID; ++ } ++ ++ public int getBlockTexture(IBlockAccess iBlockAccess1, int i2, int i3, int i4, int i5) { ++ if (i5 == 1) { ++ return Block.blockSteel.blockIndexInTexture - 16; ++ } else if (i5 == 0) { ++ return Block.blockSteel.blockIndexInTexture + 16; ++ } else { ++ int i6 = iBlockAccess1.getBlockMetadata(i2, i3, i4); ++ return i5 != i6 ? Block.blockSteel.blockIndexInTexture ++ : (this.isActive ? this.blockIndexInTexture + 16 : this.blockIndexInTexture); ++ } ++ } ++ ++ public int getBlockTextureFromSide(int i1) { ++ return i1 == 1 ? Block.blockSteel.blockIndexInTexture - 16 ++ : (i1 == 0 ? Block.blockSteel.blockIndexInTexture + 16 ++ : (i1 == 3 ? this.blockIndexInTexture : Block.blockSteel.blockIndexInTexture)); ++ } ++ ++ protected TileEntity getBlockEntity() { ++ return new TileEntityFurnace(50, 2); ++ } ++ ++ public void updateFurnaceBlockState(boolean z0, World world1, int i2, int i3, int i4) { ++ int i5 = world1.getBlockMetadata(i2, i3, i4); ++ TileEntity tileEntity6 = world1.getBlockTileEntity(i2, i3, i4); ++ if (z0) { ++ world1.setBlockWithNotify(i2, i3, i4, Block.blasterActive.blockID); ++ } else { ++ world1.setBlockWithNotify(i2, i3, i4, Block.blasterIdle.blockID); ++ } ++ ++ world1.setBlockMetadataWithNotify(i2, i3, i4, i5); ++ world1.setBlockTileEntity(i2, i3, i4, tileEntity6); ++ } ++} diff --git a/patches_merged/io/github/bluestaggo/mcdiverge/BlockRefabricator.java.patch b/patches_merged/io/github/bluestaggo/mcdiverge/BlockRefabricator.java.patch new file mode 100644 index 0000000..a611b03 --- /dev/null +++ b/patches_merged/io/github/bluestaggo/mcdiverge/BlockRefabricator.java.patch @@ -0,0 +1,27 @@ +--- /dev/null ++++ b/io/github/bluestaggo/mcdiverge/BlockRefabricator.java +@@ -1,0 +1,24 @@ ++package io.github.bluestaggo.mcdiverge; ++ ++import net.minecraft.src.*; ++ ++public class BlockRefabricator extends BlockContainer { ++ public BlockRefabricator(int id) { ++ super(id, Material.iron); ++ this.blockIndexInTexture = textureXY(8, 1); ++ } ++ ++ public int getBlockTextureFromSide(int side) { ++ return side == 1 ? textureXY(15, 6) : side == 0 ? textureXY(8, 3) : textureXY(14, 6); ++ } ++ ++ public boolean blockActivated(World worldObj, int x, int y, int z, EntityPlayer entityPlayer) { ++ TileEntityRefabricator tileEntityRefabricator = (TileEntityRefabricator)worldObj.getBlockTileEntity(x, y, z); ++ entityPlayer.displayGUIRefabricator(tileEntityRefabricator); ++ return true; ++ } ++ ++ protected TileEntity getBlockEntity() { ++ return new TileEntityRefabricator(); ++ } ++} diff --git a/patches_merged/io/github/bluestaggo/mcdiverge/BlockSpeleothem.java.patch b/patches_merged/io/github/bluestaggo/mcdiverge/BlockSpeleothem.java.patch new file mode 100644 index 0000000..6e3b2b3 --- /dev/null +++ b/patches_merged/io/github/bluestaggo/mcdiverge/BlockSpeleothem.java.patch @@ -0,0 +1,93 @@ +--- /dev/null ++++ b/io/github/bluestaggo/mcdiverge/BlockSpeleothem.java +@@ -1,0 +1,90 @@ ++package io.github.bluestaggo.mcdiverge; ++ ++import net.minecraft.src.Block; ++import net.minecraft.src.BlockOre; ++import net.minecraft.src.Material; ++import net.minecraft.src.World; ++ ++public class BlockSpeleothem extends Block { ++ public BlockSpeleothem(int i1, int i2) { ++ super(i1, i2, Material.rock); ++ } ++ ++ public boolean canPlaceBlockAt(World world1, int i2, int i3, int i4) { ++ return world1.isBlockNormalCube(i2, i3 - 1, i4) ++ || (world1.isBlockNormalCube(i2, i3 - 2, i4) && world1.getBlockId(i2, i3 - 1, i4) == this.blockID) ++ || world1.isBlockNormalCube(i2, i3 + 1, i4) ++ || (world1.isBlockNormalCube(i2, i3 + 2, i4) && world1.getBlockId(i2, i3 + 1, i4) == this.blockID); ++ } ++ ++ public int getBlockTextureFromSideAndMetadata(int i1, int i2) { ++ return this.blockIndexInTexture + (i2 & 3) * 16 + (i2 & 4) / 4; ++ } ++ ++ public void onNeighborBlockChange(World world1, int i2, int i3, int i4, int i5) { ++ if (!canPlaceBlockAt(world1, i2, i3, i4)) { ++ this.dropBlockAsItem(world1, i2, i3, i4, i5); ++ world1.setBlockWithNotify(i2, i3, i4, 0); ++ } else { ++ updateMetadata(world1, i2, i3, i4); ++ } ++ } ++ ++ public void onBlockAdded(World world1, int i2, int i3, int i4) { ++ updateMetadata(world1, i2, i3, i4); ++ } ++ ++ private static boolean isSlate(World world1, int i2, int i3, int i4) { ++ return (world1.getBlockId(i2, i3, i4) == Block.stone.blockID ++ && world1.getBlockMetadata(i2, i3, i4) == 2) ++ || (Block.blocksList[world1.getBlockId(i2, i3, i4)] instanceof BlockOre ++ && world1.getBlockMetadata(i2, i3, i4) == 1); ++ } ++ ++ private void updateMetadata(World world1, int i2, int i3, int i4) { ++ int metadata; ++ if (world1.isBlockNormalCube(i2, i3 - 1, i4)) { ++ if (world1.getBlockId(i2, i3 + 1, i4) == this.blockID) { ++ metadata = 1; ++ } else { ++ metadata = 0; ++ } ++ if (isSlate(world1, i2, i3 - 1, i4)) { ++ metadata += 4; ++ } ++ } else if (world1.isBlockNormalCube(i2, i3 + 1, i4)) { ++ if (world1.getBlockId(i2, i3 - 1, i4) == this.blockID) { ++ metadata = 2; ++ } else { ++ metadata = 3; ++ } ++ if (isSlate(world1, i2, i3 + 1, i4)) { ++ metadata += 4; ++ } ++ } else if (world1.getBlockId(i2, i3 + 1, i4) == this.blockID) { ++ metadata = 3; ++ if (isSlate(world1, i2, i3 + 2, i4)) { ++ metadata += 4; ++ } ++ } else { ++ metadata = 0; ++ if (isSlate(world1, i2, i3 - 2, i4)) { ++ metadata += 4; ++ } ++ } ++ ++ world1.setBlockMetadataWithNotify(i2, i3, i4, metadata); ++ } ++ ++ public boolean isOpaqueCube() { ++ return false; ++ } ++ ++ public boolean renderAsNormalBlock() { ++ return false; ++ } ++ ++ public int getRenderType() { ++ return 1; ++ } ++} diff --git a/patches_merged/io/github/bluestaggo/mcdiverge/CreateWorldInfo.java.patch b/patches_merged/io/github/bluestaggo/mcdiverge/CreateWorldInfo.java.patch new file mode 100644 index 0000000..8831f6d --- /dev/null +++ b/patches_merged/io/github/bluestaggo/mcdiverge/CreateWorldInfo.java.patch @@ -0,0 +1,31 @@ +--- /dev/null ++++ b/io/github/bluestaggo/mcdiverge/CreateWorldInfo.java +@@ -1,0 +1,28 @@ ++package io.github.bluestaggo.mcdiverge; ++ ++public class CreateWorldInfo { ++ public String name; ++ public long seed; ++ public boolean snowy; ++ public boolean creative; ++ ++ public CreateWorldInfo withName(String name) { ++ this.name = name; ++ return this; ++ } ++ ++ public CreateWorldInfo withSeed(long seed) { ++ this.seed = seed; ++ return this; ++ } ++ ++ public CreateWorldInfo withSnow(boolean snowy) { ++ this.snowy = snowy; ++ return this; ++ } ++ ++ public CreateWorldInfo withCreative(boolean creative) { ++ this.creative = creative; ++ return this; ++ } ++} diff --git a/patches_merged/io/github/bluestaggo/mcdiverge/FurnaceRecipe.java.patch b/patches_merged/io/github/bluestaggo/mcdiverge/FurnaceRecipe.java.patch new file mode 100644 index 0000000..3b9954b --- /dev/null +++ b/patches_merged/io/github/bluestaggo/mcdiverge/FurnaceRecipe.java.patch @@ -0,0 +1,29 @@ +--- /dev/null ++++ b/io/github/bluestaggo/mcdiverge/FurnaceRecipe.java +@@ -1,0 +1,26 @@ ++package io.github.bluestaggo.mcdiverge; ++ ++import net.minecraft.src.ItemStack; ++ ++public class FurnaceRecipe { ++ private final ItemStack input, output; ++ ++ public FurnaceRecipe(ItemStack input, ItemStack output) { ++ this.input = input; ++ this.output = output; ++ } ++ ++ public ItemStack getInput() { ++ return input; ++ } ++ ++ public ItemStack getOutput(ItemStack input) { ++ return output.itemMetadata == -1 ? output.copy().withMetadata(input.itemMetadata) : output; ++ } ++ ++ public boolean canSmelt(ItemStack input) { ++ return this.input.itemID == input.itemID ++ && (this.input.itemMetadata < 0 ++ || this.input.itemMetadata == input.itemMetadata); ++ } ++} diff --git a/patches_merged/io/github/bluestaggo/mcdiverge/FurnaceRecipeManager.java.patch b/patches_merged/io/github/bluestaggo/mcdiverge/FurnaceRecipeManager.java.patch new file mode 100644 index 0000000..0d9c5e4 --- /dev/null +++ b/patches_merged/io/github/bluestaggo/mcdiverge/FurnaceRecipeManager.java.patch @@ -0,0 +1,70 @@ +--- /dev/null ++++ b/io/github/bluestaggo/mcdiverge/FurnaceRecipeManager.java +@@ -1,0 +1,67 @@ ++package io.github.bluestaggo.mcdiverge; ++ ++import net.minecraft.src.Block; ++import net.minecraft.src.Item; ++import net.minecraft.src.ItemStack; ++ ++import java.util.ArrayList; ++import java.util.List; ++ ++public class FurnaceRecipeManager { ++ private static final FurnaceRecipeManager instance = new FurnaceRecipeManager(); ++ private List recipes = new ArrayList<>(); ++ ++ public static final FurnaceRecipeManager getInstance() { ++ return instance; ++ } ++ ++ private FurnaceRecipeManager() { ++ addRecipe(Block.oreCoal.blockID, Item.coal.shiftedIndex, -1, 0); ++ addRecipe(Block.oreIron.blockID, Item.ingotIron.shiftedIndex, -1, 0); ++ addRecipe(Block.oreGold.blockID, Item.ingotGold.shiftedIndex, -1, 0); ++ addRecipe(Block.oreDiamond.blockID, Item.diamond.shiftedIndex, -1, 0); ++ addRecipe(Block.oreRuby.blockID, Item.ruby.shiftedIndex, -1, 0); ++ addRecipe(Block.oreSapphire.blockID, Item.sapphire.shiftedIndex, -1, 0); ++ addRecipe(Block.sand.blockID, Block.glass.blockID, 0, 0); ++ addRecipe(Item.porkRaw.shiftedIndex, Item.porkCooked.shiftedIndex, 0, 0); ++ addRecipe(Item.beefRaw.shiftedIndex, Item.beefCooked.shiftedIndex, 0, 0); ++ addRecipe(Item.chickenRaw.shiftedIndex, Item.chickenCooked.shiftedIndex, 0, 0); ++ addRecipe(Item.muttonRaw.shiftedIndex, Item.muttonCooked.shiftedIndex, 0, 0); ++ addRecipe(Block.cobblestone.blockID, Block.stone.blockID, -1, -1); ++ addRecipe(Item.clay.shiftedIndex, Item.brick.shiftedIndex, 0, 0); ++ addRecipe(Item.starChunk.shiftedIndex, Item.starDust.shiftedIndex, 0, 0); ++ } ++ ++ private void addRecipe(int input, int output, int inputMeta, int outputMeta) { ++ recipes.add(new FurnaceRecipe(new ItemStack(input, 1).withMetadata(inputMeta), ++ new ItemStack(output, 1).withMetadata(outputMeta))); ++ } ++ ++ public ItemStack findMatchingRecipe(ItemStack input) { ++ for (FurnaceRecipe recipe : recipes) { ++ if (recipe.canSmelt(input)) { ++ return recipe.getOutput(input); ++ } ++ } ++ return null; ++ } ++ ++ public int count() { ++ return this.recipes.size(); ++ } ++ ++ public ItemStack[] getRecipeAsItems(int i) { ++ ItemStack in = this.recipes.get(i).getInput(); ++ ItemStack out = this.recipes.get(i).getOutput(in); ++ if (in.itemMetadata == -1) { ++ in.itemMetadata = 0; ++ } ++ if (out.itemMetadata == -1) { ++ out.itemMetadata = 0; ++ } ++ ++ return new ItemStack[] { in, new ItemStack(Block.stoneOvenIdle), ++ null, null, null, null, null, null, null, ++ out }; ++ } ++} diff --git a/patches_merged/io/github/bluestaggo/mcdiverge/GuiCreative.java.patch b/patches_merged/io/github/bluestaggo/mcdiverge/GuiCreative.java.patch new file mode 100644 index 0000000..7b32cda --- /dev/null +++ b/patches_merged/io/github/bluestaggo/mcdiverge/GuiCreative.java.patch @@ -0,0 +1,135 @@ +--- /dev/null ++++ b/io/github/bluestaggo/mcdiverge/GuiCreative.java +@@ -1,0 +1,132 @@ ++package io.github.bluestaggo.mcdiverge; ++ ++import org.lwjgl.opengl.GL11; ++ ++import net.minecraft.src.GuiButton; ++import net.minecraft.src.GuiContainer; ++import net.minecraft.src.InventoryPlayer; ++import net.minecraft.src.SlotInventory; ++import net.minecraft.client.Minecraft; ++ ++import java.util.List; ++import java.util.stream.Collectors; ++ ++public class GuiCreative extends GuiContainer { ++ private InventoryReadonly inventory; ++ private final InventoryPlayer inventoryPlayer; ++ private int row = 0; ++ private final Minecraft mc; ++ ++ public GuiCreative(InventoryPlayer inventoryPlayer, Minecraft minecraft) { ++ this.xSize = 196; ++ this.ySize = 190; ++ this.inventoryPlayer = inventoryPlayer; ++ this.mc = minecraft; ++ } ++ ++ public void initGui() { ++ this.controlList.clear(); ++ this.setupItems(); ++ this.setupControls(); ++ ++ if (this.mc.options.creativeDebug) { ++ this.controlList.add(new GuiButton(100, this.width - 150, this.height - 20, 150, 20, ++ (this.mc.creativeDebugEnabled ? "Disable " : "Enable ") + "Debug ;)")); ++ } ++ } ++ ++ protected void drawGuiContainerBackgroundLayer(float f1) { ++ int bg = this.mc.renderEngine.getTexture("/gui/creative.png"); ++ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); ++ this.mc.renderEngine.bindTexture(bg); ++ int posX = (this.width - this.xSize) / 2; ++ int posY = (this.height - this.ySize) / 2; ++ this.drawTexturedModalRect(posX, posY, 0, 0, this.xSize, this.ySize); ++ } ++ ++ protected void drawGuiContainerForegroundLayer() { ++ this.fontRenderer.drawString(this.mc.creativeDebugEnabled ? "Cheat Menu" : "Creative Inventory", 17, 6, 0x404040); ++ } ++ ++ private void setupItems() { ++// this.inventory = this.mc.creativeDebugEnabled ++// ? InventoryReadonly.generateCreativeInventory(true) ++// : InventoryReadonly.getCreativeInventory(); ++ this.inventory = InventoryReadonly.generateCreativeInventory(this.mc.creativeDebugEnabled); ++ this.inventory.pickOne = this.mc.thePlayer.creative; ++ ++ this.inventorySlots.clear(); ++ for (int i = this.row * 8; i < 64 + this.row * 8; i++) { ++ this.inventorySlots.add(new SlotInventory(this, this.inventory, i, ((i - this.row * 8) % 8) * 18 + 17, ++ ((i - this.row * 8) / 8) * 18 + 18)); ++ } ++ for (int i = 0; i < 9; i++) { ++ this.inventorySlots.add(i, new SlotInventory(this, this.inventoryPlayer, i, (i % 9) * 18 + 8, 166)); ++ } ++ } ++ ++ private void setupControls() { ++ int posX = (this.width - this.xSize) / 2 + 178; ++ int posY = (this.height - this.ySize) / 2 + 17; ++ ++ this.controlList.add(new GuiButton(0, posX, posY, 18, 18, "^5")); ++ this.controlList.add(new GuiButton(1, posX, posY + 18, 18, 18, "^1")); ++ this.controlList.add(new GuiButton(2, posX, posY + 36, 18, 18, "v1")); ++ this.controlList.add(new GuiButton(3, posX, posY + 54, 18, 18, "v5")); ++ ++ if (this.mc.creativeDebugEnabled) { ++ this.controlList.add(new GuiButton(4, posX, posY + 81, 18, 18, "FB")); ++ this.controlList.add(new GuiButton(5, posX, posY + 99, 18, 18, "NC")); ++ this.controlList.add(new GuiButton(6, posX + 20, posY + 81, 64, 18, "Day")); ++ this.controlList.add(new GuiButton(7, posX + 20, posY + 99, 64, 18, "Night")); ++ } ++ } ++ ++ protected void actionPerformed(GuiButton guiButton1) { ++ switch (guiButton1.id) { ++ case 0: ++ this.row = Math.max(this.row - 5, 0); ++ break; ++ ++ case 1: ++ this.row = Math.max(this.row - 1, 0); ++ break; ++ ++ case 2: ++ this.row += 1; ++ break; ++ ++ case 3: ++ this.row += 5; ++ break; ++ ++ case 4: ++ this.mc.renderGlobal.toggleFullbright(); ++ break; ++ ++ case 5: ++ this.mc.thePlayer.noClip = !this.mc.thePlayer.noClip; ++ break; ++ ++ case 6: ++ this.mc.theWorld.worldTime = 1000; ++ break; ++ ++ case 7: ++ this.mc.theWorld.worldTime = 14000; ++ break; ++ ++ case 100: ++ this.mc.creativeDebugEnabled = !this.mc.creativeDebugEnabled; ++ ++ this.controlList.clear(); ++ this.controlList.add(guiButton1); ++ guiButton1.displayString = (this.mc.creativeDebugEnabled ? "Disable " : "Enable ") + "Debug ;)"; ++ ++ this.setupItems(); ++ this.setupControls(); ++ break; ++ } ++ setupItems(); ++ } ++} diff --git a/patches_merged/io/github/bluestaggo/mcdiverge/GuiCredits.java.patch b/patches_merged/io/github/bluestaggo/mcdiverge/GuiCredits.java.patch new file mode 100644 index 0000000..ed138c1 --- /dev/null +++ b/patches_merged/io/github/bluestaggo/mcdiverge/GuiCredits.java.patch @@ -0,0 +1,51 @@ +--- /dev/null ++++ b/io/github/bluestaggo/mcdiverge/GuiCredits.java +@@ -1,0 +1,48 @@ ++package io.github.bluestaggo.mcdiverge; ++ ++import net.minecraft.src.*; ++ ++import java.io.BufferedReader; ++import java.io.IOException; ++import java.io.InputStreamReader; ++import java.util.ArrayList; ++import java.util.List; ++ ++public class GuiCredits extends GuiScreen { ++ private final GuiScreen parent; ++ private List lines = new ArrayList<>(); ++ ++ public GuiCredits(GuiScreen parent) { ++ this.parent = parent; ++ ++ try { ++ BufferedReader bufferedReader2 = new BufferedReader(new InputStreamReader(GuiCredits.class.getResourceAsStream("/credits.txt"))); ++ String string3; ++ ++ while((string3 = bufferedReader2.readLine()) != null) { ++ string3 = string3.trim(); ++ if(string3.length() > 0) { ++ this.lines.add(string3); ++ } ++ } ++ } catch (IOException e) { ++ this.lines.add("Failed to get credits"); ++ } ++ } ++ ++ public void initGui() { ++ this.controlList.add(new GuiButton(1, this.width / 2 - 50, this.height - 30, 100, 20, "Exit")); ++ } ++ ++ protected void actionPerformed(GuiButton button) { ++ this.mc.displayGuiScreen(this.parent); ++ } ++ ++ public void drawScreen(int mouseX, int mouseY, float renderPartialTick) { ++ this.drawDefaultBackground(); ++ for (int i = 0; i < lines.size(); i++) { ++ this.drawCenteredString(this.fontRenderer, lines.get(i), this.width / 2, 10 + i * 10, 0xFF7F7F7F); ++ } ++ super.drawScreen(mouseX, mouseY, renderPartialTick); ++ } ++} diff --git a/patches_merged/io/github/bluestaggo/mcdiverge/GuiRecipeGuide.java.patch b/patches_merged/io/github/bluestaggo/mcdiverge/GuiRecipeGuide.java.patch new file mode 100644 index 0000000..d5c1505 --- /dev/null +++ b/patches_merged/io/github/bluestaggo/mcdiverge/GuiRecipeGuide.java.patch @@ -0,0 +1,137 @@ +--- /dev/null ++++ b/io/github/bluestaggo/mcdiverge/GuiRecipeGuide.java +@@ -1,0 +1,134 @@ ++package io.github.bluestaggo.mcdiverge; ++ ++import java.util.ArrayList; ++import java.util.Arrays; ++import java.util.List; ++import java.util.Objects; ++import java.util.stream.Stream; ++ ++import org.lwjgl.opengl.GL11; ++ ++import net.minecraft.src.*; ++ ++public class GuiRecipeGuide extends GuiContainer { ++ private final List recipes = new ArrayList<>(); ++ private int currentRecipe = 0; ++ private final ItemStack filterItem; ++ private final String filterItemName; ++ ++ public GuiRecipeGuide() { ++ this(null); ++ } ++ ++ public GuiRecipeGuide(ItemStack filterItem) { ++ this.xSize = 176; ++ this.ySize = 90; ++ this.filterItem = filterItem; ++ ++ String name = "Crafting"; ++ if (filterItem != null) { ++ ItemTooltip tooltip = this.filterItem.getTooltip(); ++ if (tooltip != null) { ++ name = tooltip.lines.get(0); ++ } ++ } ++ filterItemName = name; ++ ++ this.setupRecipes(); ++ this.setupCurrentRecipe(); ++ } ++ ++ private void setupRecipes() { ++ this.recipes.clear(); ++ int r; ++ for (r = 0; r < CraftingManager.getInstance().count(); r++) { ++ ItemStack[] recipe = CraftingManager.getInstance().getRecipeAsItems(r); ++ if (showRecipe(recipe)) { ++ recipes.add(recipe); ++ } ++ } ++ for (r = 0; r < FurnaceRecipeManager.getInstance().count(); r++) { ++ ItemStack[] recipe = FurnaceRecipeManager.getInstance().getRecipeAsItems(r); ++ if (showRecipe(recipe)) { ++ recipes.add(recipe); ++ } ++ } ++ } ++ ++ private boolean showRecipe(ItemStack[] recipe) { ++ Stream filterStream = Arrays.stream(recipe).filter(Objects::nonNull); ++ return filterItem == null ++ || filterItem.itemID == 0 ++ || filterStream.anyMatch(i -> ++ i.itemID == filterItem.itemID ++ && (i.itemMetadata == -1 ++ || i.itemMetadata == filterItem.itemMetadata)); ++ } ++ ++ protected void drawGuiContainerBackgroundLayer(float f1) { ++ int bg = this.mc.renderEngine.getTexture("/gui/guide.png"); ++ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); ++ this.mc.renderEngine.bindTexture(bg); ++ int posX = (this.width - this.xSize) / 2; ++ int posY = (this.height - this.ySize) / 2; ++ this.drawTexturedModalRect(posX, posY, 0, 0, this.xSize, this.ySize); ++ } ++ ++ public void initGui() { ++ int posX = (this.width - this.xSize) / 2; ++ int posY = (this.height - this.ySize) / 2; ++ this.controlList.clear(); ++ this.controlList.add(new GuiButton(0, 5 + posX, 67 + posY, 18, 18, "<")); ++ this.controlList.add(new GuiButton(1, 153 + posX, 67 + posY, 18, 18, ">")); ++ } ++ ++ private void setupCurrentRecipe() { ++ this.inventorySlots.clear(); ++ if (this.recipes.size() == 0) { ++ return; ++ } ++ ItemStack[] items = recipes.get(this.currentRecipe); ++ InventoryReadonly inventory = new InventoryReadonly(items); ++ for (int i = 0; i < 9; i++) { ++ this.inventorySlots.add(new SlotInventory(this, inventory, i, 30 + (i % 3) * 18, 17 + (i / 3) * 18)); ++ } ++ this.inventorySlots.add(new SlotInventory(this, inventory, 9, 124, 35)); ++ } ++ ++ protected void drawGuiContainerForegroundLayer() { ++ if (this.recipes.size() > 0) { ++ String title = (this.currentRecipe + 1) + ++ " / " + ++ this.recipes.size() + ++ " " + ++ this.filterItemName + ++ " recipes"; ++ ++ this.drawString(this.fontRenderer, title, 5, 5, 0xFFFFFF); ++ } else { ++ this.drawString(this.fontRenderer, "No recipes", 5, 5, 0xFFFFFF); ++ this.drawString(this.fontRenderer, "Discover more items!", 29, 76, 0xFFFFFF); ++ } ++ } ++ ++ protected void actionPerformed(GuiButton guiButton1) { ++ switch (guiButton1.id) { ++ case 0: ++ if (this.currentRecipe > 0) { ++ this.currentRecipe--; ++ } else { ++ this.currentRecipe = this.recipes.size() - 1; ++ } ++ break; ++ ++ case 1: ++ if (this.currentRecipe < this.recipes.size() - 1) { ++ this.currentRecipe++; ++ } else { ++ this.currentRecipe = 0; ++ } ++ break; ++ } ++ this.setupCurrentRecipe(); ++ } ++} diff --git a/patches_merged/io/github/bluestaggo/mcdiverge/GuiRefabricator.java.patch b/patches_merged/io/github/bluestaggo/mcdiverge/GuiRefabricator.java.patch new file mode 100644 index 0000000..c4517c3 --- /dev/null +++ b/patches_merged/io/github/bluestaggo/mcdiverge/GuiRefabricator.java.patch @@ -0,0 +1,46 @@ +--- /dev/null ++++ b/io/github/bluestaggo/mcdiverge/GuiRefabricator.java +@@ -1,0 +1,43 @@ ++package io.github.bluestaggo.mcdiverge; ++ ++import net.minecraft.src.*; ++import org.lwjgl.opengl.GL11; ++ ++public class GuiRefabricator extends GuiContainer { ++ private TileEntityRefabricator refabricator; ++ ++ public GuiRefabricator(InventoryPlayer inventoryPlayer1, TileEntityRefabricator tileEntityRefabricator) { ++ this.refabricator = tileEntityRefabricator; ++ this.inventorySlots.add(new SlotInventory(this, tileEntityRefabricator, 0, 80, 35)); ++ this.inventorySlots.add(new SlotInventory(this, tileEntityRefabricator, 1, 107, 58)); ++ ++ int i3; ++ for(i3 = 0; i3 < 3; ++i3) { ++ for(int i4 = 0; i4 < 9; ++i4) { ++ this.inventorySlots.add(new SlotInventory(this, inventoryPlayer1, i4 + (i3 + 1) * 9, 8 + i4 * 18, 84 + i3 * 18)); ++ } ++ } ++ ++ for(i3 = 0; i3 < 9; ++i3) { ++ this.inventorySlots.add(new SlotInventory(this, inventoryPlayer1, i3, 8 + i3 * 18, 142)); ++ } ++ ++ } ++ ++ protected void drawGuiContainerForegroundLayer() { ++ this.fontRenderer.drawString("Refabricator", 60, 6, 4210752); ++ this.fontRenderer.drawString("Inventory", 8, this.ySize - 96 + 2, 4210752); ++ } ++ ++ protected void drawGuiContainerBackgroundLayer(float renderPartialTick) { ++ int bg = this.mc.renderEngine.getTexture("/gui/refabricator.png"); ++ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); ++ this.mc.renderEngine.bindTexture(bg); ++ int posX = (this.width - this.xSize) / 2; ++ int posY = (this.height - this.ySize) / 2; ++ this.drawTexturedModalRect(posX, posY, 0, 0, this.xSize, this.ySize); ++ ++ int i5 = this.refabricator.getProgressScaled(48); ++ this.drawTexturedModalRect(posX + 55, posY + 26 + (48 - i5), 176, 48 - i5, 16, i5); ++ } ++} diff --git a/patches_merged/io/github/bluestaggo/mcdiverge/InventoryReadonly.java.patch b/patches_merged/io/github/bluestaggo/mcdiverge/InventoryReadonly.java.patch new file mode 100644 index 0000000..970be32 --- /dev/null +++ b/patches_merged/io/github/bluestaggo/mcdiverge/InventoryReadonly.java.patch @@ -0,0 +1,131 @@ +--- /dev/null ++++ b/io/github/bluestaggo/mcdiverge/InventoryReadonly.java +@@ -1,0 +1,128 @@ ++package io.github.bluestaggo.mcdiverge; ++ ++import java.io.BufferedReader; ++import java.io.InputStreamReader; ++import java.util.ArrayList; ++import java.util.Arrays; ++import java.util.List; ++ ++import net.minecraft.src.*; ++import org.lwjgl.input.Keyboard; ++ ++public class InventoryReadonly implements IInventory { ++ private final ItemStack[] items; ++ private final boolean pickable; ++ public boolean pickOne; ++ ++ public InventoryReadonly(ItemStack[] items) { ++ this(items, false); ++ } ++ ++ public InventoryReadonly(ItemStack[] items, boolean pickable) { ++ this.items = items; ++ this.pickable = pickable; ++ } ++ ++ public static InventoryReadonly generateCreativeInventory(boolean debug) { ++ List items = new ArrayList<>(); ++ for (int i = 0; i < Item.itemsList.length; i++) { ++ if (i < 256) { ++ if (Block.blocksList[i] == null) { ++ continue; ++ } ++ for (int m : Block.blocksList[i].availableMetadata()) { ++ ItemStack stack = new ItemStack(i, 1).withMetadata(m); ++ if (stack.getItem() != null && (debug || !stack.getTooltip().gradient.equals(ItemTooltip.INVALID_GRAD))) { ++ items.add(stack); ++ } ++ } ++ } else { ++ ItemStack stack = new ItemStack(i, 1); ++ if (stack.getItem() != null && (debug || !stack.getTooltip().gradient.equals(ItemTooltip.INVALID_GRAD))) { ++ items.add(stack); ++ } ++ } ++ } ++ ItemStack[] itemArray = new ItemStack[items.size()]; ++ items.toArray(itemArray); ++ return new InventoryReadonly(itemArray, true); ++ } ++ ++ public static InventoryReadonly getCreativeInventory() { ++ try { ++ List ids = new ArrayList<>(); ++ BufferedReader reader = new BufferedReader( ++ new InputStreamReader( ++ InventoryReadonly.class.getResourceAsStream("/gui/creative_items.txt"))); ++ ++ String line; ++ while ((line = reader.readLine()) != null) { ++ if (!line.startsWith("--")) { ++ ids.addAll(Arrays.asList(line.trim().split(" +"))); ++ } ++ } ++ ++ List items = new ArrayList<>(); ++ for (String id : ids) { ++ String[] idSplit = id.split("#"); ++ if (idSplit.length < 2) { ++ items.add(null); ++ continue; ++ } ++ ++ int itemID = Integer.parseInt(idSplit[0], 10); ++ int itemMetadata = Integer.parseInt(idSplit[1], 16); ++ ++ if (itemID <= 0 || itemMetadata < 0) { ++ items.add(null); ++ continue; ++ } ++ ++ ItemStack item = new ItemStack(itemID, 1).withMetadata(itemMetadata); ++ items.add(item); ++ } ++ ++ ItemStack[] itemArray = new ItemStack[items.size()]; ++ items.toArray(itemArray); ++ ++ return new InventoryReadonly(itemArray, true); ++ } catch (Exception e) { ++ System.out.println("Could not get creative inventory!"); ++ e.printStackTrace(); ++ System.out.println("Generating creative inventory instead..."); ++ return generateCreativeInventory(false); ++ } ++ } ++ ++ public int getSizeInventory() { ++ return items.length; ++ } ++ ++ public ItemStack getStackInSlot(int i1) { ++ return i1 < items.length ++ ? items[i1] == null ++ ? null ++ : items[i1].copy() ++ : null; ++ } ++ ++ public ItemStack decrStackSize(int i1, int i2) { ++ return this.pickable ? new ItemStack(items[i1].itemID, ++ this.pickOne && !Keyboard.isKeyDown(Keyboard.KEY_LSHIFT) ? 1 : items[i1].getMaxStackSize(), ++ items[i1].itemDmg).withMetadata(items[i1].itemMetadata) : null; ++ } ++ ++ public void setInventorySlotContents(int i1, ItemStack itemStack2) { ++ } ++ ++ public String getInvName() { ++ return "Readonly Inventory"; ++ } ++ ++ public int getInventoryStackLimit() { ++ return 64; ++ } ++ ++ public void onInventoryChanged() { ++ } ++} diff --git a/patches_merged/io/github/bluestaggo/mcdiverge/ItemCharm.java.patch b/patches_merged/io/github/bluestaggo/mcdiverge/ItemCharm.java.patch new file mode 100644 index 0000000..75a8fdc --- /dev/null +++ b/patches_merged/io/github/bluestaggo/mcdiverge/ItemCharm.java.patch @@ -0,0 +1,34 @@ +--- /dev/null ++++ b/io/github/bluestaggo/mcdiverge/ItemCharm.java +@@ -1,0 +1,31 @@ ++package io.github.bluestaggo.mcdiverge; ++ ++import net.minecraft.src.EntityPlayer; ++import net.minecraft.src.ItemEquipable; ++import net.minecraft.src.ItemStack; ++ ++public class ItemCharm extends ItemEquipable { ++ public final String textureName; ++ ++ public ItemCharm(int id) { ++ super(id, 4); ++ this.textureName = null; ++ } ++ ++ public ItemCharm(int id, String renderName) { ++ super(id, 4); ++ this.textureName = renderName; ++ } ++ ++ public ItemCharm(int id, int durability) { ++ super(id, 4, durability); ++ this.textureName = null; ++ } ++ ++ public ItemCharm(int id, int durability, String renderName) { ++ super(id, 4, durability); ++ this.textureName = renderName; ++ } ++ ++ public void updateCharm(EntityPlayer player, ItemStack stack) {} ++} diff --git a/patches_merged/io/github/bluestaggo/mcdiverge/ItemMagic.java.patch b/patches_merged/io/github/bluestaggo/mcdiverge/ItemMagic.java.patch new file mode 100644 index 0000000..e55dfdc --- /dev/null +++ b/patches_merged/io/github/bluestaggo/mcdiverge/ItemMagic.java.patch @@ -0,0 +1,33 @@ +--- /dev/null ++++ b/io/github/bluestaggo/mcdiverge/ItemMagic.java +@@ -1,0 +1,30 @@ ++package io.github.bluestaggo.mcdiverge; ++ ++import net.minecraft.src.EntityPlayer; ++import net.minecraft.src.Item; ++import net.minecraft.src.ItemStack; ++import net.minecraft.src.World; ++ ++public class ItemMagic extends Item { ++ public float useMana; ++ ++ public ItemMagic(int i1, float f2) { ++ super(i1); ++ this.useMana = f2; ++ } ++ ++ public ItemStack onMagicItemRightClick(ItemStack itemStack1, World world2, EntityPlayer entityPlayer3) { ++ return itemStack1; ++ } ++ ++ public ItemStack onItemRightClick(ItemStack itemStack1, World world2, EntityPlayer entityPlayer3) { ++ if (entityPlayer3.useMana(this.useMana)) { ++ return this.onMagicItemRightClick(itemStack1, world2, entityPlayer3); ++ } ++ return itemStack1; ++ } ++ ++ public boolean isMagic() { ++ return true; ++ } ++} diff --git a/patches_merged/io/github/bluestaggo/mcdiverge/ItemQuiver.java.patch b/patches_merged/io/github/bluestaggo/mcdiverge/ItemQuiver.java.patch new file mode 100644 index 0000000..0f41cd5 --- /dev/null +++ b/patches_merged/io/github/bluestaggo/mcdiverge/ItemQuiver.java.patch @@ -0,0 +1,42 @@ +--- /dev/null ++++ b/io/github/bluestaggo/mcdiverge/ItemQuiver.java +@@ -1,0 +1,39 @@ ++package io.github.bluestaggo.mcdiverge; ++ ++import net.minecraft.src.*; ++ ++public class ItemQuiver extends ItemCharm { ++ public ItemQuiver(int i1) { ++ super(i1, 256, "quiver"); ++ this.startingDamage = this.maxDamage; ++ } ++ ++ public ItemStack onItemRightClick(ItemStack itemStack1, World world2, EntityPlayer entityPlayer3) { ++ InventoryPlayer inventory = entityPlayer3.inventory; ++ ++ for (int i = 0; i < inventory.getSizeInventory(); ++i) { ++ ItemStack stack = inventory.getStackInSlot(i); ++ if (stack != null && stack.itemID == Item.arrow.shiftedIndex) { ++ while (itemStack1.itemDmg > 0 && entityPlayer3.inventory.consumeInventoryItem(Item.arrow.shiftedIndex)) { ++ itemStack1.itemDmg--; ++ } ++ entityPlayer3.swingItem(); ++ return itemStack1; ++ } ++ } ++ ++ if (itemStack1.itemDmg < this.maxDamage) { ++ for (int i = this.maxDamage - itemStack1.itemDmg; i > 0; i -= 16) { ++ entityPlayer3.dropPlayerItem(new ItemStack(Item.arrow, Math.min(i, 16))); ++ } ++ itemStack1.itemDmg = this.maxDamage; ++ entityPlayer3.swingItem(); ++ } ++ ++ return itemStack1; ++ } ++ ++ public boolean allowRepair() { ++ return false; ++ } ++} diff --git a/patches_merged/io/github/bluestaggo/mcdiverge/ItemRepairKit.java.patch b/patches_merged/io/github/bluestaggo/mcdiverge/ItemRepairKit.java.patch new file mode 100644 index 0000000..2142337 --- /dev/null +++ b/patches_merged/io/github/bluestaggo/mcdiverge/ItemRepairKit.java.patch @@ -0,0 +1,34 @@ +--- /dev/null ++++ b/io/github/bluestaggo/mcdiverge/ItemRepairKit.java +@@ -1,0 +1,31 @@ ++package io.github.bluestaggo.mcdiverge; ++ ++import net.minecraft.src.*; ++ ++public class ItemRepairKit extends ItemCharm { ++ public ItemRepairKit(int id) { ++ super(id, 1024); ++ } ++ ++ public void updateCharm(EntityPlayer player, ItemStack stack) { ++ if (player.isSneaking()) { ++ ItemStack heldItem = player.inventory.getCurrentItem(); ++ if (rand.nextInt(2) != 0 ++ || heldItem == null ++ || heldItem.itemDmg == 0 ++ || !Item.itemsList[heldItem.itemID].allowRepair()) { ++ return; ++ } ++ --heldItem.itemDmg; ++ stack.damageItem(1); ++ player.playSound("random.wood click", 1.0F, 1.0F); ++ } ++ } ++ ++ public Object[] getDynamicTooltip() { ++ return new Object[] { ++ this.maxDamage + " max durability", ++ ItemTooltip.INFO_COL ++ }; ++ } ++} diff --git a/patches_merged/io/github/bluestaggo/mcdiverge/ItemSlimeShoes.java.patch b/patches_merged/io/github/bluestaggo/mcdiverge/ItemSlimeShoes.java.patch new file mode 100644 index 0000000..34d414e --- /dev/null +++ b/patches_merged/io/github/bluestaggo/mcdiverge/ItemSlimeShoes.java.patch @@ -0,0 +1,17 @@ +--- /dev/null ++++ b/io/github/bluestaggo/mcdiverge/ItemSlimeShoes.java +@@ -1,0 +1,14 @@ ++package io.github.bluestaggo.mcdiverge; ++ ++import net.minecraft.src.EntityPlayer; ++import net.minecraft.src.ItemStack; ++ ++public class ItemSlimeShoes extends ItemCharm { ++ public ItemSlimeShoes(int id) { ++ super(id, 64, "slimeshoes"); ++ } ++ ++ public void updateCharm(EntityPlayer player, ItemStack stack) { ++ player.bounce = 0.5F; ++ } ++} diff --git a/patches_merged/io/github/bluestaggo/mcdiverge/ItemStaff.java.patch b/patches_merged/io/github/bluestaggo/mcdiverge/ItemStaff.java.patch new file mode 100644 index 0000000..63e51ea --- /dev/null +++ b/patches_merged/io/github/bluestaggo/mcdiverge/ItemStaff.java.patch @@ -0,0 +1,45 @@ +--- /dev/null ++++ b/io/github/bluestaggo/mcdiverge/ItemStaff.java +@@ -1,0 +1,42 @@ ++package io.github.bluestaggo.mcdiverge; ++ ++import net.minecraft.src.*; ++ ++public class ItemStaff extends ItemMagic { ++ public final int staffDamage; ++ public final int burn; ++ public final float pierce; ++ ++ public ItemStaff(int i1, float f2, int i3, int maxDmg) { ++ this(i1, f2, i3, maxDmg, 0, 1.0F); ++ } ++ ++ public ItemStaff(int i1, float f2, int i3, int maxDmg, int burn, float pierce) { ++ super(i1, f2); ++ this.maxStackSize = 1; ++ this.maxDamage = maxDmg; ++ this.staffDamage = i3; ++ this.burn = burn; ++ this.pierce = pierce; ++ this.bFull3D = true; ++ } ++ ++ public ItemStack onMagicItemRightClick(ItemStack itemStack1, World world2, EntityPlayer entityPlayer3) { ++ world2.playSoundAtEntity(entityPlayer3, "diverge.wand", 1.0F, rand.nextFloat() * 0.2F + 0.9F); ++ world2.spawnEntityInWorld(new EntitySnowball(world2, entityPlayer3, this.iconIndex + 16, this.staffDamage, this.burn, this.pierce)); ++ itemStack1.damageItem(1); ++ ++ return itemStack1; ++ } ++ ++ public Object[] getDynamicTooltip() { ++ return new Object[] { ++ this.staffDamage + " attack damage", ++ ItemTooltip.INFO_COL, ++ "Uses " + this.useMana + " points of mana", ++ ItemTooltip.INFO_COL, ++ this.maxDamage + " max durability", ++ ItemTooltip.INFO_COL ++ }; ++ } ++} diff --git a/patches_merged/io/github/bluestaggo/mcdiverge/ItemTooltip.java.patch b/patches_merged/io/github/bluestaggo/mcdiverge/ItemTooltip.java.patch new file mode 100644 index 0000000..bf54e64 --- /dev/null +++ b/patches_merged/io/github/bluestaggo/mcdiverge/ItemTooltip.java.patch @@ -0,0 +1,344 @@ +--- /dev/null ++++ b/io/github/bluestaggo/mcdiverge/ItemTooltip.java +@@ -1,0 +1,341 @@ ++package io.github.bluestaggo.mcdiverge; ++ ++import java.util.ArrayList; ++import java.util.List; ++ ++import net.minecraft.src.Item; ++ ++public class ItemTooltip { ++ public static ItemTooltip[] items = new ItemTooltip[32000]; ++ public static ItemTooltip[][] fromMetadata = new ItemTooltip[32000][16]; ++ public List lines = new ArrayList<>(); ++ public List colors = new ArrayList<>(); ++ public Pair gradient; ++ ++ public static final Pair DEFAULT_GRAD = new Pair<>(0xC0333366, 0xC0101020); ++ public static final Pair NOVELTY_GRAD = new Pair<>(0xC08f39e6, 0xC0442b8a); ++ public static final Pair INVALID_GRAD = new Pair<>(0xC07E1212, 0xC02D0707); ++ public static final Pair LEGENDARY_GRAD = new Pair<>(0xC0663366, 0xC0201020); ++ public static final int INVALID_COL = 0xFF5555; ++ public static final int DESCRIPTION_COL = 0xAAAAAA; ++ public static final int INFO_COL = 0xAAAA66; ++ public static final int UNCOMMON_COL = 0xFFFF55; ++ public static final int RARE_COL = 0x55FFFF; ++ public static final int LEGENDARY_COL = 0xFF55FF; ++ ++ static { ++ items[1] = new ItemTooltip("Stone"); ++ fromMetadata[1][1] = new ItemTooltip("Marble"); ++ fromMetadata[1][2] = new ItemTooltip("Slate"); ++ items[2] = new ItemTooltip("Grass"); ++ items[3] = new ItemTooltip("Dirt"); ++ items[4] = new ItemTooltip("Cobblestone"); ++ fromMetadata[4][1] = new ItemTooltip("Cobbled Marble"); ++ fromMetadata[4][2] = new ItemTooltip("Cobbled Slate"); ++ items[5] = new ItemTooltip("Planks"); ++ items[6] = new ItemTooltip("Sapling", "Grows into a tree", DESCRIPTION_COL); ++ items[7] = ItemTooltip.invalid("Bedrock"); ++ items[8] = ItemTooltip.invalid("Flowing Water"); ++ items[9] = ItemTooltip.invalid("Still Water"); ++ items[10] = ItemTooltip.invalid("Flowing Lava"); ++ items[11] = ItemTooltip.invalid("Still Lava"); ++ items[12] = new ItemTooltip("Sand"); ++ items[13] = new ItemTooltip("Gravel"); ++ items[14] = new ItemTooltip("Gold Ore", UNCOMMON_COL); ++ items[15] = new ItemTooltip("Iron Ore", UNCOMMON_COL); ++ items[16] = new ItemTooltip("Coal Ore"); ++ items[17] = new ItemTooltip("Log"); ++ items[18] = new ItemTooltip("Leaves"); ++ items[19] = new ItemTooltip("Sponge"); ++ items[20] = new ItemTooltip("Glass"); ++ items[21] = new ItemTooltip("Polished Stone"); ++ fromMetadata[21][1] = new ItemTooltip("Polished Marble"); ++ fromMetadata[21][2] = new ItemTooltip("Polished Slate"); ++ items[22] = ItemTooltip.invalid("Double Plank Slab"); ++ items[23] = new ItemTooltip("Plank Slab"); ++ items[35] = new ItemTooltip("Wool"); ++ items[37] = new ItemTooltip("Dandelion"); ++ items[38] = new ItemTooltip("Rose"); ++ items[39] = new ItemTooltip("Brown Mushroom"); ++ items[40] = new ItemTooltip("Red Mushroom"); ++ items[41] = new ItemTooltip("Block of Gold", UNCOMMON_COL); ++ items[42] = new ItemTooltip("Block of Iron", UNCOMMON_COL); ++ items[43] = ItemTooltip.invalid("Double Stone Slab"); ++ items[44] = new ItemTooltip("Stone Slab"); ++ fromMetadata[44][0] = new ItemTooltip("Cobblestone Slab"); ++ fromMetadata[44][1] = new ItemTooltip("Cobbled Marble Slab"); ++ fromMetadata[44][2] = new ItemTooltip("Cobbled Slate Slab"); ++ fromMetadata[44][3] = new ItemTooltip("Stone Slab"); ++ fromMetadata[44][4] = new ItemTooltip("Marble Slab"); ++ fromMetadata[44][5] = new ItemTooltip("Slate Slab"); ++ fromMetadata[44][6] = new ItemTooltip("Polished Stone Slab"); ++ fromMetadata[44][7] = new ItemTooltip("Polished Marble Slab"); ++ fromMetadata[44][8] = new ItemTooltip("Polished Slate Slab"); ++ fromMetadata[44][9] = new ItemTooltip("Brick Slab"); ++ items[45] = new ItemTooltip("Bricks"); ++ items[46] = new ItemTooltip("TNT", UNCOMMON_COL, "Punch for an explosion", DESCRIPTION_COL); ++ items[47] = new ItemTooltip("Bookshelf"); ++ items[48] = new ItemTooltip("Mossy Cobblestone"); ++ items[49] = new ItemTooltip("Obsidian", RARE_COL); ++ items[50] = new ItemTooltip("Torch"); ++ items[51] = ItemTooltip.invalid("Fire"); ++ items[52] = ItemTooltip.invalid("Mob Spawner"); ++ items[53] = new ItemTooltip("Wooden Stairs"); ++ items[54] = new ItemTooltip("Chest"); ++ items[55] = ItemTooltip.invalid("Redstone Dust (Block)"); ++ items[56] = new ItemTooltip("Diamond Ore", RARE_COL); ++ items[57] = new ItemTooltip("Block of Diamond", RARE_COL); ++ items[58] = new ItemTooltip("Crafting Table", "The basic tool for crafting", DESCRIPTION_COL); ++ items[59] = ItemTooltip.invalid("Crops"); ++ items[60] = ItemTooltip.invalid("Farmland"); ++ items[61] = new ItemTooltip("Furnace", "Used for cooking items", DESCRIPTION_COL); ++ items[62] = ItemTooltip.invalid("Lit Furnace"); ++ items[63] = ItemTooltip.invalid("Sign (Block)"); ++ items[64] = ItemTooltip.invalid("Wooden Door (Block)"); ++ items[65] = new ItemTooltip("Ladder"); ++ items[66] = new ItemTooltip("Minecart Track", UNCOMMON_COL, "Used for travel with minecarts", DESCRIPTION_COL); ++ items[67] = new ItemTooltip("Cobblestone Stairs"); ++ items[68] = ItemTooltip.invalid("Wall Sign (Block)"); ++ items[69] = new ItemTooltip("Lever", ++ "Can be switched to toggle", DESCRIPTION_COL, ++ "a redstone signal", DESCRIPTION_COL); ++ items[70] = new ItemTooltip("Stone Pressure Plate", ++ "Emits a redstone signal when", DESCRIPTION_COL, ++ "a player steps on it", DESCRIPTION_COL); ++ items[71] = ItemTooltip.invalid("Iron Door (Block)"); ++ items[72] = new ItemTooltip("Wooden Pressure Plate", ++ "Emits a redstone signal when", DESCRIPTION_COL, ++ "something steps on it", DESCRIPTION_COL); ++ items[73] = new ItemTooltip("Redstone Ore", RARE_COL); ++ items[74] = ItemTooltip.invalid("Glowing Redstone Ore"); ++ items[75] = ItemTooltip.invalid("Redstone Torch (Off)"); ++ items[76] = new ItemTooltip("Redstone Torch", RARE_COL); ++ items[77] = new ItemTooltip("Stone Button", "Press to emit a redstone signal", DESCRIPTION_COL); ++ items[78] = new ItemTooltip("Snow"); ++ items[79] = new ItemTooltip("Ice"); ++ items[80] = new ItemTooltip("Snow Block"); ++ items[81] = new ItemTooltip("Cactus", "Hurts on contact", DESCRIPTION_COL); ++ items[82] = new ItemTooltip("Clay Block"); ++ items[83] = ItemTooltip.invalid("Sugar Cane (Block)"); ++ items[84] = new ItemTooltip("Jukebox", RARE_COL, "Can play music discs", DESCRIPTION_COL); ++ items[85] = new ItemTooltip("Fence"); ++ items[86] = new ItemTooltip("Speleothem"); ++ items[87] = new ItemTooltip(LEGENDARY_GRAD, "Ruby Ore", LEGENDARY_COL); ++ items[88] = new ItemTooltip(LEGENDARY_GRAD, "Sapphire Ore", LEGENDARY_COL); ++ items[89] = new ItemTooltip(LEGENDARY_GRAD, "Block of Ruby", LEGENDARY_COL); ++ items[90] = new ItemTooltip(LEGENDARY_GRAD, "Block of Sapphire", LEGENDARY_COL); ++ items[91] = new ItemTooltip(LEGENDARY_GRAD, "Blaster", LEGENDARY_COL, ++ "Smelt items at quadruple", DESCRIPTION_COL, ++ "the speed of a furnace but", DESCRIPTION_COL, ++ "uses double the fuel", DESCRIPTION_COL); ++ items[92] = ItemTooltip.invalid("Lit Blaster"); ++ items[93] = new ItemTooltip(LEGENDARY_GRAD, "Refabricator", LEGENDARY_COL, ++ "Duplicates or repairs items", DESCRIPTION_COL, ++ "from the power of", DESCRIPTION_COL, ++ "star dust", DESCRIPTION_COL); ++ ++ items[256] = new ItemTooltip("Iron Shovel", UNCOMMON_COL, Item.shovel); ++ items[257] = new ItemTooltip("Iron Pickaxe", UNCOMMON_COL, Item.pickaxeSteel); ++ items[258] = new ItemTooltip("Iron Axe", UNCOMMON_COL, Item.axeSteel); ++ items[259] = new ItemTooltip("Flint and Steel", UNCOMMON_COL, "Right click to create fire", ++ DESCRIPTION_COL); ++ items[260] = new ItemTooltip("Apple", UNCOMMON_COL, Item.appleRed); ++ items[261] = new ItemTooltip("Bow", "Right click to shoot arrows", DESCRIPTION_COL); ++ items[262] = new ItemTooltip("Arrow", "Shot with a bow", DESCRIPTION_COL); ++ items[263] = new ItemTooltip("Coal"); ++ items[264] = new ItemTooltip("Diamond", RARE_COL); ++ items[265] = new ItemTooltip("Iron Ingot", UNCOMMON_COL); ++ items[266] = new ItemTooltip("Gold Ingot", UNCOMMON_COL); ++ items[267] = new ItemTooltip("Iron Sword", UNCOMMON_COL, Item.swordSteel); ++ items[268] = new ItemTooltip("Wooden Sword", Item.swordWood); ++ items[269] = new ItemTooltip("Wooden Shovel", Item.shovelWood); ++ items[270] = new ItemTooltip("Wooden Pickaxe", Item.pickaxeWood); ++ items[271] = new ItemTooltip("Wooden Axe", Item.axeWood); ++ items[272] = new ItemTooltip("Stone Sword", Item.swordStone); ++ items[273] = new ItemTooltip("Stone Shovel", Item.shovelStone); ++ items[274] = new ItemTooltip("Stone Pickaxe", Item.pickaxeStone); ++ items[275] = new ItemTooltip("Stone Axe", Item.axeStone); ++ items[276] = new ItemTooltip("Diamond Sword", RARE_COL, Item.swordDiamond); ++ items[277] = new ItemTooltip("Diamond Shovel", RARE_COL, Item.shovelDiamond); ++ items[278] = new ItemTooltip("Diamond Pickaxe", RARE_COL, Item.pickaxeDiamond); ++ items[279] = new ItemTooltip("Diamond Axe", RARE_COL, Item.axeDiamond); ++ items[280] = new ItemTooltip("Stick"); ++ items[281] = new ItemTooltip("Bowl"); ++ items[282] = new ItemTooltip("Mushroom Stew", UNCOMMON_COL, Item.bowlSoup); ++ items[283] = new ItemTooltip("Golden Sword", UNCOMMON_COL, Item.swordGold); ++ items[284] = new ItemTooltip("Golden Shovel", UNCOMMON_COL, Item.shovelGold); ++ items[285] = new ItemTooltip("Golden Pickaxe", UNCOMMON_COL, Item.pickaxeGold); ++ items[286] = new ItemTooltip("Golden Axe", UNCOMMON_COL, Item.axeGold); ++ items[287] = new ItemTooltip("String"); ++ items[288] = new ItemTooltip("Feather"); ++ items[289] = new ItemTooltip("Gunpowder"); ++ items[290] = new ItemTooltip("Wooden Hoe", Item.hoeWood); ++ items[291] = new ItemTooltip("Stone Hoe", Item.hoeStone); ++ items[292] = new ItemTooltip("Iron Hoe", UNCOMMON_COL, Item.hoeSteel); ++ items[293] = new ItemTooltip("Diamond Hoe", RARE_COL, Item.hoeDiamond); ++ items[294] = new ItemTooltip("Golden Hoe", UNCOMMON_COL, Item.hoeGold); ++ items[295] = new ItemTooltip("Seeds", "Can be planted on farmland", DESCRIPTION_COL); ++ items[296] = new ItemTooltip("Wheat", "Can be crafted into bread", DESCRIPTION_COL); ++ items[297] = new ItemTooltip("Bread", Item.bread); ++ items[298] = new ItemTooltip("Leather Cap", Item.helmetLeather); ++ items[299] = new ItemTooltip("Leather Tunic", Item.plateLeather); ++ items[300] = new ItemTooltip("Leather Pants", Item.legsLeather); ++ items[301] = new ItemTooltip("Leather Boots", Item.bootsLeather); ++ items[302] = new ItemTooltip("Chainmail Helmet", UNCOMMON_COL, Item.helmetChain); ++ items[303] = new ItemTooltip("Chainmail Chestplate", UNCOMMON_COL, Item.plateChain); ++ items[304] = new ItemTooltip("Chainmail Leggings", UNCOMMON_COL, Item.legsChain); ++ items[305] = new ItemTooltip("Chainmail Boots", UNCOMMON_COL, Item.bootsChain); ++ items[306] = new ItemTooltip("Iron Helmet", UNCOMMON_COL, Item.helmetSteel); ++ items[307] = new ItemTooltip("Iron Chestplate", UNCOMMON_COL, Item.plateSteel); ++ items[308] = new ItemTooltip("Iron Leggings", UNCOMMON_COL, Item.legsSteel); ++ items[309] = new ItemTooltip("Iron Boots", UNCOMMON_COL, Item.bootsSteel); ++ items[310] = new ItemTooltip("Diamond Helmet", RARE_COL, Item.helmetDiamond); ++ items[311] = new ItemTooltip("Diamond Chestplate", RARE_COL, Item.plateDiamond); ++ items[312] = new ItemTooltip("Diamond Leggings", RARE_COL, Item.legsDiamond); ++ items[313] = new ItemTooltip("Diamond Boots", RARE_COL, Item.bootsDiamond); ++ items[314] = new ItemTooltip("Golden Helmet", UNCOMMON_COL, Item.helmetGold); ++ items[315] = new ItemTooltip("Golden Chestplate", UNCOMMON_COL, Item.plateGold); ++ items[316] = new ItemTooltip("Golden Leggings", UNCOMMON_COL, Item.legsGold); ++ items[317] = new ItemTooltip("Golden Boots", UNCOMMON_COL, Item.bootsGold); ++ items[318] = new ItemTooltip("Flint"); ++ items[319] = new ItemTooltip("Raw Porkchop", Item.porkRaw); ++ items[320] = new ItemTooltip("Cooked Porkchop", Item.porkCooked); ++ items[321] = new ItemTooltip("Painting", "Display a random piece of artwork", DESCRIPTION_COL); ++ items[322] = new ItemTooltip("Golden Apple", Item.appleGold); ++ items[323] = new ItemTooltip("Sign"); ++ items[324] = new ItemTooltip("Wooden Door"); ++ items[325] = new ItemTooltip("Bucket", ++ "Right click to pick up", DESCRIPTION_COL, ++ "a liquid", DESCRIPTION_COL); ++ items[326] = new ItemTooltip("Water Bucket", "Right click to place water", DESCRIPTION_COL); ++ items[327] = new ItemTooltip("Lava Bucket", "Right click to place lava", DESCRIPTION_COL); ++ items[328] = new ItemTooltip("Minecart", UNCOMMON_COL, ++ "Used for travelling on", DESCRIPTION_COL, ++ "minecart tracks", DESCRIPTION_COL); ++ items[329] = new ItemTooltip("Saddle", UNCOMMON_COL, "Used for riding a pig", DESCRIPTION_COL); ++ items[330] = new ItemTooltip("Iron Door", UNCOMMON_COL, ++ "Cannot be opened without", DESCRIPTION_COL, ++ "a restone signal", DESCRIPTION_COL); ++ items[331] = new ItemTooltip("Redstone Dust", RARE_COL, "Powers multiple devices", DESCRIPTION_COL); ++ items[332] = new ItemTooltip("Snowball", "Right click to throw", DESCRIPTION_COL); ++ items[333] = new ItemTooltip("Boat", "Used for travelling on water", DESCRIPTION_COL); ++ items[334] = new ItemTooltip("Leather"); ++ items[335] = new ItemTooltip("Milk"); ++ items[336] = new ItemTooltip("Brick"); ++ items[337] = new ItemTooltip("Clay Ball"); ++ items[338] = new ItemTooltip("Sugar Cane"); ++ items[339] = new ItemTooltip("Paper"); ++ items[340] = new ItemTooltip("Book"); ++ items[341] = new ItemTooltip("Slime Ball", UNCOMMON_COL); ++ items[342] = new ItemTooltip("Minecart with Chest", UNCOMMON_COL, ++ "Used for carrying items", DESCRIPTION_COL, ++ "on minecart tracks", DESCRIPTION_COL); ++ items[343] = new ItemTooltip("Minecart with Furnace", UNCOMMON_COL, ++ "Uses fuel to move fast", DESCRIPTION_COL, ++ "on minecart tracks"); ++ items[344] = new ItemTooltip("Egg", "Right click to throw", DESCRIPTION_COL); ++ items[345] = new ItemTooltip("Compass", UNCOMMON_COL, ++ "Points in the direction to", DESCRIPTION_COL, ++ "your spawnpoint", DESCRIPTION_COL); ++ items[346] = new ItemTooltip("Fishing Rod", "Right click to cast", DESCRIPTION_COL); ++ items[347] = new ItemTooltip("Quiver", ++ "Stores up to 256 arrows", DESCRIPTION_COL, ++ "Can be equipped in", INFO_COL, ++ "the charm slot", INFO_COL); ++ items[348] = new ItemTooltip(LEGENDARY_GRAD, "Ruby Staff", LEGENDARY_COL, ++ "Right click to shoot a", DESCRIPTION_COL, ++ "flaming ruby crystal", DESCRIPTION_COL, ++ Item.staffRuby); ++ items[349] = new ItemTooltip(LEGENDARY_GRAD, "Sapphire Staff", LEGENDARY_COL, ++ "Right click to shoot a", DESCRIPTION_COL, ++ "barrage of sapphire shards", DESCRIPTION_COL, ++ Item.staffSapphire); ++ items[350] = new ItemTooltip(LEGENDARY_GRAD, "Ruby", LEGENDARY_COL, "A gem capable of magic", DESCRIPTION_COL); ++ items[351] = new ItemTooltip(LEGENDARY_GRAD, "Sapphire", LEGENDARY_COL, "A gem capable of magic", DESCRIPTION_COL); ++ items[352] = new ItemTooltip("Raw Beef", Item.beefRaw); ++ items[353] = new ItemTooltip("Cooked Beef", Item.beefCooked); ++ items[354] = new ItemTooltip("Raw Chicken", Item.chickenRaw); ++ items[355] = new ItemTooltip("Cooked Chicken", Item.chickenCooked); ++ items[356] = new ItemTooltip("Raw Mutton", Item.muttonRaw); ++ items[357] = new ItemTooltip("Cooked Mutton", Item.muttonCooked); ++ items[358] = new ItemTooltip(LEGENDARY_GRAD, "Warding Ring", LEGENDARY_COL, ++ "Heals half a heart every minute", DESCRIPTION_COL, ++ "Can be equipped in", INFO_COL, ++ "the charm slot", INFO_COL); ++ items[359] = new ItemTooltip(LEGENDARY_GRAD, "Repair Kit", LEGENDARY_COL, ++ "Crouch to repair the", DESCRIPTION_COL, ++ "currently held item", DESCRIPTION_COL, ++ "Can be equipped in", INFO_COL, ++ "the charm slot", INFO_COL, ++ Item.repairKit); ++ items[360] = new ItemTooltip("Star Chunk", RARE_COL, ++ "A fallen star from the", DESCRIPTION_COL, ++ "night sky; provides great", DESCRIPTION_COL, ++ "energy when heated", DESCRIPTION_COL); ++ items[361] = new ItemTooltip(LEGENDARY_GRAD, "Star Dust", LEGENDARY_COL, ++ "This extraterrestrial dust", DESCRIPTION_COL, ++ "emanates powerful energy", DESCRIPTION_COL); ++ items[362] = new ItemTooltip(LEGENDARY_GRAD, "Sparkle Staff", LEGENDARY_COL, ++ "Right click to shoot a", DESCRIPTION_COL, ++ "star blast", DESCRIPTION_COL, ++ Item.staffSparkle); ++ items[363] = new ItemTooltip("Slime Shoes", UNCOMMON_COL, ++ "Bounces on falling", DESCRIPTION_COL, ++ "Can be equipped in", INFO_COL, ++ "the charm slot", INFO_COL, ++ "64 max durability", INFO_COL); ++ ++ items[2256] = new ItemTooltip(NOVELTY_GRAD, "Music Disc", RARE_COL, Item.record13); ++ items[2257] = new ItemTooltip(NOVELTY_GRAD, "Music Disc", RARE_COL, Item.recordCat); ++ items[2258] = new ItemTooltip(NOVELTY_GRAD, "Music Disc", RARE_COL, Item.recordMagnet); ++ } ++ ++ public ItemTooltip(Pair gradient, Object... lines) { ++ this.gradient = gradient; ++ for (Object line : lines) { ++ if (Item.class.isAssignableFrom(line.getClass())) { ++ for (Object subLine : ((Item) line).getDynamicTooltip()) { ++ this.parseLine(subLine); ++ } ++ } else { ++ this.parseLine(line); ++ } ++ } ++ if (this.parsedString) { ++ this.lines.add(this.nextText); ++ this.colors.add(0xFFFFFF); ++ } ++ } ++ ++ public ItemTooltip(Object... lines) { ++ this(DEFAULT_GRAD, lines); ++ } ++ ++ public static ItemTooltip invalid(String name, Object... objects) { ++ return new ItemTooltip(INVALID_GRAD, name, INVALID_COL, objects); ++ } ++ ++ public int size() { ++ return lines.size(); ++ } ++ ++ private boolean parsedString; ++ private String nextText; ++ ++ private void parseLine(Object line) { ++ if (line instanceof String) { ++ if (this.parsedString) { ++ this.lines.add(this.nextText); ++ this.colors.add(0xFFFFFF); ++ } ++ this.nextText = (String) line; ++ this.parsedString = true; ++ } else if (line instanceof Integer) { ++ if (this.parsedString) { ++ this.lines.add(this.nextText); ++ this.colors.add((int) line); ++ } ++ this.parsedString = false; ++ } ++ } ++} diff --git a/patches_merged/io/github/bluestaggo/mcdiverge/ItemWardingRing.java.patch b/patches_merged/io/github/bluestaggo/mcdiverge/ItemWardingRing.java.patch new file mode 100644 index 0000000..b18af97 --- /dev/null +++ b/patches_merged/io/github/bluestaggo/mcdiverge/ItemWardingRing.java.patch @@ -0,0 +1,16 @@ +--- /dev/null ++++ b/io/github/bluestaggo/mcdiverge/ItemWardingRing.java +@@ -1,0 +1,13 @@ ++package io.github.bluestaggo.mcdiverge; ++ ++import net.minecraft.src.*; ++ ++public class ItemWardingRing extends ItemCharm { ++ public ItemWardingRing(int id) { ++ super(id); ++ } ++ ++ public void updateCharm(EntityPlayer player, ItemStack stack) { ++ player.slowHealing = true; ++ } ++} diff --git a/patches_merged/io/github/bluestaggo/mcdiverge/Pair.java.patch b/patches_merged/io/github/bluestaggo/mcdiverge/Pair.java.patch new file mode 100644 index 0000000..edd3f87 --- /dev/null +++ b/patches_merged/io/github/bluestaggo/mcdiverge/Pair.java.patch @@ -0,0 +1,27 @@ +--- /dev/null ++++ b/io/github/bluestaggo/mcdiverge/Pair.java +@@ -1,0 +1,24 @@ ++package io.github.bluestaggo.mcdiverge; ++ ++import java.util.Objects; ++ ++public class Pair { ++ public I0 item0; ++ public I1 item1; ++ ++ public Pair(I0 item0, I1 item1) { ++ this.item0 = item0; ++ this.item1 = item1; ++ } ++ ++ public boolean equals(Object o) { ++ if (this == o) return true; ++ if (o == null || getClass() != o.getClass()) return false; ++ Pair pair = (Pair) o; ++ return Objects.equals(item0, pair.item0) && Objects.equals(item1, pair.item1); ++ } ++ ++ public int hashCode() { ++ return Objects.hash(item0, item1); ++ } ++} diff --git a/patches_merged/io/github/bluestaggo/mcdiverge/TileEntityRefabricator.java.patch b/patches_merged/io/github/bluestaggo/mcdiverge/TileEntityRefabricator.java.patch new file mode 100644 index 0000000..ef9430a --- /dev/null +++ b/patches_merged/io/github/bluestaggo/mcdiverge/TileEntityRefabricator.java.patch @@ -0,0 +1,120 @@ +--- /dev/null ++++ b/io/github/bluestaggo/mcdiverge/TileEntityRefabricator.java +@@ -1,0 +1,117 @@ ++package io.github.bluestaggo.mcdiverge; ++ ++import net.minecraft.src.*; ++ ++public class TileEntityRefabricator extends TileEntity implements IInventory { ++ private ItemStack[] items = new ItemStack[2]; ++ private int fabricationTime; ++ ++ public int getSizeInventory() { ++ return this.items.length; ++ } ++ ++ public ItemStack getStackInSlot(int i1) { ++ return this.items[i1]; ++ } ++ ++ public ItemStack decrStackSize(int slot, int stackSize) { ++ if(this.items[slot] != null) { ++ ItemStack itemStack3; ++ if(this.items[slot].stackSize <= stackSize) { ++ itemStack3 = this.items[slot]; ++ this.items[slot] = null; ++ } else { ++ itemStack3 = this.items[slot].splitStack(stackSize); ++ if(this.items[slot].stackSize == 0) { ++ this.items[slot] = null; ++ } ++ } ++ return itemStack3; ++ } else { ++ return null; ++ } ++ } ++ ++ public void setInventorySlotContents(int slot, ItemStack itemStack) { ++ this.items[slot] = itemStack; ++ if(itemStack != null && itemStack.stackSize > this.getInventoryStackLimit()) { ++ itemStack.stackSize = this.getInventoryStackLimit(); ++ } ++ } ++ ++ public String getInvName() { ++ return "Refabricator"; ++ } ++ ++ public int getInventoryStackLimit() { ++ return 64; ++ } ++ ++ public boolean canRefabricate() { ++ return this.items[0] != null ++ && this.items[1] != null ++ && this.items[1].itemID == Item.starDust.shiftedIndex ++ && this.items[1].stackSize >= 1 ++ && (this.items[0].stackSize < this.items[0].getMaxStackSize() ++ || this.items[0].itemDmg > 0 ++ && Item.itemsList[this.items[0].itemID].allowRepair()); ++ } ++ ++ public void readFromNBT(NBTTagCompound compoundTag) { ++ super.readFromNBT(compoundTag); ++ NBTTagList nBTTagList2 = compoundTag.getTagList("Items"); ++ this.items = new ItemStack[this.getSizeInventory()]; ++ ++ for(int i3 = 0; i3 < nBTTagList2.tagCount(); ++i3) { ++ NBTTagCompound nBTTagCompound4 = (NBTTagCompound)nBTTagList2.tagAt(i3); ++ byte b5 = nBTTagCompound4.getByte("Slot"); ++ if(b5 >= 0 && b5 < this.items.length) { ++ this.items[b5] = new ItemStack(nBTTagCompound4); ++ } ++ } ++ ++ this.fabricationTime = compoundTag.getInteger("FabricationTime"); ++ } ++ ++ public void writeToNBT(NBTTagCompound compoundTag) { ++ super.writeToNBT(compoundTag); ++ ++ NBTTagList nBTTagList2 = new NBTTagList(); ++ for(int i3 = 0; i3 < this.items.length; ++i3) { ++ if(this.items[i3] != null) { ++ NBTTagCompound nBTTagCompound4 = new NBTTagCompound(); ++ nBTTagCompound4.setByte("Slot", (byte)i3); ++ this.items[i3].writeToNBT(nBTTagCompound4); ++ nBTTagList2.setTag(nBTTagCompound4); ++ } ++ } ++ compoundTag.setTag("Items", nBTTagList2); ++ compoundTag.setInteger("FabricationTime", this.fabricationTime); ++ } ++ ++ public int getProgressScaled(int scale) { ++ return this.fabricationTime * scale / 600; ++ } ++ ++ public void updateEntity() { ++ if (!canRefabricate()) { ++ this.fabricationTime -= 10; ++ if (this.fabricationTime < 0) { ++ this.fabricationTime = 0; ++ } ++ return; ++ } ++ ++ this.fabricationTime++; ++ if (this.fabricationTime >= 600) { ++ ItemStack input = this.items[0]; ++ if (input.itemDmg > 0 && Item.itemsList[input.itemID].allowRepair()) { ++ input.itemDmg = 0; ++ } else if (input.stackSize < input.getMaxStackSize()) { ++ input.stackSize++; ++ } ++ this.decrStackSize(1, 1); ++ this.fabricationTime = 0; ++ } ++ } ++} diff --git a/patches_merged/io/github/bluestaggo/mcdiverge/WorldGenSpeleothems.java.patch b/patches_merged/io/github/bluestaggo/mcdiverge/WorldGenSpeleothems.java.patch new file mode 100644 index 0000000..2674ad2 --- /dev/null +++ b/patches_merged/io/github/bluestaggo/mcdiverge/WorldGenSpeleothems.java.patch @@ -0,0 +1,53 @@ +--- /dev/null ++++ b/io/github/bluestaggo/mcdiverge/WorldGenSpeleothems.java +@@ -1,0 +1,50 @@ ++package io.github.bluestaggo.mcdiverge; ++ ++import net.minecraft.src.World; ++import net.minecraft.src.WorldGenerator; ++ ++import java.util.Random; ++ ++public class WorldGenSpeleothems extends WorldGenerator { ++ private final int blockId; ++ ++ public WorldGenSpeleothems(int blockId) { ++ this.blockId = blockId; ++ } ++ ++ public boolean generate(World world1, Random random2, int i3, int i4, int i5) { ++ boolean stalactite = random2.nextInt(2) == 0; ++ if (stalactite) { ++ i4 = findStalactiteAnchor(world1, i3, i4, i5); ++ } else { ++ i4 = findStalagmiteAnchor(world1, i3, i4, i5); ++ } ++ if (i4 == -1 || i4 > 64) { ++ return false; ++ } ++ int height = random2.nextInt(2) + 1; ++ for (int i = 0; i < height; i++) { ++ i4 += stalactite ? -1 : 1; ++ world1.setBlockWithNotify(i3, i4, i5, blockId); ++ } ++ return true; ++ } ++ ++ private int findStalactiteAnchor(World world1, int x, int y, int z) { ++ for (++y; y < 128; y++) { ++ if (world1.isBlockNormalCube(x, y, z) && world1.getBlockId(x, y - 1, z) == 0) { ++ return y; ++ } ++ } ++ return -1; ++ } ++ ++ private int findStalagmiteAnchor(World world1, int x, int y, int z) { ++ for (--y; y > 0; y--) { ++ if (world1.isBlockNormalCube(x, y, z) && world1.getBlockId(x, y + 1, z) == 0) { ++ return y; ++ } ++ } ++ return -1; ++ } ++} diff --git a/patches_merged/net/minecraft/client/Minecraft.java.patch b/patches_merged/net/minecraft/client/Minecraft.java.patch new file mode 100644 index 0000000..a039d0b --- /dev/null +++ b/patches_merged/net/minecraft/client/Minecraft.java.patch @@ -0,0 +1,284 @@ +--- a/net/minecraft/client/Minecraft.java ++++ b/net/minecraft/client/Minecraft.java +@@ -9,60 +9,8 @@ + import java.awt.Graphics; + import java.io.File; + +-import net.minecraft.src.AxisAlignedBB; +-import net.minecraft.src.Block; +-import net.minecraft.src.EffectRenderer; +-import net.minecraft.src.EntityPlayerSP; +-import net.minecraft.src.EntityRenderer; +-import net.minecraft.src.EnumOS; +-import net.minecraft.src.FontRenderer; +-import net.minecraft.src.GLAllocation; +-import net.minecraft.src.GameSettings; +-import net.minecraft.src.GameWindowListener; +-import net.minecraft.src.GuiChat; +-import net.minecraft.src.GuiConflictWarning; +-import net.minecraft.src.GuiConnecting; +-import net.minecraft.src.GuiErrorScreen; +-import net.minecraft.src.GuiGameOver; +-import net.minecraft.src.GuiIngame; +-import net.minecraft.src.GuiIngameMenu; +-import net.minecraft.src.GuiInventory; +-import net.minecraft.src.GuiMainMenu; +-import net.minecraft.src.GuiScreen; +-import net.minecraft.src.ItemRenderer; +-import net.minecraft.src.ItemStack; +-import net.minecraft.src.LoadingScreenRenderer; +-import net.minecraft.src.MathHelper; +-import net.minecraft.src.MinecraftError; +-import net.minecraft.src.MinecraftException; +-import net.minecraft.src.MinecraftImpl; +-import net.minecraft.src.ModelBiped; +-import net.minecraft.src.MouseHelper; +-import net.minecraft.src.MovementInputFromOptions; +-import net.minecraft.src.MovingObjectPosition; +-import net.minecraft.src.OpenGlCapsChecker; +-import net.minecraft.src.PlayerController; +-import net.minecraft.src.PlayerControllerCreative; +-import net.minecraft.src.RenderEngine; +-import net.minecraft.src.RenderGlobal; +-import net.minecraft.src.RenderManager; +-import net.minecraft.src.ScaledResolution; +-import net.minecraft.src.Session; +-import net.minecraft.src.SoundManager; +-import net.minecraft.src.Tessellator; +-import net.minecraft.src.TextureCompassFX; +-import net.minecraft.src.TextureFlamesFX; +-import net.minecraft.src.TextureLavaFX; +-import net.minecraft.src.TextureLavaFlowFX; +-import net.minecraft.src.TextureWaterFX; +-import net.minecraft.src.TextureWaterFlowFX; +-import net.minecraft.src.ThreadDownloadResources; +-import net.minecraft.src.ThreadSleepForever; +-import net.minecraft.src.Timer; +-import net.minecraft.src.UnexpectedThrowable; +-import net.minecraft.src.Vec3D; +-import net.minecraft.src.World; +-import net.minecraft.src.WorldRenderer; ++import io.github.bluestaggo.mcdiverge.CreateWorldInfo; ++import net.minecraft.src.*; + + import org.lwjgl.LWJGLException; + import org.lwjgl.input.Controllers; +@@ -74,6 +22,9 @@ + import org.lwjgl.util.glu.GLU; + + public abstract class Minecraft implements Runnable { ++ private static Minecraft instance; ++ public static final String version = "Minecraft Diverge v0.1"; ++ + public PlayerController playerController; + private boolean fullscreen = false; + public int displayWidth; +@@ -125,6 +76,7 @@ + public boolean isRaining = false; + long systemTime = System.currentTimeMillis(); + private int joinPlayerCounter = 0; ++ public boolean creativeDebugEnabled = false; + + public Minecraft(Component component, Canvas canvas, MinecraftApplet mcApplet, int width, int height, boolean fullscreen) { + this.tempDisplayWidth = width; +@@ -136,10 +88,15 @@ + this.displayWidth = width; + this.displayHeight = height; + this.fullscreen = fullscreen; ++ Minecraft.instance = this; + } + + public abstract void displayUnexpectedThrowable(UnexpectedThrowable unexpectedThrowable1); + ++ public static GameSettings getOptions() { ++ return instance.options; ++ } ++ + public void setServer(String string1, int i2) { + this.serverName = string1; + this.serverPort = i2; +@@ -170,7 +127,7 @@ + Display.setDisplayMode(new DisplayMode(this.displayWidth, this.displayHeight)); + } + +- Display.setTitle("Minecraft Minecraft Alpha v1.1.2_01"); ++ Display.setTitle("Minecraft " + Minecraft.version); + + try { + Display.create(); +@@ -195,6 +152,8 @@ + Mouse.create(); + this.mouseHelper = new MouseHelper(this.mcCanvas); + ++ Display.setVSyncEnabled(this.options.limitFramerate); ++ + try { + Controllers.create(); + } catch (Exception exception4) { +@@ -240,7 +199,6 @@ + } else { + this.displayGuiScreen(new GuiMainMenu()); + } +- + } + + private void loadScreen() throws LWJGLException { +@@ -494,9 +452,9 @@ + this.resize(this.displayWidth, this.displayHeight); + } + +- if(this.options.limitFramerate) { +- Thread.sleep(5L); +- } ++ // if(this.options.limitFramerate) { ++ // Thread.sleep(5L); ++ // } + + this.checkGLError("Post render"); + ++i3; +@@ -679,7 +637,7 @@ + if(itemStack9 != null) { + i3 = itemStack9.stackSize; + ItemStack itemStack10 = itemStack9.useItemRightClick(this.theWorld, this.thePlayer); +- if(itemStack10 != itemStack9 || itemStack10 != null && itemStack10.stackSize != i3) { ++ if(itemStack10 != itemStack9 || itemStack10.stackSize != i3) { + this.thePlayer.inventory.mainInventory[this.thePlayer.inventory.currentItem] = itemStack10; + this.entityRenderer.itemRenderer.resetEquippedProgress2(); + if(itemStack10.stackSize == 0) { +@@ -788,6 +746,8 @@ + } + + public void runTick() { ++ GuiScreen.backgroundElapsedTicks++; ++ + this.ingameGUI.updateTick(); + this.entityRenderer.getMouseOver(1.0F); + if(this.thePlayer != null) { +@@ -871,6 +831,10 @@ + this.options.thirdPersonView = !this.options.thirdPersonView; + } + ++ if(Keyboard.getEventKey() == Keyboard.KEY_F3) { ++ this.options.debugMenu = !this.options.debugMenu; ++ } ++ + if(Keyboard.getEventKey() == this.options.keyBindInventory.keyCode) { + this.displayGuiScreen(new GuiInventory(this.thePlayer.inventory, this.thePlayer.inventory.craftingInventory)); + } +@@ -882,6 +846,14 @@ + if(this.isMultiplayerWorld() && Keyboard.getEventKey() == this.options.keyBindChat.keyCode) { + this.displayGuiScreen(new GuiChat()); + } ++ ++ if(Keyboard.getEventKey() == this.options.keyBindCreative.keyCode) { ++ this.thePlayer.displayGUICreative(); ++ } ++ ++ if(Keyboard.getEventKey() == this.options.keyBindRecipeGuide.keyCode) { ++ this.thePlayer.displayGUIRecipeGuide(); ++ } + } + + for(int i4 = 0; i4 < 9; ++i4) { +@@ -982,9 +954,14 @@ + } + + public void startWorld(String worldName) { ++ startWorld(worldName, null); ++ } ++ ++ public void startWorld(String worldName, CreateWorldInfo info) { ++ this.sndManager.fadeOutTitleMusic(); + this.changeWorld1((World)null); + System.gc(); +- World world2 = new World(new File(getMinecraftDir(), "saves"), worldName); ++ World world2 = new World(new File(getMinecraftDir(), "saves"), worldName, info == null ? 0 : info.seed, info); + if(world2.isNewWorld) { + this.changeWorld(world2, "Generating level"); + } else { +@@ -998,7 +975,7 @@ + } + + public void changeWorld(World world, String title) { +- this.sndManager.playStreaming((String)null, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F); ++ this.sndManager.playStreaming(null, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F); + if(this.theWorld != null) { + this.theWorld.saveWorldIndirectly(this.loadingScreen); + } +@@ -1041,6 +1018,7 @@ + world.saveWorldIndirectly(this.loadingScreen); + } + } else { ++ this.sndManager.fadeOutBackgroundMusic(); + this.thePlayer = null; + } + +@@ -1088,9 +1066,15 @@ + this.sndManager.addSound(name, file); + } else if(string4.equalsIgnoreCase("streaming")) { + this.sndManager.addStreaming(name, file); +- } else if(string4.equalsIgnoreCase("music")) { +- this.sndManager.addMusic(name, file); + } else if(string4.equalsIgnoreCase("newmusic")) { ++ if (name.contains("cave")) { ++ this.sndManager.addCaveMusic(name, file); ++ } else if (name.contains("title")) { ++ this.sndManager.addTitleMusic(name, file); ++ } else { ++ this.sndManager.addMusic(name, file); ++ } ++ } else if(string4.equalsIgnoreCase("music")) { + this.sndManager.addMusic(name, file); + } + +@@ -1100,6 +1084,12 @@ + return this.glCapabilities; + } + ++ public String debugInfoLocation() { ++ return "X: " + Math.floor(this.thePlayer.posX * 100.0F) / 100.0F ++ + ", Y: " + Math.floor(this.thePlayer.posY * 100.0F) / 100.0F ++ + ", Z: " + Math.floor(this.thePlayer.posZ * 100.0F) / 100.0F; ++ } ++ + public String debugInfoRenders() { + return this.renderGlobal.getDebugInfoRenders(); + } +@@ -1112,6 +1102,17 @@ + return "P: " + this.effectRenderer.getStatistics() + ". T: " + this.theWorld.getDebugLoadedEntities(); + } + ++ public String debugInfoSeed() { ++ return "Seed: " + this.theWorld.randomSeed; ++ } ++ ++ public String debugInfoWorld() { ++ return "S: " + (this.theWorld.snowCovered ? 1 : 0) ++ + ". GM: " + (this.theWorld.creative ? 1 : 0) ++ + ". T: " + this.theWorld.worldTime ++ + ". SF: " + this.theWorld.starfallChance; ++ } ++ + public void respawn() { + this.theWorld.setSpawnLocation(); + if(this.thePlayer != null) { +@@ -1128,7 +1129,7 @@ + } + + public static void startMainThread(String username, String sessionId) { +- startMainThread(username, sessionId, (String)null); ++ startMainThread(username, sessionId, null); + } + + public static void startMainThread(String username, String sessionId, String server) { +@@ -1139,8 +1140,8 @@ + frame5.add(canvas6, "Center"); + canvas6.setPreferredSize(new Dimension(854, 480)); + frame5.pack(); +- frame5.setLocationRelativeTo((Component)null); +- MinecraftImpl minecraftImpl7 = new MinecraftImpl(frame5, canvas6, (MinecraftApplet)null, 854, 480, z3, frame5); ++ frame5.setLocationRelativeTo(null); ++ MinecraftImpl minecraftImpl7 = new MinecraftImpl(frame5, canvas6, null, 854, 480, z3, frame5); + Thread thread8 = new Thread(minecraftImpl7, "Minecraft main thread"); + thread8.setPriority(10); + minecraftImpl7.appletMode = false; diff --git a/patches_merged/net/minecraft/server/MinecraftServer.java.patch b/patches_merged/net/minecraft/server/MinecraftServer.java.patch new file mode 100644 index 0000000..5c40df3 --- /dev/null +++ b/patches_merged/net/minecraft/server/MinecraftServer.java.patch @@ -0,0 +1,75 @@ +--- a/net/minecraft/server/MinecraftServer.java ++++ b/net/minecraft/server/MinecraftServer.java +@@ -12,28 +12,7 @@ + import java.util.logging.Level; + import java.util.logging.Logger; + +-import net.minecraft.src.AxisAlignedBB; +-import net.minecraft.src.ConsoleLogManager; +-import net.minecraft.src.EntityPlayerMP; +-import net.minecraft.src.EntityTracker; +-import net.minecraft.src.ICommandListener; +-import net.minecraft.src.IProgressUpdate; +-import net.minecraft.src.IUpdatePlayerListBox; +-import net.minecraft.src.Item; +-import net.minecraft.src.ItemStack; +-import net.minecraft.src.NetworkListenThread; +-import net.minecraft.src.Packet3Chat; +-import net.minecraft.src.Packet4UpdateTime; +-import net.minecraft.src.PropertyManager; +-import net.minecraft.src.ServerCommand; +-import net.minecraft.src.ServerConfigurationManager; +-import net.minecraft.src.ServerGUI; +-import net.minecraft.src.ThreadCommandReader; +-import net.minecraft.src.ThreadServerApplication; +-import net.minecraft.src.ThreadSleepForeverServer; +-import net.minecraft.src.Vec3D; +-import net.minecraft.src.WorldManager; +-import net.minecraft.src.WorldServer; ++import net.minecraft.src.*; + + public class MinecraftServer implements ICommandListener, Runnable { + public static Logger logger = Logger.getLogger("Minecraft"); +@@ -106,7 +85,7 @@ + + private void initWorld(String worldName) { + logger.info("Preparing start region"); +- this.worldMngr = new WorldServer(new File("."), worldName, this.propertyManagerObj.getBooleanProperty("monsters", false)); ++ this.worldMngr = new WorldServer(new File("."), worldName, this.propertyManagerObj.getBooleanProperty("monsters", false), this.propertyManagerObj.getCreateWorldInfo()); + this.worldMngr.addWorldAccess(new WorldManager(this)); + this.worldMngr.difficultySetting = 1; + this.configManager.setPlayerManager(this.worldMngr); +@@ -265,7 +244,6 @@ + } catch (Exception exception5) { + logger.log(Level.WARNING, "Unexpected exception while parsing console command", exception5); + } +- + } + + public void addCommand(String command, ICommandListener commandListener) { +@@ -314,6 +292,16 @@ + string11 = string2.substring(string2.indexOf(" ")).trim(); + this.configManager.pardonIP(string11); + this.print(string4, "Pardoning ip " + string11); ++ } else if(string2.toLowerCase().startsWith("creative ")) { ++ string11 = string2.substring(string2.indexOf(" ")).trim(); ++ this.configManager.setPlayerCreative(string11, true); ++ this.print(string4, "Setting " + string11 + "'s gamemode into creative"); ++ this.configManager.sendChatMessageToPlayer(string11, "\u00a7eYou are now in creative mode!"); ++ } else if(string2.toLowerCase().startsWith("survival ")) { ++ string11 = string2.substring(string2.indexOf(" ")).trim(); ++ this.configManager.setPlayerCreative(string11, false); ++ this.print(string4, "Setting " + string11 + "'s gamemode into survival"); ++ this.configManager.sendChatMessageToPlayer(string11, "\u00a7eYou are now in survival mode!"); + } else { + EntityPlayerMP entityPlayerMP12; + if(string2.toLowerCase().startsWith("ban ")) { +@@ -444,6 +432,8 @@ + iCommandListener3.addHelpCommandMessage(" save-on re-enables terrain saving"); + iCommandListener3.addHelpCommandMessage(" list lists all currently connected players"); + iCommandListener3.addHelpCommandMessage(" say broadcasts a message to all players"); ++ iCommandListener3.addHelpCommandMessage(" creative puts a player into creative mode"); ++ iCommandListener3.addHelpCommandMessage(" survival puts a player into survival mode"); + } + } + diff --git a/patches_merged/net/minecraft/src/Block.java.patch b/patches_merged/net/minecraft/src/Block.java.patch new file mode 100644 index 0000000..fa2cd36 --- /dev/null +++ b/patches_merged/net/minecraft/src/Block.java.patch @@ -0,0 +1,215 @@ +--- a/net/minecraft/src/Block.java ++++ b/net/minecraft/src/Block.java +@@ -1,6 +1,9 @@ + package net.minecraft.src; + ++import io.github.bluestaggo.mcdiverge.*; ++ + import java.util.ArrayList; ++import java.util.Objects; + import java.util.Random; + + public class Block { +@@ -20,10 +23,10 @@ + public static final int[] lightOpacity = new int[256]; + public static final boolean[] canBlockGrass = new boolean[256]; + public static final int[] lightValue = new int[256]; +- public static final Block stone = (new BlockStone(1, 1)).setHardness(1.5F).setResistance(10.0F).setStepSound(soundStoneFootstep); ++ public static final Block stone = (new BlockStone(1, 1, BlockStone.Type.STONE)).setHardness(1.5F).setResistance(10.0F).setStepSound(soundStoneFootstep); + public static final BlockGrass grass = (BlockGrass)(new BlockGrass(2)).setHardness(0.6F).setStepSound(soundGrassFootstep); + public static final Block dirt = (new BlockDirt(3, 2)).setHardness(0.5F).setStepSound(soundGravelFootstep); +- public static final Block cobblestone = (new Block(4, 16, Material.rock)).setHardness(2.0F).setResistance(10.0F).setStepSound(soundStoneFootstep); ++ public static final Block cobblestone = (new BlockStone(4, 16, BlockStone.Type.COBBLESTONE)).setHardness(2.0F).setResistance(10.0F).setStepSound(soundStoneFootstep); + public static final Block planks = (new Block(5, 4, Material.wood)).setHardness(2.0F).setResistance(5.0F).setStepSound(soundWoodFootstep); + public static final Block sapling = (new BlockSapling(6, 15)).setHardness(0.0F).setStepSound(soundGrassFootstep); + public static final Block bedrock = (new Block(7, 17, Material.rock)).setHardness(-1.0F).setResistance(6000000.0F).setStepSound(soundStoneFootstep); +@@ -33,49 +36,50 @@ + public static final Block lavaStill = (new BlockStationary(11, Material.lava)).setHardness(100.0F).setLightValue(1.0F).setLightOpacity(255); + public static final Block sand = (new BlockSand(12, 18)).setHardness(0.5F).setStepSound(soundSandFootstep); + public static final Block gravel = (new BlockGravel(13, 19)).setHardness(0.6F).setStepSound(soundGravelFootstep); +- public static final Block oreGold = (new BlockOre(14, 32)).setHardness(3.0F).setResistance(5.0F).setStepSound(soundStoneFootstep); +- public static final Block oreIron = (new BlockOre(15, 33)).setHardness(3.0F).setResistance(5.0F).setStepSound(soundStoneFootstep); +- public static final Block oreCoal = (new BlockOre(16, 34)).setHardness(3.0F).setResistance(5.0F).setStepSound(soundStoneFootstep); ++ public static final Block oreGold = (new BlockOre(14, 32, textureXY(8, 8))).setHardness(3.0F).setResistance(5.0F).setStepSound(soundStoneFootstep); ++ public static final Block oreIron = (new BlockOre(15, 33, textureXY(9, 8))).setHardness(3.0F).setResistance(5.0F).setStepSound(soundStoneFootstep); ++ public static final Block oreCoal = (new BlockOre(16, 34, textureXY(10, 8), 263)).setHardness(3.0F).setResistance(5.0F).setStepSound(soundStoneFootstep); + public static final Block wood = (new BlockLog(17)).setHardness(2.0F).setStepSound(soundWoodFootstep); + public static final BlockLeaves leaves = (BlockLeaves)(new BlockLeaves(18, 52)).setHardness(0.2F).setLightOpacity(1).setStepSound(soundGrassFootstep); + public static final Block sponge = (new BlockSponge(19)).setHardness(0.6F).setStepSound(soundGrassFootstep); + public static final Block glass = (new BlockGlass(20, 49, Material.glass, false)).setHardness(0.3F).setStepSound(soundGlassFootstep); +- public static final Block clothRed = null; +- public static final Block clothOrange = null; +- public static final Block clothYellow = null; +- public static final Block clothChartreuse = null; +- public static final Block clothGreen = null; +- public static final Block clothSpringGreen = null; +- public static final Block clothCyan = null; +- public static final Block clothCapri = null; +- public static final Block clothUltramarine = null; +- public static final Block clothViolet = null; +- public static final Block clothPurple = null; +- public static final Block clothMagenta = null; +- public static final Block clothRose = null; +- public static final Block clothDarkGray = null; ++ public static final Block polishedStone = (new BlockStone(21, 6, BlockStone.Type.POLISHED)).setHardness(2.0F).setResistance(10.0F).setStepSound(soundStoneFootstep); ++ public static final Block woodStairDouble = (new BlockStep(22, Material.wood, true, new BlockStep.Type[] { ++ new BlockStep.Type(textureXY(4, 0)) ++ })).setHardness(2.0F).setResistance(5.0F).setStepSound(soundWoodFootstep); ++ public static final Block woodStairSingle = (new BlockStep(23, Material.wood, false, ((BlockStep) woodStairDouble).slabTypes)).setHardness(2.0F).setResistance(5.0F).setStepSound(soundWoodFootstep); + public static final Block cloth = (new Block(35, 64, Material.cloth)).setHardness(0.8F).setStepSound(soundClothFootstep); +- public static final Block clothWhite = null; + public static final BlockFlower plantYellow = (BlockFlower)(new BlockFlower(37, 13)).setHardness(0.0F).setStepSound(soundGrassFootstep); + public static final BlockFlower plantRed = (BlockFlower)(new BlockFlower(38, 12)).setHardness(0.0F).setStepSound(soundGrassFootstep); + public static final BlockFlower mushroomBrown = (BlockFlower)(new BlockMushroom(39, 29)).setHardness(0.0F).setStepSound(soundGrassFootstep).setLightValue(0.125F); + public static final BlockFlower mushroomRed = (BlockFlower)(new BlockMushroom(40, 28)).setHardness(0.0F).setStepSound(soundGrassFootstep); + public static final Block blockGold = (new BlockOreBlock(41, 39)).setHardness(3.0F).setResistance(10.0F).setStepSound(soundMetalFootstep); + public static final Block blockSteel = (new BlockOreBlock(42, 38)).setHardness(5.0F).setResistance(10.0F).setStepSound(soundMetalFootstep); +- public static final Block stairDouble = (new BlockStep(43, true)).setHardness(2.0F).setResistance(10.0F).setStepSound(soundStoneFootstep); +- public static final Block stairSingle = (new BlockStep(44, false)).setHardness(2.0F).setResistance(10.0F).setStepSound(soundStoneFootstep); ++ public static final Block stairDouble = (new BlockStep(43, Material.rock, true, new BlockStep.Type[] { ++ new BlockStep.Type(textureXY(0, 1)), ++ new BlockStep.Type(textureXY(11, 6)), ++ new BlockStep.Type(textureXY(11, 7)), ++ new BlockStep.Type(textureXY(1, 0)), ++ new BlockStep.Type(textureXY(8, 6)), ++ new BlockStep.Type(textureXY(8, 7)), ++ new BlockStep.Type(textureXY(6, 0), true), ++ new BlockStep.Type(textureXY(10, 6), true), ++ new BlockStep.Type(textureXY(10, 7), true), ++ new BlockStep.Type(textureXY(7, 0)) ++ })).setHardness(2.0F).setResistance(10.0F).setStepSound(soundStoneFootstep); ++ public static final Block stairSingle = (new BlockStep(44, Material.rock, false, ((BlockStep) stairDouble).slabTypes)).setHardness(2.0F).setResistance(10.0F).setStepSound(soundStoneFootstep); + public static final Block brick = (new Block(45, 7, Material.rock)).setHardness(2.0F).setResistance(10.0F).setStepSound(soundStoneFootstep); + public static final Block tnt = (new BlockTNT(46, 8)).setHardness(0.0F).setStepSound(soundGrassFootstep); + public static final Block bookshelf = (new BlockBookshelf(47, 35)).setHardness(1.5F).setStepSound(soundWoodFootstep); + public static final Block cobblestoneMossy = (new Block(48, 36, Material.rock)).setHardness(2.0F).setResistance(10.0F).setStepSound(soundStoneFootstep); + public static final Block obsidian = (new BlockObsidian(49, 37)).setHardness(10.0F).setResistance(2000.0F).setStepSound(soundStoneFootstep); + public static final Block torch = (new BlockTorch(50, 80)).setHardness(0.0F).setLightValue(0.9375F).setStepSound(soundWoodFootstep); +- public static final BlockFire fire = (BlockFire)((BlockFire)(new BlockFire(51, 31)).setHardness(0.0F).setLightValue(1.0F).setStepSound(soundWoodFootstep)); ++ public static final BlockFire fire = (BlockFire) (new BlockFire(51, 31)).setHardness(0.0F).setLightValue(1.0F).setStepSound(soundWoodFootstep); + public static final Block mobSpawner = (new BlockMobSpawner(52, 65)).setHardness(5.0F).setStepSound(soundMetalFootstep); + public static final Block stairCompactWood = new BlockStairs(53, planks); + public static final Block chest = (new BlockChest(54)).setHardness(2.5F).setStepSound(soundWoodFootstep); + public static final Block redstoneWire = (new BlockRedstoneWire(55, 84)).setHardness(0.0F).setStepSound(soundPowderFootstep); +- public static final Block oreDiamond = (new BlockOre(56, 50)).setHardness(3.0F).setResistance(5.0F).setStepSound(soundStoneFootstep); ++ public static final Block oreDiamond = (new BlockOre(56, 50, textureXY(11, 8), 264)).setHardness(3.0F).setResistance(5.0F).setStepSound(soundStoneFootstep); + public static final Block blockDiamond = (new BlockOreBlock(57, 40)).setHardness(5.0F).setResistance(10.0F).setStepSound(soundMetalFootstep); + public static final Block workbench = (new BlockWorkbench(58)).setHardness(2.5F).setStepSound(soundWoodFootstep); + public static final Block crops = (new BlockCrops(59, 88)).setHardness(0.0F).setStepSound(soundGrassFootstep); +@@ -92,8 +96,8 @@ + public static final Block pressurePlateStone = (new BlockPressurePlate(70, stone.blockIndexInTexture, EnumMobType.mobs)).setHardness(0.5F).setStepSound(soundStoneFootstep); + public static final Block doorSteel = (new BlockDoor(71, Material.iron)).setHardness(5.0F).setStepSound(soundMetalFootstep); + public static final Block pressurePlateWood = (new BlockPressurePlate(72, planks.blockIndexInTexture, EnumMobType.everything)).setHardness(0.5F).setStepSound(soundWoodFootstep); +- public static final Block oreRedstone = (new BlockRedstoneOre(73, 51, false)).setHardness(3.0F).setResistance(5.0F).setStepSound(soundStoneFootstep); +- public static final Block oreRedstoneGlowing = (new BlockRedstoneOre(74, 51, true)).setLightValue(0.625F).setHardness(3.0F).setResistance(5.0F).setStepSound(soundStoneFootstep); ++ public static final Block oreRedstone = (new BlockRedstoneOre(73, 51, textureXY(12, 8), false)).setHardness(3.0F).setResistance(5.0F).setStepSound(soundStoneFootstep); ++ public static final Block oreRedstoneGlowing = (new BlockRedstoneOre(74, 51, textureXY(12, 8), true)).setLightValue(0.625F).setHardness(3.0F).setResistance(5.0F).setStepSound(soundStoneFootstep); + public static final Block torchRedstoneIdle = (new BlockRedstoneTorch(75, 115, false)).setHardness(0.0F).setStepSound(soundWoodFootstep); + public static final Block torchRedstoneActive = (new BlockRedstoneTorch(76, 99, true)).setHardness(0.0F).setLightValue(0.5F).setStepSound(soundWoodFootstep); + public static final Block button = (new BlockButton(77, stone.blockIndexInTexture)).setHardness(0.5F).setStepSound(soundStoneFootstep); +@@ -105,6 +109,14 @@ + public static final Block reed = (new BlockReed(83, 73)).setHardness(0.0F).setStepSound(soundGrassFootstep); + public static final Block jukebox = (new BlockJukeBox(84, 74)).setHardness(2.0F).setResistance(10.0F).setStepSound(soundStoneFootstep); + public static final Block fence = (new BlockFence(85, 4)).setHardness(2.0F).setResistance(5.0F).setStepSound(soundWoodFootstep); ++ public static final Block speleothem = (new BlockSpeleothem(86, textureXY(0, 9))).setHardness(0.5F).setStepSound(soundStoneFootstep); ++ public static final Block oreRuby = (new BlockOre(87, textureXY(12, 6), textureXY(12, 7), 350, 3)).setHardness(3.0F).setResistance(5.0F).setStepSound(soundStoneFootstep); ++ public static final Block oreSapphire = (new BlockOre(88, textureXY(13, 6), textureXY(13, 7), 351, 3)).setHardness(3.0F).setResistance(5.0F).setStepSound(soundStoneFootstep); ++ public static final Block blockRuby = (new BlockOreBlock(89, textureXY(6, 7))).setHardness(5.0F).setResistance(10.0F).setStepSound(soundMetalFootstep); ++ public static final Block blockSapphire = (new BlockOreBlock(90, textureXY(7, 7))).setHardness(5.0F).setResistance(10.0F).setStepSound(soundMetalFootstep); ++ public static final Block blasterIdle = (new BlockBlaster(91, false)).setHardness(7.0F).setStepSound(soundMetalFootstep); ++ public static final Block blasterActive = (new BlockBlaster(92, true)).setHardness(7.0F).setStepSound(soundMetalFootstep).setLightValue(0.875F); ++ public static final Block refabricator = (new BlockRefabricator(93)).setHardness(10.0F).setResistance(10.0F).setStepSound(soundMetalFootstep).setLightValue(0.5F); + public int blockIndexInTexture; + public final int blockID; + protected float hardness; +@@ -120,6 +132,10 @@ + public final Material material; + public float slipperiness; + ++ protected static int textureXY(int x, int y) { ++ return y * 16 + x; ++ } ++ + protected Block(int id, Material material) { + this.stepSound = soundPowderFootstep; + this.blockParticleGravity = 1.0F; +@@ -201,8 +217,12 @@ + return blockAccess.getBrightness(x, y, z); + } + ++ public float getBlockRenderBrightness(IBlockAccess blockAccess, int x, int y, int z) { ++ return this.getBlockBrightness(blockAccess, x, y, z) * (1 - RenderGlobal.globalBrightness) + RenderGlobal.globalBrightness; ++ } ++ + public boolean shouldSideBeRendered(IBlockAccess blockAccess, int x, int y, int z, int side) { +- return side == 0 && this.minY > 0.0D ? true : (side == 1 && this.maxY < 1.0D ? true : (side == 2 && this.minZ > 0.0D ? true : (side == 3 && this.maxZ < 1.0D ? true : (side == 4 && this.minX > 0.0D ? true : (side == 5 && this.maxX < 1.0D ? true : !blockAccess.isBlockNormalCube(x, y, z)))))); ++ return side == 0 && this.minY > 0.0D ? true : (side == 1 && this.maxY < 1.0D || (side == 2 && this.minZ > 0.0D ? true : (side == 3 && this.maxZ < 1.0D ? true : (side == 4 && this.minX > 0.0D ? true : (side == 5 && this.maxX < 1.0D ? true : !blockAccess.isBlockNormalCube(x, y, z)))))); + } + + public int getBlockTexture(IBlockAccess blockAccess, int x, int y, int z, int side) { +@@ -221,7 +241,7 @@ + return AxisAlignedBB.getBoundingBoxFromPool((double)x + this.minX, (double)y + this.minY, (double)z + this.minZ, (double)x + this.maxX, (double)y + this.maxY, (double)z + this.maxZ); + } + +- public void getCollidingBoundingBoxes(World worldObj, int x, int y, int z, AxisAlignedBB aabb, ArrayList collidingBoundingBoxes) { ++ public void getCollidingBoundingBoxes(World worldObj, int x, int y, int z, AxisAlignedBB aabb, ArrayList collidingBoundingBoxes) { + AxisAlignedBB axisAlignedBB7 = this.getCollisionBoundingBoxFromPool(worldObj, x, y, z); + if(axisAlignedBB7 != null && aabb.intersectsWith(axisAlignedBB7)) { + collidingBoundingBoxes.add(axisAlignedBB7); +@@ -275,8 +295,15 @@ + return this.blockID; + } + ++ public int metadataDropped(int metadata, Random rand) { ++ return 0; ++ } ++ + public float blockStrength(EntityPlayer entityPlayer) { +- return this.hardness < 0.0F ? 0.0F : (!entityPlayer.canHarvestBlock(this) ? 1.0F / this.hardness / 100.0F : entityPlayer.getCurrentPlayerStrVsBlock(this) / this.hardness / 30.0F); ++ return entityPlayer.creative ? Float.POSITIVE_INFINITY ++ : this.hardness < 0.0F ? 0.0F ++ : (!entityPlayer.canHarvestBlock(this) ? 1.0F / this.hardness / 100.0F ++ : entityPlayer.getCurrentPlayerStrVsBlock(this) / this.hardness / 30.0F); + } + + public void dropBlockAsItem(World worldObj, int x, int y, int z, int metadata) { +@@ -291,11 +318,16 @@ + if(worldObj.rand.nextFloat() <= chance) { + int i9 = this.idDropped(metadata, worldObj.rand); + if(i9 > 0) { ++ ItemStack itemStack = new ItemStack(i9); ++ if(i9 < 256) { ++ itemStack.itemMetadata = this.metadataDropped(metadata, worldObj.rand); ++ } ++ + float f10 = 0.7F; + double d11 = (double)(worldObj.rand.nextFloat() * f10) + (double)(1.0F - f10) * 0.5D; + double d13 = (double)(worldObj.rand.nextFloat() * f10) + (double)(1.0F - f10) * 0.5D; + double d15 = (double)(worldObj.rand.nextFloat() * f10) + (double)(1.0F - f10) * 0.5D; +- EntityItem entityItem17 = new EntityItem(worldObj, (double)x + d11, (double)y + d13, (double)z + d15, new ItemStack(i9)); ++ EntityItem entityItem17 = new EntityItem(worldObj, (double)x + d11, (double)y + d13, (double)z + d15, itemStack); + entityItem17.delayBeforeCanPickup = 10; + worldObj.spawnEntityInWorld(entityItem17); + } +@@ -479,6 +511,20 @@ + Item.itemsList[i0] = new ItemBlock(i0 - 256); + } + } +- ++ } ++ ++ public int[] availableMetadata() { ++ return new int[] { 0 }; ++ } ++ ++ public boolean equals(Object o) { ++ if (this == o) return true; ++ if (o == null || getClass() != o.getClass()) return false; ++ Block block = (Block) o; ++ return blockID == block.blockID; ++ } ++ ++ public int hashCode() { ++ return Objects.hash(blockID); + } + } diff --git a/patches_merged/net/minecraft/src/BlockBookshelf.java.patch b/patches_merged/net/minecraft/src/BlockBookshelf.java.patch new file mode 100644 index 0000000..41840ba --- /dev/null +++ b/patches_merged/net/minecraft/src/BlockBookshelf.java.patch @@ -0,0 +1,14 @@ +--- a/net/minecraft/src/BlockBookshelf.java ++++ b/net/minecraft/src/BlockBookshelf.java +@@ -12,6 +12,10 @@ + } + + public int quantityDropped(Random rand) { +- return 0; ++ return 3; ++ } ++ ++ public int idDropped(int metadata, Random rand) { ++ return Item.book.shiftedIndex; + } + } diff --git a/patches_merged/net/minecraft/src/BlockFurnace.java.patch b/patches_merged/net/minecraft/src/BlockFurnace.java.patch new file mode 100644 index 0000000..17040db --- /dev/null +++ b/patches_merged/net/minecraft/src/BlockFurnace.java.patch @@ -0,0 +1,28 @@ +--- a/net/minecraft/src/BlockFurnace.java ++++ b/net/minecraft/src/BlockFurnace.java +@@ -3,10 +3,14 @@ + import java.util.Random; + + public class BlockFurnace extends BlockContainer { +- private final boolean isActive; ++ protected final boolean isActive; + + protected BlockFurnace(int blockID, boolean isActive) { +- super(blockID, Material.rock); ++ this(blockID, isActive, Material.rock); ++ } ++ ++ protected BlockFurnace(int blockID, boolean isActive, Material material) { ++ super(blockID, material); + this.isActive = isActive; + this.blockIndexInTexture = 45; + } +@@ -91,7 +95,7 @@ + return true; + } + +- public static void updateFurnaceBlockState(boolean isActive, World worldObj, int x, int y, int z) { ++ public void updateFurnaceBlockState(boolean isActive, World worldObj, int x, int y, int z) { + int i5 = worldObj.getBlockMetadata(x, y, z); + TileEntity tileEntity6 = worldObj.getBlockTileEntity(x, y, z); + if(isActive) { diff --git a/patches_merged/net/minecraft/src/BlockGrass.java.patch b/patches_merged/net/minecraft/src/BlockGrass.java.patch new file mode 100644 index 0000000..3accdd6 --- /dev/null +++ b/patches_merged/net/minecraft/src/BlockGrass.java.patch @@ -0,0 +1,16 @@ +--- a/net/minecraft/src/BlockGrass.java ++++ b/net/minecraft/src/BlockGrass.java +@@ -20,6 +20,13 @@ + } + } + ++ ++ public int getBlockTextureFromSide(int side) { ++ return side == 1 ? 0 ++ : side == 0 ? 2 ++ : 3; ++ } ++ + public void updateTick(World worldObj, int x, int y, int z, Random rand) { + if(worldObj.getBlockLightValue(x, y + 1, z) < 4 && worldObj.getBlockMaterial(x, y + 1, z).getCanBlockGrass()) { + if(rand.nextInt(4) != 0) { diff --git a/patches_merged/net/minecraft/src/BlockJukeBox.java.patch b/patches_merged/net/minecraft/src/BlockJukeBox.java.patch new file mode 100644 index 0000000..1d25ed7 --- /dev/null +++ b/patches_merged/net/minecraft/src/BlockJukeBox.java.patch @@ -0,0 +1,20 @@ +--- a/net/minecraft/src/BlockJukeBox.java ++++ b/net/minecraft/src/BlockJukeBox.java +@@ -20,7 +20,7 @@ + } + + public void ejectRecord(World worldObj, int x, int y, int z, int i5) { +- worldObj.playRecord((String)null, x, y, z); ++ worldObj.playRecord(null, x, y, z, null); + worldObj.setBlockMetadataWithNotify(x, y, z, 0); + int i6 = Item.record13.shiftedIndex + i5 - 1; + float f7 = 0.7F; +@@ -38,7 +38,7 @@ + this.ejectRecord(worldObj, x, y, z, metadata); + } + +- super.dropBlockAsItemWithChance(worldObj, x, y, z, metadata, chance); ++ super.dropBlockAsItemWithChance(worldObj, x, y, z, 0, chance); + } + } + } diff --git a/patches_merged/net/minecraft/src/BlockLeaves.java.patch b/patches_merged/net/minecraft/src/BlockLeaves.java.patch new file mode 100644 index 0000000..d7fbc3a --- /dev/null +++ b/patches_merged/net/minecraft/src/BlockLeaves.java.patch @@ -0,0 +1,165 @@ +--- a/net/minecraft/src/BlockLeaves.java ++++ b/net/minecraft/src/BlockLeaves.java +@@ -3,101 +3,58 @@ + import java.util.Random; + + public class BlockLeaves extends BlockLeavesBase { +- private int leafTexIndex; +- private int decayCounter = 0; ++ private final int leafTexIndex; + +- protected BlockLeaves(int id, int tex) { +- super(id, tex, Material.leaves, false); +- this.leafTexIndex = tex; ++ protected BlockLeaves(int i1, int i2) { ++ super(i1, i2, Material.leaves, false); ++ this.leafTexIndex = i2; + this.setTickOnLoad(true); + } + ++ public void updateTick(World world1, int i2, int i3, int i4, Random random5) { ++ if (!world1.getBlockMaterial(i2, i3 - 1, i4).isSolid()) { ++ byte b6 = 5; ++ ++ for (int i7 = i2 - b6; i7 <= i2 + b6; ++i7) { ++ for (int i8 = i3 - 1; i8 <= i3 + 1; ++i8) { ++ for (int i9 = i4 - b6; i9 <= i4 + b6; ++i9) { ++ if (world1.getBlockId(i7, i8, i9) == Block.wood.blockID) { ++ return; ++ } ++ } ++ } ++ } ++ ++// this.dropBlockAsItem(world1, i2, i3, i4, world1.getBlockMetadata(i2, i3, i4)); ++// world1.setBlockWithNotify(i2, i3, i4, 0); ++ fall(world1, i2, i3, i4); ++ } ++ } ++ + public void onNeighborBlockChange(World worldObj, int x, int y, int z, int id) { +- this.decayCounter = 0; +- this.updateCurrentLeaves(worldObj, x, y, z); +- super.onNeighborBlockChange(worldObj, x, y, z, id); +- } +- +- public void updateConnectedLeaves(World worldObj, int x, int y, int z, int metadata) { +- if(worldObj.getBlockId(x, y, z) == this.blockID) { +- int i6 = worldObj.getBlockMetadata(x, y, z); +- if(i6 != 0 && i6 == metadata - 1) { +- this.updateCurrentLeaves(worldObj, x, y, z); +- } +- } +- } +- +- public void updateCurrentLeaves(World worldObj, int x, int y, int z) { +- if(this.decayCounter++ < 100) { +- int i5 = worldObj.getBlockMaterial(x, y - 1, z).isSolid() ? 16 : 0; +- int i6 = worldObj.getBlockMetadata(x, y, z); +- if(i6 == 0) { +- i6 = 1; +- worldObj.setBlockMetadataWithNotify(x, y, z, 1); +- } +- +- i5 = this.getConnectionStrength(worldObj, x, y - 1, z, i5); +- i5 = this.getConnectionStrength(worldObj, x, y, z - 1, i5); +- i5 = this.getConnectionStrength(worldObj, x, y, z + 1, i5); +- i5 = this.getConnectionStrength(worldObj, x - 1, y, z, i5); +- i5 = this.getConnectionStrength(worldObj, x + 1, y, z, i5); +- int i7 = i5 - 1; +- if(i7 < 10) { +- i7 = 1; +- } +- +- if(i7 != i6) { +- worldObj.setBlockMetadataWithNotify(x, y, z, i7); +- this.updateConnectedLeaves(worldObj, x, y - 1, z, i6); +- this.updateConnectedLeaves(worldObj, x, y + 1, z, i6); +- this.updateConnectedLeaves(worldObj, x, y, z - 1, i6); +- this.updateConnectedLeaves(worldObj, x, y, z + 1, i6); +- this.updateConnectedLeaves(worldObj, x - 1, y, z, i6); +- this.updateConnectedLeaves(worldObj, x + 1, y, z, i6); +- } +- +- } +- } +- +- private int getConnectionStrength(World worldObj, int x, int y, int z, int metadata) { +- int i6 = worldObj.getBlockId(x, y, z); +- if(i6 == Block.wood.blockID) { +- return 16; +- } else { +- if(i6 == this.blockID) { +- int i7 = worldObj.getBlockMetadata(x, y, z); +- if(i7 != 0 && i7 > metadata) { +- return i7; ++ updateTick(worldObj, x, y, z, worldObj.rand); ++ } ++ ++ public void fall(World world1, int i2, int i3, int i4) { ++ EntityFallingSand fallingLeaves = new EntityFallingSand(world1, (float)i2 + 0.5F, (float)i3 + 0.5F, (float)i4 + 0.5F, Block.leaves.blockID); ++ fallingLeaves.breakOnFall = true; ++ world1.setBlockWithNotify(i2, i3, i4, 0); ++ world1.spawnEntityInWorld(fallingLeaves); ++ ++ for (int rx = i2 - 1; rx <= i2 + 1; rx++) { ++ for (int ry = i3 - 1; ry <= i3 + 1; ry++) { ++ for (int rz = i4 - 1; rz <= i4 + 1; rz++) { ++ world1.markBlockNeedsUpdate(rx, ry, rz); + } + } +- +- return metadata; +- } +- } +- +- public void updateTick(World worldObj, int x, int y, int z, Random rand) { +- int i6 = worldObj.getBlockMetadata(x, y, z); +- if(i6 == 0) { +- this.decayCounter = 0; +- this.updateCurrentLeaves(worldObj, x, y, z); +- } else if(i6 == 1) { +- this.removeLeaves(worldObj, x, y, z); +- } else if(rand.nextInt(10) == 0) { +- this.updateCurrentLeaves(worldObj, x, y, z); +- } +- +- } +- +- private void removeLeaves(World worldObj, int x, int y, int z) { +- this.dropBlockAsItem(worldObj, x, y, z, worldObj.getBlockMetadata(x, y, z)); +- worldObj.setBlockWithNotify(x, y, z, 0); +- } +- +- public int quantityDropped(Random rand) { +- return rand.nextInt(20) == 0 ? 1 : 0; +- } +- +- public int idDropped(int metadata, Random rand) { ++ } ++ } ++ ++ public int quantityDropped(Random random1) { ++ return random1.nextInt(20) == 0 ? 1 : 0; ++ } ++ ++ public int idDropped(int i1, Random random2) { + return Block.sapling.blockID; + } + +@@ -105,12 +62,8 @@ + return !this.graphicsLevel; + } + +- public void setGraphicsLevel(boolean graphicsLevel) { +- this.graphicsLevel = graphicsLevel; +- this.blockIndexInTexture = this.leafTexIndex + (graphicsLevel ? 0 : 1); +- } +- +- public void onEntityWalking(World worldObj, int x, int y, int z, Entity entity) { +- super.onEntityWalking(worldObj, x, y, z, entity); ++ public void setGraphicsLevel(boolean z1) { ++ this.graphicsLevel = z1; ++ this.blockIndexInTexture = this.leafTexIndex + (z1 ? 0 : 1); + } + } diff --git a/patches_merged/net/minecraft/src/BlockLog.java.patch b/patches_merged/net/minecraft/src/BlockLog.java.patch new file mode 100644 index 0000000..35e94e9 --- /dev/null +++ b/patches_merged/net/minecraft/src/BlockLog.java.patch @@ -0,0 +1,79 @@ +--- a/net/minecraft/src/BlockLog.java ++++ b/net/minecraft/src/BlockLog.java +@@ -1,8 +1,12 @@ + package net.minecraft.src; + ++import java.util.ArrayList; ++import java.util.List; + import java.util.Random; + + public class BlockLog extends Block { ++ private final List leavesToUpdate = new ArrayList<>(); ++ + protected BlockLog(int id) { + super(id, Material.wood); + this.blockIndexInTexture = 20; +@@ -12,11 +16,61 @@ + return 1; + } + +- public int idDropped(int metadata, Random rand) { +- return Block.wood.blockID; ++ public int getBlockTextureFromSideAndMetadata(int side, int metadata) { ++ return metadata == 0 ? getBlockTextureFromSide(side) ++ : textureXY(14, 5 + metadata) + (side <= 1 ? 1 : 0); + } + + public int getBlockTextureFromSide(int side) { + return side == 1 ? 21 : (side == 0 ? 21 : 20); ++ } ++ ++ private boolean recursiveDestroy(World worldObj, int x, int y, int z, int ignoredMetadata, EntityPlayer player, ItemStack currentItem) { ++ for (int rx = x - 1; rx <= x + 1; rx++) { ++ for (int ry = y; ry <= y + 1; ry++) { ++ for (int rz = z - 1; rz <= z + 1; rz++) { ++ if (worldObj.getBlockId(rx, ry, rz) == this.blockID ++ && currentItem.itemDmg <= currentItem.getMaxDamage() ++ && (rx != x || ry != y || rz != z)) { ++ currentItem.onDestroyBlock(this.blockID, rx, ry, rz); ++ if (currentItem.stackSize == 0) { ++ currentItem.onItemDestroyedByUse(player); ++ player.destroyCurrentEquippedItem(); ++ return false; ++ } ++ ++ this.dropBlockAsItem(worldObj, rx, ry, rz, 0); ++ worldObj.setBlockWithNotify(rx, ry, rz, 0); ++ if (!this.recursiveDestroy(worldObj, rx, ry, rz, ignoredMetadata, player, currentItem)) { ++ return false; ++ } ++ } else if (worldObj.getBlockId(rx, ry, rz) == Block.leaves.blockID) { ++// Block.leaves.fall(worldObj, rx, ry, rz); ++ leavesToUpdate.add(new Integer[] {rx, ry, rz}); ++ } ++ } ++ } ++ } ++ return true; ++ } ++ ++ public void onBlockDestroyedByPlayer(World worldObj, int x, int y, int z, int metadata) { ++ EntityPlayer player = worldObj.getClosestPlayer(x, y, z, 10); ++ ItemStack currentItem = player.inventory.getCurrentItem(); ++ if (currentItem == null) { ++ return; ++ } ++ Item heldItem = currentItem.getItem(); ++ if (!(heldItem instanceof ItemTool ++ && ((ItemTool) heldItem).effectiveAgainst(this) ++ && player.isSneaking())) { ++ return; ++ } ++ ++ recursiveDestroy(worldObj, x, y, z, metadata, player, currentItem); ++ for (Integer[] leaf : leavesToUpdate) { ++ Block.leaves.fall(worldObj, leaf[0], leaf[1], leaf[2]); ++ } ++ leavesToUpdate.clear(); + } + } diff --git a/patches_merged/net/minecraft/src/BlockObsidian.java.patch b/patches_merged/net/minecraft/src/BlockObsidian.java.patch new file mode 100644 index 0000000..8ed8f36 --- /dev/null +++ b/patches_merged/net/minecraft/src/BlockObsidian.java.patch @@ -0,0 +1,14 @@ +--- a/net/minecraft/src/BlockObsidian.java ++++ b/net/minecraft/src/BlockObsidian.java +@@ -2,9 +2,9 @@ + + import java.util.Random; + +-public class BlockObsidian extends BlockStone { ++public class BlockObsidian extends Block { + public BlockObsidian(int i1, int i2) { +- super(i1, i2); ++ super(i1, i2, Material.rock); + } + + public int quantityDropped(Random rand) { diff --git a/patches_merged/net/minecraft/src/BlockOre.java.patch b/patches_merged/net/minecraft/src/BlockOre.java.patch new file mode 100644 index 0000000..e1ac96f --- /dev/null +++ b/patches_merged/net/minecraft/src/BlockOre.java.patch @@ -0,0 +1,47 @@ +--- a/net/minecraft/src/BlockOre.java ++++ b/net/minecraft/src/BlockOre.java +@@ -1,17 +1,41 @@ + package net.minecraft.src; + + import java.util.Random; ++import java.util.stream.IntStream; + + public class BlockOre extends Block { +- public BlockOre(int id, int tex) { ++ private final int slateTex; ++ private final int dropId; ++ private final int dropExtra; ++ ++ public BlockOre(int id, int tex, int slateTex) { ++ this(id, tex, slateTex, id, 0); ++ } ++ ++ public BlockOre(int id, int tex, int slateTex, int dropId) { ++ this(id, tex, slateTex, dropId, 0); ++ } ++ ++ public BlockOre(int id, int tex, int slateTex, int dropId, int dropExtra) { + super(id, tex, Material.rock); ++ this.slateTex = slateTex; ++ this.dropId = dropId; ++ this.dropExtra = dropExtra; + } + + public int idDropped(int metadata, Random rand) { +- return this.blockID == Block.oreCoal.blockID ? Item.coal.shiftedIndex : (this.blockID == Block.oreDiamond.blockID ? Item.diamond.shiftedIndex : this.blockID); ++ return this.dropId; + } + + public int quantityDropped(Random rand) { +- return 1; ++ return rand.nextInt(this.dropExtra + 1) + 1; ++ } ++ ++ public int[] availableMetadata() { ++ return IntStream.range(0, 2).toArray(); ++ } ++ ++ public int getBlockTextureFromSideAndMetadata(int side, int metadata) { ++ return metadata == 1 ? slateTex : blockIndexInTexture; + } + } diff --git a/patches_merged/net/minecraft/src/BlockRedstoneOre.java.patch b/patches_merged/net/minecraft/src/BlockRedstoneOre.java.patch new file mode 100644 index 0000000..542e6f5 --- /dev/null +++ b/patches_merged/net/minecraft/src/BlockRedstoneOre.java.patch @@ -0,0 +1,36 @@ +--- a/net/minecraft/src/BlockRedstoneOre.java ++++ b/net/minecraft/src/BlockRedstoneOre.java +@@ -3,10 +3,12 @@ + import java.util.Random; + + public class BlockRedstoneOre extends Block { +- private boolean glowing; ++ private final boolean glowing; ++ private final int slateTex; + +- public BlockRedstoneOre(int id, int tex, boolean glowing) { ++ public BlockRedstoneOre(int id, int tex, int slateTex, boolean glowing) { + super(id, tex, Material.rock); ++ this.slateTex = slateTex; + if(glowing) { + this.setTickOnLoad(true); + } +@@ -36,7 +38,7 @@ + private void glow(World worldObj, int x, int y, int z) { + this.sparkle(worldObj, x, y, z); + if(this.blockID == Block.oreRedstone.blockID) { +- worldObj.setBlockWithNotify(x, y, z, Block.oreRedstoneGlowing.blockID); ++ worldObj.setBlockAndMetadataWithNotify(x, y, z, Block.oreRedstoneGlowing.blockID, worldObj.getBlockMetadata(x, y, z)); + } + + } +@@ -99,6 +101,9 @@ + worldObj.spawnParticle("reddust", d9, d11, d13, 0.0D, 0.0D, 0.0D); + } + } ++ } + ++ public int getBlockTextureFromSideAndMetadata(int side, int metadata) { ++ return metadata == 1 ? slateTex : blockIndexInTexture; + } + } diff --git a/patches_merged/net/minecraft/src/BlockReed.java.patch b/patches_merged/net/minecraft/src/BlockReed.java.patch new file mode 100644 index 0000000..c3d1e28 --- /dev/null +++ b/patches_merged/net/minecraft/src/BlockReed.java.patch @@ -0,0 +1,16 @@ +--- a/net/minecraft/src/BlockReed.java ++++ b/net/minecraft/src/BlockReed.java +@@ -32,7 +32,12 @@ + + public boolean canPlaceBlockAt(World world, int x, int y, int z) { + int i5 = world.getBlockId(x, y - 1, z); +- return i5 == this.blockID ? true : (i5 != Block.grass.blockID && i5 != Block.dirt.blockID ? false : (world.getBlockMaterial(x - 1, y - 1, z) == Material.water ? true : (world.getBlockMaterial(x + 1, y - 1, z) == Material.water ? true : (world.getBlockMaterial(x, y - 1, z - 1) == Material.water ? true : world.getBlockMaterial(x, y - 1, z + 1) == Material.water)))); ++ return i5 == this.blockID ? true ++ : (i5 != Block.grass.blockID && i5 != Block.dirt.blockID && i5 != Block.sand.blockID ? false ++ : (world.getBlockMaterial(x - 1, y - 1, z) == Material.water ? true ++ : (world.getBlockMaterial(x + 1, y - 1, z) == Material.water ? true ++ : (world.getBlockMaterial(x, y - 1, z - 1) == Material.water ? true ++ : world.getBlockMaterial(x, y - 1, z + 1) == Material.water)))); + } + + public void onNeighborBlockChange(World worldObj, int x, int y, int z, int id) { diff --git a/patches_merged/net/minecraft/src/BlockStairs.java.patch b/patches_merged/net/minecraft/src/BlockStairs.java.patch new file mode 100644 index 0000000..674aac7 --- /dev/null +++ b/patches_merged/net/minecraft/src/BlockStairs.java.patch @@ -0,0 +1,19 @@ +--- a/net/minecraft/src/BlockStairs.java ++++ b/net/minecraft/src/BlockStairs.java +@@ -181,15 +181,7 @@ + } + + public int getBlockTextureFromSideAndMetadata(int side, int metadata) { +- return this.modelBlock.getBlockTextureFromSideAndMetadata(side, metadata); +- } +- +- public int getBlockTextureFromSide(int side) { +- return this.modelBlock.getBlockTextureFromSide(side); +- } +- +- public int getBlockTexture(IBlockAccess blockAccess, int x, int y, int z, int side) { +- return this.modelBlock.getBlockTexture(blockAccess, x, y, z, side); ++ return this.modelBlock.getBlockTextureFromSideAndMetadata(side, 0); + } + + public int tickRate() { diff --git a/patches_merged/net/minecraft/src/BlockStep.java.patch b/patches_merged/net/minecraft/src/BlockStep.java.patch new file mode 100644 index 0000000..a450fb9 --- /dev/null +++ b/patches_merged/net/minecraft/src/BlockStep.java.patch @@ -0,0 +1,131 @@ +--- a/net/minecraft/src/BlockStep.java ++++ b/net/minecraft/src/BlockStep.java +@@ -1,13 +1,39 @@ + package net.minecraft.src; + + import java.util.Random; ++import java.util.stream.IntStream; + + public class BlockStep extends Block { +- private boolean blockType; +- +- public BlockStep(int id, boolean blockType) { +- super(id, 6, Material.rock); ++ public final boolean blockType; ++ protected final Type[] slabTypes; ++ ++ public static class Type { ++ public final int sideTexture; ++ public final int topTexture; ++ ++ public Type(int texture) { ++ this(texture, texture); ++ } ++ ++ public Type(int texture, boolean autoSide) { ++ this(autoSide ? texture - 1 : texture, texture); ++ } ++ ++ public Type(int sideTexture, int topTexture) { ++ this.sideTexture = sideTexture; ++ this.topTexture = topTexture; ++ } ++ ++ public int getTextureFromSide(int side) { ++ return side <= 1 ? topTexture : sideTexture; ++ } ++ } ++ ++ public BlockStep(int id, Material material, boolean blockType, Type[] slabTypes) { ++ super(id, 6, material); ++ this.slabTypes = slabTypes; + this.blockType = blockType; ++ this.blockIndexInTexture = slabTypes[0].topTexture; + if(!blockType) { + this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.5F, 1.0F); + } +@@ -15,7 +41,23 @@ + this.setLightOpacity(255); + } + +- public int getBlockTextureFromSide(int side) { ++ public int getBlockTextureFromSideAndMetadata(int side, int metadata) { ++// switch (metadata) { ++// case 0: return textureXY(0, 1); ++// case 1: return textureXY(11, 6); ++// case 2: return textureXY(11, 7); ++// case 3: return textureXY(1, 0); ++// case 4: return textureXY(8, 6); ++// case 5: return textureXY(8, 7); ++// case 6: return side <= 1 ? textureXY(6, 0) : textureXY(5, 0); ++// case 7: return side <= 1 ? textureXY(10, 6) : textureXY(9, 6); ++// case 8: return side <= 1 ? textureXY(10, 7) : textureXY(9, 7); ++// case 9: return textureXY(7, 0); ++// default: return side <= 1 ? 6 : 5; ++// } ++ if (metadata < slabTypes.length) { ++ return slabTypes[metadata].getTextureFromSide(side); ++ } + return side <= 1 ? 6 : 5; + } + +@@ -23,27 +65,32 @@ + return this.blockType; + } + +- public void onNeighborBlockChange(World worldObj, int x, int y, int z, int id) { +- if(this == Block.stairSingle) { +- ; +- } +- } +- + public void onBlockAdded(World worldObj, int x, int y, int z) { +- if(this != Block.stairSingle) { ++ if(this.blockType) { + super.onBlockAdded(worldObj, x, y, z); ++ return; + } + ++ int metadata = worldObj.getBlockMetadata(x, y, z); + int i5 = worldObj.getBlockId(x, y - 1, z); +- if(i5 == stairSingle.blockID) { ++ int i5Metadata = worldObj.getBlockMetadata(x, y - 1, z); ++ ++ if(i5 == blockID && i5Metadata == metadata) { + worldObj.setBlockWithNotify(x, y, z, 0); +- worldObj.setBlockWithNotify(x, y - 1, z, Block.stairDouble.blockID); ++ worldObj.setBlockAndMetadataWithNotify(x, y - 1, z, blockID - 1, metadata); + } +- + } + + public int idDropped(int metadata, Random rand) { +- return Block.stairSingle.blockID; ++ return blockType ? this.blockID + 1 : this.blockID; ++ } ++ ++ public int quantityDropped(Random rand) { ++ return blockType ? 2 : 1; ++ } ++ ++ public int metadataDropped(int metadata, Random rand) { ++ return metadata; + } + + public boolean renderAsNormalBlock() { +@@ -51,10 +98,14 @@ + } + + public boolean shouldSideBeRendered(IBlockAccess blockAccess, int x, int y, int z, int side) { +- if(this != Block.stairSingle) { ++ if(this.blockType) { + super.shouldSideBeRendered(blockAccess, x, y, z, side); + } + + return side == 1 ? true : (!super.shouldSideBeRendered(blockAccess, x, y, z, side) ? false : (side == 0 ? true : blockAccess.getBlockId(x, y, z) != this.blockID)); ++ } ++ ++ public int[] availableMetadata() { ++ return IntStream.range(0, this.slabTypes.length).toArray(); + } + } diff --git a/patches_merged/net/minecraft/src/BlockStone.java.patch b/patches_merged/net/minecraft/src/BlockStone.java.patch new file mode 100644 index 0000000..712e0b2 --- /dev/null +++ b/patches_merged/net/minecraft/src/BlockStone.java.patch @@ -0,0 +1,48 @@ +--- a/net/minecraft/src/BlockStone.java ++++ b/net/minecraft/src/BlockStone.java +@@ -1,13 +1,43 @@ + package net.minecraft.src; + + import java.util.Random; ++import java.util.stream.IntStream; + + public class BlockStone extends Block { +- public BlockStone(int id, int tex) { ++ private final Type type; ++ ++ public enum Type { ++ STONE, ++ COBBLESTONE, ++ POLISHED ++ } ++ ++ public BlockStone(int id, int tex, Type type) { + super(id, tex, Material.rock); ++ this.type = type; + } + + public int idDropped(int metadata, Random rand) { +- return Block.cobblestone.blockID; ++ return type == Type.STONE ? Block.cobblestone.blockID : this.blockID; ++ } ++ ++ public int metadataDropped(int metadata, Random rand) { ++ return metadata; ++ } ++ ++ public int[] availableMetadata() { ++ return IntStream.range(0, 3).toArray(); ++ } ++ ++ public int getBlockTextureFromSideAndMetadata(int side, int metadata) { ++ if (metadata == 0) { ++ return this.blockIndexInTexture; ++ } ++ switch (type) { ++ case STONE: return textureXY(8, 5 + metadata); ++ case COBBLESTONE: return textureXY(11, 5 + metadata); ++ case POLISHED: return textureXY(10, 5 + metadata); ++ default: return this.blockIndexInTexture; ++ } + } + } diff --git a/patches_merged/net/minecraft/src/ChunkCache.java.patch b/patches_merged/net/minecraft/src/ChunkCache.java.patch new file mode 100644 index 0000000..9032e1c --- /dev/null +++ b/patches_merged/net/minecraft/src/ChunkCache.java.patch @@ -0,0 +1,12 @@ +--- a/net/minecraft/src/ChunkCache.java ++++ b/net/minecraft/src/ChunkCache.java +@@ -54,7 +54,8 @@ + int i6; + if(z4) { + i5 = this.getBlockId(x, y, z); +- if(i5 == Block.stairSingle.blockID || i5 == Block.tilledField.blockID) { ++ Block b = Block.blocksList[i5]; ++ if((b instanceof BlockStep && !((BlockStep) b).blockType) || i5 == Block.tilledField.blockID) { + i6 = this.getLightValueExt(x, y + 1, z, false); + int i7 = this.getLightValueExt(x + 1, y, z, false); + int i8 = this.getLightValueExt(x - 1, y, z, false); diff --git a/patches_merged/net/minecraft/src/ChunkProviderGenerate.java.patch b/patches_merged/net/minecraft/src/ChunkProviderGenerate.java.patch new file mode 100644 index 0000000..8d39f2a --- /dev/null +++ b/patches_merged/net/minecraft/src/ChunkProviderGenerate.java.patch @@ -0,0 +1,163 @@ +--- a/net/minecraft/src/ChunkProviderGenerate.java ++++ b/net/minecraft/src/ChunkProviderGenerate.java +@@ -1,5 +1,7 @@ + package net.minecraft.src; + ++import io.github.bluestaggo.mcdiverge.WorldGenSpeleothems; ++ + import java.util.Random; + + public class ChunkProviderGenerate implements IChunkProvider { +@@ -107,7 +109,7 @@ + + } + +- public void replaceSurfaceBlocks(int chunkX, int chunkZ, byte[] blocks) { ++ public void replaceSurfaceBlocks(int chunkX, int chunkZ, byte[] blocks, NibbleArray metadata) { + byte b4 = 64; + double d5 = 8.0D / 256D; + this.sandNoise = this.noiseGen4.generateNoiseOctaves(this.sandNoise, (double)(chunkX * 16), (double)(chunkZ * 16), 0.0D, 16, 16, 1, d5, d5, 1.0D); +@@ -125,14 +127,16 @@ + + for(int i15 = 127; i15 >= 0; --i15) { + int i16 = (i7 * 16 + i8) * 128 + i15; +- if(i15 <= 0 + this.rand.nextInt(6) - 1) { ++ if(i15 <= this.rand.nextInt(4)) { + blocks[i16] = (byte)Block.bedrock.blockID; + } else { + byte b17 = blocks[i16]; + if(b17 == 0) { + i12 = -1; + } else if(b17 == Block.stone.blockID) { +- if(i12 == -1) { ++ if(i15 <= 32 - this.rand.nextInt(8)) { ++ metadata.set(i7, i15, i8, 2); ++ } else if(i12 == -1) { + if(i11 <= 0) { + b13 = 0; + b14 = (byte)Block.stone.blockID; +@@ -183,7 +187,7 @@ + byte[] b3 = new byte[32768]; + Chunk chunk4 = new Chunk(this.worldObj, b3, chunkX, chunkZ); + this.generateTerrain(chunkX, chunkZ, b3); +- this.replaceSurfaceBlocks(chunkX, chunkZ, b3); ++ this.replaceSurfaceBlocks(chunkX, chunkZ, b3, chunk4.data); + this.caveGenerator.generate(this, this.worldObj, chunkX, chunkZ, b3); + chunk4.generateSkylightMap(); + return chunk4; +@@ -305,9 +309,10 @@ + int i13; + int i14; + int i15; +- for(i12 = 0; i12 < 8; ++i12) { ++ int maxDungeons = this.rand.nextInt(2) + 1; ++ for(i12 = 0; i12 < maxDungeons; ++i12) { + i13 = i4 + this.rand.nextInt(16) + 8; +- i14 = this.rand.nextInt(128); ++ i14 = this.rand.nextInt(64); + i15 = i5 + this.rand.nextInt(16) + 8; + (new WorldGenDungeons()).generate(this.worldObj, this.rand, i13, i14, i15); + } +@@ -333,39 +338,60 @@ + (new WorldGenMinable(Block.gravel.blockID, 32)).generate(this.worldObj, this.rand, i13, i14, i15); + } + ++ for (i12 = 0; i12 < 4; ++i12) { ++ i13 = i4 + this.rand.nextInt(16); ++ i14 = this.rand.nextInt(96) + 32; ++ i15 = i5 + this.rand.nextInt(16); ++ (new WorldGenMinable(Block.stone.blockID, 64, 1)).generate(this.worldObj, this.rand, i13, i14, i15); ++ } ++ + for(i12 = 0; i12 < 20; ++i12) { + i13 = i4 + this.rand.nextInt(16); + i14 = this.rand.nextInt(128); + i15 = i5 + this.rand.nextInt(16); +- (new WorldGenMinable(Block.oreCoal.blockID, 16)).generate(this.worldObj, this.rand, i13, i14, i15); ++ (new WorldGenMinable(Block.oreCoal.blockID, 16).withSlateMetadata(1)).generate(this.worldObj, this.rand, i13, i14, i15); + } + + for(i12 = 0; i12 < 20; ++i12) { + i13 = i4 + this.rand.nextInt(16); + i14 = this.rand.nextInt(64); + i15 = i5 + this.rand.nextInt(16); +- (new WorldGenMinable(Block.oreIron.blockID, 8)).generate(this.worldObj, this.rand, i13, i14, i15); ++ (new WorldGenMinable(Block.oreIron.blockID, 8).withSlateMetadata(1)).generate(this.worldObj, this.rand, i13, i14, i15); + } + + for(i12 = 0; i12 < 2; ++i12) { + i13 = i4 + this.rand.nextInt(16); + i14 = this.rand.nextInt(32); + i15 = i5 + this.rand.nextInt(16); +- (new WorldGenMinable(Block.oreGold.blockID, 8)).generate(this.worldObj, this.rand, i13, i14, i15); ++ (new WorldGenMinable(Block.oreGold.blockID, 8).withSlateMetadata(1)).generate(this.worldObj, this.rand, i13, i14, i15); + } + + for(i12 = 0; i12 < 8; ++i12) { + i13 = i4 + this.rand.nextInt(16); + i14 = this.rand.nextInt(16); + i15 = i5 + this.rand.nextInt(16); +- (new WorldGenMinable(Block.oreRedstone.blockID, 7)).generate(this.worldObj, this.rand, i13, i14, i15); ++ (new WorldGenMinable(Block.oreRedstone.blockID, 7).withSlateMetadata(1)).generate(this.worldObj, this.rand, i13, i14, i15); + } + + for(i12 = 0; i12 < 1; ++i12) { + i13 = i4 + this.rand.nextInt(16); + i14 = this.rand.nextInt(16); + i15 = i5 + this.rand.nextInt(16); +- (new WorldGenMinable(Block.oreDiamond.blockID, 7)).generate(this.worldObj, this.rand, i13, i14, i15); ++ (new WorldGenMinable(Block.oreDiamond.blockID, 7).withSlateMetadata(1)).generate(this.worldObj, this.rand, i13, i14, i15); ++ } ++ ++ for (i12 = 0; i12 < 2; ++i12) { ++ i13 = i4 + this.rand.nextInt(16); ++ i14 = this.rand.nextInt(32); ++ i15 = i5 + this.rand.nextInt(16); ++ (new WorldGenMinable(Block.oreRuby.blockID, 4).withSlateMetadata(1)).generate(this.worldObj, this.rand, i13, i14, i15); ++ } ++ ++ for (i12 = 0; i12 < 2; ++i12) { ++ i13 = i4 + this.rand.nextInt(16); ++ i14 = this.rand.nextInt(32); ++ i15 = i5 + this.rand.nextInt(16); ++ (new WorldGenMinable(Block.oreSapphire.blockID, 4).withSlateMetadata(1)).generate(this.worldObj, this.rand, i13, i14, i15); + } + + d10 = 0.5D; +@@ -448,14 +474,31 @@ + (new WorldGenLiquids(Block.lavaMoving.blockID)).generate(this.worldObj, this.rand, i15, i16, i17); + } + +- for(i14 = i4 + 8 + 0; i14 < i4 + 8 + 16; ++i14) { +- for(i15 = i5 + 8 + 0; i15 < i5 + 8 + 16; ++i15) { +- i16 = this.worldObj.getTopSolidOrLiquidBlock(i14, i15); +- if(this.worldObj.snowCovered && i16 > 0 && i16 < 128 && this.worldObj.getBlockId(i14, i16, i15) == 0 && this.worldObj.getBlockMaterial(i14, i16 - 1, i15).getIsSolid() && this.worldObj.getBlockMaterial(i14, i16 - 1, i15) != Material.ice) { +- this.worldObj.setBlockWithNotify(i14, i16, i15, Block.snow.blockID); ++ for (i14 = 0; i14 < 64; ++i14) { ++ i15 = i4 + this.rand.nextInt(16) + 8; ++ i16 = this.rand.nextInt(64); ++ i17 = i5 + this.rand.nextInt(16) + 8; ++ (new WorldGenSpeleothems(Block.speleothem.blockID)).generate(this.worldObj, this.rand, i15, i16, i17); ++ } ++ ++ if (this.worldObj.snowCovered) { ++ for(i14 = i4 + 8; i14 < i4 + 24; ++i14) { ++ for(i15 = i5 + 8; i15 < i5 + 24; ++i15) { ++ i16 = this.worldObj.getTopSolidOrLiquidBlock(i14, i15); ++ if(i16 > 0 && i16 < 128 && this.worldObj.getBlockId(i14, i16, i15) == 0 && this.worldObj.getBlockMaterial(i14, i16 - 1, i15).getIsSolid() && this.worldObj.getBlockMaterial(i14, i16 - 1, i15) != Material.ice) { ++ this.worldObj.setBlockWithNotify(i14, i16, i15, Block.snow.blockID); ++ } + } + } + } ++ ++ for(i14 = i4 + 8; i14 < i4 + 24; ++i14) ++ for(i15 = i5 + 8; i15 < i5 + 24; ++i15) ++ for (int y = 0; y < 8; y++) { ++ if (!this.worldObj.isBlockNormalCube(i14, y, i15)) { ++ this.worldObj.setBlockWithNotify(i14, y, i15, Block.lavaStill.blockID); ++ } ++ } + + BlockSand.fallInstantly = false; + } diff --git a/patches_merged/net/minecraft/src/CraftingInventoryPlayerCB.java.patch b/patches_merged/net/minecraft/src/CraftingInventoryPlayerCB.java.patch new file mode 100644 index 0000000..405e000 --- /dev/null +++ b/patches_merged/net/minecraft/src/CraftingInventoryPlayerCB.java.patch @@ -0,0 +1,30 @@ +--- a/net/minecraft/src/CraftingInventoryPlayerCB.java ++++ b/net/minecraft/src/CraftingInventoryPlayerCB.java +@@ -11,22 +11,26 @@ + + public void onCraftMatrixChanged(IInventory inventory) { + int[] i2 = new int[9]; ++ int[] metaMap = new int[9]; + + for(int i3 = 0; i3 < 3; ++i3) { + for(int i4 = 0; i4 < 3; ++i4) { + int i5 = -1; ++ int metadata = -1; + if(i3 < 2 && i4 < 2) { + ItemStack itemStack6 = this.craftMatrix.getStackInSlot(i3 + i4 * 2); + if(itemStack6 != null) { + i5 = itemStack6.itemID; ++ metadata = itemStack6.itemMetadata; + } + } + + i2[i3 + i4 * 3] = i5; ++ metaMap[i3 + i4 * 3] = metadata; + } + } + +- this.craftResult.setInventorySlotContents(0, CraftingManager.getInstance().findMatchingRecipe(i2)); ++ this.craftResult.setInventorySlotContents(0, CraftingManager.getInstance().findMatchingRecipe(i2, metaMap)); + } + + public void onCraftGuiClosed(EntityPlayer entityPlayer) { diff --git a/patches_merged/net/minecraft/src/CraftingInventoryWorkbenchCB.java.patch b/patches_merged/net/minecraft/src/CraftingInventoryWorkbenchCB.java.patch new file mode 100644 index 0000000..e1c4e17 --- /dev/null +++ b/patches_merged/net/minecraft/src/CraftingInventoryWorkbenchCB.java.patch @@ -0,0 +1,27 @@ +--- a/net/minecraft/src/CraftingInventoryWorkbenchCB.java ++++ b/net/minecraft/src/CraftingInventoryWorkbenchCB.java +@@ -6,6 +6,7 @@ + + public void onCraftMatrixChanged(IInventory inventory) { + int[] i2 = new int[9]; ++ int[] metaMap = new int[9]; + + for(int i3 = 0; i3 < 3; ++i3) { + for(int i4 = 0; i4 < 3; ++i4) { +@@ -13,13 +14,15 @@ + ItemStack itemStack6 = this.craftMatrix.getStackInSlot(i5); + if(itemStack6 == null) { + i2[i5] = -1; ++ metaMap[i5] = -1; + } else { + i2[i5] = itemStack6.itemID; ++ metaMap[i5] = itemStack6.itemMetadata; + } + } + } + +- this.craftResult.setInventorySlotContents(0, CraftingManager.getInstance().findMatchingRecipe(i2)); ++ this.craftResult.setInventorySlotContents(0, CraftingManager.getInstance().findMatchingRecipe(i2, metaMap)); + } + + public void onCraftGuiClosed(EntityPlayer entityPlayer) { diff --git a/patches_merged/net/minecraft/src/CraftingManager.java.patch b/patches_merged/net/minecraft/src/CraftingManager.java.patch new file mode 100644 index 0000000..eecfe3f --- /dev/null +++ b/patches_merged/net/minecraft/src/CraftingManager.java.patch @@ -0,0 +1,194 @@ +--- a/net/minecraft/src/CraftingManager.java ++++ b/net/minecraft/src/CraftingManager.java +@@ -1,5 +1,7 @@ + package net.minecraft.src; + ++import io.github.bluestaggo.mcdiverge.Pair; ++ + import java.util.ArrayList; + import java.util.Collections; + import java.util.HashMap; +@@ -20,46 +22,61 @@ + (new RecipesFood()).addRecipes(this); + (new RecipesCrafting()).addRecipes(this); + (new RecipesArmor()).addRecipes(this); +- this.addRecipe(new ItemStack(Item.paper, 3), new Object[]{"###", '#', Item.reed}); +- this.addRecipe(new ItemStack(Item.book, 1), new Object[]{"#", "#", "#", '#', Item.paper}); +- this.addRecipe(new ItemStack(Block.fence, 2), new Object[]{"###", "###", '#', Item.stick}); +- this.addRecipe(new ItemStack(Block.jukebox, 1), new Object[]{"###", "#X#", "###", '#', Block.planks, 'X', Item.diamond}); +- this.addRecipe(new ItemStack(Block.bookshelf, 1), new Object[]{"###", "XXX", "###", '#', Block.planks, 'X', Item.book}); +- this.addRecipe(new ItemStack(Block.blockSnow, 1), new Object[]{"##", "##", '#', Item.snowball}); +- this.addRecipe(new ItemStack(Block.blockClay, 1), new Object[]{"##", "##", '#', Item.clay}); +- this.addRecipe(new ItemStack(Block.brick, 1), new Object[]{"##", "##", '#', Item.brick}); +- this.addRecipe(new ItemStack(Block.cloth, 1), new Object[]{"###", "###", "###", '#', Item.silk}); +- this.addRecipe(new ItemStack(Block.tnt, 1), new Object[]{"X#X", "#X#", "X#X", 'X', Item.gunpowder, '#', Block.sand}); +- this.addRecipe(new ItemStack(Block.stairSingle, 3), new Object[]{"###", '#', Block.cobblestone}); +- this.addRecipe(new ItemStack(Block.ladder, 1), new Object[]{"# #", "###", "# #", '#', Item.stick}); +- this.addRecipe(new ItemStack(Item.doorWood, 1), new Object[]{"##", "##", "##", '#', Block.planks}); +- this.addRecipe(new ItemStack(Item.doorSteel, 1), new Object[]{"##", "##", "##", '#', Item.ingotIron}); +- this.addRecipe(new ItemStack(Item.sign, 1), new Object[]{"###", "###", " X ", '#', Block.planks, 'X', Item.stick}); +- this.addRecipe(new ItemStack(Block.planks, 4), new Object[]{"#", '#', Block.wood}); +- this.addRecipe(new ItemStack(Item.stick, 4), new Object[]{"#", "#", '#', Block.planks}); +- this.addRecipe(new ItemStack(Block.torch, 4), new Object[]{"X", "#", 'X', Item.coal, '#', Item.stick}); +- this.addRecipe(new ItemStack(Item.bowlEmpty, 4), new Object[]{"# #", " # ", '#', Block.planks}); +- this.addRecipe(new ItemStack(Block.minecartTrack, 16), new Object[]{"X X", "X#X", "X X", 'X', Item.ingotIron, '#', Item.stick}); +- this.addRecipe(new ItemStack(Item.minecartEmpty, 1), new Object[]{"# #", "###", '#', Item.ingotIron}); +- this.addRecipe(new ItemStack(Item.minecartBox, 1), new Object[]{"A", "B", 'A', Block.chest, 'B', Item.minecartEmpty}); +- this.addRecipe(new ItemStack(Item.minecartEngine, 1), new Object[]{"A", "B", 'A', Block.stoneOvenIdle, 'B', Item.minecartEmpty}); +- this.addRecipe(new ItemStack(Item.boat, 1), new Object[]{"# #", "###", '#', Block.planks}); +- this.addRecipe(new ItemStack(Item.bucketEmpty, 1), new Object[]{"# #", " # ", '#', Item.ingotIron}); +- this.addRecipe(new ItemStack(Item.striker, 1), new Object[]{"A ", " B", 'A', Item.ingotIron, 'B', Item.flint}); +- this.addRecipe(new ItemStack(Item.bread, 1), new Object[]{"###", '#', Item.wheat}); +- this.addRecipe(new ItemStack(Block.stairCompactWood, 4), new Object[]{"# ", "## ", "###", '#', Block.planks}); +- this.addRecipe(new ItemStack(Item.fishingRod, 1), new Object[]{" #", " #X", "# X", '#', Item.stick, 'X', Item.silk}); +- this.addRecipe(new ItemStack(Block.stairCompactStone, 4), new Object[]{"# ", "## ", "###", '#', Block.cobblestone}); +- this.addRecipe(new ItemStack(Item.painting, 1), new Object[]{"###", "#X#", "###", '#', Item.stick, 'X', Block.cloth}); +- this.addRecipe(new ItemStack(Item.appleGold, 1), new Object[]{"###", "#X#", "###", '#', Block.blockGold, 'X', Item.appleRed}); +- this.addRecipe(new ItemStack(Block.lever, 1), new Object[]{"X", "#", '#', Block.cobblestone, 'X', Item.stick}); +- this.addRecipe(new ItemStack(Block.torchRedstoneActive, 1), new Object[]{"X", "#", '#', Item.stick, 'X', Item.redstone}); +- this.addRecipe(new ItemStack(Item.compass, 1), new Object[]{" # ", "#X#", " # ", '#', Item.ingotIron, 'X', Item.redstone}); +- this.addRecipe(new ItemStack(Block.button, 1), new Object[]{"#", "#", '#', Block.stone}); +- this.addRecipe(new ItemStack(Block.pressurePlateStone, 1), new Object[]{"###", '#', Block.stone}); +- this.addRecipe(new ItemStack(Block.pressurePlateWood, 1), new Object[]{"###", '#', Block.planks}); ++ this.addRecipe(new ItemStack(Item.paper, 3), "###", '#', Item.reed); ++ this.addRecipe(new ItemStack(Item.book, 1), "#", "#", "#", '#', Item.paper); ++ this.addRecipe(new ItemStack(Block.fence, 2), "###", "###", '#', Item.stick); ++ this.addRecipe(new ItemStack(Block.jukebox, 1), "###", "#X#", "###", '#', Block.planks, 'X', Item.diamond); ++ this.addRecipe(new ItemStack(Block.bookshelf, 1), "###", "XXX", "###", '#', Block.planks, 'X', Item.book); ++ this.addRecipe(new ItemStack(Block.blockSnow, 1), "##", "##", '#', Item.snowball); ++ this.addRecipe(new ItemStack(Block.blockClay, 1), "##", "##", '#', Item.clay); ++ this.addRecipe(new ItemStack(Block.brick, 1), "##", "##", '#', Item.brick); ++ this.addRecipe(new ItemStack(Block.cloth, 1), "###", "###", "###", '#', Item.silk); ++ this.addRecipe(new ItemStack(Block.tnt, 1), "X#X", "#X#", "X#X", 'X', Item.gunpowder, '#', Block.sand); ++ this.addRecipe(new ItemStack(Block.stairSingle, 6, 0), "###", '#', new Pair<>(Block.cobblestone, 0)); ++ this.addRecipe(new ItemStack(Block.stairSingle, 6, 1), "###", '#', new Pair<>(Block.cobblestone, 1)); ++ this.addRecipe(new ItemStack(Block.stairSingle, 6, 2), "###", '#', new Pair<>(Block.cobblestone, 2)); ++ this.addRecipe(new ItemStack(Block.stairSingle, 6, 3), "###", '#', new Pair<>(Block.stone, 0)); ++ this.addRecipe(new ItemStack(Block.stairSingle, 6, 4), "###", '#', new Pair<>(Block.stone, 1)); ++ this.addRecipe(new ItemStack(Block.stairSingle, 6, 5), "###", '#', new Pair<>(Block.stone, 2)); ++ this.addRecipe(new ItemStack(Block.stairSingle, 6, 6), "###", '#', new Pair<>(Block.polishedStone, 0)); ++ this.addRecipe(new ItemStack(Block.stairSingle, 6, 7), "###", '#', new Pair<>(Block.polishedStone, 1)); ++ this.addRecipe(new ItemStack(Block.stairSingle, 6, 8), "###", '#', new Pair<>(Block.polishedStone, 2)); ++ this.addRecipe(new ItemStack(Block.stairSingle, 6, 9), "###", '#', Block.brick); ++ this.addRecipe(new ItemStack(Block.woodStairSingle, 6, 0), "###", '#', new Pair<>(Block.planks, 0)); ++ this.addRecipe(new ItemStack(Block.ladder, 1), "# #", "###", "# #", '#', Item.stick); ++ this.addRecipe(new ItemStack(Item.doorWood, 1), "##", "##", "##", '#', Block.planks); ++ this.addRecipe(new ItemStack(Item.doorSteel, 1), "##", "##", "##", '#', Item.ingotIron); ++ this.addRecipe(new ItemStack(Item.sign, 1), "###", "###", " X ", '#', Block.planks, 'X', Item.stick); ++ this.addRecipe(new ItemStack(Block.planks, 4), "#", '#', Block.wood); ++ this.addRecipe(new ItemStack(Item.stick, 4), "#", "#", '#', Block.planks); ++ this.addRecipe(new ItemStack(Block.torch, 4), "X", "#", 'X', Item.coal, '#', Item.stick); ++ this.addRecipe(new ItemStack(Item.bowlEmpty, 4), "# #", " # ", '#', Block.planks); ++ this.addRecipe(new ItemStack(Block.minecartTrack, 16), "X X", "X#X", "X X", 'X', Item.ingotIron, '#', Item.stick); ++ this.addRecipe(new ItemStack(Item.minecartEmpty, 1), "# #", "###", '#', Item.ingotIron); ++ this.addRecipe(new ItemStack(Item.minecartBox, 1), "A", "B", 'A', Block.chest, 'B', Item.minecartEmpty); ++ this.addRecipe(new ItemStack(Item.minecartEngine, 1), "A", "B", 'A', Block.stoneOvenIdle, 'B', Item.minecartEmpty); ++ this.addRecipe(new ItemStack(Item.boat, 1), "# #", "###", '#', Block.planks); ++ this.addRecipe(new ItemStack(Item.bucketEmpty, 1), "# #", " # ", '#', Item.ingotIron); ++ this.addRecipe(new ItemStack(Item.striker, 1), "A ", " B", 'A', Item.ingotIron, 'B', Item.flint); ++ this.addRecipe(new ItemStack(Item.bread, 1), "###", '#', Item.wheat); ++ this.addRecipe(new ItemStack(Block.stairCompactWood, 8), "# ", "## ", "###", '#', Block.planks); ++ this.addRecipe(new ItemStack(Item.fishingRod, 1), " #", " #X", "# X", '#', Item.stick, 'X', Item.silk); ++ this.addRecipe(new ItemStack(Block.stairCompactStone, 8), "# ", "## ", "###", '#', new Pair<>(Block.cobblestone, 0)); ++ this.addRecipe(new ItemStack(Item.painting, 1), "###", "#X#", "###", '#', Item.stick, 'X', Block.cloth); ++ this.addRecipe(new ItemStack(Item.appleGold, 1), "###", "#X#", "###", '#', Block.blockGold, 'X', Item.appleRed); ++ this.addRecipe(new ItemStack(Block.lever, 1), "X", "#", '#', Block.cobblestone, 'X', Item.stick); ++ this.addRecipe(new ItemStack(Block.torchRedstoneActive, 1), "X", "#", '#', Item.stick, 'X', Item.redstone); ++ this.addRecipe(new ItemStack(Item.compass, 1), " # ", "#X#", " # ", '#', Item.ingotIron, 'X', Item.redstone); ++ this.addRecipe(new ItemStack(Block.button, 1), "#", "#", '#', Block.stone); ++ this.addRecipe(new ItemStack(Block.pressurePlateStone, 1), "###", '#', Block.stone); ++ this.addRecipe(new ItemStack(Block.pressurePlateWood, 1), "###", '#', Block.planks); ++ this.addRecipe(new ItemStack(Block.polishedStone, 4, 0), "##", "##", '#', new Pair<>(Block.stone, 0)); ++ this.addRecipe(new ItemStack(Block.polishedStone, 4, 1), "##", "##", '#', new Pair<>(Block.stone, 1)); ++ this.addRecipe(new ItemStack(Block.polishedStone, 4, 2), "##", "##", '#', new Pair<>(Block.stone, 2)); ++ this.addRecipe(new ItemStack(Item.quiver, 1), "##/", "##/", "## ", '#', Item.leather, '/', Item.stick); ++ this.addRecipe(new ItemStack(Item.wardingRing, 1), " o ", "X X", " X ", 'o', Item.ruby, 'X', Item.sapphire); ++ this.addRecipe(new ItemStack(Item.repairKit, 1), "=o=", "###", '=', Block.stone, 'o', Item.sapphire, '#', Item.ingotIron); + Collections.sort(this.recipes, new RecipeSorter(this)); +- System.out.println(this.recipes.size() + " recipes"); + } + + void addRecipe(ItemStack itemStack1, Object... object2) { +@@ -86,41 +103,68 @@ + } + + HashMap hashMap12; +- int i15; ++ Pair i15; + for(hashMap12 = new HashMap(); i4 < object2.length; i4 += 2) { ++ Object value = object2[i4 + 1]; + Character character13 = (Character)object2[i4]; +- i15 = 0; +- if(object2[i4 + 1] instanceof Item) { +- i15 = ((Item)object2[i4 + 1]).shiftedIndex; +- } else if(object2[i4 + 1] instanceof Block) { +- i15 = ((Block)object2[i4 + 1]).blockID; ++ ++ i15 = new Pair<>( -1, -1 ); ++ if(value instanceof Pair && ((Pair) value).item1 instanceof Integer) { ++ if(((Pair) value).item0 instanceof Integer) { ++ i15 = (Pair)value; ++ } else if(((Pair) value).item0 instanceof Item) { ++ Pair item = (Pair) value; ++ i15 = new Pair<>( item.item0.shiftedIndex, item.item1 ); ++ } else if(((Pair) value).item0 instanceof Block) { ++ Pair item = (Pair) value; ++ i15 = new Pair<>( item.item0.blockID, item.item1 ); ++ } ++ } else if(value instanceof Item) { ++ i15 = new Pair<>( ((Item)object2[i4 + 1]).shiftedIndex, -1 ); ++ } else if(value instanceof Block) { ++ i15 = new Pair<>( ((Block)object2[i4 + 1]).blockID, -1 ); + } + + hashMap12.put(character13, i15); + } + + int[] i14 = new int[i5 * i6]; ++ int[] metadata = new int[i5 * i6]; + +- for(i15 = 0; i15 < i5 * i6; ++i15) { +- char c10 = string3.charAt(i15); ++ for(int i16 = 0; i16 < i5 * i6; ++i16) { ++ char c10 = string3.charAt(i16); + if(hashMap12.containsKey(c10)) { +- i14[i15] = ((Integer)hashMap12.get(c10)).intValue(); ++ i14[i16] = ((Pair) hashMap12.get(c10)).item0; ++ metadata[i16] = ((Pair) hashMap12.get(c10)).item1; + } else { +- i14[i15] = -1; ++ i14[i16] = -1; ++ metadata[i16] = -1; + } + } + +- this.recipes.add(new CraftingRecipe(i5, i6, i14, itemStack1)); ++ this.recipes.add(new CraftingRecipe(i5, i6, i14, metadata, itemStack1)); + } + +- public ItemStack findMatchingRecipe(int[] i1) { ++ public ItemStack findMatchingRecipe(int[] i1, int[] metadata) { + for(int i2 = 0; i2 < this.recipes.size(); ++i2) { + CraftingRecipe craftingRecipe3 = (CraftingRecipe)this.recipes.get(i2); +- if(craftingRecipe3.matches(i1)) { +- return craftingRecipe3.getCraftingResult(i1); ++ if(craftingRecipe3.matches(i1, metadata)) { ++ return craftingRecipe3.getCraftingResult(); + } + } + + return null; ++ } ++ ++ public ItemStack[] getRecipeAsItems(int i) { ++ CraftingRecipe recipe = (CraftingRecipe)recipes.get(i); ++ if (recipe == null) { ++ return null; ++ } ++ return recipe.asItemStacks(); ++ } ++ ++ public int count() { ++ return this.recipes.size(); + } + } diff --git a/patches_merged/net/minecraft/src/CraftingRecipe.java.patch b/patches_merged/net/minecraft/src/CraftingRecipe.java.patch new file mode 100644 index 0000000..a854e5f --- /dev/null +++ b/patches_merged/net/minecraft/src/CraftingRecipe.java.patch @@ -0,0 +1,89 @@ +--- a/net/minecraft/src/CraftingRecipe.java ++++ b/net/minecraft/src/CraftingRecipe.java +@@ -4,25 +4,27 @@ + private int width; + private int height; + private int[] ingredientMap; ++ private int[] metadataMap; + private ItemStack resultStack; + public final int resultId; + +- public CraftingRecipe(int width, int height, int[] ingredientMap, ItemStack resultStack) { ++ public CraftingRecipe(int width, int height, int[] ingredientMap, int[] metadataMap, ItemStack resultStack) { + this.resultId = resultStack.itemID; + this.width = width; + this.height = height; + this.ingredientMap = ingredientMap; ++ this.metadataMap = metadataMap; + this.resultStack = resultStack; + } + +- public boolean matches(int[] i1) { ++ public boolean matches(int[] i1, int[] metadata) { + for(int i2 = 0; i2 <= 3 - this.width; ++i2) { + for(int i3 = 0; i3 <= 3 - this.height; ++i3) { +- if(this.checkMatch(i1, i2, i3, true)) { ++ if(this.checkMatch(i1, i2, i3, metadata, true)) { + return true; + } + +- if(this.checkMatch(i1, i2, i3, false)) { ++ if(this.checkMatch(i1, i2, i3, metadata, false)) { + return true; + } + } +@@ -31,21 +33,24 @@ + return false; + } + +- private boolean checkMatch(int[] i1, int i2, int i3, boolean z4) { ++ private boolean checkMatch(int[] i1, int i2, int i3, int[] metaMap, boolean z4) { + for(int i5 = 0; i5 < 3; ++i5) { + for(int i6 = 0; i6 < 3; ++i6) { + int i7 = i5 - i2; + int i8 = i6 - i3; + int i9 = -1; ++ int metadata = -1; + if(i7 >= 0 && i8 >= 0 && i7 < this.width && i8 < this.height) { + if(z4) { + i9 = this.ingredientMap[this.width - i7 - 1 + i8 * this.width]; ++ metadata = this.metadataMap[this.width - i7 - 1 + i8 * this.width]; + } else { + i9 = this.ingredientMap[i7 + i8 * this.width]; ++ metadata = this.metadataMap[i7 + i8 * this.width]; + } + } + +- if(i1[i5 + i6 * 3] != i9) { ++ if(i1[i5 + i6 * 3] != i9 || (metadata >= 0 && metaMap[i5 + i6 * 3] != metadata)) { + return false; + } + } +@@ -54,11 +59,25 @@ + return true; + } + +- public ItemStack getCraftingResult(int[] i1) { +- return new ItemStack(this.resultStack.itemID, this.resultStack.stackSize); ++ public ItemStack getCraftingResult() { ++ return new ItemStack(this.resultStack.itemID, this.resultStack.stackSize).withMetadata(this.resultStack.itemMetadata); + } + + public int getRecipeSize() { + return this.width * this.height; ++ } ++ ++ public ItemStack[] asItemStacks() { ++ ItemStack[] items = new ItemStack[10]; ++ for (int y = 0; y < this.height; y++) { ++ for (int x = 0; x < this.width; x++) { ++ int item = this.ingredientMap[x + y * this.width]; ++ if (item > 0) { ++ items[x + y * 3] = new ItemStack(item, 1).withMetadata(this.metadataMap[x + y * this.width]); ++ } ++ } ++ } ++ items[9] = this.resultStack; ++ return items; + } + } diff --git a/patches_merged/net/minecraft/src/Entity.java.patch b/patches_merged/net/minecraft/src/Entity.java.patch new file mode 100644 index 0000000..7799b2c --- /dev/null +++ b/patches_merged/net/minecraft/src/Entity.java.patch @@ -0,0 +1,41 @@ +--- a/net/minecraft/src/Entity.java ++++ b/net/minecraft/src/Entity.java +@@ -444,6 +444,10 @@ + return false; + } + ++ public boolean isRunning() { ++ return false; ++ } ++ + public AxisAlignedBB getBoundingBox() { + return null; + } +@@ -504,7 +508,7 @@ + double d3 = (this.boundingBox.maxY - this.boundingBox.minY) * 0.66D; + int i5 = MathHelper.floor_double(this.posY - (double)this.yOffset + d3); + int i6 = MathHelper.floor_double(this.posZ); +- return this.worldObj.getBrightness(i2, i5, i6); ++ return this.worldObj.getBrightness(i2, i5, i6) * (1 - RenderGlobal.globalBrightness) + RenderGlobal.globalBrightness; + } + + public void setWorld(World world) { +@@ -736,7 +740,7 @@ + int i1 = MathHelper.floor_double(this.posX); + int i2 = MathHelper.floor_double(this.posY + (double)this.getEyeHeight()); + int i3 = MathHelper.floor_double(this.posZ); +- return this.worldObj.isBlockNormalCube(i1, i2, i3); ++ return this.worldObj.isBlockNormalCube(i1, i2, i3) && !this.noClip; + } + + public boolean interact(EntityPlayer entityPlayer) { +@@ -835,5 +839,9 @@ + public void setPositionAndRotation(double x, double y, double z, float rotationYaw, float rotationPitch, int newPosRotationIncrements) { + this.setPosition(x, y, z); + this.setRotation(rotationYaw, rotationPitch); ++ } ++ ++ public void playSound(String sound, float volume, float pitch) { ++ this.worldObj.playSoundAtEntity(this, sound, volume, pitch); + } + } diff --git a/patches_merged/net/minecraft/src/EntityAnimal.java.patch b/patches_merged/net/minecraft/src/EntityAnimal.java.patch new file mode 100644 index 0000000..09b7882 --- /dev/null +++ b/patches_merged/net/minecraft/src/EntityAnimal.java.patch @@ -0,0 +1,10 @@ +--- a/net/minecraft/src/EntityAnimal.java ++++ b/net/minecraft/src/EntityAnimal.java +@@ -1,6 +1,6 @@ + package net.minecraft.src; + +-public abstract class EntityAnimal extends EntityCreature implements IAnimals { ++public abstract class EntityAnimal extends EntityCreature implements IAnimal { + public EntityAnimal(World world1) { + super(world1); + } diff --git a/patches_merged/net/minecraft/src/EntityChicken.java.patch b/patches_merged/net/minecraft/src/EntityChicken.java.patch new file mode 100644 index 0000000..9815111 --- /dev/null +++ b/patches_merged/net/minecraft/src/EntityChicken.java.patch @@ -0,0 +1,12 @@ +--- a/net/minecraft/src/EntityChicken.java ++++ b/net/minecraft/src/EntityChicken.java +@@ -71,7 +71,7 @@ + return "mob.chickenhurt"; + } + +- protected int getDropItemId() { +- return Item.feather.shiftedIndex; ++ protected int[] getDropItems() { ++ return new int[] { Item.feather.shiftedIndex, Item.chickenRaw.shiftedIndex }; + } + } diff --git a/patches_merged/net/minecraft/src/EntityCow.java.patch b/patches_merged/net/minecraft/src/EntityCow.java.patch new file mode 100644 index 0000000..07f96e5 --- /dev/null +++ b/patches_merged/net/minecraft/src/EntityCow.java.patch @@ -0,0 +1,13 @@ +--- a/net/minecraft/src/EntityCow.java ++++ b/net/minecraft/src/EntityCow.java +@@ -33,8 +33,8 @@ + return 0.4F; + } + +- protected int getDropItemId() { +- return Item.leather.shiftedIndex; ++ protected int[] getDropItems() { ++ return new int[] { Item.leather.shiftedIndex, Item.beefRaw.shiftedIndex }; + } + + public boolean interact(EntityPlayer entityPlayer) { diff --git a/patches_merged/net/minecraft/src/EntityFallingSand.java.patch b/patches_merged/net/minecraft/src/EntityFallingSand.java.patch new file mode 100644 index 0000000..f3201a1 --- /dev/null +++ b/patches_merged/net/minecraft/src/EntityFallingSand.java.patch @@ -0,0 +1,39 @@ +--- a/net/minecraft/src/EntityFallingSand.java ++++ b/net/minecraft/src/EntityFallingSand.java +@@ -3,6 +3,7 @@ + public class EntityFallingSand extends Entity { + public int blockID; + public int fallTime = 0; ++ public boolean breakOnFall = false; + + public EntityFallingSand(World world1) { + super(world1); +@@ -53,11 +54,12 @@ + this.motionZ *= (double)0.7F; + this.motionY *= -0.5D; + this.setEntityDead(); +- if(!this.worldObj.canBlockBePlacedAt(this.blockID, i1, i2, i3, true) || !this.worldObj.setBlockWithNotify(i1, i2, i3, this.blockID)) { +- this.dropItem(this.blockID, 1); ++ if(this.breakOnFall || !this.worldObj.canBlockBePlacedAt(this.blockID, i1, i2, i3, true) || !this.worldObj.setBlockWithNotify(i1, i2, i3, this.blockID)) { ++// this.dropItem(this.blockID, 1); ++ Block.blocksList[this.blockID].dropBlockAsItem(this.worldObj, i1, i2, i3, 0); + } + } else if(this.fallTime > 100) { +- this.dropItem(this.blockID, 1); ++ Block.blocksList[this.blockID].dropBlockAsItem(this.worldObj, i1, i2, i3, 0); + this.setEntityDead(); + } + +@@ -66,10 +68,12 @@ + + protected void writeEntityToNBT(NBTTagCompound compoundTag) { + compoundTag.setByte("Tile", (byte)this.blockID); ++ compoundTag.setBoolean("BreakOnFall", this.breakOnFall); + } + + protected void readEntityFromNBT(NBTTagCompound compoundTag) { + this.blockID = compoundTag.getByte("Tile") & 255; ++ this.breakOnFall = compoundTag.getBoolean("BreakOnFall"); + } + + public float getShadowSize() { diff --git a/patches_merged/net/minecraft/src/EntityFlameFX.java.patch b/patches_merged/net/minecraft/src/EntityFlameFX.java.patch new file mode 100644 index 0000000..75b799d --- /dev/null +++ b/patches_merged/net/minecraft/src/EntityFlameFX.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/src/EntityFlameFX.java ++++ b/net/minecraft/src/EntityFlameFX.java +@@ -34,7 +34,7 @@ + f2 = 1.0F; + } + +- float f3 = super.getBrightness(renderPartialTick); ++ float f3 = super.getBrightness(renderPartialTick) * (1 - RenderGlobal.globalBrightness) + RenderGlobal.globalBrightness; + return f3 * f2 + (1.0F - f2); + } + diff --git a/patches_merged/net/minecraft/src/EntityItem.java.patch b/patches_merged/net/minecraft/src/EntityItem.java.patch new file mode 100644 index 0000000..1f997dd --- /dev/null +++ b/patches_merged/net/minecraft/src/EntityItem.java.patch @@ -0,0 +1,20 @@ +--- a/net/minecraft/src/EntityItem.java ++++ b/net/minecraft/src/EntityItem.java +@@ -184,7 +184,16 @@ + entityPlayer.onItemPickup(this, i2); + this.setEntityDead(); + } +- + } ++ } ++ ++ public float getBrightness(float renderPartialTick) { ++ return this.item.itemID == Item.starChunk.shiftedIndex ? 1.0F : super.getBrightness(renderPartialTick); ++ } ++ ++ public boolean isInRangeToRenderDist(double distance) { ++ double d3 = this.boundingBox.getAverageEdgeLength(); ++ d3 *= 2048.0D * this.renderDistanceWeight; ++ return distance < d3 * d3; + } + } diff --git a/patches_merged/net/minecraft/src/EntityLiving.java.patch b/patches_merged/net/minecraft/src/EntityLiving.java.patch new file mode 100644 index 0000000..e475714 --- /dev/null +++ b/patches_merged/net/minecraft/src/EntityLiving.java.patch @@ -0,0 +1,86 @@ +--- a/net/minecraft/src/EntityLiving.java ++++ b/net/minecraft/src/EntityLiving.java +@@ -4,6 +4,7 @@ + + public class EntityLiving extends Entity { + public int heartsHalvesLife = 20; ++ public int healthRegen = 0; + public float unusedRotationPitch2; + public float unusedFloat; + public float unusedRotationPitch; +@@ -46,7 +47,6 @@ + private double newPosZ; + private double newRotationYaw; + private double newRotationPitch; +- float unusedFloat3 = 0.0F; + protected int entityAge = 0; + protected float moveStrafing; + protected float moveForward; +@@ -54,6 +54,7 @@ + protected boolean isJumping = false; + protected float defaultPitch = 0.0F; + protected float moveSpeed = 0.7F; ++ protected float runSpeed = 1.5F; + private Entity currentTarget; + private int numTicksToChaseTarget = 0; + +@@ -379,21 +380,27 @@ + } + + this.dead = true; +- int i2 = this.getDropItemId(); +- if(i2 > 0) { +- int i3 = this.rand.nextInt(3); +- +- for(int i4 = 0; i4 < i3; ++i4) { +- this.dropItem(i2, 1); ++ int[] items = this.getDropItems(); ++ ++ for (int i2 : items) { ++ if(i2 > 0) { ++ int i3 = this.rand.nextInt(3); ++ ++ for(int i4 = 0; i4 < i3; ++i4) { ++ this.dropItem(i2, 1); ++ } + } + } +- + } + + protected int getDropItemId() { + return 0; + } + ++ protected int[] getDropItems() { ++ return new int[] { getDropItemId() }; ++ } ++ + protected void fall(float distance) { + int i2 = (int)Math.ceil((double)(distance - 3.0F)); + if(i2 > 0) { +@@ -442,7 +449,7 @@ + } + + float f9 = 0.16277136F / (f8 * f8 * f8); +- this.moveFlying(moveX, moveZ, this.onGround ? 0.1F * f9 : 0.02F); ++ this.moveFlying(moveX, moveZ, (this.onGround ? 0.1F : 0.02F) * (this.isRunning() ? this.runSpeed : 1.0F)); + f8 = 0.91F; + if(this.onGround) { + f8 = 0.54600006F; +@@ -491,6 +498,7 @@ + + public void writeEntityToNBT(NBTTagCompound compoundTag) { + compoundTag.setShort("Health", (short)this.health); ++ compoundTag.setShort("HealthRegen", (short)this.healthRegen); + compoundTag.setShort("HurtTime", (short)this.hurtTime); + compoundTag.setShort("DeathTime", (short)this.deathTime); + compoundTag.setShort("AttackTime", (short)this.attackTime); +@@ -501,6 +509,7 @@ + if(!compoundTag.hasKey("Health")) { + this.health = 10; + } ++ this.healthRegen = compoundTag.getShort("HealthRegen"); + + this.hurtTime = compoundTag.getShort("HurtTime"); + this.deathTime = compoundTag.getShort("DeathTime"); diff --git a/patches_merged/net/minecraft/src/EntityOtherPlayerMP.java.patch b/patches_merged/net/minecraft/src/EntityOtherPlayerMP.java.patch new file mode 100644 index 0000000..fd9dc9c --- /dev/null +++ b/patches_merged/net/minecraft/src/EntityOtherPlayerMP.java.patch @@ -0,0 +1,28 @@ +--- a/net/minecraft/src/EntityOtherPlayerMP.java ++++ b/net/minecraft/src/EntityOtherPlayerMP.java +@@ -1,5 +1,7 @@ + package net.minecraft.src; + ++import java.util.regex.Pattern; ++ + public class EntityOtherPlayerMP extends EntityPlayer { + private int otherPlayerMPPosRotationIncrements; + private double otherPlayerMPX; +@@ -14,9 +16,14 @@ + this.username = username; + this.yOffset = 0.0F; + this.stepHeight = 0.0F; +- if(username != null && username.length() > 0) { +- this.skinUrl = "http://www.minecraft.net/skin/" + username + ".png"; +- System.out.println("Loading texture " + this.skinUrl); ++ if (username != null && username.length() > 0) { ++ Pattern player4DigitPattern = Pattern.compile("Player[0-9]{0,4}"); ++ boolean useBlueStagSkin = player4DigitPattern.matcher(username).find(); ++ if (useBlueStagSkin) { ++ this.skinUrl = "https://raw.githubusercontent.com/BlueStaggo/BlueStaggo/main/skin-mc-diverge.png"; ++ } else { ++ this.skinUrl = "http://www.minecraft.net/skin/" + username + ".png"; ++ } + } + + this.noClip = true; diff --git a/patches_merged/net/minecraft/src/EntityPickupFX.java.patch b/patches_merged/net/minecraft/src/EntityPickupFX.java.patch new file mode 100644 index 0000000..59759c0 --- /dev/null +++ b/patches_merged/net/minecraft/src/EntityPickupFX.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/src/EntityPickupFX.java ++++ b/net/minecraft/src/EntityPickupFX.java +@@ -32,7 +32,7 @@ + int i27 = MathHelper.floor_double(d21); + int i28 = MathHelper.floor_double(d23 + (double)(this.yOffset / 2.0F)); + int i29 = MathHelper.floor_double(d25); +- float f30 = this.worldObj.getBrightness(i27, i28, i29); ++ float f30 = this.worldObj.getBrightness(i27, i28, i29) * (1 - RenderGlobal.globalBrightness) + RenderGlobal.globalBrightness; + d21 -= interpPosX; + d23 -= interpPosY; + d25 -= interpPosZ; diff --git a/patches_merged/net/minecraft/src/EntityPig.java.patch b/patches_merged/net/minecraft/src/EntityPig.java.patch new file mode 100644 index 0000000..ab27375 --- /dev/null +++ b/patches_merged/net/minecraft/src/EntityPig.java.patch @@ -0,0 +1,10 @@ +--- a/net/minecraft/src/EntityPig.java ++++ b/net/minecraft/src/EntityPig.java +@@ -7,7 +7,6 @@ + super(world1); + this.texture = "/mob/pig.png"; + this.setSize(0.9F, 0.9F); +- this.saddled = false; + } + + public void writeEntityToNBT(NBTTagCompound compoundTag) { diff --git a/patches_merged/net/minecraft/src/EntityPlayer.java.patch b/patches_merged/net/minecraft/src/EntityPlayer.java.patch new file mode 100644 index 0000000..a45f709 --- /dev/null +++ b/patches_merged/net/minecraft/src/EntityPlayer.java.patch @@ -0,0 +1,250 @@ +--- a/net/minecraft/src/EntityPlayer.java ++++ b/net/minecraft/src/EntityPlayer.java +@@ -1,5 +1,8 @@ + package net.minecraft.src; + ++import io.github.bluestaggo.mcdiverge.ItemCharm; ++import io.github.bluestaggo.mcdiverge.TileEntityRefabricator; ++ + import java.util.List; + + public class EntityPlayer extends EntityLiving { +@@ -12,6 +15,16 @@ + public int swingProgressInt = 0; + public String username; + private int damageRemainder = 0; ++ public float energy = 20.0F; ++ public int energyBoostTick = 0; ++ public boolean energyRegen; ++ public float mana = 20.0F; ++ public boolean showMana = false; ++ public boolean creative; ++ private int slowHealTick = 0; ++ public boolean slowHealing = false; ++ public float bounce = 0.0F; ++ private float bounceHeight = 0.0F; + + public EntityPlayer(World world1) { + super(world1); +@@ -22,6 +35,7 @@ + this.unusedRotation = 180.0F; + this.fireResistance = 20; + this.texture = "/char.png"; ++ this.creative = world1.creative; + } + + public void updateRidden() { +@@ -53,13 +67,76 @@ + } + + public void onLivingUpdate() { +- if(this.worldObj.difficultySetting == 0 && this.health < 20 && this.ticksExisted % 20 * 4 == 0) { ++ this.preUpdateCharms(); ++ ++ for (ItemStack armor : this.inventory.armorInventory) { ++ if (armor == null) continue; ++ Item item = Item.itemsList[armor.itemID]; ++ if (item instanceof ItemCharm) { ++ ((ItemCharm) item).updateCharm(this, armor); ++ if (armor.itemID == Item.slimeShoes.shiftedIndex && this.bounceHeight > 0.0F) { ++ this.worldObj.playSoundAtEntity(this, "mob.slime", this.getSoundVolume(), ((this.rand.nextFloat() - this.rand.nextFloat()) * 0.2F + 1.0F) * 0.8F); ++ armor.damageItem(1); ++ this.motionX *= 2.0; ++ this.motionZ *= 2.0; ++ this.motionY = Math.sqrt(2 * 0.08 * this.bounceHeight); // Thanks https://qr.ae/prhm4v ++ this.bounceHeight = 0.0F; ++ } ++ } ++ } ++ ++ if((this.worldObj.difficultySetting == 0 && this.health < 20 && this.ticksExisted % 20 * 4 == 0) ++ || this.ticksExisted % 5 == 0 && this.healthRegen > 0) { + this.heal(1); +- } ++ this.healthRegen--; ++ } ++ ++ if (this.slowHealing && this.health < 20) { ++ if (--this.slowHealTick <= 0) { ++ this.heal(1); ++ this.slowHealTick = 1200; ++ } ++ } else { ++ this.slowHealTick = 1200; ++ } ++ ++ if (this.energyBoostTick > 0) { ++ this.energyBoostTick--; ++ } ++ ++ ItemStack currentItem = this.inventory.getCurrentItem(); ++ this.showMana = (currentItem != null && Item.itemsList[currentItem.itemID].isMagic()) || this.mana < 20; ++ if (currentItem != null && this.creative) { ++ currentItem.itemDmg = 0; ++ } ++ ++ this.mana += (this.mana / 50.0F) + 0.1F; ++ this.mana = MathHelper.clamp(this.mana, 0.0F, 20.0F); + + this.inventory.decrementAnimations(); + this.prevCameraYaw = this.cameraYaw; + super.onLivingUpdate(); ++ ++ if (this.creative) { ++ this.health = 20; ++ this.energy = 20.0F; ++ this.mana = 20.0F; ++ this.hurtTime = 0; ++ } ++ ++ if (this.noClip) { ++ if (this.moveForward != 0 || this.moveStrafing != 0) { ++ this.motionX *= 1.8F; ++ this.motionZ *= 1.8F; ++ } else { ++ this.motionX = 0; ++ this.motionZ = 0; ++ } ++ this.motionY = this.isSneaking() ? -1 : this.isJumping ? 1 : 0; ++ this.health = 20; ++ this.energy = 20; ++ } ++ + float f1 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ); + float f2 = (float)Math.atan(-this.motionY * (double)0.2F) * 15.0F; + if(f1 > 0.1F) { +@@ -79,12 +156,33 @@ + if(this.health > 0) { + List list3 = this.worldObj.getEntitiesWithinAABBExcludingEntity(this, this.boundingBox.expand(1.0D, 0.0D, 1.0D)); + if(list3 != null) { +- for(int i4 = 0; i4 < list3.size(); ++i4) { +- this.collideWithPlayer((Entity)list3.get(i4)); ++ for (Object o : list3) { ++ this.collideWithPlayer((Entity) o); + } + } + } + ++ if (this.isRunning()) { ++ this.energy -= 0.2F; ++ } else { ++ this.energy += 0.1F; ++ } ++ this.energy = MathHelper.clamp(this.energy, 0.0F, 20.0F); ++ this.energyRegen = this.energyRegen ? this.energy < 20 : this.energy == 0; ++ } ++ ++ public void preUpdateCharms() { ++ this.slowHealing = false; ++ this.bounce = 0.0F; ++ } ++ ++ protected void fall(float distance) { ++ if (this.bounce > 0.0F && distance > 1.5F) { ++ this.bounceHeight = distance * this.bounce; ++ super.fall(distance * (1.0F - this.bounce)); ++ } else { ++ super.fall(distance); ++ } + } + + private void collideWithPlayer(Entity entity) { +@@ -102,6 +200,9 @@ + if(this.username.equals("Notch")) { + this.dropPlayerItemWithRandomChoice(new ItemStack(Item.appleRed, 1), true); + } ++ if(this.username.equals("BlueStag256")) { ++ this.dropPlayerItemWithRandomChoice(new ItemStack(Item.ruby, 1), true); ++ } + + this.inventory.dropAllItems(); + if(entity != null) { +@@ -165,22 +266,34 @@ + f2 /= 5.0F; + } + ++ if(block.blockID == Block.wood.blockID && this.isSneaking()) { ++ f2 /= 4.0F; ++ } ++ + return f2; + } + + public boolean canHarvestBlock(Block block) { +- return this.inventory.canHarvestBlock(block); ++ return this.inventory.canHarvestBlock(block) && !this.creative; + } + + public void readEntityFromNBT(NBTTagCompound compoundTag) { + super.readEntityFromNBT(compoundTag); + NBTTagList nBTTagList2 = compoundTag.getTagList("Inventory"); + this.inventory.readFromNBT(nBTTagList2); ++ this.energy = compoundTag.hasKey("Energy") ? compoundTag.getFloat("Energy") : 20.0F; ++ this.energyRegen = compoundTag.getBoolean("RegeneratingEnergy"); ++ this.noClip = compoundTag.getBoolean("NoClip"); ++ this.mana = compoundTag.hasKey("Mana") ? compoundTag.getFloat("Mana") : 20.0F; + } + + public void writeEntityToNBT(NBTTagCompound compoundTag) { + super.writeEntityToNBT(compoundTag); + compoundTag.setTag("Inventory", this.inventory.writeToNBT(new NBTTagList())); ++ compoundTag.setFloat("Energy", this.energy); ++ compoundTag.setBoolean("RegeneratingEnergy", this.energyRegen); ++ compoundTag.setBoolean("NoClip", this.noClip); ++ compoundTag.setFloat("Mana", this.mana); + } + + public void displayGUIChest(IInventory inventory) { +@@ -198,9 +311,7 @@ + + public boolean attackEntityFrom(Entity entity, int damage) { + this.entityAge = 0; +- if(this.health <= 0) { +- return false; +- } else if((float)this.heartsLife > (float)this.heartsHalvesLife / 2.0F) { ++ if(this.creative || this.health <= 0 || (float)this.heartsLife > (float)this.heartsHalvesLife / 2.0F) { + return false; + } else { + if(entity instanceof EntityMob || entity instanceof EntityArrow) { +@@ -222,7 +333,7 @@ + this.inventory.damageArmor(damage); + damage = i4 / 25; + this.damageRemainder = i4 % 25; +- return damage == 0 ? false : super.attackEntityFrom(entity, damage); ++ return damage != 0 && super.attackEntityFrom(entity, damage); + } + } + +@@ -232,6 +343,18 @@ + public void displayGUIEditSign(TileEntitySign signTileEntity) { + } + ++ public void displayGUIRefabricator(TileEntityRefabricator refabricatorTileEntity) { ++ } ++ ++ public void displayGUIRecipeGuide() { ++ } ++ ++ public void displayGUIRecipeGuide(ItemStack itemStack) { ++ } ++ ++ public void displayGUICreative() { ++ } ++ + public void interactWithEntity(Entity entity) { + } + +@@ -250,5 +373,13 @@ + public void swingItem() { + this.swingProgressInt = -1; + this.isSwinging = true; ++ } ++ ++ public boolean useMana(float f1) { ++ if (this.mana >= f1) { ++ this.mana -= f1; ++ return true; ++ } ++ return false; + } + } diff --git a/patches_merged/net/minecraft/src/EntityPlayerSP.java.patch b/patches_merged/net/minecraft/src/EntityPlayerSP.java.patch new file mode 100644 index 0000000..150572b --- /dev/null +++ b/patches_merged/net/minecraft/src/EntityPlayerSP.java.patch @@ -0,0 +1,73 @@ +--- a/net/minecraft/src/EntityPlayerSP.java ++++ b/net/minecraft/src/EntityPlayerSP.java +@@ -1,20 +1,30 @@ + package net.minecraft.src; + ++import io.github.bluestaggo.mcdiverge.GuiCreative; ++import io.github.bluestaggo.mcdiverge.GuiRecipeGuide; ++import io.github.bluestaggo.mcdiverge.GuiRefabricator; ++import io.github.bluestaggo.mcdiverge.TileEntityRefabricator; + import net.minecraft.client.Minecraft; + ++import java.util.regex.Pattern; ++ + public class EntityPlayerSP extends EntityPlayer { ++ private static final Pattern player4DigitPattern = Pattern.compile("Player[0-9]{0,4}"); + public MovementInput movementInput; + private Minecraft mc; + + public EntityPlayerSP(Minecraft mc, World worldObj, Session session) { + super(worldObj); + this.mc = mc; +- if(session != null && session.username != null && session.username.length() > 0) { +- this.skinUrl = "http://www.minecraft.net/skin/" + session.username + ".png"; +- System.out.println("Loading texture " + this.skinUrl); ++ if (session != null && session.username != null && session.username.length() > 0) { ++ boolean useBlueStagSkin = player4DigitPattern.matcher(session.username).find(); ++ if (useBlueStagSkin) { ++ this.skinUrl = "https://raw.githubusercontent.com/BlueStaggo/BlueStaggo/main/skin-mc-diverge.png"; ++ } else { ++ this.skinUrl = "http://www.minecraft.net/skin/" + session.username + ".png"; ++ } ++ this.username = session.username; + } +- +- this.username = session.username; + } + + public void updateEntityActionState() { +@@ -67,6 +77,24 @@ + this.mc.displayGuiScreen(new GuiFurnace(this.inventory, furnaceTileEntity)); + } + ++ public void displayGUIRefabricator(TileEntityRefabricator refabricatorTileEntity) { ++ this.mc.displayGuiScreen(new GuiRefabricator(this.inventory, refabricatorTileEntity)); ++ } ++ ++ public void displayGUIRecipeGuide() { ++ this.mc.displayGuiScreen(new GuiRecipeGuide()); ++ } ++ ++ public void displayGUIRecipeGuide(ItemStack itemStack) { ++ this.mc.displayGuiScreen(new GuiRecipeGuide(itemStack)); ++ } ++ ++ public void displayGUICreative() { ++ if (this.creative || this.mc.options.creativeDebug) { ++ this.mc.displayGuiScreen(new GuiCreative(this.inventory, this.mc)); ++ } ++ } ++ + public void attackEntity(Entity entity) { + int i2 = this.inventory.getDamageVsEntity(entity); + if(i2 > 0) { +@@ -113,5 +141,9 @@ + + public boolean isSneaking() { + return this.movementInput.sneak; ++ } ++ ++ public boolean isRunning() { ++ return this.movementInput.run && !this.energyRegen; + } + } diff --git a/patches_merged/net/minecraft/src/EntitySheep.java.patch b/patches_merged/net/minecraft/src/EntitySheep.java.patch new file mode 100644 index 0000000..c393bb9 --- /dev/null +++ b/patches_merged/net/minecraft/src/EntitySheep.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/src/EntitySheep.java ++++ b/net/minecraft/src/EntitySheep.java +@@ -46,4 +46,8 @@ + protected String getDeathSound() { + return "mob.sheep"; + } ++ ++ protected int getDropItemId() { ++ return Item.muttonRaw.shiftedIndex; ++ } + } diff --git a/patches_merged/net/minecraft/src/EntitySnowball.java.patch b/patches_merged/net/minecraft/src/EntitySnowball.java.patch new file mode 100644 index 0000000..8d091d0 --- /dev/null +++ b/patches_merged/net/minecraft/src/EntitySnowball.java.patch @@ -0,0 +1,314 @@ +--- a/net/minecraft/src/EntitySnowball.java ++++ b/net/minecraft/src/EntitySnowball.java +@@ -12,6 +12,10 @@ + private EntityLiving thrower; + private int ticksInGround; + private int ticksInAir = 0; ++ public int iconIndex; ++ public int damage; ++ public int burn; ++ public float pierce; + + public EntitySnowball(World world1) { + super(world1); +@@ -24,54 +28,67 @@ + return distance < d3 * d3; + } + +- public EntitySnowball(World world1, EntityLiving entityLiving2) { ++ public EntitySnowball(World world1, EntityLiving entityLiving2, int iconIndex, int damage) { ++ this(world1, entityLiving2, iconIndex, damage, 0, 1.0F); ++ } ++ ++ public EntitySnowball(World world1, EntityLiving entityLiving2, int iconIndex, int damage, int burn, ++ float pierce) { + super(world1); + this.thrower = entityLiving2; + this.setSize(0.25F, 0.25F); +- this.setLocationAndAngles(entityLiving2.posX, entityLiving2.posY, entityLiving2.posZ, entityLiving2.rotationYaw, entityLiving2.rotationPitch); +- this.posX -= (double)(MathHelper.cos(this.rotationYaw / 180.0F * (float)Math.PI) * 0.16F); +- this.posY -= (double)0.1F; +- this.posZ -= (double)(MathHelper.sin(this.rotationYaw / 180.0F * (float)Math.PI) * 0.16F); ++ this.setLocationAndAngles(entityLiving2.posX, entityLiving2.posY, entityLiving2.posZ, entityLiving2.rotationYaw, ++ entityLiving2.rotationPitch); ++ this.posX -= (double) (MathHelper.cos(this.rotationYaw / 180.0F * (float) Math.PI) * 0.16F); ++ this.posY -= (double) 0.1F; ++ this.posZ -= (double) (MathHelper.sin(this.rotationYaw / 180.0F * (float) Math.PI) * 0.16F); + this.setPosition(this.posX, this.posY, this.posZ); + this.yOffset = 0.0F; + float f3 = 0.4F; +- this.motionX = (double)(-MathHelper.sin(this.rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float)Math.PI) * f3); +- this.motionZ = (double)(MathHelper.cos(this.rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float)Math.PI) * f3); +- this.motionY = (double)(-MathHelper.sin(this.rotationPitch / 180.0F * (float)Math.PI) * f3); ++ this.motionX = (double) (-MathHelper.sin(this.rotationYaw / 180.0F * (float) Math.PI) ++ * MathHelper.cos(this.rotationPitch / 180.0F * (float) Math.PI) * f3); ++ this.motionZ = (double) (MathHelper.cos(this.rotationYaw / 180.0F * (float) Math.PI) ++ * MathHelper.cos(this.rotationPitch / 180.0F * (float) Math.PI) * f3); ++ this.motionY = (double) (-MathHelper.sin(this.rotationPitch / 180.0F * (float) Math.PI) * f3); + this.setThrowableHeading(this.motionX, this.motionY, this.motionZ, 1.5F, 1.0F); ++ this.iconIndex = iconIndex; ++ this.damage = damage; ++ this.burn = burn; ++ this.pierce = pierce; + } + + public void setThrowableHeading(double d1, double d3, double d5, float f7, float f8) { + float f9 = MathHelper.sqrt_double(d1 * d1 + d3 * d3 + d5 * d5); +- d1 /= (double)f9; +- d3 /= (double)f9; +- d5 /= (double)f9; +- d1 += this.rand.nextGaussian() * (double)0.0075F * (double)f8; +- d3 += this.rand.nextGaussian() * (double)0.0075F * (double)f8; +- d5 += this.rand.nextGaussian() * (double)0.0075F * (double)f8; +- d1 *= (double)f7; +- d3 *= (double)f7; +- d5 *= (double)f7; ++ d1 /= (double) f9; ++ d3 /= (double) f9; ++ d5 /= (double) f9; ++ d1 += this.rand.nextGaussian() * (double) 0.0075F * (double) f8; ++ d3 += this.rand.nextGaussian() * (double) 0.0075F * (double) f8; ++ d5 += this.rand.nextGaussian() * (double) 0.0075F * (double) f8; ++ d1 *= (double) f7; ++ d3 *= (double) f7; ++ d5 *= (double) f7; + this.motionX = d1; + this.motionY = d3; + this.motionZ = d5; + float f10 = MathHelper.sqrt_double(d1 * d1 + d5 * d5); +- this.prevRotationYaw = this.rotationYaw = (float)(Math.atan2(d1, d5) * 180.0D / (double)(float)Math.PI); +- this.prevRotationPitch = this.rotationPitch = (float)(Math.atan2(d3, (double)f10) * 180.0D / (double)(float)Math.PI); ++ this.prevRotationYaw = this.rotationYaw = (float) (Math.atan2(d1, d5) * 180.0D / (double) (float) Math.PI); ++ this.prevRotationPitch = this.rotationPitch = (float) (Math.atan2(d3, (double) f10) * 180.0D ++ / (double) (float) Math.PI); + this.ticksInGround = 0; + } + + public void onUpdate() { + super.onUpdate(); +- if(this.throwableShake > 0) { ++ if (this.throwableShake > 0) { + --this.throwableShake; + } + +- if(this.inGround) { ++ if (this.inGround) { + int i1 = this.worldObj.getBlockId(this.xTile, this.yTile, this.zTile); +- if(i1 == this.inTile) { ++ if (i1 == this.inTile) { + ++this.ticksInGround; +- if(this.ticksInGround == 1200) { ++ if (this.ticksInGround == 1200) { + this.setEntityDead(); + } + +@@ -79,9 +96,9 @@ + } + + this.inGround = false; +- this.motionX *= (double)(this.rand.nextFloat() * 0.2F); +- this.motionY *= (double)(this.rand.nextFloat() * 0.2F); +- this.motionZ *= (double)(this.rand.nextFloat() * 0.2F); ++ this.motionX *= (double) (this.rand.nextFloat() * 0.2F); ++ this.motionY *= (double) (this.rand.nextFloat() * 0.2F); ++ this.motionZ *= (double) (this.rand.nextFloat() * 0.2F); + this.ticksInGround = 0; + this.ticksInAir = 0; + } else { +@@ -93,25 +110,27 @@ + MovingObjectPosition movingObjectPosition3 = this.worldObj.rayTraceBlocks(vec3D15, vec3D2); + vec3D15 = Vec3D.createVector(this.posX, this.posY, this.posZ); + vec3D2 = Vec3D.createVector(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ); +- if(movingObjectPosition3 != null) { +- vec3D2 = Vec3D.createVector(movingObjectPosition3.hitVec.xCoord, movingObjectPosition3.hitVec.yCoord, movingObjectPosition3.hitVec.zCoord); ++ if (movingObjectPosition3 != null) { ++ vec3D2 = Vec3D.createVector(movingObjectPosition3.hitVec.xCoord, movingObjectPosition3.hitVec.yCoord, ++ movingObjectPosition3.hitVec.zCoord); + } + + Entity entity4 = null; +- List list5 = this.worldObj.getEntitiesWithinAABBExcludingEntity(this, this.boundingBox.addCoord(this.motionX, this.motionY, this.motionZ).expand(1.0D, 1.0D, 1.0D)); ++ List list5 = this.worldObj.getEntitiesWithinAABBExcludingEntity(this, ++ this.boundingBox.addCoord(this.motionX, this.motionY, this.motionZ).expand(1.0D, 1.0D, 1.0D)); + double d6 = 0.0D; + + int i8; + float f10; +- for(i8 = 0; i8 < list5.size(); ++i8) { +- Entity entity9 = (Entity)list5.get(i8); +- if(entity9.canBeCollidedWith() && (entity9 != this.thrower || this.ticksInAir >= 5)) { ++ for (i8 = 0; i8 < list5.size(); ++i8) { ++ Entity entity9 = (Entity) list5.get(i8); ++ if (entity9.canBeCollidedWith() && (entity9 != this.thrower || this.ticksInAir >= 5)) { + f10 = 0.3F; +- AxisAlignedBB axisAlignedBB11 = entity9.boundingBox.expand((double)f10, (double)f10, (double)f10); ++ AxisAlignedBB axisAlignedBB11 = entity9.boundingBox.expand((double) f10, (double) f10, (double) f10); + MovingObjectPosition movingObjectPosition12 = axisAlignedBB11.calculateIntercept(vec3D15, vec3D2); +- if(movingObjectPosition12 != null) { ++ if (movingObjectPosition12 != null) { + double d13 = vec3D15.distanceTo(movingObjectPosition12.hitVec); +- if(d13 < d6 || d6 == 0.0D) { ++ if (d13 < d6 || d6 == 0.0D) { + entity4 = entity9; + d6 = d13; + } +@@ -119,40 +138,74 @@ + } + } + +- if(entity4 != null) { ++ if (entity4 != null) { + movingObjectPosition3 = new MovingObjectPosition(entity4); + } + +- if(movingObjectPosition3 != null) { +- if(movingObjectPosition3.entityHit != null && movingObjectPosition3.entityHit.attackEntityFrom(this.thrower, 0)) { +- ; +- } +- +- for(i8 = 0; i8 < 8; ++i8) { +- this.worldObj.spawnParticle("snowballpoof", this.posX, this.posY, this.posZ, 0.0D, 0.0D, 0.0D); +- } +- +- this.setEntityDead(); ++ float cf16; ++ if (movingObjectPosition3 != null) { ++ if (movingObjectPosition3.entityHit != null) { ++ if (movingObjectPosition3.entityHit.attackEntityFrom(this.thrower, this.damage)) { ++ // this.worldObj.playSoundAtEntity(this, "random.drr", 1.0F, 1.2F / ++ // (this.rand.nextFloat() * 0.2F + 0.9F)); ++ if (this.burn > 0) { ++ movingObjectPosition3.entityHit.fire = this.burn; ++ } ++ if (EntityLiving.class.isInstance(movingObjectPosition3.entityHit)) { ++ ((EntityLiving) movingObjectPosition3.entityHit).hurtTime /= this.pierce; ++ ((EntityLiving) movingObjectPosition3.entityHit).maxHurtTime /= this.pierce; ++ ((EntityLiving) movingObjectPosition3.entityHit).heartsLife /= this.pierce; ++ } ++ this.setEntityDead(); ++ } else { ++ this.motionX *= -0.10000000149011612D; ++ this.motionY *= -0.10000000149011612D; ++ this.motionZ *= -0.10000000149011612D; ++ this.rotationYaw += 180.0F; ++ this.prevRotationYaw += 180.0F; ++ this.ticksInAir = 0; ++ } ++ } else { ++ this.xTile = movingObjectPosition3.blockX; ++ this.yTile = movingObjectPosition3.blockY; ++ this.zTile = movingObjectPosition3.blockZ; ++ this.inTile = this.worldObj.getBlockId(this.xTile, this.yTile, this.zTile); ++ this.motionX = (double) ((float) (movingObjectPosition3.hitVec.xCoord - this.posX)); ++ this.motionY = (double) ((float) (movingObjectPosition3.hitVec.yCoord - this.posY)); ++ this.motionZ = (double) ((float) (movingObjectPosition3.hitVec.zCoord - this.posZ)); ++ cf16 = MathHelper.sqrt_double( ++ this.motionX * this.motionX + this.motionY * this.motionY + this.motionZ * this.motionZ); ++ this.posX -= this.motionX / (double) cf16 * (double) 0.05F; ++ this.posY -= this.motionY / (double) cf16 * (double) 0.05F; ++ this.posZ -= this.motionZ / (double) cf16 * (double) 0.05F; ++ // this.worldObj.playSoundAtEntity(this, "random.drr", 1.0F, 1.2F / ++ // (this.rand.nextFloat() * 0.2F + 0.9F)); ++ this.inGround = true; ++ this.throwableShake = 7; ++ this.setEntityDead(); ++ } + } + + this.posX += this.motionX; + this.posY += this.motionY; + this.posZ += this.motionZ; + float f16 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ); +- this.rotationYaw = (float)(Math.atan2(this.motionX, this.motionZ) * 180.0D / (double)(float)Math.PI); ++ this.rotationYaw = (float) (Math.atan2(this.motionX, this.motionZ) * 180.0D / (double) (float) Math.PI); + +- for(this.rotationPitch = (float)(Math.atan2(this.motionY, (double)f16) * 180.0D / (double)(float)Math.PI); this.rotationPitch - this.prevRotationPitch < -180.0F; this.prevRotationPitch -= 360.0F) { ++ for (this.rotationPitch = (float) (Math.atan2(this.motionY, (double) f16) * 180.0D ++ / (double) (float) Math.PI); this.rotationPitch ++ - this.prevRotationPitch < -180.0F; this.prevRotationPitch -= 360.0F) { + } + +- while(this.rotationPitch - this.prevRotationPitch >= 180.0F) { ++ while (this.rotationPitch - this.prevRotationPitch >= 180.0F) { + this.prevRotationPitch += 360.0F; + } + +- while(this.rotationYaw - this.prevRotationYaw < -180.0F) { ++ while (this.rotationYaw - this.prevRotationYaw < -180.0F) { + this.prevRotationYaw -= 360.0F; + } + +- while(this.rotationYaw - this.prevRotationYaw >= 180.0F) { ++ while (this.rotationYaw - this.prevRotationYaw >= 180.0F) { + this.prevRotationYaw += 360.0F; + } + +@@ -160,29 +213,33 @@ + this.rotationYaw = this.prevRotationYaw + (this.rotationYaw - this.prevRotationYaw) * 0.2F; + float f17 = 0.99F; + f10 = 0.03F; +- if(this.handleWaterMovement()) { +- for(int i18 = 0; i18 < 4; ++i18) { ++ if (this.handleWaterMovement()) { ++ for (int i18 = 0; i18 < 4; ++i18) { + float f19 = 0.25F; +- this.worldObj.spawnParticle("bubble", this.posX - this.motionX * (double)f19, this.posY - this.motionY * (double)f19, this.posZ - this.motionZ * (double)f19, this.motionX, this.motionY, this.motionZ); ++ this.worldObj.spawnParticle("bubble", this.posX - this.motionX * (double) f19, ++ this.posY - this.motionY * (double) f19, this.posZ - this.motionZ * (double) f19, this.motionX, ++ this.motionY, this.motionZ); + } + + f17 = 0.8F; + } + +- this.motionX *= (double)f17; +- this.motionY *= (double)f17; +- this.motionZ *= (double)f17; +- this.motionY -= (double)f10; ++ this.motionX *= (double) f17; ++ this.motionY *= (double) f17; ++ this.motionZ *= (double) f17; ++ this.motionY -= (double) f10; + this.setPosition(this.posX, this.posY, this.posZ); + } + + public void writeEntityToNBT(NBTTagCompound compoundTag) { +- compoundTag.setShort("xTile", (short)this.xTile); +- compoundTag.setShort("yTile", (short)this.yTile); +- compoundTag.setShort("zTile", (short)this.zTile); +- compoundTag.setByte("inTile", (byte)this.inTile); +- compoundTag.setByte("shake", (byte)this.throwableShake); +- compoundTag.setByte("inGround", (byte)(this.inGround ? 1 : 0)); ++ compoundTag.setShort("xTile", (short) this.xTile); ++ compoundTag.setShort("yTile", (short) this.yTile); ++ compoundTag.setShort("zTile", (short) this.zTile); ++ compoundTag.setByte("inTile", (byte) this.inTile); ++ compoundTag.setByte("shake", (byte) this.throwableShake); ++ compoundTag.setByte("inGround", (byte) (this.inGround ? 1 : 0)); ++ compoundTag.setByte("itemIndex", (byte) this.iconIndex); ++ compoundTag.setByte("damage", (byte) this.damage); + } + + public void readEntityFromNBT(NBTTagCompound compoundTag) { +@@ -192,15 +249,17 @@ + this.inTile = compoundTag.getByte("inTile") & 255; + this.throwableShake = compoundTag.getByte("shake") & 255; + this.inGround = compoundTag.getByte("inGround") == 1; ++ this.iconIndex = compoundTag.getByte("itemIndex"); ++ this.damage = compoundTag.getByte("damage"); + } + + public void onCollideWithPlayer(EntityPlayer entityPlayer) { +- if(this.inGround && this.thrower == entityPlayer && this.throwableShake <= 0 && entityPlayer.inventory.addItemStackToInventory(new ItemStack(Item.arrow.shiftedIndex, 1))) { +- this.worldObj.playSoundAtEntity(this, "random.pop", 0.2F, ((this.rand.nextFloat() - this.rand.nextFloat()) * 0.7F + 1.0F) * 2.0F); +- entityPlayer.onItemPickup(this, 1); ++ if (this.inGround && this.thrower == entityPlayer && this.throwableShake <= 0 ++ && entityPlayer.inventory.addItemStackToInventory(new ItemStack(Item.arrow.shiftedIndex, 1))) { ++ this.worldObj.playSoundAtEntity(this, "random.pop", 0.2F, ++ ((this.rand.nextFloat() - this.rand.nextFloat()) * 0.7F + 1.0F) * 2.0F); + this.setEntityDead(); + } +- + } + + public float getShadowSize() { diff --git a/patches_merged/net/minecraft/src/EntityTracker.java.patch b/patches_merged/net/minecraft/src/EntityTracker.java.patch new file mode 100644 index 0000000..35d16f3 --- /dev/null +++ b/patches_merged/net/minecraft/src/EntityTracker.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/src/EntityTracker.java ++++ b/net/minecraft/src/EntityTracker.java +@@ -34,7 +34,7 @@ + this.trackEntity(entity1, 64, 20); + } else if(entity1 instanceof EntityMinecart) { + this.trackEntity(entity1, 160, 4); +- } else if(entity1 instanceof IAnimals) { ++ } else if(entity1 instanceof IAnimal) { + this.trackEntity(entity1, 160, 2); + } + diff --git a/patches_merged/net/minecraft/src/EntityTrackerEntry.java.patch b/patches_merged/net/minecraft/src/EntityTrackerEntry.java.patch new file mode 100644 index 0000000..b72bd0e --- /dev/null +++ b/patches_merged/net/minecraft/src/EntityTrackerEntry.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/src/EntityTrackerEntry.java ++++ b/net/minecraft/src/EntityTrackerEntry.java +@@ -160,7 +160,7 @@ + + if(this.trackedEntity instanceof EntityBoat) { + return new Packet23VehicleSpawn(this.trackedEntity, 1); +- } else if(this.trackedEntity instanceof IAnimals) { ++ } else if(this.trackedEntity instanceof IAnimal) { + return new Packet24MobSpawn((EntityLiving)this.trackedEntity); + } else { + throw new IllegalArgumentException("Don\'t know how to add " + this.trackedEntity.getClass() + "!"); diff --git a/patches_merged/net/minecraft/src/GameSettings.java.patch b/patches_merged/net/minecraft/src/GameSettings.java.patch new file mode 100644 index 0000000..a7a33cb --- /dev/null +++ b/patches_merged/net/minecraft/src/GameSettings.java.patch @@ -0,0 +1,315 @@ +--- a/net/minecraft/src/GameSettings.java ++++ b/net/minecraft/src/GameSettings.java +@@ -9,35 +9,46 @@ + import net.minecraft.client.Minecraft; + + import org.lwjgl.input.Keyboard; ++import org.lwjgl.opengl.Display; + + public class GameSettings { +- private static final String[] RENDER_DISTANCES = new String[]{"FAR", "NORMAL", "SHORT", "TINY"}; +- private static final String[] DIFFICULTY_LEVELS = new String[]{"Peaceful", "Easy", "Normal", "Hard"}; ++ private static final String[] RENDER_DISTANCES = new String[] { "FAR", "NORMAL", "SHORT", "TINY" }; ++ private static final String[] DIFFICULTY_LEVELS = new String[] { "Peaceful", "Easy", "Normal", "Hard" }; + public float musicVolume = 1.0F; + public float soundVolume = 1.0F; ++ public float musicDelay = 1.0F; + public float mouseSensitivity = 0.5F; ++ public float brightness = 0.5F; + public boolean invertMouse = false; + public int renderDistance = 0; + public boolean viewBobbing = true; + public boolean anaglyph = false; + public boolean limitFramerate = false; + public boolean fancyGraphics = true; ++ public boolean caveSounds = false; ++ public boolean creativeDebug = false; + public KeyBinding keyBindForward = new KeyBinding("Forward", Keyboard.KEY_W); + public KeyBinding keyBindLeft = new KeyBinding("Left", Keyboard.KEY_A); + public KeyBinding keyBindBack = new KeyBinding("Back", Keyboard.KEY_S); + public KeyBinding keyBindRight = new KeyBinding("Right", Keyboard.KEY_D); + public KeyBinding keyBindJump = new KeyBinding("Jump", Keyboard.KEY_SPACE); +- public KeyBinding keyBindInventory = new KeyBinding("Inventory", Keyboard.KEY_I); ++ public KeyBinding keyBindInventory = new KeyBinding("Inventory", Keyboard.KEY_E); + public KeyBinding keyBindDrop = new KeyBinding("Drop", Keyboard.KEY_Q); + public KeyBinding keyBindChat = new KeyBinding("Chat", Keyboard.KEY_T); + public KeyBinding keyBindToggleFog = new KeyBinding("Toggle fog", Keyboard.KEY_F); + public KeyBinding keyBindSneak = new KeyBinding("Sneak", Keyboard.KEY_LSHIFT); +- public KeyBinding[] keyBindings = new KeyBinding[]{this.keyBindForward, this.keyBindLeft, this.keyBindBack, this.keyBindRight, this.keyBindJump, this.keyBindSneak, this.keyBindDrop, this.keyBindInventory, this.keyBindChat, this.keyBindToggleFog}; ++ public KeyBinding keyBindRun = new KeyBinding("Run", Keyboard.KEY_LCONTROL); ++ public KeyBinding keyBindCreative = new KeyBinding("Creative", Keyboard.KEY_C); ++ public KeyBinding keyBindRecipeGuide = new KeyBinding("Recipe guide", Keyboard.KEY_R); ++ public KeyBinding[] keyBindings = new KeyBinding[] { this.keyBindForward, this.keyBindLeft, this.keyBindBack, ++ this.keyBindRight, this.keyBindJump, this.keyBindSneak, this.keyBindDrop, this.keyBindInventory, ++ this.keyBindChat, this.keyBindToggleFog, this.keyBindRun, this.keyBindCreative, this.keyBindRecipeGuide }; + protected Minecraft mc; + private File optionsFile; +- public int numberOfOptions = 10; ++ public int numberOfOptions = 13; + public int difficulty = 2; + public boolean thirdPersonView = false; ++ public boolean debugMenu = false; + + public GameSettings(Minecraft minecraft, File file) { + this.mc = minecraft; +@@ -58,121 +69,196 @@ + } + + public void setOptionFloatValue(int i1, float f2) { +- if(i1 == 0) { ++ if (i1 == 0) { + this.musicVolume = f2; + this.mc.sndManager.onSoundOptionsChanged(); + } + +- if(i1 == 1) { ++ if (i1 == 1) { + this.soundVolume = f2; + this.mc.sndManager.onSoundOptionsChanged(); + } + +- if(i1 == 3) { ++ if (i1 == 3) { + this.mouseSensitivity = f2; + } + ++ if (i1 == 11) { ++ this.brightness = f2; ++ RenderGlobal.globalBrightness = this.brightness * 0.2F; ++ this.mc.renderGlobal.loadRenderers(); ++ } ++ ++ if (i1 == 12) { ++ this.musicDelay = f2; ++ } + } + + public void setOptionValue(int i1, int i2) { +- if(i1 == 2) { ++ if (i1 == 2) { + this.invertMouse = !this.invertMouse; + } + +- if(i1 == 4) { ++ if (i1 == 4) { + this.renderDistance = this.renderDistance + i2 & 3; + } + +- if(i1 == 5) { ++ if (i1 == 5) { + this.viewBobbing = !this.viewBobbing; + } + +- if(i1 == 6) { ++ if (i1 == 6) { + this.anaglyph = !this.anaglyph; + this.mc.renderEngine.refreshTextures(); + } + +- if(i1 == 7) { ++ if (i1 == 7) { + this.limitFramerate = !this.limitFramerate; ++ Display.setVSyncEnabled(this.limitFramerate); + } + +- if(i1 == 8) { ++ if (i1 == 8) { + this.difficulty = this.difficulty + i2 & 3; + } + +- if(i1 == 9) { ++ if (i1 == 9) { + this.fancyGraphics = !this.fancyGraphics; + this.mc.renderGlobal.loadRenderers(); + } + ++ if (i1 == 10) { ++ this.caveSounds = !this.caveSounds; ++ if (this.caveSounds) { ++ this.mc.sndManager.playSoundFX("ambient.cave.cave", 1.0F, 1.0F); ++ } ++ } ++ + this.saveOptions(); + } + + public int isSlider(int i1) { +- return i1 == 0 ? 1 : (i1 == 1 ? 1 : (i1 == 3 ? 1 : 0)); ++ return i1 == 0 || i1 == 1 || i1 == 3 || i1 == 11 || i1 == 12 ? 1 : 0; + } + + public float getOptionFloatValue(int i1) { +- return i1 == 0 ? this.musicVolume : (i1 == 1 ? this.soundVolume : (i1 == 3 ? this.mouseSensitivity : 0.0F)); ++ switch (i1) { ++ case 0: return this.musicVolume; ++ case 1: return this.soundVolume; ++ case 3: return this.mouseSensitivity; ++ case 11: return this.brightness; ++ case 12: return this.musicDelay; ++ default: return 0.0F; ++ } + } + + public String getOptionDisplayString(int i1) { +- return i1 == 0 ? "Music: " + (this.musicVolume > 0.0F ? (int)(this.musicVolume * 100.0F) + "%" : "OFF") : (i1 == 1 ? "Sound: " + (this.soundVolume > 0.0F ? (int)(this.soundVolume * 100.0F) + "%" : "OFF") : (i1 == 2 ? "Invert mouse: " + (this.invertMouse ? "ON" : "OFF") : (i1 == 3 ? (this.mouseSensitivity == 0.0F ? "Sensitivity: *yawn*" : (this.mouseSensitivity == 1.0F ? "Sensitivity: HYPERSPEED!!!" : "Sensitivity: " + (int)(this.mouseSensitivity * 200.0F) + "%")) : (i1 == 4 ? "Render distance: " + RENDER_DISTANCES[this.renderDistance] : (i1 == 5 ? "View bobbing: " + (this.viewBobbing ? "ON" : "OFF") : (i1 == 6 ? "3d anaglyph: " + (this.anaglyph ? "ON" : "OFF") : (i1 == 7 ? "Limit framerate: " + (this.limitFramerate ? "ON" : "OFF") : (i1 == 8 ? "Difficulty: " + DIFFICULTY_LEVELS[this.difficulty] : (i1 == 9 ? "Graphics: " + (this.fancyGraphics ? "FANCY" : "FAST") : ""))))))))); ++ switch (i1) { ++ case 0: ++ return "Music: " + (this.musicVolume > 0.0F ? (int) (this.musicVolume * 100.0F) + "%" : "OFF"); ++ case 1: ++ return "Sound: " + (this.soundVolume > 0.0F ? (int) (this.soundVolume * 100.0F) + "%" : "OFF"); ++ case 2: ++ return "Invert mouse: " + (this.invertMouse ? "ON" : "OFF"); ++ case 3: ++ return (this.mouseSensitivity == 0.0F ? "Sensitivity: *yawn*" ++ : (this.mouseSensitivity == 1.0F ? "Sensitivity: HYPERSPEED!!!" ++ : "Sensitivity: " + (int) (this.mouseSensitivity * 200.0F) + "%")); ++ case 4: ++ return "Render distance: " + RENDER_DISTANCES[this.renderDistance]; ++ case 5: ++ return "View bobbing: " + (this.viewBobbing ? "ON" : "OFF"); ++ case 6: ++ return "3d anaglyph: " + (this.anaglyph ? "ON" : "OFF"); ++ case 7: ++ return "VSync: " + (this.limitFramerate ? "ON" : "OFF"); ++ case 8: ++ return "Difficulty: " + DIFFICULTY_LEVELS[this.difficulty]; ++ case 9: ++ return "Graphics: " + (this.fancyGraphics ? "FANCY" : "FAST"); ++ case 10: ++ return "Cave sounds: " + (this.caveSounds ? "ON" : "OFF"); ++ case 11: ++ return "Brightness: " + ( ++ this.brightness <= 0.0F ? "Moody" ++ : this.brightness >= 1.0F ? "Bright" ++ : (int) (this.brightness * 100.0F) + "%"); ++ case 12: ++ float delay = (int) (this.musicDelay * 100.0F) / 10.0F; ++ return "Music Delay: " + delay + "-" + delay * 2.0F + " mins"; ++ default: ++ return "NULL"; ++ } + } + + public void loadOptions() { + try { +- if(!this.optionsFile.exists()) { ++ if (!this.optionsFile.exists()) { + return; + } + + BufferedReader bufferedReader1 = new BufferedReader(new FileReader(this.optionsFile)); +- String string2 = ""; ++ String string2; + +- while((string2 = bufferedReader1.readLine()) != null) { ++ while ((string2 = bufferedReader1.readLine()) != null) { + String[] string3 = string2.split(":"); +- if(string3[0].equals("music")) { ++ if (string3[0].equals("music")) { + this.musicVolume = this.parseFloat(string3[1]); + } + +- if(string3[0].equals("sound")) { ++ if (string3[0].equals("sound")) { + this.soundVolume = this.parseFloat(string3[1]); + } + +- if(string3[0].equals("mouseSensitivity")) { ++ if (string3[0].equals("mouseSensitivity")) { + this.mouseSensitivity = this.parseFloat(string3[1]); + } + +- if(string3[0].equals("invertYMouse")) { ++ if (string3[0].equals("invertYMouse")) { + this.invertMouse = string3[1].equals("true"); + } + +- if(string3[0].equals("viewDistance")) { ++ if (string3[0].equals("viewDistance")) { + this.renderDistance = Integer.parseInt(string3[1]); + } + +- if(string3[0].equals("bobView")) { ++ if (string3[0].equals("bobView")) { + this.viewBobbing = string3[1].equals("true"); + } + +- if(string3[0].equals("anaglyph3d")) { ++ if (string3[0].equals("anaglyph3d")) { + this.anaglyph = string3[1].equals("true"); + } + +- if(string3[0].equals("limitFramerate")) { ++ if (string3[0].equals("limitFramerate")) { + this.limitFramerate = string3[1].equals("true"); + } + +- if(string3[0].equals("difficulty")) { ++ if (string3[0].equals("difficulty")) { + this.difficulty = Integer.parseInt(string3[1]); + } + +- if(string3[0].equals("fancyGraphics")) { ++ if (string3[0].equals("fancyGraphics")) { + this.fancyGraphics = string3[1].equals("true"); + } + +- for(int i4 = 0; i4 < this.keyBindings.length; ++i4) { +- if(string3[0].equals("key_" + this.keyBindings[i4].keyDescription)) { ++ if (string3[0].equals("caveSounds")) { ++ this.caveSounds = string3[1].equals("true"); ++ } ++ ++ if (string3[0].equals("brightness")) { ++ this.brightness = this.parseFloat(string3[1]); ++ } ++ ++ if (string3[0].equals("musicDelay")) { ++ this.musicDelay = this.parseFloat(string3[1]); ++ } ++ ++ if (string3[0].equals("creativeDebug")) { ++ this.creativeDebug = string3[1].equals("true"); ++ } ++ ++ for (int i4 = 0; i4 < this.keyBindings.length; ++i4) { ++ if (string3[0].equals("key_" + this.keyBindings[i4].keyDescription)) { + this.keyBindings[i4].keyCode = Integer.parseInt(string3[1]); + } + } +@@ -193,18 +279,24 @@ + public void saveOptions() { + try { + PrintWriter printWriter1 = new PrintWriter(new FileWriter(this.optionsFile)); +- printWriter1.println("music:" + this.musicVolume); +- printWriter1.println("sound:" + this.soundVolume); ++ printWriter1.println("music:" + Math.floor(this.musicVolume * 100.0F) / 100.0F); ++ printWriter1.println("sound:" + Math.floor(this.soundVolume * 100.0F) / 100.0F); + printWriter1.println("invertYMouse:" + this.invertMouse); +- printWriter1.println("mouseSensitivity:" + this.mouseSensitivity); ++ printWriter1.println("mouseSensitivity:" + Math.floor(this.mouseSensitivity * 100.0F) / 100.0F); + printWriter1.println("viewDistance:" + this.renderDistance); + printWriter1.println("bobView:" + this.viewBobbing); + printWriter1.println("anaglyph3d:" + this.anaglyph); + printWriter1.println("limitFramerate:" + this.limitFramerate); + printWriter1.println("difficulty:" + this.difficulty); + printWriter1.println("fancyGraphics:" + this.fancyGraphics); ++ printWriter1.println("caveSounds:" + this.caveSounds); ++ printWriter1.println("brightness:" + Math.floor(this.brightness * 100.0F) / 100.0F); ++ printWriter1.println("musicDelay:" + Math.floor(this.musicDelay * 100.0F) / 100.0F); ++ if (this.creativeDebug) { ++ printWriter1.println("creativeDebug:true"); ++ } + +- for(int i2 = 0; i2 < this.keyBindings.length; ++i2) { ++ for (int i2 = 0; i2 < this.keyBindings.length; ++i2) { + printWriter1.println("key_" + this.keyBindings[i2].keyDescription + ":" + this.keyBindings[i2].keyCode); + } + +@@ -213,6 +305,5 @@ + System.out.println("Failed to save options"); + exception3.printStackTrace(); + } +- + } + } diff --git a/patches_merged/net/minecraft/src/GuiButton.java.patch b/patches_merged/net/minecraft/src/GuiButton.java.patch new file mode 100644 index 0000000..2e33ea7 --- /dev/null +++ b/patches_merged/net/minecraft/src/GuiButton.java.patch @@ -0,0 +1,22 @@ +--- a/net/minecraft/src/GuiButton.java ++++ b/net/minecraft/src/GuiButton.java +@@ -18,16 +18,14 @@ + this(i1, i2, i3, 200, 20, string4); + } + +- protected GuiButton(int i1, int i2, int i3, int i4, int i5, String string6) { +- this.width = 200; +- this.height = 20; ++ public GuiButton(int i1, int i2, int i3, int i4, int i5, String string6) { ++ this.width = i4; ++ this.height = i5; + this.enabled = true; + this.visible = true; + this.id = i1; + this.xPosition = i2; + this.yPosition = i3; +- this.width = i4; +- this.height = i5; + this.displayString = string6; + } + diff --git a/patches_merged/net/minecraft/src/GuiContainer.java.patch b/patches_merged/net/minecraft/src/GuiContainer.java.patch new file mode 100644 index 0000000..839727f --- /dev/null +++ b/patches_merged/net/minecraft/src/GuiContainer.java.patch @@ -0,0 +1,101 @@ +--- a/net/minecraft/src/GuiContainer.java ++++ b/net/minecraft/src/GuiContainer.java +@@ -6,6 +6,8 @@ + import org.lwjgl.opengl.GL11; + import org.lwjgl.opengl.GL12; + ++import io.github.bluestaggo.mcdiverge.ItemTooltip; ++ + public abstract class GuiContainer extends GuiScreen { + private static RenderItem itemRenderer = new RenderItem(); + protected int xSize = 176; +@@ -17,6 +19,7 @@ + int i4 = (this.width - this.xSize) / 2; + int i5 = (this.height - this.ySize) / 2; + this.drawGuiContainerBackgroundLayer(renderPartialTick); ++ super.drawScreen(mouseX, mouseY, renderPartialTick); + GL11.glPushMatrix(); + GL11.glRotatef(180.0F, 1.0F, 0.0F, 0.0F); + RenderHelper.enableStandardItemLighting(); +@@ -52,6 +55,12 @@ + GL11.glDisable(GL11.GL_LIGHTING); + GL11.glDisable(GL11.GL_DEPTH_TEST); + this.drawGuiContainerForegroundLayer(); ++ for (int i6 = 0; i6 < this.inventorySlots.size(); ++i6) { ++ SlotInventory slotInventory4 = (SlotInventory)this.inventorySlots.get(i6); ++ if (slotInventory4.getIsMouseOverSlot(mouseX, mouseY)) { ++ this.drawSlotTooltip(slotInventory4, mouseX, mouseY); ++ } ++ } + GL11.glEnable(GL11.GL_LIGHTING); + GL11.glEnable(GL11.GL_DEPTH_TEST); + GL11.glPopMatrix(); +@@ -83,6 +92,35 @@ + itemRenderer.renderItemOverlayIntoGUI(this.fontRenderer, this.mc.renderEngine, itemStack6, i4, i5); + } + ++ private void drawSlotTooltip(SlotInventory slotInventory1, int x, int y) { ++ x -= (this.width - this.xSize) / 2; ++ y -= (this.height - this.ySize) / 2; ++ if (slotInventory1 == null || slotInventory1.getStack() == null) { ++ return; ++ } ++ ++ ItemTooltip tooltip = slotInventory1.getTooltip(); ++ if (tooltip != null) { ++ int tooltipWidth = 0; ++ for (String line : tooltip.lines) { ++ int newWidth = this.fontRenderer.getStringWidth(line); ++ if (newWidth > tooltipWidth) { ++ tooltipWidth = newWidth; ++ } ++ } ++ if ((x + tooltipWidth + 48) > this.width) { ++ x -= tooltipWidth + 24; ++ } ++ ++ int tooltipHeight = tooltip.size() * 9; ++ this.drawGradientRect(x + 8, y, x + tooltipWidth + 16, y + tooltipHeight + 8, tooltip.gradient.item0, ++ tooltip.gradient.item1); ++ for (int i = 0; i < tooltip.size(); i++) { ++ this.drawString(this.fontRenderer, tooltip.lines.get(i), x + 12, y + 4 + i * 9, tooltip.colors.get(i)); ++ } ++ } ++ } ++ + private Slot getSlotAtPosition(int i1, int i2) { + for(int i3 = 0; i3 < this.inventorySlots.size(); ++i3) { + SlotInventory slotInventory4 = (SlotInventory)this.inventorySlots.get(i3); +@@ -122,12 +160,12 @@ + } + } else if(itemStack6 != null && inventoryPlayer5.draggedItemStack != null) { + if(slot4.isItemValid(inventoryPlayer5.draggedItemStack)) { +- if(itemStack6.itemID != inventoryPlayer5.draggedItemStack.itemID) { ++ if(itemStack6.itemID != inventoryPlayer5.draggedItemStack.itemID || itemStack6.itemMetadata != inventoryPlayer5.draggedItemStack.itemMetadata) { + if(inventoryPlayer5.draggedItemStack.stackSize <= slot4.inventory.getInventoryStackLimit()) { + slot4.putStack(inventoryPlayer5.draggedItemStack); + inventoryPlayer5.draggedItemStack = itemStack6; + } +- } else if(itemStack6.itemID == inventoryPlayer5.draggedItemStack.itemID) { ++ } else if(itemStack6.itemID == inventoryPlayer5.draggedItemStack.itemID && itemStack6.itemMetadata == inventoryPlayer5.draggedItemStack.itemMetadata) { + if(i3 == 0) { + i7 = inventoryPlayer5.draggedItemStack.stackSize; + if(i7 > slot4.inventory.getInventoryStackLimit() - itemStack6.stackSize) { +@@ -162,7 +200,7 @@ + itemStack6.stackSize += i7; + } + } +- } else if(itemStack6.itemID == inventoryPlayer5.draggedItemStack.itemID && inventoryPlayer5.draggedItemStack.getMaxStackSize() > 1) { ++ } else if(itemStack6.itemID == inventoryPlayer5.draggedItemStack.itemID && itemStack6.itemMetadata == inventoryPlayer5.draggedItemStack.itemMetadata && inventoryPlayer5.draggedItemStack.getMaxStackSize() > 1) { + i7 = itemStack6.stackSize; + if(i7 > 0 && i7 + inventoryPlayer5.draggedItemStack.stackSize <= inventoryPlayer5.draggedItemStack.getMaxStackSize()) { + inventoryPlayer5.draggedItemStack.stackSize += i7; +@@ -197,7 +235,7 @@ + } + } + } +- ++ super.mouseClicked(i1, i2, i3); + } + + protected void mouseMovedOrUp(int i1, int i2, int i3) { diff --git a/patches_merged/net/minecraft/src/GuiCreateWorld.java.patch b/patches_merged/net/minecraft/src/GuiCreateWorld.java.patch new file mode 100644 index 0000000..35ea814 --- /dev/null +++ b/patches_merged/net/minecraft/src/GuiCreateWorld.java.patch @@ -0,0 +1,137 @@ +--- /dev/null ++++ b/net/minecraft/src/GuiCreateWorld.java +@@ -1,0 +1,134 @@ ++package net.minecraft.src; ++ ++import java.util.Random; ++ ++import io.github.bluestaggo.mcdiverge.CreateWorldInfo; ++import org.lwjgl.input.Keyboard; ++ ++public class GuiCreateWorld extends GuiScreen { ++ private final GuiScreen parent; ++ private GuiTextField textboxWorldName; ++ private GuiTextField textboxSeed; ++ private String displayName; ++ private boolean createClicked; ++ private final int index; ++ private boolean snowy; ++ private boolean creative; ++ ++ public GuiCreateWorld(GuiScreen guiScreen1, int index) { ++ this.parent = guiScreen1; ++ this.index = index; ++ } ++ ++ public void updateScreen() { ++ this.textboxWorldName.updateCursorCounter(); ++ this.textboxSeed.updateCursorCounter(); ++ } ++ ++ public void initGui() { ++ Keyboard.enableRepeatEvents(true); ++ this.controlList.clear(); ++ this.controlList.add(new GuiButton(0, this.width / 2 - 100, this.height / 4 + 96 + 12, "Create New World")); ++ this.controlList.add(new GuiButton(1, this.width / 2 - 100, this.height / 4 + 120 + 12, "Cancel")); ++ this.textboxWorldName = new GuiTextField(this, this.fontRenderer, this.width / 4 - 100, 60, 200, 20, "World " + index); ++ this.textboxWorldName.isFocused = true; ++ this.textboxWorldName.setMaxStringLength(32); ++ this.textboxSeed = new GuiTextField(this, this.fontRenderer, this.width / 4 * 3 - 100, 60, 200, 20, ""); ++ this.controlList.add(new GuiButton(2, this.width / 2 - 156, 100, 150, 20, "Type: NORMAL")); ++ this.controlList.add(new GuiButton(3, this.width / 2 + 6, 100, 150, 20, "Gamemode: SURVIVAL")); ++ this.func_22129_j(); ++ } ++ ++ private void func_22129_j() { ++ this.displayName = this.textboxWorldName.getText().trim(); ++ if(this.displayName.isEmpty()) { ++ this.displayName = "World" + index; ++ } ++ } ++ ++ public void onGuiClosed() { ++ Keyboard.enableRepeatEvents(false); ++ } ++ ++ protected void actionPerformed(GuiButton guiButton1) { ++ if(!guiButton1.enabled) { ++ return; ++ } ++ switch (guiButton1.id) { ++ case 0: ++ this.mc.displayGuiScreen((GuiScreen)null); ++ if(this.createClicked) { ++ return; ++ } ++ ++ this.createClicked = true; ++ long j2 = (new Random()).nextLong(); ++ String string4 = this.textboxSeed.getText(); ++ if(string4 != null && string4.length() > 0) { ++ try { ++ long j5 = Long.parseLong(string4); ++ if(j5 != 0L) { ++ j2 = j5; ++ } ++ } catch (NumberFormatException numberFormatException7) { ++ j2 = (long)string4.hashCode(); ++ } ++ } ++ ++ this.mc.playerController = new PlayerControllerSP(this.mc); ++ this.mc.startWorld("World" + index, new CreateWorldInfo() ++ .withName(this.displayName) ++ .withSeed(j2) ++ .withSnow(this.snowy) ++ .withCreative(this.creative)); ++ this.mc.displayGuiScreen((GuiScreen)null); ++ break; ++ ++ case 1: ++ this.mc.displayGuiScreen(this.parent); ++ break; ++ ++ case 2: ++ this.snowy = !this.snowy; ++ guiButton1.displayString = "Type: " + (this.snowy ? "SNOW" : "NORMAL"); ++ break; ++ ++ case 3: ++ this.creative = !this.creative; ++ guiButton1.displayString = "Gamemode: " + (this.creative ? "CREATIVE" : "SURVIVAL"); ++ break; ++ } ++ } ++ ++ protected void keyTyped(char c1, int i2) { ++ if(this.textboxWorldName.isFocused) { ++ this.textboxWorldName.textboxKeyTyped(c1, i2); ++ } else { ++ this.textboxSeed.textboxKeyTyped(c1, i2); ++ } ++ ++ if(c1 == 13) { ++ this.actionPerformed((GuiButton)this.controlList.get(0)); ++ } ++ ++ ((GuiButton)this.controlList.get(0)).enabled = this.textboxWorldName.getText().length() > 0; ++ this.func_22129_j(); ++ } ++ ++ protected void mouseClicked(int i1, int i2, int i3) { ++ super.mouseClicked(i1, i2, i3); ++ this.textboxWorldName.mouseClicked(i1, i2, i3); ++ this.textboxSeed.mouseClicked(i1, i2, i3); ++ } ++ ++ public void drawScreen(int i1, int i2, float f3) { ++ this.drawDefaultBackground(); ++ this.drawCenteredString(this.fontRenderer, "Create new world", this.width / 2, this.height / 4 - 40, 0xFFFFFF); ++ this.drawString(this.fontRenderer, "World Name", this.width / 4 - 100, 47, 10526880); ++ this.drawString(this.fontRenderer, "Seed for the World Generator", this.width / 4 * 3 - 100, 47, 10526880); ++ this.drawString(this.fontRenderer, "Leave blank for a random seed", this.width / 4 * 3 - 100, 83, 10526880); ++ this.textboxWorldName.drawTextBox(); ++ this.textboxSeed.drawTextBox(); ++ super.drawScreen(i1, i2, f3); ++ } ++} diff --git a/patches_merged/net/minecraft/src/GuiDeleteWorld.java.patch b/patches_merged/net/minecraft/src/GuiDeleteWorld.java.patch new file mode 100644 index 0000000..0a70947 --- /dev/null +++ b/patches_merged/net/minecraft/src/GuiDeleteWorld.java.patch @@ -0,0 +1,35 @@ +--- a/net/minecraft/src/GuiDeleteWorld.java ++++ b/net/minecraft/src/GuiDeleteWorld.java +@@ -11,7 +11,7 @@ + } + + public void initButtons() { +- this.controlList.add(new GuiButton(6, this.width / 2 - 100, this.height / 6 + 168, "Cancel")); ++ this.controlList.add(new GuiButton(106, this.width / 2 - 100, this.height / 6 + 168, "Cancel")); + } + + public void selectWorld(int i1) { +@@ -19,15 +19,21 @@ + if(string2 != null) { + this.mc.displayGuiScreen(new GuiYesNo(this, "Are you sure you want to delete this world?", "\'" + string2 + "\' will be lost forever!", i1)); + } +- + } + + public void deleteWorld(boolean z1, int i2) { + if(z1) { + File file3 = Minecraft.getMinecraftDir(); +- World.deleteWorld(file3, this.getSaveName(i2)); ++ World.deleteWorld(file3, "World" + i2); + } + + this.mc.displayGuiScreen(this.parentScreen); ++ } ++ ++ protected void actionPerformed(GuiButton button) { ++ if (button.id == 106) ++ this.mc.displayGuiScreen(this.parentScreen); ++ else ++ super.actionPerformed(button); + } + } diff --git a/patches_merged/net/minecraft/src/GuiFurnace.java.patch b/patches_merged/net/minecraft/src/GuiFurnace.java.patch new file mode 100644 index 0000000..eee6983 --- /dev/null +++ b/patches_merged/net/minecraft/src/GuiFurnace.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/src/GuiFurnace.java ++++ b/net/minecraft/src/GuiFurnace.java +@@ -3,7 +3,7 @@ + import org.lwjgl.opengl.GL11; + + public class GuiFurnace extends GuiContainer { +- private TileEntityFurnace furnaceInventory; ++ private final TileEntityFurnace furnaceInventory; + + public GuiFurnace(InventoryPlayer inventoryPlayer1, TileEntityFurnace tileEntityFurnace2) { + this.furnaceInventory = tileEntityFurnace2; diff --git a/patches_merged/net/minecraft/src/GuiIngame.java.patch b/patches_merged/net/minecraft/src/GuiIngame.java.patch new file mode 100644 index 0000000..5977694 --- /dev/null +++ b/patches_merged/net/minecraft/src/GuiIngame.java.patch @@ -0,0 +1,122 @@ +--- a/net/minecraft/src/GuiIngame.java ++++ b/net/minecraft/src/GuiIngame.java +@@ -7,7 +7,6 @@ + + import net.minecraft.client.Minecraft; + +-import org.lwjgl.input.Keyboard; + import org.lwjgl.opengl.GL11; + import org.lwjgl.opengl.GL12; + +@@ -56,11 +55,17 @@ + + int i11 = this.mc.thePlayer.health; + int i12 = this.mc.thePlayer.prevHealth; ++ float cf0 = this.mc.thePlayer.energy; ++ float cf1 = this.mc.thePlayer.mana; ++ boolean cz1 = this.mc.thePlayer.energyRegen; ++ boolean cz2 = this.mc.thePlayer.energyBoostTick > 0; ++ boolean cz3 = this.mc.thePlayer.showMana; ++ boolean cz4 = this.mc.thePlayer.creative; + this.rand.setSeed((long)(this.updateCounter * 312871)); + int i13; + int i14; + int i15; +- if(this.mc.playerController.shouldDrawHUD()) { ++ if(this.mc.playerController.shouldDrawHUD() && !cz4) { + i13 = this.mc.thePlayer.getPlayerArmorValue(); + + int i16; +@@ -69,15 +74,15 @@ + if(i13 > 0) { + i16 = i6 / 2 + 91 - i14 * 8 - 9; + if(i14 * 2 + 1 < i13) { +- this.drawTexturedModalRect(i16, i15, 34, 9, 9, 9); ++ this.drawTexturedModalRect(i16, i15 - 10, 34, 9, 9, 9); + } + + if(i14 * 2 + 1 == i13) { +- this.drawTexturedModalRect(i16, i15, 25, 9, 9, 9); ++ this.drawTexturedModalRect(i16, i15 - 10, 25, 9, 9, 9); + } + + if(i14 * 2 + 1 > i13) { +- this.drawTexturedModalRect(i16, i15, 16, 9, 9, 9); ++ this.drawTexturedModalRect(i16, i15 - 10, 16, 9, 9, 9); + } + } + +@@ -109,17 +114,42 @@ + if(i14 * 2 + 1 == i11) { + this.drawTexturedModalRect(i17, i15, 61, 0, 9, 9); + } ++ ++ i15 = i7 - 32; ++ if (cz1) { ++ i15 += this.rand.nextInt(2); ++ } ++ i16 = i6 / 2 + 91 - i14 * 8 - 9; ++ ++ this.drawTexturedModalRect(i16, i15, 34 + (cz2 ? 9 : 0), 18, 9, 9); ++ int ci3 = MathHelper.floor_float(MathHelper.clamp((i14 * 2 + 2 - cf0) * 9, 0, 9)); ++ this.drawTexturedModalRect(i16 + ci3, i15, 52 + ci3, 18, 9, 9); ++ ++ if (cz3) { ++ i15 = i7 - 42; ++ i16 = i6 / 2 - 91 + i14 * 8; ++ this.drawTexturedModalRect(i16, i15, 16, 27, 9, 9); ++ int ci5 = MathHelper.floor_float(MathHelper.clamp((cf1 - (i14 * 2 + 1)) * 9, 0, 9)); ++ this.drawTexturedModalRect(i16, i15, 25, 27, ci5, 9); ++ } + } + + if(this.mc.thePlayer.isInsideOfMaterial(Material.water)) { ++ if (cz3) { ++ i7 += 10; ++ } ++ if (cz4) { ++ i7 += 10; ++ } ++ + i14 = (int)Math.ceil((double)(this.mc.thePlayer.air - 2) * 10.0D / 300.0D); + i15 = (int)Math.ceil((double)this.mc.thePlayer.air * 10.0D / 300.0D) - i14; + + for(i16 = 0; i16 < i14 + i15; ++i16) { + if(i16 < i14) { +- this.drawTexturedModalRect(i6 / 2 - 91 + i16 * 8, i7 - 32 - 9, 16, 18, 9, 9); ++ this.drawTexturedModalRect(i6 / 2 - 91 + i16 * 8, i7 - 42, 16, 18, 9, 9); + } else { +- this.drawTexturedModalRect(i6 / 2 - 91 + i16 * 8, i7 - 32 - 9, 25, 18, 9, 9); ++ this.drawTexturedModalRect(i6 / 2 - 91 + i16 * 8, i7 - 42, 25, 18, 9, 9); + } + } + } +@@ -141,11 +171,14 @@ + RenderHelper.disableStandardItemLighting(); + GL11.glDisable(GL12.GL_RESCALE_NORMAL); + String string21; +- if(Keyboard.isKeyDown(Keyboard.KEY_F3)) { +- fontRenderer8.drawStringWithShadow("Minecraft Alpha v1.1.2_01 (" + this.mc.debug + ")", 2, 2, 0xFFFFFF); +- fontRenderer8.drawStringWithShadow(this.mc.debugInfoRenders(), 2, 12, 0xFFFFFF); +- fontRenderer8.drawStringWithShadow(this.mc.getEntityDebug(), 2, 22, 0xFFFFFF); +- fontRenderer8.drawStringWithShadow(this.mc.debugInfoEntities(), 2, 32, 0xFFFFFF); ++ if(this.mc.options.debugMenu) { ++ fontRenderer8.drawStringWithShadow(Minecraft.version + " (" + this.mc.debug + ")", 2, 2, 0xFFFFFF); ++ fontRenderer8.drawStringWithShadow(this.mc.debugInfoLocation(), 2, 12, 0xFFFFFF); ++ fontRenderer8.drawStringWithShadow(this.mc.debugInfoRenders(), 2, 22, 0xFFFFFF); ++ fontRenderer8.drawStringWithShadow(this.mc.getEntityDebug(), 2, 32, 0xFFFFFF); ++ fontRenderer8.drawStringWithShadow(this.mc.debugInfoEntities(), 2, 42, 0xFFFFFF); ++ fontRenderer8.drawStringWithShadow(this.mc.debugInfoSeed(), 2, 52, 0xFFFFFF); ++ fontRenderer8.drawStringWithShadow(this.mc.debugInfoWorld(), 2, 62, 0xFFFFFF); + long j22 = Runtime.getRuntime().maxMemory(); + long j27 = Runtime.getRuntime().totalMemory(); + long j28 = Runtime.getRuntime().freeMemory(); +@@ -155,7 +188,7 @@ + string21 = "Allocated memory: " + j27 * 100L / j22 + "% (" + j27 / 1024L / 1024L + "MB)"; + this.drawString(fontRenderer8, string21, i6 - fontRenderer8.getStringWidth(string21) - 2, 12, 14737632); + } else { +- fontRenderer8.drawStringWithShadow("Minecraft Alpha v1.1.2_01", 2, 2, 0xFFFFFF); ++ fontRenderer8.drawStringWithShadow(Minecraft.version, 2, 2, 0xFFFFFF); + } + + if(this.recordPlayingUpFor > 0) { diff --git a/patches_merged/net/minecraft/src/GuiInventory.java.patch b/patches_merged/net/minecraft/src/GuiInventory.java.patch new file mode 100644 index 0000000..a19934b --- /dev/null +++ b/patches_merged/net/minecraft/src/GuiInventory.java.patch @@ -0,0 +1,71 @@ +--- a/net/minecraft/src/GuiInventory.java ++++ b/net/minecraft/src/GuiInventory.java +@@ -3,27 +3,33 @@ + import org.lwjgl.opengl.GL11; + import org.lwjgl.opengl.GL12; + ++import java.util.ArrayList; ++import java.util.Optional; ++ + public class GuiInventory extends GuiContainer { + private CraftingInventoryPlayerCB craftingInventory; + private float xSize_lo; + private float ySize_lo; ++ private int mouseX; ++ private int mouseY; + + public GuiInventory(IInventory iInventory1, ItemStack[] itemStack2) { + this.allowUserInput = true; + this.craftingInventory = new CraftingInventoryPlayerCB(itemStack2); +- this.inventorySlots.add(new SlotCrafting(this, this.craftingInventory.craftMatrix, this.craftingInventory.craftResult, 0, 144, 36)); ++ this.inventorySlots.add(new SlotCrafting(this, this.craftingInventory.craftMatrix, this.craftingInventory.craftResult, 0, 144, 27)); + + int i3; + int i4; + for(i3 = 0; i3 < 2; ++i3) { + for(i4 = 0; i4 < 2; ++i4) { +- this.inventorySlots.add(new SlotInventory(this, this.craftingInventory.craftMatrix, i4 + i3 * 2, 88 + i4 * 18, 26 + i3 * 18)); ++ this.inventorySlots.add(new SlotInventory(this, this.craftingInventory.craftMatrix, i4 + i3 * 2, 88 + i4 * 18, 17 + i3 * 18)); + } + } + + for(i3 = 0; i3 < 4; ++i3) { + this.inventorySlots.add(new SlotArmor(this, this, iInventory1, iInventory1.getSizeInventory() - 1 - i3, 8, 8 + i3 * 18, i3)); + } ++ this.inventorySlots.add(new SlotArmor(this, this, iInventory1, iInventory1.getSizeInventory() - 5, 80, 62, 4)); + + for(i3 = 0; i3 < 3; ++i3) { + for(i4 = 0; i4 < 9; ++i4) { +@@ -38,13 +44,15 @@ + } + + protected void drawGuiContainerForegroundLayer() { +- this.fontRenderer.drawString("Crafting", 86, 16, 4210752); ++ this.fontRenderer.drawString("Crafting", 86, 7, 4210752); + } + + public void drawScreen(int mouseX, int mouseY, float renderPartialTick) { + super.drawScreen(mouseX, mouseY, renderPartialTick); + this.xSize_lo = (float)mouseX; + this.ySize_lo = (float)mouseY; ++ this.mouseX = mouseX; ++ this.mouseY = mouseY; + } + + protected void drawGuiContainerBackgroundLayer(float renderPartialTick) { +@@ -81,5 +89,15 @@ + GL11.glPopMatrix(); + RenderHelper.disableStandardItemLighting(); + GL11.glDisable(GL12.GL_RESCALE_NORMAL); ++ } ++ ++ protected void keyTyped(char c1, int i2) { ++ super.keyTyped(c1, i2); ++ if (i2 == this.mc.options.keyBindRecipeGuide.keyCode) { ++ Optional hoverSlot = ((ArrayList)this.inventorySlots).stream() ++ .filter(slot -> (slot).getIsMouseOverSlot(mouseX, mouseY)) ++ .findFirst(); ++ hoverSlot.ifPresent(slotInventory -> mc.thePlayer.displayGUIRecipeGuide(slotInventory.getStack())); ++ } + } + } diff --git a/patches_merged/net/minecraft/src/GuiMainMenu.java.patch b/patches_merged/net/minecraft/src/GuiMainMenu.java.patch new file mode 100644 index 0000000..9a04096 --- /dev/null +++ b/patches_merged/net/minecraft/src/GuiMainMenu.java.patch @@ -0,0 +1,190 @@ +--- a/net/minecraft/src/GuiMainMenu.java ++++ b/net/minecraft/src/GuiMainMenu.java +@@ -7,17 +7,43 @@ + import java.util.Date; + import java.util.Random; + ++import io.github.bluestaggo.mcdiverge.GuiCredits; ++import net.minecraft.client.Minecraft; + import org.lwjgl.opengl.GL11; + import org.lwjgl.util.glu.GLU; + + public class GuiMainMenu extends GuiScreen { + private static final Random rand = new Random(); +- String[] logoBlockLayers = new String[]{" * * * * * *** *** *** *** *** ***", " ** ** * ** * * * * * * * * * ", " * * * * * * * ** * ** *** ** * ", " * * * * ** * * * * * * * * ", " * * * * * *** *** * * * * * * "}; ++ private static final Block[] titleBlocks = { ++ Block.stone, ++ Block.cobblestone, ++ Block.bedrock, ++ Block.wood, ++ Block.planks, ++ Block.obsidian, ++ Block.cobblestoneMossy, ++ Block.dirt, ++ Block.gravel, ++ Block.blockClay ++ }; ++ String[] logoBlockLayers = new String[]{" * * * * * *** *** *** *** *** ***", ++ " ** ** * ** * * * * * * * * * ", ++ " * * * * * * * ** * ** *** ** * ", ++ " * * * * ** * * * * * * * * ", ++ " * * * * * *** *** * * * * * * "}; + private LogoEffectRandomizer[][] logoEffects; +- private float updateCounter = 0.0F; + private String splashString = "missingno"; ++ private Block drawBlock; + + public GuiMainMenu() { ++ if (rand.nextDouble() <= 0.0001F) { ++ logoBlockLayers = new String[]{" * * * * * *** *** *** *** *** ***", ++ " ** ** * ** * * * * * * * * * ", ++ " * * * * * * * * *** ** *** ** * ", ++ " * * * * ** * * * * * * * * ", ++ " * * * * * *** *** * * * * * * "}; ++ } ++ + try { + ArrayList arrayList1 = new ArrayList(); + BufferedReader bufferedReader2 = new BufferedReader(new InputStreamReader(GuiMainMenu.class.getResourceAsStream("/title/splashes.txt"))); +@@ -31,13 +57,16 @@ + } + + this.splashString = (String)arrayList1.get(rand.nextInt(arrayList1.size())); ++ this.drawBlock = titleBlocks[rand.nextInt(titleBlocks.length)]; + } catch (Exception exception4) { + } + + } + + public void updateScreen() { +- ++this.updateCounter; ++ this.mc.sndManager.tickMusic(); ++ this.mc.sndManager.playRandomTitleMusicIfReady(); ++ + if(this.logoEffects != null) { + for(int i1 = 0; i1 < this.logoEffects.length; ++i1) { + for(int i2 = 0; i2 < this.logoEffects[i1].length; ++i2) { +@@ -52,24 +81,30 @@ + } + + public void initGui() { +- Calendar calendar1 = Calendar.getInstance(); +- calendar1.setTime(new Date()); +- if(calendar1.get(2) + 1 == 11 && calendar1.get(5) == 9) { +- this.splashString = "Happy birthday, ez!"; +- } else if(calendar1.get(2) + 1 == 6 && calendar1.get(5) == 1) { +- this.splashString = "Happy birthday, Notch!"; +- } else if(calendar1.get(2) + 1 == 12 && calendar1.get(5) == 24) { +- this.splashString = "Merry X-mas!"; +- } else if(calendar1.get(2) + 1 == 1 && calendar1.get(5) == 1) { +- this.splashString = "Happy new year!"; ++ this.mc.sndManager.stopBackgroundMusic(); ++ ++ if(rand.nextInt(2) == 0) { ++ Calendar calendar1 = Calendar.getInstance(); ++ calendar1.setTime(new Date()); ++ ++ if(calendar1.get(Calendar.MONTH) == Calendar.NOVEMBER && calendar1.get(Calendar.DATE) == 9) { ++ this.splashString = "Happy birthday, ez!"; ++ } else if(calendar1.get(Calendar.MONTH) == Calendar.JUNE && calendar1.get(Calendar.DATE) == 1) { ++ this.splashString = "Happy birthday, Notch!"; ++ } else if(calendar1.get(Calendar.MONTH) == Calendar.DECEMBER && (calendar1.get(Calendar.DATE) == 24 || calendar1.get(Calendar.DATE) == 25)) { ++ this.splashString = "Merry X-mas!"; ++ } else if(calendar1.get(Calendar.MONTH) == Calendar.JANUARY && calendar1.get(Calendar.DATE) == 1) { ++ this.splashString = "Happy new year!"; ++ } else if(calendar1.get(Calendar.MONTH) == Calendar.MAY && calendar1.get(Calendar.DATE) == 17) { ++ this.splashString = "Happy birthday, Minecraft!"; ++ } + } + + this.controlList.clear(); + this.controlList.add(new GuiButton(1, this.width / 2 - 100, this.height / 4 + 48, "Singleplayer")); + this.controlList.add(new GuiButton(2, this.width / 2 - 100, this.height / 4 + 72, "Multiplayer")); +- this.controlList.add(new GuiButton(3, this.width / 2 - 100, this.height / 4 + 96, "Play tutorial level")); +- this.controlList.add(new GuiButton(0, this.width / 2 - 100, this.height / 4 + 120 + 12, "Options...")); +- ((GuiButton)this.controlList.get(2)).enabled = false; ++ this.controlList.add(new GuiButton(3, 10, this.height - 30, 60, 20, "Credits")); ++ this.controlList.add(new GuiButton(0, this.width / 2 - 100, this.height / 4 + 132, "Options...")); + if(this.mc.session == null) { + ((GuiButton)this.controlList.get(1)).enabled = false; + } +@@ -77,33 +112,44 @@ + } + + protected void actionPerformed(GuiButton button) { +- if(button.id == 0) { +- this.mc.displayGuiScreen(new GuiOptions(this, this.mc.options)); +- } +- +- if(button.id == 1) { +- this.mc.displayGuiScreen(new GuiSelectWorld(this)); +- } +- +- if(button.id == 2) { +- this.mc.displayGuiScreen(new GuiMultiplayer(this)); +- } +- ++ switch (button.id) { ++ case 0: ++ this.mc.displayGuiScreen(new GuiOptions(this, this.mc.options)); ++ break; ++ ++ case 1: ++ this.mc.displayGuiScreen(new GuiSelectWorld(this)); ++ break; ++ ++ case 2: ++ this.mc.displayGuiScreen(new GuiMultiplayer(this)); ++ break; ++ ++ case 3: ++ this.mc.displayGuiScreen(new GuiCredits(this)); ++ break; ++ } + } + + public void drawScreen(int mouseX, int mouseY, float renderPartialTick) { + this.drawDefaultBackground(); ++ this.drawString(this.fontRenderer, Minecraft.version, 2, 2, 0xFF7F7F7F); + Tessellator tessellator4 = Tessellator.instance; + this.drawLogo(renderPartialTick); + GL11.glBindTexture(GL11.GL_TEXTURE_2D, this.mc.renderEngine.getTexture("/gui/logo.png")); + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + tessellator4.setColorOpaque_I(0xFFFFFF); + GL11.glPushMatrix(); +- GL11.glTranslatef((float)(this.width / 2 + 90), 70.0F, 0.0F); +- GL11.glRotatef(-20.0F, 0.0F, 0.0F, 1.0F); +- float f5 = 1.8F - MathHelper.abs(MathHelper.sin((float)(System.currentTimeMillis() % 1000L) / 1000.0F * (float)Math.PI * 2.0F) * 0.1F); +- f5 = f5 * 100.0F / (float)(this.fontRenderer.getStringWidth(this.splashString) + 32); +- GL11.glScalef(f5, f5, f5); ++ GL11.glScalef(3.0F, 3.0F, 3.0F); ++ this.drawCenteredString(this.fontRenderer, "DIVERGE", this.width / 2 / 3, 80 / 3, 0xFF00FFFF); ++ GL11.glPopMatrix(); ++ GL11.glPushMatrix(); ++ GL11.glTranslatef((float)(this.width / 2), (float)(this.height / 4 + 124), 0.0F); ++ float f5 = MathHelper.sin((float)(System.currentTimeMillis() % 1000L) / 1000.0F * (float)Math.PI * 2.0F); ++ float f6 = (1.8F - MathHelper.abs(f5) * 0.1F) * 100.0F / (float)(this.fontRenderer.getStringWidth(this.splashString) + 32); ++ float f7 = f5 * 2.5F; ++ GL11.glScalef(f6, f6, f6); ++ GL11.glRotatef(f7, 0.0F, 0.0F, 1.0F); + this.drawCenteredString(this.fontRenderer, this.splashString, 0, -8, 16776960); + GL11.glPopMatrix(); + String string6 = "Copyright Mojang Specifications. Do not distribute."; +@@ -186,7 +232,6 @@ + float f10 = (float)(logoEffectRandomizer9.prevHeight + (logoEffectRandomizer9.height - logoEffectRandomizer9.prevHeight) * (double)renderPartialTick); + float f11 = 1.0F; + float f12 = 1.0F; +- float f13 = 0.0F; + if(i4 == 0) { + f11 = f10 * 0.04F + 1.0F; + f12 = 1.0F / f11; +@@ -195,8 +240,7 @@ + + GL11.glTranslatef((float)i7, (float)i6, f10); + GL11.glScalef(f11, f11, f11); +- GL11.glRotatef(f13, 0.0F, 1.0F, 0.0F); +- renderBlocks5.renderBlockAsItem(Block.stone, f12); ++ renderBlocks5.renderBlockAsItem(this.drawBlock, f12); + GL11.glPopMatrix(); + } + } diff --git a/patches_merged/net/minecraft/src/GuiOptions.java.patch b/patches_merged/net/minecraft/src/GuiOptions.java.patch new file mode 100644 index 0000000..5daeeaa --- /dev/null +++ b/patches_merged/net/minecraft/src/GuiOptions.java.patch @@ -0,0 +1,73 @@ +--- a/net/minecraft/src/GuiOptions.java ++++ b/net/minecraft/src/GuiOptions.java +@@ -1,27 +1,40 @@ + package net.minecraft.src; + ++import java.util.Arrays; ++import java.util.List; ++import java.util.stream.Collectors; ++ + public class GuiOptions extends GuiScreen { + private GuiScreen parentScreen; + protected String screenTitle = "Options"; + private GameSettings options; ++ private final int maxPages; ++ private int currentPage; + + public GuiOptions(GuiScreen guiScreen1, GameSettings gameSettings2) { + this.parentScreen = guiScreen1; + this.options = gameSettings2; ++ this.maxPages = Math.floorDiv(this.options.numberOfOptions, 10) + 1; + } + + public void initGui() { +- for(int i1 = 0; i1 < this.options.numberOfOptions; ++i1) { +- int i2 = this.options.isSlider(i1); +- if(i2 == 0) { +- this.controlList.add(new GuiSmallButton(i1, this.width / 2 - 155 + i1 % 2 * 160, this.height / 6 + 24 * (i1 >> 1), this.options.getOptionDisplayString(i1))); ++ this.controlList.add(new GuiButton(100, this.width / 2 - 100, this.height / 6 + 132, "Controls...")); ++ this.controlList.add(new GuiButton(200, this.width / 2 - 100, this.height / 6 + 168, "Done")); ++ this.controlList.add(new GuiButton(300, this.width / 2 - 140, this.height / 6 + 132, 20, 20, "<")); ++ this.controlList.add(new GuiButton(301, this.width / 2 + 120, this.height / 6 + 132, 20, 20, ">")); ++ initPage(); ++ } ++ ++ private void initPage() { ++ this.controlList = (List) this.controlList.stream().filter(button -> ((GuiButton) button).id >= 100).collect(Collectors.toList()); ++ for(int i1 = 0; i1 < Math.min(this.options.numberOfOptions - currentPage * 10, 10); ++i1) { ++ int i11 = i1 + currentPage * 10; ++ if(this.options.isSlider(i11) == 0) { ++ this.controlList.add(new GuiSmallButton(i11, this.width / 2 - 155 + i1 % 2 * 160, this.height / 6 + 24 * (i1 >> 1), this.options.getOptionDisplayString(i11))); + } else { +- this.controlList.add(new GuiSlider(i1, this.width / 2 - 155 + i1 % 2 * 160, this.height / 6 + 24 * (i1 >> 1), i1, this.options.getOptionDisplayString(i1), this.options.getOptionFloatValue(i1))); ++ this.controlList.add(new GuiSlider(i11, this.width / 2 - 155 + i1 % 2 * 160, this.height / 6 + 24 * (i1 >> 1), i11, this.options.getOptionDisplayString(i11), this.options.getOptionFloatValue(i11))); + } + } +- +- this.controlList.add(new GuiButton(100, this.width / 2 - 100, this.height / 6 + 120 + 12, "Controls...")); +- this.controlList.add(new GuiButton(200, this.width / 2 - 100, this.height / 6 + 168, "Done")); + } + + protected void actionPerformed(GuiButton button) { +@@ -39,6 +52,21 @@ + this.mc.displayGuiScreen(this.parentScreen); + } + ++ if(button.id == 300) { ++ this.currentPage--; ++ if (this.currentPage < 0) { ++ this.currentPage = maxPages - 1; ++ } ++ this.initPage(); ++ } ++ ++ if(button.id == 301) { ++ this.currentPage++; ++ if (this.currentPage >= maxPages) { ++ this.currentPage = 0; ++ } ++ this.initPage(); ++ } + } + } + diff --git a/patches_merged/net/minecraft/src/GuiScreen.java.patch b/patches_merged/net/minecraft/src/GuiScreen.java.patch new file mode 100644 index 0000000..fbd0f2e --- /dev/null +++ b/patches_merged/net/minecraft/src/GuiScreen.java.patch @@ -0,0 +1,34 @@ +--- a/net/minecraft/src/GuiScreen.java ++++ b/net/minecraft/src/GuiScreen.java +@@ -143,19 +143,25 @@ + + } + ++ public static long backgroundElapsedTicks = 0; ++ + public void drawBackground(int i1) { + GL11.glDisable(GL11.GL_LIGHTING); + GL11.glDisable(GL11.GL_FOG); + Tessellator tessellator2 = Tessellator.instance; +- GL11.glBindTexture(GL11.GL_TEXTURE_2D, this.mc.renderEngine.getTexture("/dirt.png")); ++ GL11.glBindTexture(GL11.GL_TEXTURE_2D, this.mc.renderEngine.getTexture("/guibg.png")); + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); +- float f3 = 32.0F; ++ float f3 = 512.0F; ++ ++ float f4 = backgroundElapsedTicks / 1000.0F; ++ float f5 = f4 / 2.0F; ++ + tessellator2.startDrawingQuads(); + tessellator2.setColorOpaque_I(4210752); +- tessellator2.addVertexWithUV(0.0D, (double)this.height, 0.0D, 0.0D, (double)((float)this.height / f3 + (float)i1)); +- tessellator2.addVertexWithUV((double)this.width, (double)this.height, 0.0D, (double)((float)this.width / f3), (double)((float)this.height / f3 + (float)i1)); +- tessellator2.addVertexWithUV((double)this.width, 0.0D, 0.0D, (double)((float)this.width / f3), (double)(0 + i1)); +- tessellator2.addVertexWithUV(0.0D, 0.0D, 0.0D, 0.0D, (double)(0 + i1)); ++ tessellator2.addVertexWithUV(0.0D, this.height, 0.0D, f4, ((float)this.height / f3 + (float)i1) + f5); ++ tessellator2.addVertexWithUV(this.width, this.height, 0.0D, ((float)this.width / f3) + f4, ((float)this.height / f3 + (float)i1) + f5); ++ tessellator2.addVertexWithUV(this.width, 0.0D, 0.0D, ((float)this.width / f3) + f4, i1 + f5); ++ tessellator2.addVertexWithUV(0.0D, 0.0D, 0.0D, f4, i1 + f5); + tessellator2.draw(); + } + diff --git a/patches_merged/net/minecraft/src/GuiSelectWorld.java.patch b/patches_merged/net/minecraft/src/GuiSelectWorld.java.patch new file mode 100644 index 0000000..53da428 --- /dev/null +++ b/patches_merged/net/minecraft/src/GuiSelectWorld.java.patch @@ -0,0 +1,126 @@ +--- a/net/minecraft/src/GuiSelectWorld.java ++++ b/net/minecraft/src/GuiSelectWorld.java +@@ -1,6 +1,8 @@ + package net.minecraft.src; + + import java.io.File; ++import java.util.List; ++import java.util.stream.Collectors; + + import net.minecraft.client.Minecraft; + +@@ -8,49 +10,78 @@ + protected GuiScreen parentScreen; + protected String screenTitle = "Select world"; + private boolean selected = false; ++ private int currentPage; ++ private static final int maxPages = 100 / 5; ++ private File mcDir = Minecraft.getMinecraftDir(); + + public GuiSelectWorld(GuiScreen guiScreen1) { + this.parentScreen = guiScreen1; ++ if (guiScreen1 instanceof GuiSelectWorld) { ++ this.currentPage = ((GuiSelectWorld) guiScreen1).currentPage; ++ } + } + + public void initGui() { +- File file1 = Minecraft.getMinecraftDir(); ++ this.controlList.clear(); ++ this.initPage(); ++ this.initButtons(); ++ } + ++ public void initPage() { ++ this.controlList = (List) this.controlList.stream().filter(button -> ((GuiButton) button).id >= 100).collect(Collectors.toList()); + for(int i2 = 0; i2 < 5; ++i2) { +- NBTTagCompound nBTTagCompound3 = World.getLevelData(file1, "World" + (i2 + 1)); ++ int i22 = i2 + this.currentPage * 5; ++ NBTTagCompound nBTTagCompound3 = World.getLevelData(mcDir, "World" + (i22 + 1)); + if(nBTTagCompound3 == null) { +- this.controlList.add(new GuiButton(i2, this.width / 2 - 100, this.height / 6 + 24 * i2, "- empty -")); ++ this.controlList.add(new GuiButton(i22, this.width / 2 - 100, this.height / 6 + 24 * i2, "- empty -")); + } else { +- String string4 = "World " + (i2 + 1); ++ String string4 = nBTTagCompound3.getString("DisplayName"); ++ if(string4.isEmpty()) { ++ string4 = "World " + (i22 + 1); ++ } + long j5 = nBTTagCompound3.getLong("SizeOnDisk"); + string4 = string4 + " (" + (float)(j5 / 1024L * 100L / 1024L) / 100.0F + " MB)"; +- this.controlList.add(new GuiButton(i2, this.width / 2 - 100, this.height / 6 + 24 * i2, string4)); ++ this.controlList.add(new GuiButton(i22, this.width / 2 - 100, this.height / 6 + 24 * i2, string4)); + } + } +- +- this.initButtons(); + } + + protected String getSaveName(int i1) { + File file2 = Minecraft.getMinecraftDir(); +- return World.getLevelData(file2, "World" + i1) != null ? "World" + i1 : null; ++ NBTTagCompound data = World.getLevelData(file2, "World" + i1); ++ if (data == null) { ++ return null; ++ } ++ ++ String displayName = data.getString("DisplayName"); ++ if (displayName.isEmpty()) { ++ return "World" + i1; ++ } ++ return displayName; + } + + public void initButtons() { +- this.controlList.add(new GuiButton(5, this.width / 2 - 100, this.height / 6 + 120 + 12, "Delete world...")); +- this.controlList.add(new GuiButton(6, this.width / 2 - 100, this.height / 6 + 168, "Cancel")); ++ this.controlList.add(new GuiButton(100, this.width / 2 - 100, this.height / 6 + 132, "Delete world...")); ++ this.controlList.add(new GuiButton(101, this.width / 2 - 100, this.height / 6 + 168, "Cancel")); ++ this.controlList.add(new GuiButton(102, this.width / 2 - 140, this.height / 6 + 132, 20, 20, "<")); ++ this.controlList.add(new GuiButton(103, this.width / 2 + 120, this.height / 6 + 132, 20, 20, ">")); + } + + protected void actionPerformed(GuiButton button) { + if(button.enabled) { +- if(button.id < 5) { ++ if(button.id < 100) { + this.selectWorld(button.id + 1); +- } else if(button.id == 5) { ++ } else if(button.id == 100) { + this.mc.displayGuiScreen(new GuiDeleteWorld(this)); +- } else if(button.id == 6) { ++ } else if(button.id == 101) { + this.mc.displayGuiScreen(this.parentScreen); ++ } else if(button.id == 102 && this.currentPage > 0) { ++ this.currentPage--; ++ this.initPage(); ++ } else if(button.id == 103 && this.currentPage < maxPages - 1) { ++ this.currentPage++; ++ this.initPage(); + } +- + } + } + +@@ -58,6 +89,13 @@ + this.mc.displayGuiScreen((GuiScreen)null); + if(!this.selected) { + this.selected = true; ++ ++ NBTTagCompound nBTTagCompound3 = World.getLevelData(Minecraft.getMinecraftDir(), "World" + i1); ++ if(nBTTagCompound3 == null) { ++ this.mc.displayGuiScreen(new GuiCreateWorld(this, i1)); ++ return; ++ } ++ + this.mc.playerController = new PlayerControllerSP(this.mc); + this.mc.startWorld("World" + i1); + this.mc.displayGuiScreen((GuiScreen)null); +@@ -67,6 +105,7 @@ + public void drawScreen(int mouseX, int mouseY, float renderPartialTick) { + this.drawDefaultBackground(); + this.drawCenteredString(this.fontRenderer, this.screenTitle, this.width / 2, 20, 0xFFFFFF); ++ this.drawCenteredString(this.fontRenderer, (this.currentPage + 1) + " / " + maxPages, this.width / 2, this.height - 10, 0xFFFFFF); + super.drawScreen(mouseX, mouseY, renderPartialTick); + } + } diff --git a/patches_merged/net/minecraft/src/GuiTextField.java.patch b/patches_merged/net/minecraft/src/GuiTextField.java.patch new file mode 100644 index 0000000..eda3feb --- /dev/null +++ b/patches_merged/net/minecraft/src/GuiTextField.java.patch @@ -0,0 +1,103 @@ +--- /dev/null ++++ b/net/minecraft/src/GuiTextField.java +@@ -1,0 +1,100 @@ ++package net.minecraft.src; ++ ++public class GuiTextField extends Gui { ++ private final FontRenderer fontRenderer; ++ private final int xPos; ++ private final int yPos; ++ private final int width; ++ private final int height; ++ private String text; ++ private int maxStringLength; ++ private int cursorCounter; ++ public boolean isFocused = false; ++ public boolean isEnabled = true; ++ private GuiScreen parentGuiScreen; ++ ++ public GuiTextField(GuiScreen guiScreen1, FontRenderer fontRenderer2, int i3, int i4, int i5, int i6, String string7) { ++ this.parentGuiScreen = guiScreen1; ++ this.fontRenderer = fontRenderer2; ++ this.xPos = i3; ++ this.yPos = i4; ++ this.width = i5; ++ this.height = i6; ++ this.setText(string7); ++ } ++ ++ public void setText(String string1) { ++ this.text = string1; ++ } ++ ++ public String getText() { ++ return this.text; ++ } ++ ++ public void updateCursorCounter() { ++ ++this.cursorCounter; ++ } ++ ++ public void textboxKeyTyped(char c1, int i2) { ++ if(this.isEnabled && this.isFocused) { ++// if(c1 == 9) { ++// this.parentGuiScreen.selectNextField(); ++// } ++ ++ if(c1 == 22) { ++ String string3 = GuiScreen.getClipboardString(); ++ if(string3 == null) { ++ string3 = ""; ++ } ++ ++ int i4 = 32 - this.text.length(); ++ if(i4 > string3.length()) { ++ i4 = string3.length(); ++ } ++ ++ if(i4 > 0) { ++ this.text = this.text + string3.substring(0, i4); ++ } ++ } ++ ++ if(i2 == 14 && this.text.length() > 0) { ++ this.text = this.text.substring(0, this.text.length() - 1); ++ } ++ ++ if(" !\"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_\'abcdefghijklmnopqrstuvwxyz{|}~\u2302\u00c7\u00fc\u00e9\u00e2\u00e4\u00e0\u00e5\u00e7\u00ea\u00eb\u00e8\u00ef\u00ee\u00ec\u00c4\u00c5\u00c9\u00e6\u00c6\u00f4\u00f6\u00f2\u00fb\u00f9\u00ff\u00d6\u00dc\u00f8\u00a3\u00d8\u00d7\u0192\u00e1\u00ed\u00f3\u00fa\u00f1\u00d1\u00aa\u00ba\u00bf\u00ae\u00ac\u00bd\u00bc\u00a1\u00ab\u00bb" ++ .indexOf(c1) >= 0 && (this.text.length() < this.maxStringLength || this.maxStringLength == 0)) { ++ this.text = this.text + c1; ++ } ++ ++ } ++ } ++ ++ public void mouseClicked(int i1, int i2, int i3) { ++ boolean z4 = this.isEnabled && i1 >= this.xPos && i1 < this.xPos + this.width && i2 >= this.yPos && i2 < this.yPos + this.height; ++ this.setFocused(z4); ++ } ++ ++ public void setFocused(boolean z1) { ++ if(z1 && !this.isFocused) { ++ this.cursorCounter = 0; ++ } ++ ++ this.isFocused = z1; ++ } ++ ++ public void drawTextBox() { ++ this.drawRect(this.xPos - 1, this.yPos - 1, this.xPos + this.width + 1, this.yPos + this.height + 1, -6250336); ++ this.drawRect(this.xPos, this.yPos, this.xPos + this.width, this.yPos + this.height, 0xFF000000); ++ if(this.isEnabled) { ++ boolean z1 = this.isFocused && this.cursorCounter / 6 % 2 == 0; ++ this.drawString(this.fontRenderer, this.text + (z1 ? "_" : ""), this.xPos + 4, this.yPos + (this.height - 8) / 2, 14737632); ++ } else { ++ this.drawString(this.fontRenderer, this.text, this.xPos + 4, this.yPos + (this.height - 8) / 2, 7368816); ++ } ++ ++ } ++ ++ public void setMaxStringLength(int i1) { ++ this.maxStringLength = i1; ++ } ++} diff --git a/patches_merged/net/minecraft/src/IAnimal.java.patch b/patches_merged/net/minecraft/src/IAnimal.java.patch new file mode 100644 index 0000000..360276e --- /dev/null +++ b/patches_merged/net/minecraft/src/IAnimal.java.patch @@ -0,0 +1,7 @@ +--- /dev/null ++++ b/net/minecraft/src/IAnimal.java +@@ -1,0 +1,4 @@ ++package net.minecraft.src; ++ ++public interface IAnimal { ++} diff --git a/patches_merged/net/minecraft/src/IAnimals.java.patch b/patches_merged/net/minecraft/src/IAnimals.java.patch new file mode 100644 index 0000000..25b1220 --- /dev/null +++ b/patches_merged/net/minecraft/src/IAnimals.java.patch @@ -0,0 +1,7 @@ +--- a/net/minecraft/src/IAnimals.java ++++ /dev/null +@@ -1,4 +1,0 @@ +-package net.minecraft.src; +- +-public interface IAnimals { +-} diff --git a/patches_merged/net/minecraft/src/IMobs.java.patch b/patches_merged/net/minecraft/src/IMobs.java.patch new file mode 100644 index 0000000..08699eb --- /dev/null +++ b/patches_merged/net/minecraft/src/IMobs.java.patch @@ -0,0 +1,8 @@ +--- a/net/minecraft/src/IMobs.java ++++ b/net/minecraft/src/IMobs.java +@@ -1,4 +1,4 @@ + package net.minecraft.src; + +-public interface IMobs extends IAnimals { ++public interface IMobs extends IAnimal { + } diff --git a/patches_merged/net/minecraft/src/IWorldAccess.java.patch b/patches_merged/net/minecraft/src/IWorldAccess.java.patch new file mode 100644 index 0000000..e4b3562 --- /dev/null +++ b/patches_merged/net/minecraft/src/IWorldAccess.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/src/IWorldAccess.java ++++ b/net/minecraft/src/IWorldAccess.java +@@ -15,7 +15,7 @@ + + void updateAllRenderers(); + +- void playRecord(String string1, int i2, int i3, int i4); ++ void playRecord(String string1, int i2, int i3, int i4, String author); + + void doNothingWithTileEntity(int i1, int i2, int i3, TileEntity tileEntity4); + } diff --git a/patches_merged/net/minecraft/src/InventoryPlayer.java.patch b/patches_merged/net/minecraft/src/InventoryPlayer.java.patch new file mode 100644 index 0000000..945d992 --- /dev/null +++ b/patches_merged/net/minecraft/src/InventoryPlayer.java.patch @@ -0,0 +1,120 @@ +--- a/net/minecraft/src/InventoryPlayer.java ++++ b/net/minecraft/src/InventoryPlayer.java +@@ -2,7 +2,7 @@ + + public class InventoryPlayer implements IInventory { + public ItemStack[] mainInventory = new ItemStack[37]; +- public ItemStack[] armorInventory = new ItemStack[4]; ++ public ItemStack[] armorInventory = new ItemStack[5]; + public ItemStack[] craftingInventory = new ItemStack[4]; + public int currentItem = 0; + private EntityPlayer player; +@@ -27,9 +27,13 @@ + return -1; + } + +- private int storeItemStack(int i1) { ++ private int storeItemStack(int i1, int metadata) { + for(int i2 = 0; i2 < this.mainInventory.length; ++i2) { +- if(this.mainInventory[i2] != null && this.mainInventory[i2].itemID == i1 && this.mainInventory[i2].stackSize < this.mainInventory[i2].getMaxStackSize() && this.mainInventory[i2].stackSize < this.getInventoryStackLimit()) { ++ if(this.mainInventory[i2] != null ++ && this.mainInventory[i2].itemID == i1 ++ && this.mainInventory[i2].itemMetadata == metadata ++ && this.mainInventory[i2].stackSize < this.mainInventory[i2].getMaxStackSize() ++ && this.mainInventory[i2].stackSize < this.getInventoryStackLimit()) { + return i2; + } + } +@@ -72,8 +76,8 @@ + + } + +- private int storePartialItemStack(int i1, int i2) { +- int i3 = this.storeItemStack(i1); ++ private int storePartialItemStack(int i1, int i2, int metadata) { ++ int i3 = this.storeItemStack(i1, metadata); + if(i3 < 0) { + i3 = this.getFirstEmptyStack(); + } +@@ -82,7 +86,7 @@ + return i2; + } else { + if(this.mainInventory[i3] == null) { +- this.mainInventory[i3] = new ItemStack(i1, 0); ++ this.mainInventory[i3] = new ItemStack(i1, 0).withMetadata(metadata); + } + + int i4 = i2; +@@ -129,7 +133,7 @@ + + public boolean addItemStackToInventory(ItemStack itemStack1) { + if(itemStack1.itemDmg == 0) { +- itemStack1.stackSize = this.storePartialItemStack(itemStack1.itemID, itemStack1.stackSize); ++ itemStack1.stackSize = this.storePartialItemStack(itemStack1.itemID, itemStack1.stackSize, itemStack1.itemMetadata); + if(itemStack1.stackSize == 0) { + return true; + } +@@ -191,7 +195,6 @@ + if(this.mainInventory[this.currentItem] != null) { + f2 *= this.mainInventory[this.currentItem].getStrVsBlock(block1); + } +- + return f2; + } + +@@ -230,13 +233,13 @@ + + public void readFromNBT(NBTTagList nBTTagList1) { + this.mainInventory = new ItemStack[36]; +- this.armorInventory = new ItemStack[4]; ++ this.armorInventory = new ItemStack[5]; + this.craftingInventory = new ItemStack[4]; + + for(int i2 = 0; i2 < nBTTagList1.tagCount(); ++i2) { + NBTTagCompound nBTTagCompound3 = (NBTTagCompound)nBTTagList1.tagAt(i2); + int i4 = nBTTagCompound3.getByte("Slot") & 255; +- if(i4 >= 0 && i4 < this.mainInventory.length) { ++ if(i4 < this.mainInventory.length) { + this.mainInventory[i4] = new ItemStack(nBTTagCompound3); + } + +@@ -252,7 +255,7 @@ + } + + public int getSizeInventory() { +- return this.mainInventory.length + 4; ++ return this.mainInventory.length + 5; + } + + public ItemStack getStackInSlot(int slot) { +@@ -298,26 +301,12 @@ + + public int getTotalArmorValue() { + int i1 = 0; +- int i2 = 0; +- int i3 = 0; +- +- for(int i4 = 0; i4 < this.armorInventory.length; ++i4) { +- if(this.armorInventory[i4] != null && this.armorInventory[i4].getItem() instanceof ItemArmor) { +- int i5 = this.armorInventory[i4].getMaxDamage(); +- int i6 = this.armorInventory[i4].itemDmg; +- int i7 = i5 - i6; +- i2 += i7; +- i3 += i5; +- int i8 = ((ItemArmor)this.armorInventory[i4].getItem()).damageReduceAmount; +- i1 += i8; ++ for (int i4 = 0; i4 < this.armorInventory.length; ++i4) { ++ if (this.armorInventory[i4] != null && this.armorInventory[i4].getItem() instanceof ItemArmor) { ++ i1 += ((ItemArmor) this.armorInventory[i4].getItem()).defense; + } + } +- +- if(i3 == 0) { +- return 0; +- } else { +- return (i1 - 1) * i2 / i3 + 1; +- } ++ return i1; + } + + public void damageArmor(int i1) { diff --git a/patches_merged/net/minecraft/src/Item.java.patch b/patches_merged/net/minecraft/src/Item.java.patch new file mode 100644 index 0000000..622bc9f --- /dev/null +++ b/patches_merged/net/minecraft/src/Item.java.patch @@ -0,0 +1,251 @@ +--- a/net/minecraft/src/Item.java ++++ b/net/minecraft/src/Item.java +@@ -2,108 +2,133 @@ + + import java.util.Random; + ++import io.github.bluestaggo.mcdiverge.*; ++ + public class Item { + protected static Random rand = new Random(); + public static Item[] itemsList = new Item[32000]; +- public static Item shovel = (new ItemSpade(0, 2)).setIconIndex(82); +- public static Item pickaxeSteel = (new ItemPickaxe(1, 2)).setIconIndex(98); +- public static Item axeSteel = (new ItemAxe(2, 2)).setIconIndex(114); +- public static Item striker = (new ItemFlintAndSteel(3)).setIconIndex(5); +- public static Item appleRed = (new ItemFood(4, 4)).setIconIndex(10); +- public static Item bow = (new ItemBow(5)).setIconIndex(21); +- public static Item arrow = (new Item(6)).setIconIndex(37); +- public static Item coal = (new Item(7)).setIconIndex(7); +- public static Item diamond = (new Item(8)).setIconIndex(55); +- public static Item ingotIron = (new Item(9)).setIconIndex(23); +- public static Item ingotGold = (new Item(10)).setIconIndex(39); +- public static Item swordSteel = (new ItemSword(11, 2)).setIconIndex(66); +- public static Item swordWood = (new ItemSword(12, 0)).setIconIndex(64); +- public static Item shovelWood = (new ItemSpade(13, 0)).setIconIndex(80); +- public static Item pickaxeWood = (new ItemPickaxe(14, 0)).setIconIndex(96); +- public static Item axeWood = (new ItemAxe(15, 0)).setIconIndex(112); +- public static Item swordStone = (new ItemSword(16, 1)).setIconIndex(65); +- public static Item shovelStone = (new ItemSpade(17, 1)).setIconIndex(81); +- public static Item pickaxeStone = (new ItemPickaxe(18, 1)).setIconIndex(97); +- public static Item axeStone = (new ItemAxe(19, 1)).setIconIndex(113); +- public static Item swordDiamond = (new ItemSword(20, 3)).setIconIndex(67); +- public static Item shovelDiamond = (new ItemSpade(21, 3)).setIconIndex(83); +- public static Item pickaxeDiamond = (new ItemPickaxe(22, 3)).setIconIndex(99); +- public static Item axeDiamond = (new ItemAxe(23, 3)).setIconIndex(115); +- public static Item stick = (new Item(24)).setIconIndex(53).setFull3D(); +- public static Item bowlEmpty = (new Item(25)).setIconIndex(71); +- public static Item bowlSoup = (new ItemSoup(26, 10)).setIconIndex(72); +- public static Item swordGold = (new ItemSword(27, 0)).setIconIndex(68); +- public static Item shovelGold = (new ItemSpade(28, 0)).setIconIndex(84); +- public static Item pickaxeGold = (new ItemPickaxe(29, 0)).setIconIndex(100); +- public static Item axeGold = (new ItemAxe(30, 0)).setIconIndex(116); +- public static Item silk = (new Item(31)).setIconIndex(8); +- public static Item feather = (new Item(32)).setIconIndex(24); +- public static Item gunpowder = (new Item(33)).setIconIndex(40); +- public static Item hoeWood = (new ItemHoe(34, 0)).setIconIndex(128); +- public static Item hoeStone = (new ItemHoe(35, 1)).setIconIndex(129); +- public static Item hoeSteel = (new ItemHoe(36, 2)).setIconIndex(130); +- public static Item hoeDiamond = (new ItemHoe(37, 3)).setIconIndex(131); +- public static Item hoeGold = (new ItemHoe(38, 1)).setIconIndex(132); +- public static Item seeds = (new ItemSeeds(39, Block.crops.blockID)).setIconIndex(9); +- public static Item wheat = (new Item(40)).setIconIndex(25); +- public static Item bread = (new ItemFood(41, 5)).setIconIndex(41); +- public static Item helmetLeather = (new ItemArmor(42, 0, 0, 0)).setIconIndex(0); +- public static Item plateLeather = (new ItemArmor(43, 0, 0, 1)).setIconIndex(16); +- public static Item legsLeather = (new ItemArmor(44, 0, 0, 2)).setIconIndex(32); +- public static Item bootsLeather = (new ItemArmor(45, 0, 0, 3)).setIconIndex(48); +- public static Item helmetChain = (new ItemArmor(46, 1, 1, 0)).setIconIndex(1); +- public static Item plateChain = (new ItemArmor(47, 1, 1, 1)).setIconIndex(17); +- public static Item legsChain = (new ItemArmor(48, 1, 1, 2)).setIconIndex(33); +- public static Item bootsChain = (new ItemArmor(49, 1, 1, 3)).setIconIndex(49); +- public static Item helmetSteel = (new ItemArmor(50, 2, 2, 0)).setIconIndex(2); +- public static Item plateSteel = (new ItemArmor(51, 2, 2, 1)).setIconIndex(18); +- public static Item legsSteel = (new ItemArmor(52, 2, 2, 2)).setIconIndex(34); +- public static Item bootsSteel = (new ItemArmor(53, 2, 2, 3)).setIconIndex(50); +- public static Item helmetDiamond = (new ItemArmor(54, 3, 3, 0)).setIconIndex(3); +- public static Item plateDiamond = (new ItemArmor(55, 3, 3, 1)).setIconIndex(19); +- public static Item legsDiamond = (new ItemArmor(56, 3, 3, 2)).setIconIndex(35); +- public static Item bootsDiamond = (new ItemArmor(57, 3, 3, 3)).setIconIndex(51); +- public static Item helmetGold = (new ItemArmor(58, 1, 4, 0)).setIconIndex(4); +- public static Item plateGold = (new ItemArmor(59, 1, 4, 1)).setIconIndex(20); +- public static Item legsGold = (new ItemArmor(60, 1, 4, 2)).setIconIndex(36); +- public static Item bootsGold = (new ItemArmor(61, 1, 4, 3)).setIconIndex(52); +- public static Item flint = (new Item(62)).setIconIndex(6); +- public static Item porkRaw = (new ItemFood(63, 3)).setIconIndex(87); +- public static Item porkCooked = (new ItemFood(64, 8)).setIconIndex(88); +- public static Item painting = (new ItemPainting(65)).setIconIndex(26); +- public static Item appleGold = (new ItemFood(66, 42)).setIconIndex(11); +- public static Item sign = (new ItemSign(67)).setIconIndex(42); +- public static Item doorWood = (new ItemDoor(68, Material.wood)).setIconIndex(43); +- public static Item bucketEmpty = (new ItemBucket(69, 0)).setIconIndex(74); +- public static Item bucketWater = (new ItemBucket(70, Block.waterMoving.blockID)).setIconIndex(75); +- public static Item bucketLava = (new ItemBucket(71, Block.lavaMoving.blockID)).setIconIndex(76); +- public static Item minecartEmpty = (new ItemMinecart(72, 0)).setIconIndex(135); +- public static Item saddle = (new ItemSaddle(73)).setIconIndex(104); +- public static Item doorSteel = (new ItemDoor(74, Material.iron)).setIconIndex(44); +- public static Item redstone = (new ItemRedstone(75)).setIconIndex(56); +- public static Item snowball = (new ItemSnowball(76)).setIconIndex(14); +- public static Item boat = (new ItemBoat(77)).setIconIndex(136); +- public static Item leather = (new Item(78)).setIconIndex(103); +- public static Item bucketMilk = (new ItemBucket(79, -1)).setIconIndex(77); +- public static Item brick = (new Item(80)).setIconIndex(22); +- public static Item clay = (new Item(81)).setIconIndex(57); +- public static Item reed = (new ItemReed(82, Block.reed)).setIconIndex(27); +- public static Item paper = (new Item(83)).setIconIndex(58); +- public static Item book = (new Item(84)).setIconIndex(59); +- public static Item slimeBall = (new Item(85)).setIconIndex(30); +- public static Item minecartBox = (new ItemMinecart(86, 1)).setIconIndex(151); +- public static Item minecartEngine = (new ItemMinecart(87, 2)).setIconIndex(167); +- public static Item egg = (new Item(88)).setIconIndex(12); +- public static Item compass = (new Item(89)).setIconIndex(54); +- public static Item fishingRod = (new Item(90)).setIconIndex(69); +- public static Item record13 = (new ItemRecord(2000, "13")).setIconIndex(240); +- public static Item recordCat = (new ItemRecord(2001, "cat")).setIconIndex(241); ++ public static final Item shovel = (new ItemSpade(0, 2)).setIconIndex(82); ++ public static final Item pickaxeSteel = (new ItemPickaxe(1, 2)).setIconIndex(98); ++ public static final Item axeSteel = (new ItemAxe(2, 2)).setIconIndex(114); ++ public static final Item striker = (new ItemFlintAndSteel(3)).setIconIndex(5); ++ public static final Item appleRed = (new ItemFood(4, 4)).setIconIndex(10); ++ public static final Item bow = (new ItemBow(5)).setIconIndex(21); ++ public static final Item arrow = (new Item(6)).setIconIndex(37); ++ public static final Item coal = (new Item(7)).setIconIndex(7); ++ public static final Item diamond = (new Item(8)).setIconIndex(55); ++ public static final Item ingotIron = (new Item(9)).setIconIndex(23); ++ public static final Item ingotGold = (new Item(10)).setIconIndex(39); ++ public static final Item swordSteel = (new ItemSword(11, 2)).setIconIndex(66); ++ public static final Item swordWood = (new ItemSword(12, 0)).setIconIndex(64); ++ public static final Item shovelWood = (new ItemSpade(13, 0)).setIconIndex(80); ++ public static final Item pickaxeWood = (new ItemPickaxe(14, 0)).setIconIndex(96); ++ public static final Item axeWood = (new ItemAxe(15, 0)).setIconIndex(112); ++ public static final Item swordStone = (new ItemSword(16, 1)).setIconIndex(65); ++ public static final Item shovelStone = (new ItemSpade(17, 1)).setIconIndex(81); ++ public static final Item pickaxeStone = (new ItemPickaxe(18, 1)).setIconIndex(97); ++ public static final Item axeStone = (new ItemAxe(19, 1)).setIconIndex(113); ++ public static final Item swordDiamond = (new ItemSword(20, 3)).setIconIndex(67); ++ public static final Item shovelDiamond = (new ItemSpade(21, 3)).setIconIndex(83); ++ public static final Item pickaxeDiamond = (new ItemPickaxe(22, 3)).setIconIndex(99); ++ public static final Item axeDiamond = (new ItemAxe(23, 3)).setIconIndex(115); ++ public static final Item stick = (new Item(24)).setIconIndex(53).setFull3D(); ++ public static final Item bowlEmpty = (new Item(25)).setIconIndex(71); ++ public static final Item bowlSoup = (new ItemSoup(26, 10)).setIconIndex(72); ++ public static final Item swordGold = (new ItemSword(27, -1)).setIconIndex(68); ++ public static final Item shovelGold = (new ItemSpade(28, -1)).setIconIndex(84); ++ public static final Item pickaxeGold = (new ItemPickaxe(29, -1)).setIconIndex(100); ++ public static final Item axeGold = (new ItemAxe(30, -1)).setIconIndex(116); ++ public static final Item silk = (new Item(31)).setIconIndex(8); ++ public static final Item feather = (new Item(32)).setIconIndex(24); ++ public static final Item gunpowder = (new Item(33)).setIconIndex(40); ++ public static final Item hoeWood = (new ItemHoe(34, 0)).setIconIndex(128); ++ public static final Item hoeStone = (new ItemHoe(35, 1)).setIconIndex(129); ++ public static final Item hoeSteel = (new ItemHoe(36, 2)).setIconIndex(130); ++ public static final Item hoeDiamond = (new ItemHoe(37, 3)).setIconIndex(131); ++ public static final Item hoeGold = (new ItemHoe(38, 1)).setIconIndex(132); ++ public static final Item seeds = (new ItemSeeds(39, 59)).setIconIndex(9); ++ public static final Item wheat = (new Item(40)).setIconIndex(25); ++ public static final Item bread = (new ItemFood(41, 5)).setIconIndex(41); ++ public static final Item helmetLeather = (new ItemArmor(42, 0, 0, 0, 0.35D)).setIconIndex(0); ++ public static final Item plateLeather = (new ItemArmor(43, 0, 0, 1, 0.35D)).setIconIndex(16); ++ public static final Item legsLeather = (new ItemArmor(44, 0, 0, 2, 0.35D)).setIconIndex(32); ++ public static final Item bootsLeather = (new ItemArmor(45, 0, 0, 3, 0.35D)).setIconIndex(48); ++ public static final Item helmetChain = (new ItemArmor(46, 1, 1, 0, 0.6D)).setIconIndex(1); ++ public static final Item plateChain = (new ItemArmor(47, 1, 1, 1, 0.6D)).setIconIndex(17); ++ public static final Item legsChain = (new ItemArmor(48, 1, 1, 2, 0.6D)).setIconIndex(33); ++ public static final Item bootsChain = (new ItemArmor(49, 1, 1, 3, 0.6D)).setIconIndex(49); ++ public static final Item helmetSteel = (new ItemArmor(50, 2, 2, 0, 0.75D)).setIconIndex(2); ++ public static final Item plateSteel = (new ItemArmor(51, 2, 2, 1, 0.75D)).setIconIndex(18); ++ public static final Item legsSteel = (new ItemArmor(52, 2, 2, 2, 0.75D)).setIconIndex(34); ++ public static final Item bootsSteel = (new ItemArmor(53, 2, 2, 3, 0.75D)).setIconIndex(50); ++ public static final Item helmetDiamond = (new ItemArmor(54, 3, 3, 0, 1.0D)).setIconIndex(3); ++ public static final Item plateDiamond = (new ItemArmor(55, 3, 3, 1, 1.0D)).setIconIndex(19); ++ public static final Item legsDiamond = (new ItemArmor(56, 3, 3, 2, 1.0D)).setIconIndex(35); ++ public static final Item bootsDiamond = (new ItemArmor(57, 3, 3, 3, 1.0D)).setIconIndex(51); ++ public static final Item helmetGold = (new ItemArmor(58, 1, 4, 0, 0.55D)).setIconIndex(4); ++ public static final Item plateGold = (new ItemArmor(59, 1, 4, 1, 0.55D)).setIconIndex(20); ++ public static final Item legsGold = (new ItemArmor(60, 1, 4, 2, 0.55D)).setIconIndex(36); ++ public static final Item bootsGold = (new ItemArmor(61, 1, 4, 3, 0.55D)).setIconIndex(52); ++ public static final Item flint = (new Item(62)).setIconIndex(6); ++ public static final Item porkRaw = (new ItemFood(63, 3)).setIconIndex(87); ++ public static final Item porkCooked = (new ItemFood(64, 8)).setIconIndex(88); ++ public static final Item painting = (new ItemPainting(65)).setIconIndex(26); ++ public static final Item appleGold = (new ItemFood(66, 42)).setIconIndex(11); ++ public static final Item sign = (new ItemSign(67)).setIconIndex(42); ++ public static final Item doorWood = (new ItemDoor(68, Material.wood)).setIconIndex(43); ++ public static final Item bucketEmpty = (new ItemBucket(69, 0)).setIconIndex(74); ++ public static final Item bucketWater = (new ItemBucket(70, Block.waterMoving.blockID)).setIconIndex(75); ++ public static final Item bucketLava = (new ItemBucket(71, Block.lavaMoving.blockID)).setIconIndex(76); ++ public static final Item minecartEmpty = (new ItemMinecart(72, 0)).setIconIndex(135); ++ public static final Item saddle = (new ItemSaddle(73)).setIconIndex(104); ++ public static final Item doorSteel = (new ItemDoor(74, Material.iron)).setIconIndex(44); ++ public static final Item redstone = (new ItemRedstone(75)).setIconIndex(56); ++ public static final Item snowball = (new ItemSnowball(76)).setIconIndex(14); ++ public static final Item boat = (new ItemBoat(77)).setIconIndex(136); ++ public static final Item leather = (new Item(78)).setIconIndex(103); ++ public static final Item bucketMilk = (new ItemBucket(79, -1)).setIconIndex(77); ++ public static final Item brick = (new Item(80)).setIconIndex(22); ++ public static final Item clay = (new Item(81)).setIconIndex(57); ++ public static final Item reed = (new ItemReed(82, 83)).setIconIndex(27); ++ public static final Item paper = (new Item(83)).setIconIndex(58); ++ public static final Item book = (new Item(84)).setIconIndex(59); ++ public static final Item slimeBall = (new Item(85)).setIconIndex(30); ++ public static final Item minecartBox = (new ItemMinecart(86, 1)).setIconIndex(151); ++ public static final Item minecartEngine = (new ItemMinecart(87, 2)).setIconIndex(167); ++ public static final Item egg = (new Item(88)).setIconIndex(12); ++ public static final Item compass = (new Item(89)).setIconIndex(54); ++ public static final Item fishingRod = (new Item(90)).setIconIndex(69); ++ public static final Item quiver = (new ItemQuiver(91)).setIconIndex(textureXY(6, 2)); ++ public static final Item staffRuby = (new ItemStaff(92, 8.0F, 10, 1024, 100, 1.0F)).setIconIndex(textureXY(10, 6)); ++ public static final Item staffSapphire = (new ItemStaff(93, 4.0F, 6, 1024, 0, 5.0F)).setIconIndex(textureXY(11, 6)); ++ public static final Item ruby = (new Item(94)).setIconIndex(textureXY(10, 5)); ++ public static final Item sapphire = (new Item(95)).setIconIndex(textureXY(11, 5)); ++ public static final Item beefRaw = (new ItemFood(96, 3)).setIconIndex(textureXY(8, 9)); ++ public static final Item beefCooked = (new ItemFood(97, 8)).setIconIndex(textureXY(8, 10)); ++ public static final Item chickenRaw = (new ItemFood(98, 3)).setIconIndex(textureXY(9, 9)); ++ public static final Item chickenCooked = (new ItemFood(99, 8)).setIconIndex(textureXY(9, 10)); ++ public static final Item muttonRaw = (new ItemFood(100, 3)).setIconIndex(textureXY(10, 9)); ++ public static final Item muttonCooked = (new ItemFood(101, 8)).setIconIndex(textureXY(10, 10)); ++ public static final Item wardingRing = (new ItemWardingRing(102)).setIconIndex(textureXY(1, 9)); ++ public static final Item repairKit = (new ItemRepairKit(103)).setIconIndex(textureXY(3, 9)); ++ public static final Item starChunk = (new Item(104)).setIconIndex(textureXY(12, 5)); ++ public static final Item starDust = (new Item(105)).setIconIndex(textureXY(13, 5)); ++ public static final Item staffSparkle = (new ItemStaff(106, 20.0F, 6, 256)).setIconIndex(textureXY(12, 6)); ++ public static final Item slimeShoes = (new ItemSlimeShoes(107)).setIconIndex(textureXY(2, 9)); ++ public static final Item record13 = (new ItemRecord(2000, "13", "C418 - 13")).setIconIndex(240); ++ public static final Item recordCat = (new ItemRecord(2001, "cat", "C418 - cat")).setIconIndex(241); ++ public static final Item recordMagnet = (new ItemRecord(2002, "diverge.magnet", "Notch - Magnetic Circuit")).setIconIndex(242); + public final int shiftedIndex; + protected int maxStackSize = 64; + protected int maxDamage = 32; + protected int iconIndex; ++ protected int startingDamage = 0; + protected boolean bFull3D = false; + ++ protected static int textureXY(int x, int y) { ++ return y * 16 + x; ++ } ++ + protected Item(int id) { + this.shiftedIndex = 256 + id; + if(itemsList[256 + id] != null) { +@@ -166,5 +191,21 @@ + + public boolean isFull3D() { + return this.bFull3D; ++ } ++ ++ public ItemTooltip getTooltip() { ++ return ItemTooltip.items[this.shiftedIndex]; ++ } ++ ++ public Object[] getDynamicTooltip() { ++ return new Object[0]; ++ } ++ ++ public boolean isMagic() { ++ return false; ++ } ++ ++ public boolean allowRepair() { ++ return true; + } + } diff --git a/patches_merged/net/minecraft/src/ItemArmor.java.patch b/patches_merged/net/minecraft/src/ItemArmor.java.patch new file mode 100644 index 0000000..707c4f7 --- /dev/null +++ b/patches_merged/net/minecraft/src/ItemArmor.java.patch @@ -0,0 +1,47 @@ +--- a/net/minecraft/src/ItemArmor.java ++++ b/net/minecraft/src/ItemArmor.java +@@ -1,20 +1,31 @@ + package net.minecraft.src; + +-public class ItemArmor extends Item { +- private static final int[] damageReduceAmountArray = new int[]{3, 8, 6, 3}; +- private static final int[] maxDamageArray = new int[]{11, 16, 15, 13}; ++import io.github.bluestaggo.mcdiverge.ItemTooltip; ++ ++public class ItemArmor extends ItemEquipable { ++ private static final int[] protectionValues = new int[] { 3, 8, 6, 3 }; ++ private static final int[] maxDamageArray = new int[] { 11, 16, 15, 13 }; + public final int armorLevel; +- public final int armorType; +- public final int damageReduceAmount; ++ public final int defense; + public final int renderIndex; + +- public ItemArmor(int id, int armorLevel, int renderIndex, int armorType) { +- super(id); +- this.armorLevel = armorLevel; +- this.armorType = armorType; +- this.renderIndex = renderIndex; +- this.damageReduceAmount = damageReduceAmountArray[armorType]; +- this.maxDamage = maxDamageArray[armorType] * 3 << armorLevel; +- this.maxStackSize = 1; ++ public ItemArmor(int i1, int i2, int i3, int i4, double d5) { ++ super(i1, i4); ++ this.armorLevel = i2; ++ this.renderIndex = i3; ++ this.defense = (int) Math.round(protectionValues[i4] * d5); ++ this.maxDamage = maxDamageArray[i4] * 3 << i2; ++ if (i2 > 1) { ++ this.maxDamage *= 1 << i2 - 1; ++ } ++ } ++ ++ public Object[] getDynamicTooltip() { ++ return new Object[] { ++ Integer.toString(this.maxDamage) + " max durability", ++ ItemTooltip.INFO_COL, ++ Integer.toString(this.defense) + " defense", ++ ItemTooltip.INFO_COL ++ }; + } + } diff --git a/patches_merged/net/minecraft/src/ItemAxe.java.patch b/patches_merged/net/minecraft/src/ItemAxe.java.patch new file mode 100644 index 0000000..ab58d01 --- /dev/null +++ b/patches_merged/net/minecraft/src/ItemAxe.java.patch @@ -0,0 +1,40 @@ +--- a/net/minecraft/src/ItemAxe.java ++++ b/net/minecraft/src/ItemAxe.java +@@ -1,9 +1,35 @@ + package net.minecraft.src; + ++import io.github.bluestaggo.mcdiverge.ItemTooltip; ++ ++import java.util.stream.Stream; ++ + public class ItemAxe extends ItemTool { +- private static Block[] blocksEffectiveAgainst = new Block[]{Block.planks, Block.bookshelf, Block.wood, Block.chest}; ++ private static final Block[] blocksEffectiveAgainst = new Block[] { ++ Block.planks, ++ Block.wood, ++ Block.leaves, ++ Block.chest, ++ Block.bookshelf, ++ Block.stairCompactWood, ++ Block.workbench, ++ Block.doorWood, ++ Block.jukebox, ++ Block.fence ++ }; + + public ItemAxe(int id, int i2) { +- super(id, 3, i2, blocksEffectiveAgainst); ++ super(id, 3, Math.abs(i2), blocksEffectiveAgainst); ++ if (i2 < 0) { ++ this.efficiencyOnProperMaterial *= 2.5F; ++ this.maxDamage *= 4; ++ } ++ } ++ ++ public Object[] getDynamicTooltip() { ++ return Stream.of(new Object[] { ++ "Break a log while crouching to fell trees.", ++ ItemTooltip.DESCRIPTION_COL ++ }, super.getDynamicTooltip()).flatMap(Stream::of).toArray(); + } + } diff --git a/patches_merged/net/minecraft/src/ItemBlock.java.patch b/patches_merged/net/minecraft/src/ItemBlock.java.patch new file mode 100644 index 0000000..1286d8f --- /dev/null +++ b/patches_merged/net/minecraft/src/ItemBlock.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/src/ItemBlock.java ++++ b/net/minecraft/src/ItemBlock.java +@@ -43,7 +43,7 @@ + } else { + if(worldObj.canBlockBePlacedAt(this.blockID, x, y, z, false)) { + Block block8 = Block.blocksList[this.blockID]; +- if(worldObj.setBlockWithNotify(x, y, z, this.blockID)) { ++ if(worldObj.setBlockAndMetadataWithNotify(x, y, z, this.blockID, itemStack.itemMetadata)) { + Block.blocksList[this.blockID].onBlockPlaced(worldObj, x, y, z, side); + worldObj.playSoundEffect((double)((float)x + 0.5F), (double)((float)y + 0.5F), (double)((float)z + 0.5F), block8.stepSound.getStepSound(), (block8.stepSound.getVolume() + 1.0F) / 2.0F, block8.stepSound.getPitch() * 0.8F); + --itemStack.stackSize; diff --git a/patches_merged/net/minecraft/src/ItemBow.java.patch b/patches_merged/net/minecraft/src/ItemBow.java.patch new file mode 100644 index 0000000..597ef11 --- /dev/null +++ b/patches_merged/net/minecraft/src/ItemBow.java.patch @@ -0,0 +1,36 @@ +--- a/net/minecraft/src/ItemBow.java ++++ b/net/minecraft/src/ItemBow.java +@@ -6,12 +6,26 @@ + this.maxStackSize = 1; + } + +- public ItemStack onItemRightClick(ItemStack itemStack, World worldObj, EntityPlayer entityPlayer) { +- if(entityPlayer.inventory.consumeInventoryItem(Item.arrow.shiftedIndex)) { +- worldObj.playSoundAtEntity(entityPlayer, "random.bow", 1.0F, 1.0F / (rand.nextFloat() * 0.4F + 0.8F)); +- worldObj.spawnEntityInWorld(new EntityArrow(worldObj, entityPlayer)); +- } +- +- return itemStack; ++ private boolean canShootArrow(EntityPlayer entityPlayer1) { ++ ItemStack bodyArmor = entityPlayer1.inventory.armorItemInSlot(0); ++ if (bodyArmor != null && bodyArmor.itemID == Item.quiver.shiftedIndex ++ && bodyArmor.itemDmg < bodyArmor.getMaxDamage()) { ++ bodyArmor.itemDmg += 1; ++ return true; ++ } ++ ++ if (entityPlayer1.inventory.consumeInventoryItem(Item.arrow.shiftedIndex)) ++ return true; ++ ++ return false; ++ } ++ ++ public ItemStack onItemRightClick(ItemStack itemStack1, World world2, EntityPlayer entityPlayer3) { ++ if (canShootArrow(entityPlayer3)) { ++ world2.playSoundAtEntity(entityPlayer3, "random.bow", 1.0F, 1.0F / (rand.nextFloat() * 0.4F + 0.8F)); ++ world2.spawnEntityInWorld(new EntityArrow(world2, entityPlayer3)); ++ } ++ ++ return itemStack1; + } + } diff --git a/patches_merged/net/minecraft/src/ItemEquipable.java.patch b/patches_merged/net/minecraft/src/ItemEquipable.java.patch new file mode 100644 index 0000000..8bee990 --- /dev/null +++ b/patches_merged/net/minecraft/src/ItemEquipable.java.patch @@ -0,0 +1,19 @@ +--- /dev/null ++++ b/net/minecraft/src/ItemEquipable.java +@@ -1,0 +1,16 @@ ++package net.minecraft.src; ++ ++public class ItemEquipable extends Item { ++ public final int armorType; ++ ++ public ItemEquipable(int i1, int i2) { ++ this(i1, i2, 0); ++ } ++ ++ public ItemEquipable(int i1, int i2, int i3) { ++ super(i1); ++ this.maxStackSize = 1; ++ this.armorType = i2; ++ this.maxDamage = i3; ++ } ++} diff --git a/patches_merged/net/minecraft/src/ItemFood.java.patch b/patches_merged/net/minecraft/src/ItemFood.java.patch new file mode 100644 index 0000000..04d5bc6 --- /dev/null +++ b/patches_merged/net/minecraft/src/ItemFood.java.patch @@ -0,0 +1,33 @@ +--- a/net/minecraft/src/ItemFood.java ++++ b/net/minecraft/src/ItemFood.java +@@ -1,17 +1,27 @@ + package net.minecraft.src; + ++import io.github.bluestaggo.mcdiverge.ItemTooltip; ++ + public class ItemFood extends Item { + private int healAmount; +- ++ + public ItemFood(int id, int healAmount) { + super(id); + this.healAmount = healAmount; +- this.maxStackSize = 1; ++ this.maxStackSize = 4; + } + + public ItemStack onItemRightClick(ItemStack itemStack, World worldObj, EntityPlayer entityPlayer) { + --itemStack.stackSize; +- entityPlayer.heal(this.healAmount); ++// entityPlayer.heal(this.healAmount); ++ entityPlayer.healthRegen = Math.min(entityPlayer.healthRegen + this.healAmount, 20 - entityPlayer.health); + return itemStack; ++ } ++ ++ public Object[] getDynamicTooltip() { ++ return new Object[] { ++ "Heals " + healAmount / 2.0F + (healAmount == 2 ? " heart" : " hearts"), ++ ItemTooltip.INFO_COL ++ }; + } + } diff --git a/patches_merged/net/minecraft/src/ItemHoe.java.patch b/patches_merged/net/minecraft/src/ItemHoe.java.patch new file mode 100644 index 0000000..2ab2e63 --- /dev/null +++ b/patches_merged/net/minecraft/src/ItemHoe.java.patch @@ -0,0 +1,27 @@ +--- a/net/minecraft/src/ItemHoe.java ++++ b/net/minecraft/src/ItemHoe.java +@@ -1,5 +1,7 @@ + package net.minecraft.src; + ++import io.github.bluestaggo.mcdiverge.ItemTooltip; ++ + public class ItemHoe extends Item { + public ItemHoe(int id, int strength) { + super(id); +@@ -37,5 +39,16 @@ + + public boolean isFull3D() { + return true; ++ } ++ ++ public Object[] getDynamicTooltip() { ++ return new Object[] { ++ "Right click to create farmland", ++ ItemTooltip.DESCRIPTION_COL, ++ "and gather seeds.", ++ ItemTooltip.DESCRIPTION_COL, ++ Integer.toString(this.maxDamage) + " max durability", ++ ItemTooltip.INFO_COL ++ }; + } + } diff --git a/patches_merged/net/minecraft/src/ItemInWorldManager.java.patch b/patches_merged/net/minecraft/src/ItemInWorldManager.java.patch new file mode 100644 index 0000000..f677315 --- /dev/null +++ b/patches_merged/net/minecraft/src/ItemInWorldManager.java.patch @@ -0,0 +1,21 @@ +--- a/net/minecraft/src/ItemInWorldManager.java ++++ b/net/minecraft/src/ItemInWorldManager.java +@@ -95,8 +95,15 @@ + return z6; + } + +- public boolean activeBlockOrUseItem(EntityPlayer entityPlayer1, World world2, ItemStack itemStack3, int i4, int i5, int i6, int i7) { +- int i8 = world2.getBlockId(i4, i5, i6); +- return i8 > 0 && Block.blocksList[i8].blockActivated(world2, i4, i5, i6, entityPlayer1) ? true : (itemStack3 == null ? false : itemStack3.useItem(entityPlayer1, world2, i4, i5, i6, i7)); ++ public boolean activeBlockOrUseItem(EntityPlayer entityPlayer, World world, ItemStack itemStack, int x, int y, int z, int side) { ++ int i8 = world.getBlockId(x, y, z); ++ int oldStackSize = itemStack != null ? itemStack.stackSize : 0; ++ boolean result = i8 > 0 && Block.blocksList[i8].blockActivated(world, x, y, z, entityPlayer) ? true ++ : (itemStack == null ? false ++ : itemStack.useItem(entityPlayer, world, x, y, z, side)); ++ if (entityPlayer.creative && itemStack != null) { ++ itemStack.stackSize = oldStackSize; ++ } ++ return result; + } + } diff --git a/patches_merged/net/minecraft/src/ItemPickaxe.java.patch b/patches_merged/net/minecraft/src/ItemPickaxe.java.patch new file mode 100644 index 0000000..58f9467 --- /dev/null +++ b/patches_merged/net/minecraft/src/ItemPickaxe.java.patch @@ -0,0 +1,97 @@ +--- a/net/minecraft/src/ItemPickaxe.java ++++ b/net/minecraft/src/ItemPickaxe.java +@@ -1,15 +1,90 @@ + package net.minecraft.src; + ++import java.util.Arrays; ++ + public class ItemPickaxe extends ItemTool { +- private static Block[] blocksEffectiveAgainst = new Block[]{Block.cobblestone, Block.stairDouble, Block.stairSingle, Block.stone, Block.cobblestoneMossy, Block.oreIron, Block.blockSteel, Block.oreCoal, Block.blockGold, Block.oreGold, Block.oreDiamond, Block.blockDiamond, Block.ice}; +- private int harvestLevel; ++ private static final Block[] tier3 = new Block[] { ++ Block.obsidian, ++ Block.oreRuby, ++ Block.oreSapphire, ++ Block.refabricator ++ }; ++ private static final Block[] tier2 = new Block[] { ++ Block.blockDiamond, ++ Block.oreDiamond, ++ Block.blockGold, ++ Block.oreGold, ++ Block.oreRedstone, ++ Block.oreRedstoneGlowing ++ }; ++ private static final Block[] tier1 = new Block[] { ++ Block.blockSteel, ++ Block.oreIron ++ }; ++ ++ private static final Block[] blocksEffectiveAgainst = new Block[] { ++ Block.cobblestone, ++ Block.stairDouble, ++ Block.stairSingle, ++ Block.stone, ++ Block.polishedStone, ++ Block.cobblestoneMossy, ++ Block.oreIron, ++ Block.blockSteel, ++ Block.oreCoal, ++ Block.blockGold, ++ Block.oreGold, ++ Block.oreDiamond, ++ Block.blockDiamond, ++ Block.ice, ++ Block.mobSpawner, ++ Block.stoneOvenIdle, ++ Block.stoneOvenActive, ++ Block.stairCompactStone, ++ Block.minecartTrack, ++ Block.doorSteel, ++ Block.obsidian, ++ Block.oreRuby, ++ Block.oreSapphire, ++ Block.blasterIdle, ++ Block.blasterActive, ++ Block.refabricator, ++ Block.speleothem ++ }; ++ private final int harvestLevel; + + public ItemPickaxe(int id, int harvestLevel) { +- super(id, 2, harvestLevel, blocksEffectiveAgainst); ++ super(id, 2, Math.abs(harvestLevel), blocksEffectiveAgainst); + this.harvestLevel = harvestLevel; ++ if (harvestLevel < 0) { ++ this.efficiencyOnProperMaterial *= 2.5F; ++ this.maxDamage *= 4; ++ } + } + + public boolean canHarvestBlock(Block block) { +- return block == Block.obsidian ? this.harvestLevel == 3 : (block != Block.blockDiamond && block != Block.oreDiamond ? (block != Block.blockGold && block != Block.oreGold ? (block != Block.blockSteel && block != Block.oreIron ? (block != Block.oreRedstone && block != Block.oreRedstoneGlowing ? (block.material == Material.rock ? true : block.material == Material.iron) : this.harvestLevel >= 2) : this.harvestLevel >= 1) : this.harvestLevel >= 2) : this.harvestLevel >= 2); ++// return block == Block.obsidian ++// ? this.harvestLevel == 3 ++// : (block != Block.blockDiamond && block != Block.oreDiamond ++// ? (block != Block.blockGold && block != Block.oreGold ++// ? (block != Block.blockSteel && block != Block.oreIron ++// ? (block != Block.oreRedstone && block != Block.oreRedstoneGlowing ++// ? (block.material == Material.rock ++// ? true ++// : block.material == Material.iron) ++// : this.harvestLevel >= 2) ++// : this.harvestLevel >= 1) ++// : this.harvestLevel >= 2) ++// : this.harvestLevel >= 2); ++ if (Arrays.asList(tier3).contains(block)) { ++ return this.harvestLevel >= 3; ++ } ++ if (Arrays.asList(tier2).contains(block)) { ++ return this.harvestLevel >= 2; ++ } ++ if (Arrays.asList(tier1).contains(block)) { ++ return this.harvestLevel >= 1; ++ } ++ return block.material == Material.rock || block.material == Material.iron; + } + } diff --git a/patches_merged/net/minecraft/src/ItemRecord.java.patch b/patches_merged/net/minecraft/src/ItemRecord.java.patch new file mode 100644 index 0000000..5c586ad --- /dev/null +++ b/patches_merged/net/minecraft/src/ItemRecord.java.patch @@ -0,0 +1,37 @@ +--- a/net/minecraft/src/ItemRecord.java ++++ b/net/minecraft/src/ItemRecord.java +@@ -1,22 +1,30 @@ + package net.minecraft.src; + ++import io.github.bluestaggo.mcdiverge.ItemTooltip; ++ + public class ItemRecord extends Item { +- private String recordName; ++ private final String recordName; ++ private final String recordTitle; + +- protected ItemRecord(int id, String record) { ++ protected ItemRecord(int id, String name, String title) { + super(id); +- this.recordName = record; ++ this.recordName = name; ++ this.recordTitle = title; + this.maxStackSize = 1; + } + + public boolean onItemUse(ItemStack itemStack, EntityPlayer entityPlayer, World worldObj, int x, int y, int z, int side) { + if(worldObj.getBlockId(x, y, z) == Block.jukebox.blockID && worldObj.getBlockMetadata(x, y, z) == 0) { + worldObj.setBlockMetadataWithNotify(x, y, z, this.shiftedIndex - Item.record13.shiftedIndex + 1); +- worldObj.playRecord(this.recordName, x, y, z); ++ worldObj.playRecord(this.recordName, x, y, z, this.recordTitle); + --itemStack.stackSize; + return true; + } else { + return false; + } ++ } ++ ++ public Object[] getDynamicTooltip() { ++ return new Object[] { this.recordTitle, ItemTooltip.DESCRIPTION_COL }; + } + } diff --git a/patches_merged/net/minecraft/src/ItemReed.java.patch b/patches_merged/net/minecraft/src/ItemReed.java.patch new file mode 100644 index 0000000..142119e --- /dev/null +++ b/patches_merged/net/minecraft/src/ItemReed.java.patch @@ -0,0 +1,14 @@ +--- a/net/minecraft/src/ItemReed.java ++++ b/net/minecraft/src/ItemReed.java +@@ -3,9 +3,9 @@ + public class ItemReed extends Item { + private int spawnID; + +- public ItemReed(int id, Block block) { ++ public ItemReed(int id, int block) { + super(id); +- this.spawnID = block.blockID; ++ this.spawnID = block; + } + + public boolean onItemUse(ItemStack itemStack, EntityPlayer entityPlayer, World worldObj, int x, int y, int z, int side) { diff --git a/patches_merged/net/minecraft/src/ItemRenderer.java.patch b/patches_merged/net/minecraft/src/ItemRenderer.java.patch new file mode 100644 index 0000000..87887f4 --- /dev/null +++ b/patches_merged/net/minecraft/src/ItemRenderer.java.patch @@ -0,0 +1,30 @@ +--- a/net/minecraft/src/ItemRenderer.java ++++ b/net/minecraft/src/ItemRenderer.java +@@ -20,7 +20,7 @@ + GL11.glPushMatrix(); + if(itemStack.itemID < 256 && RenderBlocks.renderItemIn3d(Block.blocksList[itemStack.itemID].getRenderType())) { + GL11.glBindTexture(GL11.GL_TEXTURE_2D, this.mc.renderEngine.getTexture("/terrain.png")); +- this.renderBlocksInstance.renderBlockOnInventory(Block.blocksList[itemStack.itemID]); ++ this.renderBlocksInstance.renderBlockOnInventory(Block.blocksList[itemStack.itemID], Math.max(itemStack.itemMetadata, 0)); + } else { + if(itemStack.itemID < 256) { + GL11.glBindTexture(GL11.GL_TEXTURE_2D, this.mc.renderEngine.getTexture("/terrain.png")); +@@ -132,7 +132,8 @@ + GL11.glRotatef(entityPlayerSP3.prevRotationYaw + (entityPlayerSP3.rotationYaw - entityPlayerSP3.prevRotationYaw) * renderPartialTick, 0.0F, 1.0F, 0.0F); + RenderHelper.enableStandardItemLighting(); + GL11.glPopMatrix(); +- float f4 = this.mc.theWorld.getBrightness(MathHelper.floor_double(entityPlayerSP3.posX), MathHelper.floor_double(entityPlayerSP3.posY), MathHelper.floor_double(entityPlayerSP3.posZ)); ++ float f4 = this.mc.theWorld.getBrightness(MathHelper.floor_double(entityPlayerSP3.posX), MathHelper.floor_double(entityPlayerSP3.posY), MathHelper.floor_double(entityPlayerSP3.posZ)) ++ * (1 - RenderGlobal.globalBrightness) + RenderGlobal.globalBrightness; + GL11.glColor4f(f4, f4, f4, 1.0F); + float f5; + float f6; +@@ -250,7 +251,7 @@ + + private void renderWarpedTextureOverlay(float renderPartialTick) { + Tessellator tessellator2 = Tessellator.instance; +- float f3 = this.mc.thePlayer.getBrightness(renderPartialTick); ++ float f3 = this.mc.thePlayer.getBrightness(renderPartialTick) * (1 - RenderGlobal.globalBrightness) + RenderGlobal.globalBrightness; + GL11.glColor4f(f3, f3, f3, 0.5F); + GL11.glEnable(GL11.GL_BLEND); + GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); diff --git a/patches_merged/net/minecraft/src/ItemSnowball.java.patch b/patches_merged/net/minecraft/src/ItemSnowball.java.patch new file mode 100644 index 0000000..efc4497 --- /dev/null +++ b/patches_merged/net/minecraft/src/ItemSnowball.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/src/ItemSnowball.java ++++ b/net/minecraft/src/ItemSnowball.java +@@ -9,7 +9,7 @@ + public ItemStack onItemRightClick(ItemStack itemStack, World worldObj, EntityPlayer entityPlayer) { + --itemStack.stackSize; + worldObj.playSoundAtEntity(entityPlayer, "random.bow", 0.5F, 0.4F / (rand.nextFloat() * 0.4F + 0.8F)); +- worldObj.spawnEntityInWorld(new EntitySnowball(worldObj, entityPlayer)); ++ worldObj.spawnEntityInWorld(new EntitySnowball(worldObj, entityPlayer, 14, 1)); + return itemStack; + } + } diff --git a/patches_merged/net/minecraft/src/ItemSpade.java.patch b/patches_merged/net/minecraft/src/ItemSpade.java.patch new file mode 100644 index 0000000..2e05d7c --- /dev/null +++ b/patches_merged/net/minecraft/src/ItemSpade.java.patch @@ -0,0 +1,31 @@ +--- a/net/minecraft/src/ItemSpade.java ++++ b/net/minecraft/src/ItemSpade.java +@@ -1,13 +1,25 @@ + package net.minecraft.src; + + public class ItemSpade extends ItemTool { +- private static Block[] blocksEffectiveAgainst = new Block[]{Block.grass, Block.dirt, Block.sand, Block.gravel, Block.snow, Block.blockSnow, Block.blockClay}; ++ private static Block[] blocksEffectiveAgainst = new Block[] { ++ Block.grass, ++ Block.dirt, ++ Block.sand, ++ Block.gravel, ++ Block.snow, ++ Block.blockSnow, ++ Block.blockClay ++ }; + + public ItemSpade(int id, int strength) { +- super(id, 1, strength, blocksEffectiveAgainst); ++ super(id, 1, Math.abs(strength), blocksEffectiveAgainst); ++ if (strength < 0) { ++ this.efficiencyOnProperMaterial *= 2.5F; ++ this.maxDamage *= 4; ++ } + } + + public boolean canHarvestBlock(Block block) { +- return block == Block.snow ? true : block == Block.blockSnow; ++ return block == Block.snow || block == Block.blockSnow; + } + } diff --git a/patches_merged/net/minecraft/src/ItemStack.java.patch b/patches_merged/net/minecraft/src/ItemStack.java.patch new file mode 100644 index 0000000..27c091e --- /dev/null +++ b/patches_merged/net/minecraft/src/ItemStack.java.patch @@ -0,0 +1,100 @@ +--- a/net/minecraft/src/ItemStack.java ++++ b/net/minecraft/src/ItemStack.java +@@ -1,21 +1,29 @@ + package net.minecraft.src; + ++import io.github.bluestaggo.mcdiverge.ItemTooltip; ++ + public final class ItemStack { + public int stackSize; + public int animationsToGo; + public int itemID; + public int itemDmg; ++ public int itemMetadata; + + public ItemStack(Block block) { +- this((Block)block, 1); ++ this(block, 1); + } + + public ItemStack(Block block, int stackSize) { ++ this(block, stackSize, 0); ++ } ++ ++ public ItemStack(Block block, int stackSize, int metadata) { + this(block.blockID, stackSize); ++ this.itemMetadata = metadata; + } + + public ItemStack(Item item) { +- this((Item)item, 1); ++ this(item, 1); + } + + public ItemStack(Item item, int stackSize) { +@@ -27,26 +35,30 @@ + } + + public ItemStack(int itemID, int stackSize) { +- this.stackSize = 0; + this.itemID = itemID; + this.stackSize = stackSize; ++ if (Item.itemsList[itemID] != null) ++ this.itemDmg = Item.itemsList[itemID].startingDamage; + } + + public ItemStack(int itemID, int stackSize, int itemDmg) { +- this.stackSize = 0; + this.itemID = itemID; + this.stackSize = stackSize; + this.itemDmg = itemDmg; + } + + public ItemStack(NBTTagCompound nbtCompound) { +- this.stackSize = 0; + this.readFromNBT(nbtCompound); + } + ++ public ItemStack withMetadata(int metadata) { ++ this.itemMetadata = metadata; ++ return this; ++ } ++ + public ItemStack splitStack(int stackSize) { + this.stackSize -= stackSize; +- return new ItemStack(this.itemID, stackSize, this.itemDmg); ++ return new ItemStack(this.itemID, stackSize, this.itemDmg).withMetadata(this.itemMetadata); + } + + public Item getItem() { +@@ -73,6 +85,7 @@ + nbtCompound.setShort("id", (short)this.itemID); + nbtCompound.setByte("Count", (byte)this.stackSize); + nbtCompound.setShort("Damage", (short)this.itemDmg); ++ nbtCompound.setShort("Metadata", (byte)this.itemMetadata); + return nbtCompound; + } + +@@ -80,6 +93,7 @@ + this.itemID = nbtCompound.getShort("id"); + this.stackSize = nbtCompound.getByte("Count"); + this.itemDmg = nbtCompound.getShort("Damage"); ++ this.itemMetadata = nbtCompound.getShort("Metadata"); + } + + public int getMaxStackSize() { +@@ -127,6 +141,13 @@ + } + + public ItemStack copy() { +- return new ItemStack(this.itemID, this.stackSize, this.itemDmg); ++ return new ItemStack(this.itemID, this.stackSize, this.itemDmg).withMetadata(this.itemMetadata); ++ } ++ ++ public ItemTooltip getTooltip() { ++ if (ItemTooltip.fromMetadata[this.itemID] != null && ItemTooltip.fromMetadata[this.itemID][Math.max(this.itemMetadata, 0)] != null) { ++ return ItemTooltip.fromMetadata[this.itemID][Math.max(this.itemMetadata, 0)]; ++ } ++ return Item.itemsList[this.itemID].getTooltip(); + } + } diff --git a/patches_merged/net/minecraft/src/ItemSword.java.patch b/patches_merged/net/minecraft/src/ItemSword.java.patch new file mode 100644 index 0000000..f921a94 --- /dev/null +++ b/patches_merged/net/minecraft/src/ItemSword.java.patch @@ -0,0 +1,42 @@ +--- a/net/minecraft/src/ItemSword.java ++++ b/net/minecraft/src/ItemSword.java +@@ -1,17 +1,20 @@ + package net.minecraft.src; + ++import io.github.bluestaggo.mcdiverge.ItemTooltip; ++ + public class ItemSword extends Item { +- private int weaponDamage; ++ private final int weaponDamage; + + public ItemSword(int id, int strength) { + super(id); ++ int strengthAbs = Math.abs(strength); + this.maxStackSize = 1; +- this.maxDamage = 32 << strength; +- if(strength == 3) { ++ this.maxDamage = 32 << strengthAbs; ++ if(strengthAbs == 3 || strength < 0) { + this.maxDamage *= 4; + } + +- this.weaponDamage = 4 + strength * 2; ++ this.weaponDamage = 4 + strengthAbs * 2; + } + + public float getStrVsBlock(ItemStack itemStack, Block block) { +@@ -32,5 +35,14 @@ + + public boolean isFull3D() { + return true; ++ } ++ ++ public Object[] getDynamicTooltip() { ++ return new Object[] { ++ Integer.toString(this.weaponDamage) + " attack damage", ++ ItemTooltip.INFO_COL, ++ Integer.toString(this.maxDamage) + " max durability", ++ ItemTooltip.INFO_COL ++ }; + } + } diff --git a/patches_merged/net/minecraft/src/ItemTool.java.patch b/patches_merged/net/minecraft/src/ItemTool.java.patch new file mode 100644 index 0000000..e430386 --- /dev/null +++ b/patches_merged/net/minecraft/src/ItemTool.java.patch @@ -0,0 +1,43 @@ +--- a/net/minecraft/src/ItemTool.java ++++ b/net/minecraft/src/ItemTool.java +@@ -1,9 +1,11 @@ + package net.minecraft.src; + ++import io.github.bluestaggo.mcdiverge.ItemTooltip; ++ + public class ItemTool extends Item { +- private Block[] blocksEffectiveAgainst; +- private float efficiencyOnProperMaterial = 4.0F; +- private int damageVsEntity; ++ private final Block[] blocksEffectiveAgainst; ++ protected float efficiencyOnProperMaterial; ++ private final int damageVsEntity; + protected int toolMaterial; + + public ItemTool(int id, int attackDmg, int strength, Block[] blocks) { +@@ -44,5 +46,25 @@ + + public boolean isFull3D() { + return true; ++ } ++ ++ public boolean effectiveAgainst(Block block) { ++ for (Block value : this.blocksEffectiveAgainst) { ++ if (value == block) { ++ return true; ++ } ++ } ++ return false; ++ } ++ ++ public Object[] getDynamicTooltip() { ++ return new Object[] { ++ "x" + this.efficiencyOnProperMaterial + " efficiency", ++ ItemTooltip.INFO_COL, ++ this.damageVsEntity + " attack damage", ++ ItemTooltip.INFO_COL, ++ this.maxDamage + " max durability", ++ ItemTooltip.INFO_COL ++ }; + } + } diff --git a/patches_merged/net/minecraft/src/MapGenCaves.java.patch b/patches_merged/net/minecraft/src/MapGenCaves.java.patch new file mode 100644 index 0000000..86952cb --- /dev/null +++ b/patches_merged/net/minecraft/src/MapGenCaves.java.patch @@ -0,0 +1,34 @@ +--- a/net/minecraft/src/MapGenCaves.java ++++ b/net/minecraft/src/MapGenCaves.java +@@ -131,14 +131,14 @@ + } + + if(b51 == Block.stone.blockID || b51 == Block.dirt.blockID || b51 == Block.grass.blockID) { +- if(i48 < 10) { +- b3[i46] = (byte)Block.lavaMoving.blockID; +- } else { ++// if(i48 < 10) { ++// b3[i46] = (byte)Block.lavaStill.blockID; ++// } else { + b3[i46] = 0; + if(z47 && b3[i46 - 1] == Block.dirt.blockID) { + b3[i46 - 1] = (byte)Block.grass.blockID; + } +- } ++// } + } + } + +@@ -174,9 +174,9 @@ + } + + for(int i16 = 0; i16 < i15; ++i16) { +- float f17 = this.rand.nextFloat() * (float)Math.PI * 2.0F; +- float f18 = (this.rand.nextFloat() - 0.5F) * 2.0F / 8.0F; +- float f19 = this.rand.nextFloat() * 2.0F + this.rand.nextFloat(); ++ float f17 = this.rand.nextFloat() * (float) Math.PI * 2.0F; ++ float f18 = (this.rand.nextFloat() - 0.5F) / 4.0F; ++ float f19 = this.rand.nextFloat() * 6.0F; + this.generateCaveNode(i4, i5, b6, d9, d11, d13, f19, f17, f18, 0, 0, 1.0D); + } + } diff --git a/patches_merged/net/minecraft/src/MathHelper.java.patch b/patches_merged/net/minecraft/src/MathHelper.java.patch new file mode 100644 index 0000000..df846ae --- /dev/null +++ b/patches_merged/net/minecraft/src/MathHelper.java.patch @@ -0,0 +1,13 @@ +--- a/net/minecraft/src/MathHelper.java ++++ b/net/minecraft/src/MathHelper.java +@@ -49,6 +49,10 @@ + return value1 < 0 ? -((-value1 - 1) / value2) - 1 : value1 / value2; + } + ++ public static float clamp(float x, float min, float max) { ++ return Math.min(Math.max(x, min), max); ++ } ++ + static { + for(int i0 = 0; i0 < 65536; ++i0) { + SIN_TABLE[i0] = (float)Math.sin((double)i0 * Math.PI * 2.0D / 65536.0D); diff --git a/patches_merged/net/minecraft/src/MovementInput.java.patch b/patches_merged/net/minecraft/src/MovementInput.java.patch new file mode 100644 index 0000000..7e39098 --- /dev/null +++ b/patches_merged/net/minecraft/src/MovementInput.java.patch @@ -0,0 +1,10 @@ +--- a/net/minecraft/src/MovementInput.java ++++ b/net/minecraft/src/MovementInput.java +@@ -6,6 +6,7 @@ + public boolean unused = false; + public boolean jump = false; + public boolean sneak = false; ++ public boolean run = false; + + public void updatePlayerMoveState(EntityPlayer entityPlayer) { + } diff --git a/patches_merged/net/minecraft/src/MovementInputFromOptions.java.patch b/patches_merged/net/minecraft/src/MovementInputFromOptions.java.patch new file mode 100644 index 0000000..0726ac5 --- /dev/null +++ b/patches_merged/net/minecraft/src/MovementInputFromOptions.java.patch @@ -0,0 +1,25 @@ +--- a/net/minecraft/src/MovementInputFromOptions.java ++++ b/net/minecraft/src/MovementInputFromOptions.java +@@ -34,6 +34,10 @@ + b3 = 5; + } + ++ if(key == this.gameSettings.keyBindRun.keyCode) { ++ b3 = 6; ++ } ++ + if(b3 >= 0) { + this.movementKeyStates[b3] = state; + } +@@ -68,10 +72,10 @@ + + this.jump = this.movementKeyStates[4]; + this.sneak = this.movementKeyStates[5]; ++ this.run = this.movementKeyStates[6]; + if(this.sneak) { + this.moveStrafe = (float)((double)this.moveStrafe * 0.3D); + this.moveForward = (float)((double)this.moveForward * 0.3D); + } +- + } + } diff --git a/patches_merged/net/minecraft/src/PanelCrashReport.java.patch b/patches_merged/net/minecraft/src/PanelCrashReport.java.patch new file mode 100644 index 0000000..6043302 --- /dev/null +++ b/patches_merged/net/minecraft/src/PanelCrashReport.java.patch @@ -0,0 +1,19 @@ +--- a/net/minecraft/src/PanelCrashReport.java ++++ b/net/minecraft/src/PanelCrashReport.java +@@ -10,6 +10,7 @@ + import java.text.SimpleDateFormat; + import java.util.Date; + ++import net.minecraft.client.Minecraft; + import org.lwjgl.Sys; + import org.lwjgl.opengl.GL11; + +@@ -26,7 +27,7 @@ + try { + string5 = string5 + "Generated " + (new SimpleDateFormat()).format(new Date()) + "\n"; + string5 = string5 + "\n"; +- string5 = string5 + "Minecraft: Minecraft Diverge v0.1\n"; ++ string5 = string5 + "Minecraft: " + Minecraft.version + "\n"; + string5 = string5 + "OS: " + System.getProperty("os.name") + " (" + System.getProperty("os.arch") + ") version " + System.getProperty("os.version") + "\n"; + string5 = string5 + "Java: " + System.getProperty("java.version") + ", " + System.getProperty("java.vendor") + "\n"; + string5 = string5 + "VM: " + System.getProperty("java.vm.name") + " (" + System.getProperty("java.vm.info") + "), " + System.getProperty("java.vm.vendor") + "\n"; diff --git a/patches_merged/net/minecraft/src/PlayerController.java.patch b/patches_merged/net/minecraft/src/PlayerController.java.patch new file mode 100644 index 0000000..9c470ba --- /dev/null +++ b/patches_merged/net/minecraft/src/PlayerController.java.patch @@ -0,0 +1,18 @@ +--- a/net/minecraft/src/PlayerController.java ++++ b/net/minecraft/src/PlayerController.java +@@ -59,7 +59,14 @@ + + public boolean onPlayerRightClick(EntityPlayer entityPlayer, World world, ItemStack itemStack, int x, int y, int z, int side) { + int i8 = world.getBlockId(x, y, z); +- return i8 > 0 && Block.blocksList[i8].blockActivated(world, x, y, z, entityPlayer) ? true : (itemStack == null ? false : itemStack.useItem(entityPlayer, world, x, y, z, side)); ++ int oldStackSize = itemStack != null ? itemStack.stackSize : 0; ++ boolean result = i8 > 0 && Block.blocksList[i8].blockActivated(world, x, y, z, entityPlayer) ? true ++ : (itemStack == null ? false ++ : itemStack.useItem(entityPlayer, world, x, y, z, side)); ++ if (entityPlayer.creative && itemStack != null) { ++ itemStack.stackSize = oldStackSize; ++ } ++ return result; + } + + public EntityPlayer createPlayer(World world) { diff --git a/patches_merged/net/minecraft/src/PlayerControllerSP.java.patch b/patches_merged/net/minecraft/src/PlayerControllerSP.java.patch new file mode 100644 index 0000000..7bc50cf --- /dev/null +++ b/patches_merged/net/minecraft/src/PlayerControllerSP.java.patch @@ -0,0 +1,38 @@ +--- a/net/minecraft/src/PlayerControllerSP.java ++++ b/net/minecraft/src/PlayerControllerSP.java +@@ -81,7 +81,7 @@ + this.curBlockDamage = 0.0F; + this.prevBlockDamage = 0.0F; + this.blockDestroySoundCounter = 0.0F; +- this.blockHitWait = 5; ++ this.blockHitWait = this.mc.thePlayer.creative ? 60 : 0; + } + } else { + this.curBlockDamage = 0.0F; +@@ -119,6 +119,25 @@ + this.prevBlockDamage = this.curBlockDamage; + this.monsterSpawner.onUpdate(this.mc.theWorld); + this.animalSpawner.onUpdate(this.mc.theWorld); +- this.mc.sndManager.playRandomMusicIfReady(); ++ ++ EntityPlayer plr = this.mc.thePlayer; ++ int ix = (int) plr.posX; ++ int iy = (int) plr.posY; ++ int iz = (int) plr.posZ; ++ ++ this.mc.sndManager.tickMusic(); ++ if (iy < 64 ++ && this.mc.theWorld.getSavedLightValue(EnumSkyBlock.Sky, ix, iy, iz) <= 0 ++ && this.mc.theWorld.hasSolidCeiling(ix, iy, iz)) { ++ if (this.mc.sndManager.getMusicType() != SoundManager.MusicType.CAVE) { ++ this.mc.sndManager.fadeOutBackgroundMusic(); ++ } ++ this.mc.sndManager.playRandomCaveMusicIfReady(); ++ } else { ++ if (this.mc.sndManager.getMusicType() != SoundManager.MusicType.NORMAL) { ++ this.mc.sndManager.fadeOutBackgroundMusic(); ++ } ++ this.mc.sndManager.playRandomMusicIfReady(); ++ } + } + } diff --git a/patches_merged/net/minecraft/src/PropertyManager.java.patch b/patches_merged/net/minecraft/src/PropertyManager.java.patch new file mode 100644 index 0000000..6eb4c02 --- /dev/null +++ b/patches_merged/net/minecraft/src/PropertyManager.java.patch @@ -0,0 +1,29 @@ +--- a/net/minecraft/src/PropertyManager.java ++++ b/net/minecraft/src/PropertyManager.java +@@ -1,9 +1,12 @@ + package net.minecraft.src; + ++import io.github.bluestaggo.mcdiverge.CreateWorldInfo; ++ + import java.io.File; + import java.io.FileInputStream; + import java.io.FileOutputStream; + import java.util.Properties; ++import java.util.Random; + import java.util.logging.Level; + import java.util.logging.Logger; + +@@ -68,5 +71,13 @@ + this.serverProperties.setProperty(key, "" + value); + return value; + } ++ } ++ ++ public CreateWorldInfo getCreateWorldInfo() { ++ return new CreateWorldInfo() ++ .withName(this.getStringProperty("level-display-name", "World")) ++ .withSeed(this.getIntProperty("seed", new Random().nextInt())) ++ .withSnow(this.getBooleanProperty("snowy", false)) ++ .withCreative(this.getBooleanProperty("creative", false)); + } + } diff --git a/patches_merged/net/minecraft/src/RecipesCrafting.java.patch b/patches_merged/net/minecraft/src/RecipesCrafting.java.patch new file mode 100644 index 0000000..ecb1a59 --- /dev/null +++ b/patches_merged/net/minecraft/src/RecipesCrafting.java.patch @@ -0,0 +1,16 @@ +--- a/net/minecraft/src/RecipesCrafting.java ++++ b/net/minecraft/src/RecipesCrafting.java +@@ -2,8 +2,10 @@ + + public class RecipesCrafting { + public void addRecipes(CraftingManager craftingManager) { +- craftingManager.addRecipe(new ItemStack(Block.chest), new Object[]{"###", "# #", "###", '#', Block.planks}); +- craftingManager.addRecipe(new ItemStack(Block.stoneOvenIdle), new Object[]{"###", "# #", "###", '#', Block.cobblestone}); +- craftingManager.addRecipe(new ItemStack(Block.workbench), new Object[]{"##", "##", '#', Block.planks}); ++ craftingManager.addRecipe(new ItemStack(Block.chest), "###", "# #", "###", '#', Block.planks); ++ craftingManager.addRecipe(new ItemStack(Block.stoneOvenIdle), "###", "# #", "###", '#', Block.cobblestone); ++ craftingManager.addRecipe(new ItemStack(Block.workbench), "##", "##", '#', Block.planks); ++ craftingManager.addRecipe(new ItemStack(Block.blasterIdle), "###", "#X#", "###", '#', Item.ingotIron, 'X', Block.blockRuby); ++ craftingManager.addRecipe(new ItemStack(Block.refabricator), "xxx", "#S#", "#D#", 'x', Item.starDust, '#', Item.ingotGold, 'S', Block.blockSapphire, 'D', Block.blockDiamond); + } + } diff --git a/patches_merged/net/minecraft/src/RecipesIngots.java.patch b/patches_merged/net/minecraft/src/RecipesIngots.java.patch new file mode 100644 index 0000000..e7bfdc0 --- /dev/null +++ b/patches_merged/net/minecraft/src/RecipesIngots.java.patch @@ -0,0 +1,30 @@ +--- a/net/minecraft/src/RecipesIngots.java ++++ b/net/minecraft/src/RecipesIngots.java +@@ -1,15 +1,20 @@ + package net.minecraft.src; + + public class RecipesIngots { +- private Object[][] recipeItems = new Object[][]{{Block.blockGold, Item.ingotGold}, {Block.blockSteel, Item.ingotIron}, {Block.blockDiamond, Item.diamond}}; ++ private Object[][] recipeItems = new Object[][]{ ++ {Block.blockGold, Item.ingotGold}, ++ {Block.blockSteel, Item.ingotIron}, ++ {Block.blockDiamond, Item.diamond}, ++ {Block.blockRuby, Item.ruby}, ++ {Block.blockSapphire, Item.sapphire} ++ }; + + public void addRecipes(CraftingManager craftingManager) { +- for(int i2 = 0; i2 < this.recipeItems.length; ++i2) { +- Block block3 = (Block)this.recipeItems[i2][0]; +- Item item4 = (Item)this.recipeItems[i2][1]; +- craftingManager.addRecipe(new ItemStack(block3), new Object[]{"###", "###", "###", '#', item4}); +- craftingManager.addRecipe(new ItemStack(item4, 9), new Object[]{"#", '#', block3}); ++ for (Object[] recipeItem : this.recipeItems) { ++ Block block3 = (Block) recipeItem[0]; ++ Item item4 = (Item) recipeItem[1]; ++ craftingManager.addRecipe(new ItemStack(block3), "###", "###", "###", '#', item4); ++ craftingManager.addRecipe(new ItemStack(item4, 9), "#", '#', block3); + } +- + } + } diff --git a/patches_merged/net/minecraft/src/RecipesTools.java.patch b/patches_merged/net/minecraft/src/RecipesTools.java.patch new file mode 100644 index 0000000..fb70b49 --- /dev/null +++ b/patches_merged/net/minecraft/src/RecipesTools.java.patch @@ -0,0 +1,25 @@ +--- a/net/minecraft/src/RecipesTools.java ++++ b/net/minecraft/src/RecipesTools.java +@@ -2,7 +2,12 @@ + + public class RecipesTools { + private String[][] recipePatterns = new String[][]{{"XXX", " # ", " # "}, {"X", "#", "#"}, {"XX", "X#", " #"}, {"XX", " #", " #"}}; +- private Object[][] recipeItems = new Object[][]{{Block.planks, Block.cobblestone, Item.ingotIron, Item.diamond, Item.ingotGold}, {Item.pickaxeWood, Item.pickaxeStone, Item.pickaxeSteel, Item.pickaxeDiamond, Item.pickaxeGold}, {Item.shovelWood, Item.shovelStone, Item.shovel, Item.shovelDiamond, Item.shovelGold}, {Item.axeWood, Item.axeStone, Item.axeSteel, Item.axeDiamond, Item.axeGold}, {Item.hoeWood, Item.hoeStone, Item.hoeSteel, Item.hoeDiamond, Item.hoeGold}}; ++ private Object[][] recipeItems = new Object[][]{ ++ {Block.planks, Block.cobblestone, Item.ingotIron, Item.diamond, Item.ingotGold}, ++ {Item.pickaxeWood, Item.pickaxeStone, Item.pickaxeSteel, Item.pickaxeDiamond, Item.pickaxeGold}, ++ {Item.shovelWood, Item.shovelStone, Item.shovel, Item.shovelDiamond, Item.shovelGold}, ++ {Item.axeWood, Item.axeStone, Item.axeSteel, Item.axeDiamond, Item.axeGold}, ++ {Item.hoeWood, Item.hoeStone, Item.hoeSteel, Item.hoeDiamond, Item.hoeGold}}; + + public void addRecipes(CraftingManager craftingManager) { + for(int i2 = 0; i2 < this.recipeItems[0].length; ++i2) { +@@ -10,7 +15,7 @@ + + for(int i4 = 0; i4 < this.recipeItems.length - 1; ++i4) { + Item item5 = (Item)this.recipeItems[i4 + 1][i2]; +- craftingManager.addRecipe(new ItemStack(item5), new Object[]{this.recipePatterns[i4], '#', Item.stick, 'X', object3}); ++ craftingManager.addRecipe(new ItemStack(item5), this.recipePatterns[i4], '#', Item.stick, 'X', object3); + } + } + diff --git a/patches_merged/net/minecraft/src/RecipesWeapons.java.patch b/patches_merged/net/minecraft/src/RecipesWeapons.java.patch new file mode 100644 index 0000000..1860e72 --- /dev/null +++ b/patches_merged/net/minecraft/src/RecipesWeapons.java.patch @@ -0,0 +1,20 @@ +--- a/net/minecraft/src/RecipesWeapons.java ++++ b/net/minecraft/src/RecipesWeapons.java +@@ -10,11 +10,14 @@ + + for(int i4 = 0; i4 < this.recipeItems.length - 1; ++i4) { + Item item5 = (Item)this.recipeItems[i4 + 1][i2]; +- craftingManager.addRecipe(new ItemStack(item5), new Object[]{this.recipePatterns[i4], '#', Item.stick, 'X', object3}); ++ craftingManager.addRecipe(new ItemStack(item5), this.recipePatterns[i4], '#', Item.stick, 'X', object3); + } + } + +- craftingManager.addRecipe(new ItemStack(Item.bow, 1), new Object[]{" #X", "# X", " #X", 'X', Item.silk, '#', Item.stick}); +- craftingManager.addRecipe(new ItemStack(Item.arrow, 4), new Object[]{"X", "#", "Y", 'Y', Item.feather, 'X', Item.flint, '#', Item.stick}); ++ craftingManager.addRecipe(new ItemStack(Item.bow, 1), " #X", "# X", " #X", 'X', Item.silk, '#', Item.stick); ++ craftingManager.addRecipe(new ItemStack(Item.arrow, 4), "X", "#", "Y", 'Y', Item.feather, 'X', Item.flint, '#', Item.stick); ++ craftingManager.addRecipe(new ItemStack(Item.staffRuby, 1), "#", "o", "/", '#', Item.ruby, 'o', Item.ingotGold, '/', Item.stick); ++ craftingManager.addRecipe(new ItemStack(Item.staffSapphire, 1), "#", "o", "/", '#', Item.sapphire, 'o', Item.ingotIron, '/', Item.stick); ++ craftingManager.addRecipe(new ItemStack(Item.staffSparkle, 1), "#", "/", "/", '#', Item.starChunk, '/', Item.stick); + } + } diff --git a/patches_merged/net/minecraft/src/RenderBlocks.java.patch b/patches_merged/net/minecraft/src/RenderBlocks.java.patch new file mode 100644 index 0000000..f580bea --- /dev/null +++ b/patches_merged/net/minecraft/src/RenderBlocks.java.patch @@ -0,0 +1,474 @@ +--- a/net/minecraft/src/RenderBlocks.java ++++ b/net/minecraft/src/RenderBlocks.java +@@ -30,7 +30,7 @@ + public boolean renderBlockTorch(Block block, int x, int y, int z) { + int i5 = this.blockAccess.getBlockMetadata(x, y, z); + Tessellator tessellator6 = Tessellator.instance; +- float f7 = block.getBlockBrightness(this.blockAccess, x, y, z); ++ float f7 = block.getBlockRenderBrightness(this.blockAccess, x, y, z); + if(Block.lightValue[block.blockID] > 0) { + f7 = 1.0F; + } +@@ -86,7 +86,7 @@ + this.overrideBlockTexture = -1; + } + +- float f13 = block.getBlockBrightness(this.blockAccess, x, y, z); ++ float f13 = block.getBlockRenderBrightness(this.blockAccess, x, y, z); + if(Block.lightValue[block.blockID] > 0) { + f13 = 1.0F; + } +@@ -224,7 +224,7 @@ + i6 = this.overrideBlockTexture; + } + +- float f7 = block.getBlockBrightness(this.blockAccess, x, y, z); ++ float f7 = block.getBlockRenderBrightness(this.blockAccess, x, y, z); + tessellator5.setColorOpaque_F(f7, f7, f7); + int i8 = (i6 & 15) << 4; + int i9 = i6 & 240; +@@ -412,7 +412,7 @@ + i6 = this.overrideBlockTexture; + } + +- float f7 = block.getBlockBrightness(this.blockAccess, x, y, z); ++ float f7 = block.getBlockRenderBrightness(this.blockAccess, x, y, z); + tessellator5.setColorOpaque_F(f7, f7, f7); + int i8 = (i6 & 15) << 4; + int i9 = i6 & 240; +@@ -565,7 +565,7 @@ + i7 = this.overrideBlockTexture; + } + +- float f8 = block.getBlockBrightness(this.blockAccess, x, y, z); ++ float f8 = block.getBlockRenderBrightness(this.blockAccess, x, y, z); + tessellator5.setColorOpaque_F(f8, f8, f8); + int i9 = (i7 & 15) << 4; + int i10 = i7 & 240; +@@ -633,7 +633,7 @@ + i6 = this.overrideBlockTexture; + } + +- float f7 = block.getBlockBrightness(this.blockAccess, x, y, z); ++ float f7 = block.getBlockRenderBrightness(this.blockAccess, x, y, z); + tessellator5.setColorOpaque_F(f7, f7, f7); + int i8 = (i6 & 15) << 4; + int i9 = i6 & 240; +@@ -677,7 +677,7 @@ + + public boolean renderBlockReed(Block block, int x, int y, int z) { + Tessellator tessellator5 = Tessellator.instance; +- float f6 = block.getBlockBrightness(this.blockAccess, x, y, z); ++ float f6 = block.getBlockRenderBrightness(this.blockAccess, x, y, z); + tessellator5.setColorOpaque_F(f6, f6, f6); + this.renderCrossedSquares(block, this.blockAccess.getBlockMetadata(x, y, z), (double)x, (double)y, (double)z); + return true; +@@ -685,7 +685,7 @@ + + public boolean renderBlockCrops(Block block, int x, int y, int z) { + Tessellator tessellator5 = Tessellator.instance; +- float f6 = block.getBlockBrightness(this.blockAccess, x, y, z); ++ float f6 = block.getBlockRenderBrightness(this.blockAccess, x, y, z); + tessellator5.setColorOpaque_F(f6, f6, f6); + this.renderBlockCropsImpl(block, this.blockAccess.getBlockMetadata(x, y, z), (double)x, (double)((float)y - 0.0625F), (double)z); + return true; +@@ -875,7 +875,7 @@ + + f32 = MathHelper.sin(f25) * 8.0F / 256.0F; + f33 = MathHelper.cos(f25) * 8.0F / 256.0F; +- f34 = block.getBlockBrightness(this.blockAccess, x, y, z); ++ f34 = block.getBlockRenderBrightness(this.blockAccess, x, y, z); + tessellator5.setColorOpaque_F(f11 * f34, f11 * f34, f11 * f34); + tessellator5.addVertexWithUV((double)(x + 0), (double)((float)y + f20), (double)(z + 0), d28 - (double)f33 - (double)f32, d30 - (double)f33 + (double)f32); + tessellator5.addVertexWithUV((double)(x + 0), (double)((float)y + f21), (double)(z + 1), d28 - (double)f33 + (double)f32, d30 + (double)f33 + (double)f32); +@@ -884,7 +884,7 @@ + } + + if(this.renderAllFaces || z7) { +- float f48 = block.getBlockBrightness(this.blockAccess, x, y - 1, z); ++ float f48 = block.getBlockRenderBrightness(this.blockAccess, x, y - 1, z); + tessellator5.setColorOpaque_F(f10 * f48, f10 * f48, f10 * f48); + this.renderBottomFace(block, (double)x, (double)y, (double)z, block.getBlockTextureFromSide(0)); + z9 = true; +@@ -952,7 +952,7 @@ + double d41 = (double)(((float)i51 + (1.0F - f31) * 16.0F) / 256.0F); + double d43 = (double)(((float)i51 + (1.0F - f32) * 16.0F) / 256.0F); + double d45 = ((double)(i51 + 16) - 0.01D) / 256.0D; +- float f47 = block.getBlockBrightness(this.blockAccess, i49, y, i27); ++ float f47 = block.getBlockRenderBrightness(this.blockAccess, i49, y, i27); + if(i24 < 2) { + f47 *= f12; + } else { +@@ -1012,43 +1012,43 @@ + float f9 = 0.6F; + Tessellator tessellator10 = Tessellator.instance; + tessellator10.startDrawingQuads(); +- float f11 = block.getBlockBrightness(worldObj, x, y, z); +- float f12 = block.getBlockBrightness(worldObj, x, y - 1, z); ++ float f11 = block.getBlockRenderBrightness(worldObj, x, y, z); ++ float f12 = block.getBlockRenderBrightness(worldObj, x, y - 1, z); + if(f12 < f11) { + f12 = f11; + } + + tessellator10.setColorOpaque_F(f6 * f12, f6 * f12, f6 * f12); + this.renderBottomFace(block, -0.5D, -0.5D, -0.5D, block.getBlockTextureFromSide(0)); +- f12 = block.getBlockBrightness(worldObj, x, y + 1, z); ++ f12 = block.getBlockRenderBrightness(worldObj, x, y + 1, z); + if(f12 < f11) { + f12 = f11; + } + + tessellator10.setColorOpaque_F(f7 * f12, f7 * f12, f7 * f12); + this.renderTopFace(block, -0.5D, -0.5D, -0.5D, block.getBlockTextureFromSide(1)); +- f12 = block.getBlockBrightness(worldObj, x, y, z - 1); ++ f12 = block.getBlockRenderBrightness(worldObj, x, y, z - 1); + if(f12 < f11) { + f12 = f11; + } + + tessellator10.setColorOpaque_F(f8 * f12, f8 * f12, f8 * f12); + this.renderEastFace(block, -0.5D, -0.5D, -0.5D, block.getBlockTextureFromSide(2)); +- f12 = block.getBlockBrightness(worldObj, x, y, z + 1); ++ f12 = block.getBlockRenderBrightness(worldObj, x, y, z + 1); + if(f12 < f11) { + f12 = f11; + } + + tessellator10.setColorOpaque_F(f8 * f12, f8 * f12, f8 * f12); + this.renderWestFace(block, -0.5D, -0.5D, -0.5D, block.getBlockTextureFromSide(3)); +- f12 = block.getBlockBrightness(worldObj, x - 1, y, z); ++ f12 = block.getBlockRenderBrightness(worldObj, x - 1, y, z); + if(f12 < f11) { + f12 = f11; + } + + tessellator10.setColorOpaque_F(f9 * f12, f9 * f12, f9 * f12); + this.renderNorthFace(block, -0.5D, -0.5D, -0.5D, block.getBlockTextureFromSide(4)); +- f12 = block.getBlockBrightness(worldObj, x + 1, y, z); ++ f12 = block.getBlockRenderBrightness(worldObj, x + 1, y, z); + if(f12 < f11) { + f12 = f11; + } +@@ -1085,17 +1085,17 @@ + float f23 = f11 * f7; + float f24 = f12 * f7; + float f25 = f13 * f7; +- float f26 = block.getBlockBrightness(this.blockAccess, x, y, z); ++ float f26 = block.getBlockRenderBrightness(this.blockAccess, x, y, z); + float f27; + if(this.renderAllFaces || block.shouldSideBeRendered(this.blockAccess, x, y - 1, z, 0)) { +- f27 = block.getBlockBrightness(this.blockAccess, x, y - 1, z); ++ f27 = block.getBlockRenderBrightness(this.blockAccess, x, y - 1, z); + tessellator8.setColorOpaque_F(f14 * f27, f18 * f27, f22 * f27); + this.renderBottomFace(block, (double)x, (double)y, (double)z, block.getBlockTexture(this.blockAccess, x, y, z, 0)); + z9 = true; + } + + if(this.renderAllFaces || block.shouldSideBeRendered(this.blockAccess, x, y + 1, z, 1)) { +- f27 = block.getBlockBrightness(this.blockAccess, x, y + 1, z); ++ f27 = block.getBlockRenderBrightness(this.blockAccess, x, y + 1, z); + if(block.maxY != 1.0D && !block.material.getIsLiquid()) { + f27 = f26; + } +@@ -1106,7 +1106,7 @@ + } + + if(this.renderAllFaces || block.shouldSideBeRendered(this.blockAccess, x, y, z - 1, 2)) { +- f27 = block.getBlockBrightness(this.blockAccess, x, y, z - 1); ++ f27 = block.getBlockRenderBrightness(this.blockAccess, x, y, z - 1); + if(block.minZ > 0.0D) { + f27 = f26; + } +@@ -1117,7 +1117,7 @@ + } + + if(this.renderAllFaces || block.shouldSideBeRendered(this.blockAccess, x, y, z + 1, 3)) { +- f27 = block.getBlockBrightness(this.blockAccess, x, y, z + 1); ++ f27 = block.getBlockRenderBrightness(this.blockAccess, x, y, z + 1); + if(block.maxZ < 1.0D) { + f27 = f26; + } +@@ -1128,7 +1128,7 @@ + } + + if(this.renderAllFaces || block.shouldSideBeRendered(this.blockAccess, x - 1, y, z, 4)) { +- f27 = block.getBlockBrightness(this.blockAccess, x - 1, y, z); ++ f27 = block.getBlockRenderBrightness(this.blockAccess, x - 1, y, z); + if(block.minX > 0.0D) { + f27 = f26; + } +@@ -1139,7 +1139,7 @@ + } + + if(this.renderAllFaces || block.shouldSideBeRendered(this.blockAccess, x + 1, y, z, 5)) { +- f27 = block.getBlockBrightness(this.blockAccess, x + 1, y, z); ++ f27 = block.getBlockRenderBrightness(this.blockAccess, x + 1, y, z); + if(block.maxX < 1.0D) { + f27 = f26; + } +@@ -1180,17 +1180,17 @@ + float f24 = f12 * f7; + float f25 = f13 * f7; + float f26 = 0.0625F; +- float f27 = block.getBlockBrightness(this.blockAccess, x, y, z); ++ float f27 = block.getBlockRenderBrightness(this.blockAccess, x, y, z); + float f28; + if(this.renderAllFaces || block.shouldSideBeRendered(this.blockAccess, x, y - 1, z, 0)) { +- f28 = block.getBlockBrightness(this.blockAccess, x, y - 1, z); ++ f28 = block.getBlockRenderBrightness(this.blockAccess, x, y - 1, z); + tessellator8.setColorOpaque_F(f14 * f28, f18 * f28, f22 * f28); + this.renderBottomFace(block, (double)x, (double)y, (double)z, block.getBlockTexture(this.blockAccess, x, y, z, 0)); + z9 = true; + } + + if(this.renderAllFaces || block.shouldSideBeRendered(this.blockAccess, x, y + 1, z, 1)) { +- f28 = block.getBlockBrightness(this.blockAccess, x, y + 1, z); ++ f28 = block.getBlockRenderBrightness(this.blockAccess, x, y + 1, z); + if(block.maxY != 1.0D && !block.material.getIsLiquid()) { + f28 = f27; + } +@@ -1201,7 +1201,7 @@ + } + + if(this.renderAllFaces || block.shouldSideBeRendered(this.blockAccess, x, y, z - 1, 2)) { +- f28 = block.getBlockBrightness(this.blockAccess, x, y, z - 1); ++ f28 = block.getBlockRenderBrightness(this.blockAccess, x, y, z - 1); + if(block.minZ > 0.0D) { + f28 = f27; + } +@@ -1214,7 +1214,7 @@ + } + + if(this.renderAllFaces || block.shouldSideBeRendered(this.blockAccess, x, y, z + 1, 3)) { +- f28 = block.getBlockBrightness(this.blockAccess, x, y, z + 1); ++ f28 = block.getBlockRenderBrightness(this.blockAccess, x, y, z + 1); + if(block.maxZ < 1.0D) { + f28 = f27; + } +@@ -1227,7 +1227,7 @@ + } + + if(this.renderAllFaces || block.shouldSideBeRendered(this.blockAccess, x - 1, y, z, 4)) { +- f28 = block.getBlockBrightness(this.blockAccess, x - 1, y, z); ++ f28 = block.getBlockRenderBrightness(this.blockAccess, x - 1, y, z); + if(block.minX > 0.0D) { + f28 = f27; + } +@@ -1240,7 +1240,7 @@ + } + + if(this.renderAllFaces || block.shouldSideBeRendered(this.blockAccess, x + 1, y, z, 5)) { +- f28 = block.getBlockBrightness(this.blockAccess, x + 1, y, z); ++ f28 = block.getBlockRenderBrightness(this.blockAccess, x + 1, y, z); + if(block.maxX < 1.0D) { + f28 = f27; + } +@@ -1350,8 +1350,8 @@ + float f9 = 1.0F; + float f10 = 0.8F; + float f11 = 0.6F; +- float f12 = block.getBlockBrightness(this.blockAccess, x, y, z); +- float f13 = block.getBlockBrightness(this.blockAccess, x, y - 1, z); ++ float f12 = block.getBlockRenderBrightness(this.blockAccess, x, y, z); ++ float f13 = block.getBlockRenderBrightness(this.blockAccess, x, y - 1, z); + if(blockDoor6.minY > 0.0D) { + f13 = f12; + } +@@ -1363,7 +1363,7 @@ + tessellator5.setColorOpaque_F(f8 * f13, f8 * f13, f8 * f13); + this.renderBottomFace(block, (double)x, (double)y, (double)z, block.getBlockTexture(this.blockAccess, x, y, z, 0)); + z7 = true; +- f13 = block.getBlockBrightness(this.blockAccess, x, y + 1, z); ++ f13 = block.getBlockRenderBrightness(this.blockAccess, x, y + 1, z); + if(blockDoor6.maxY < 1.0D) { + f13 = f12; + } +@@ -1375,7 +1375,7 @@ + tessellator5.setColorOpaque_F(f9 * f13, f9 * f13, f9 * f13); + this.renderTopFace(block, (double)x, (double)y, (double)z, block.getBlockTexture(this.blockAccess, x, y, z, 1)); + z7 = true; +- f13 = block.getBlockBrightness(this.blockAccess, x, y, z - 1); ++ f13 = block.getBlockRenderBrightness(this.blockAccess, x, y, z - 1); + if(blockDoor6.minZ > 0.0D) { + f13 = f12; + } +@@ -1394,7 +1394,7 @@ + this.renderEastFace(block, (double)x, (double)y, (double)z, i14); + z7 = true; + this.flipTexture = false; +- f13 = block.getBlockBrightness(this.blockAccess, x, y, z + 1); ++ f13 = block.getBlockRenderBrightness(this.blockAccess, x, y, z + 1); + if(blockDoor6.maxZ < 1.0D) { + f13 = f12; + } +@@ -1413,7 +1413,7 @@ + this.renderWestFace(block, (double)x, (double)y, (double)z, i14); + z7 = true; + this.flipTexture = false; +- f13 = block.getBlockBrightness(this.blockAccess, x - 1, y, z); ++ f13 = block.getBlockRenderBrightness(this.blockAccess, x - 1, y, z); + if(blockDoor6.minX > 0.0D) { + f13 = f12; + } +@@ -1432,7 +1432,7 @@ + this.renderNorthFace(block, (double)x, (double)y, (double)z, i14); + z7 = true; + this.flipTexture = false; +- f13 = block.getBlockBrightness(this.blockAccess, x + 1, y, z); ++ f13 = block.getBlockRenderBrightness(this.blockAccess, x + 1, y, z); + if(blockDoor6.maxX < 1.0D) { + f13 = f12; + } +@@ -1707,7 +1707,7 @@ + + } + +- public void renderBlockOnInventory(Block block1) { ++ public void renderBlockOnInventory(Block block1, int metadata) { + byte b2 = -1; + Tessellator tessellator3 = Tessellator.instance; + int i4 = block1.getRenderType(); +@@ -1716,27 +1716,27 @@ + GL11.glTranslatef(-0.5F, -0.5F, -0.5F); + tessellator3.startDrawingQuads(); + tessellator3.setNormal(0.0F, -1.0F, 0.0F); +- this.renderBottomFace(block1, 0.0D, 0.0D, 0.0D, block1.getBlockTextureFromSide(0)); ++ this.renderBottomFace(block1, 0.0D, 0.0D, 0.0D, block1.getBlockTextureFromSideAndMetadata(0, metadata)); + tessellator3.draw(); + tessellator3.startDrawingQuads(); + tessellator3.setNormal(0.0F, 1.0F, 0.0F); +- this.renderTopFace(block1, 0.0D, 0.0D, 0.0D, block1.getBlockTextureFromSide(1)); ++ this.renderTopFace(block1, 0.0D, 0.0D, 0.0D, block1.getBlockTextureFromSideAndMetadata(1, metadata)); + tessellator3.draw(); + tessellator3.startDrawingQuads(); + tessellator3.setNormal(0.0F, 0.0F, -1.0F); +- this.renderEastFace(block1, 0.0D, 0.0D, 0.0D, block1.getBlockTextureFromSide(2)); ++ this.renderEastFace(block1, 0.0D, 0.0D, 0.0D, block1.getBlockTextureFromSideAndMetadata(2, metadata)); + tessellator3.draw(); + tessellator3.startDrawingQuads(); + tessellator3.setNormal(0.0F, 0.0F, 1.0F); +- this.renderWestFace(block1, 0.0D, 0.0D, 0.0D, block1.getBlockTextureFromSide(3)); ++ this.renderWestFace(block1, 0.0D, 0.0D, 0.0D, block1.getBlockTextureFromSideAndMetadata(3, metadata)); + tessellator3.draw(); + tessellator3.startDrawingQuads(); + tessellator3.setNormal(-1.0F, 0.0F, 0.0F); +- this.renderNorthFace(block1, 0.0D, 0.0D, 0.0D, block1.getBlockTextureFromSide(4)); ++ this.renderNorthFace(block1, 0.0D, 0.0D, 0.0D, block1.getBlockTextureFromSideAndMetadata(4, metadata)); + tessellator3.draw(); + tessellator3.startDrawingQuads(); + tessellator3.setNormal(1.0F, 0.0F, 0.0F); +- this.renderSouthFace(block1, 0.0D, 0.0D, 0.0D, block1.getBlockTextureFromSide(5)); ++ this.renderSouthFace(block1, 0.0D, 0.0D, 0.0D, block1.getBlockTextureFromSideAndMetadata(5, metadata)); + tessellator3.draw(); + GL11.glTranslatef(0.5F, 0.5F, 0.5F); + } else if(i4 == 1) { +@@ -1750,34 +1750,34 @@ + float f5 = 0.0625F; + tessellator3.startDrawingQuads(); + tessellator3.setNormal(0.0F, -1.0F, 0.0F); +- this.renderBottomFace(block1, 0.0D, 0.0D, 0.0D, block1.getBlockTextureFromSide(0)); ++ this.renderBottomFace(block1, 0.0D, 0.0D, 0.0D, block1.getBlockTextureFromSideAndMetadata(0, metadata)); + tessellator3.draw(); + tessellator3.startDrawingQuads(); + tessellator3.setNormal(0.0F, 1.0F, 0.0F); +- this.renderTopFace(block1, 0.0D, 0.0D, 0.0D, block1.getBlockTextureFromSide(1)); ++ this.renderTopFace(block1, 0.0D, 0.0D, 0.0D, block1.getBlockTextureFromSideAndMetadata(1, metadata)); + tessellator3.draw(); + tessellator3.startDrawingQuads(); + tessellator3.setNormal(0.0F, 0.0F, -1.0F); + tessellator3.setTranslationF(0.0F, 0.0F, f5); +- this.renderEastFace(block1, 0.0D, 0.0D, 0.0D, block1.getBlockTextureFromSide(2)); ++ this.renderEastFace(block1, 0.0D, 0.0D, 0.0D, block1.getBlockTextureFromSideAndMetadata(2, metadata)); + tessellator3.setTranslationF(0.0F, 0.0F, -f5); + tessellator3.draw(); + tessellator3.startDrawingQuads(); + tessellator3.setNormal(0.0F, 0.0F, 1.0F); + tessellator3.setTranslationF(0.0F, 0.0F, -f5); +- this.renderWestFace(block1, 0.0D, 0.0D, 0.0D, block1.getBlockTextureFromSide(3)); ++ this.renderWestFace(block1, 0.0D, 0.0D, 0.0D, block1.getBlockTextureFromSideAndMetadata(3, metadata)); + tessellator3.setTranslationF(0.0F, 0.0F, f5); + tessellator3.draw(); + tessellator3.startDrawingQuads(); + tessellator3.setNormal(-1.0F, 0.0F, 0.0F); + tessellator3.setTranslationF(f5, 0.0F, 0.0F); +- this.renderNorthFace(block1, 0.0D, 0.0D, 0.0D, block1.getBlockTextureFromSide(4)); ++ this.renderNorthFace(block1, 0.0D, 0.0D, 0.0D, block1.getBlockTextureFromSideAndMetadata(4, metadata)); + tessellator3.setTranslationF(-f5, 0.0F, 0.0F); + tessellator3.draw(); + tessellator3.startDrawingQuads(); + tessellator3.setNormal(1.0F, 0.0F, 0.0F); + tessellator3.setTranslationF(-f5, 0.0F, 0.0F); +- this.renderSouthFace(block1, 0.0D, 0.0D, 0.0D, block1.getBlockTextureFromSide(5)); ++ this.renderSouthFace(block1, 0.0D, 0.0D, 0.0D, block1.getBlockTextureFromSideAndMetadata(5, metadata)); + tessellator3.setTranslationF(f5, 0.0F, 0.0F); + tessellator3.draw(); + GL11.glTranslatef(0.5F, 0.5F, 0.5F); +@@ -1806,27 +1806,27 @@ + GL11.glTranslatef(-0.5F, -0.5F, -0.5F); + tessellator3.startDrawingQuads(); + tessellator3.setNormal(0.0F, -1.0F, 0.0F); +- this.renderBottomFace(block1, 0.0D, 0.0D, 0.0D, block1.getBlockTextureFromSide(0)); ++ this.renderBottomFace(block1, 0.0D, 0.0D, 0.0D, block1.getBlockTextureFromSideAndMetadata(0, metadata)); + tessellator3.draw(); + tessellator3.startDrawingQuads(); + tessellator3.setNormal(0.0F, 1.0F, 0.0F); +- this.renderTopFace(block1, 0.0D, 0.0D, 0.0D, block1.getBlockTextureFromSide(1)); ++ this.renderTopFace(block1, 0.0D, 0.0D, 0.0D, block1.getBlockTextureFromSideAndMetadata(1, metadata)); + tessellator3.draw(); + tessellator3.startDrawingQuads(); + tessellator3.setNormal(0.0F, 0.0F, -1.0F); +- this.renderEastFace(block1, 0.0D, 0.0D, 0.0D, block1.getBlockTextureFromSide(2)); ++ this.renderEastFace(block1, 0.0D, 0.0D, 0.0D, block1.getBlockTextureFromSideAndMetadata(2, metadata)); + tessellator3.draw(); + tessellator3.startDrawingQuads(); + tessellator3.setNormal(0.0F, 0.0F, 1.0F); +- this.renderWestFace(block1, 0.0D, 0.0D, 0.0D, block1.getBlockTextureFromSide(3)); ++ this.renderWestFace(block1, 0.0D, 0.0D, 0.0D, block1.getBlockTextureFromSideAndMetadata(3, metadata)); + tessellator3.draw(); + tessellator3.startDrawingQuads(); + tessellator3.setNormal(-1.0F, 0.0F, 0.0F); +- this.renderNorthFace(block1, 0.0D, 0.0D, 0.0D, block1.getBlockTextureFromSide(4)); ++ this.renderNorthFace(block1, 0.0D, 0.0D, 0.0D, block1.getBlockTextureFromSideAndMetadata(4, metadata)); + tessellator3.draw(); + tessellator3.startDrawingQuads(); + tessellator3.setNormal(1.0F, 0.0F, 0.0F); +- this.renderSouthFace(block1, 0.0D, 0.0D, 0.0D, block1.getBlockTextureFromSide(5)); ++ this.renderSouthFace(block1, 0.0D, 0.0D, 0.0D, block1.getBlockTextureFromSideAndMetadata(5, metadata)); + tessellator3.draw(); + GL11.glTranslatef(0.5F, 0.5F, 0.5F); + } +@@ -1853,27 +1853,27 @@ + GL11.glTranslatef(-0.5F, -0.5F, -0.5F); + tessellator3.startDrawingQuads(); + tessellator3.setNormal(0.0F, -1.0F, 0.0F); +- this.renderBottomFace(block1, 0.0D, 0.0D, 0.0D, block1.getBlockTextureFromSide(0)); ++ this.renderBottomFace(block1, 0.0D, 0.0D, 0.0D, block1.getBlockTextureFromSideAndMetadata(0, metadata)); + tessellator3.draw(); + tessellator3.startDrawingQuads(); + tessellator3.setNormal(0.0F, 1.0F, 0.0F); +- this.renderTopFace(block1, 0.0D, 0.0D, 0.0D, block1.getBlockTextureFromSide(1)); ++ this.renderTopFace(block1, 0.0D, 0.0D, 0.0D, block1.getBlockTextureFromSideAndMetadata(1, metadata)); + tessellator3.draw(); + tessellator3.startDrawingQuads(); + tessellator3.setNormal(0.0F, 0.0F, -1.0F); +- this.renderEastFace(block1, 0.0D, 0.0D, 0.0D, block1.getBlockTextureFromSide(2)); ++ this.renderEastFace(block1, 0.0D, 0.0D, 0.0D, block1.getBlockTextureFromSideAndMetadata(2, metadata)); + tessellator3.draw(); + tessellator3.startDrawingQuads(); + tessellator3.setNormal(0.0F, 0.0F, 1.0F); +- this.renderWestFace(block1, 0.0D, 0.0D, 0.0D, block1.getBlockTextureFromSide(3)); ++ this.renderWestFace(block1, 0.0D, 0.0D, 0.0D, block1.getBlockTextureFromSideAndMetadata(3, metadata)); + tessellator3.draw(); + tessellator3.startDrawingQuads(); + tessellator3.setNormal(-1.0F, 0.0F, 0.0F); +- this.renderNorthFace(block1, 0.0D, 0.0D, 0.0D, block1.getBlockTextureFromSide(4)); ++ this.renderNorthFace(block1, 0.0D, 0.0D, 0.0D, block1.getBlockTextureFromSideAndMetadata(4, metadata)); + tessellator3.draw(); + tessellator3.startDrawingQuads(); + tessellator3.setNormal(1.0F, 0.0F, 0.0F); +- this.renderSouthFace(block1, 0.0D, 0.0D, 0.0D, block1.getBlockTextureFromSide(5)); ++ this.renderSouthFace(block1, 0.0D, 0.0D, 0.0D, block1.getBlockTextureFromSideAndMetadata(5, metadata)); + tessellator3.draw(); + GL11.glTranslatef(0.5F, 0.5F, 0.5F); + } diff --git a/patches_merged/net/minecraft/src/RenderEngine.java.patch b/patches_merged/net/minecraft/src/RenderEngine.java.patch new file mode 100644 index 0000000..4e71f74 --- /dev/null +++ b/patches_merged/net/minecraft/src/RenderEngine.java.patch @@ -0,0 +1,10 @@ +--- a/net/minecraft/src/RenderEngine.java ++++ b/net/minecraft/src/RenderEngine.java +@@ -28,6 +28,7 @@ + + public RenderEngine(GameSettings gameSettings1) { + this.options = gameSettings1; ++ RenderGlobal.globalBrightness = this.options.brightness * 0.2F; + } + + public int getTexture(String string1) { diff --git a/patches_merged/net/minecraft/src/RenderGlobal.java.patch b/patches_merged/net/minecraft/src/RenderGlobal.java.patch new file mode 100644 index 0000000..e7e2df9 --- /dev/null +++ b/patches_merged/net/minecraft/src/RenderGlobal.java.patch @@ -0,0 +1,45 @@ +--- a/net/minecraft/src/RenderGlobal.java ++++ b/net/minecraft/src/RenderGlobal.java +@@ -59,6 +59,7 @@ + double prevSortZ = -9999.0D; + public float damagePartialTime; + int frustumCheckOffset = 0; ++ public static float globalBrightness = 0.0F; + + public RenderGlobal(Minecraft minecraft1, RenderEngine renderEngine2) { + this.mc = minecraft1; +@@ -1033,12 +1034,12 @@ + ++this.frustumCheckOffset; + } + +- public void playRecord(String record, int x, int y, int z) { +- if(record != null) { +- this.mc.ingameGUI.setRecordPlayingMessage("C418 - " + record); ++ public void playRecord(String name, int x, int y, int z, String title) { ++ if(title != null) { ++ this.mc.ingameGUI.setRecordPlayingMessage(title); + } + +- this.mc.sndManager.playStreaming(record, (float)x, (float)y, (float)z, 1.0F, 1.0F); ++ this.mc.sndManager.playStreaming(name, (float)x, (float)y, (float)z, 1.0F, 1.0F); + } + + public void playSound(String sound, double posX, double posY, double posZ, float volume, float pitch) { +@@ -1111,5 +1112,17 @@ + } + + public void doNothingWithTileEntity(int x, int y, int z, TileEntity tileEntity) { ++ } ++ ++ private boolean fullBright = false; ++ ++ public void toggleFullbright() { ++ fullBright = !fullBright; ++ if (fullBright) { ++ RenderGlobal.globalBrightness = 1.0F; ++ } else { ++ RenderGlobal.globalBrightness = this.mc.options.brightness * 0.2F; ++ } ++ this.loadRenderers(); + } + } diff --git a/patches_merged/net/minecraft/src/RenderItem.java.patch b/patches_merged/net/minecraft/src/RenderItem.java.patch new file mode 100644 index 0000000..51d887c --- /dev/null +++ b/patches_merged/net/minecraft/src/RenderItem.java.patch @@ -0,0 +1,33 @@ +--- a/net/minecraft/src/RenderItem.java ++++ b/net/minecraft/src/RenderItem.java +@@ -42,9 +42,9 @@ + GL11.glRotatef(f12, 0.0F, 1.0F, 0.0F); + this.loadTexture("/terrain.png"); + float f27 = 0.25F; +- if(!Block.blocksList[itemStack10.itemID].renderAsNormalBlock() && itemStack10.itemID != Block.stairSingle.blockID) { +- f27 = 0.5F; +- } ++// if(!Block.blocksList[itemStack10.itemID].renderAsNormalBlock() && itemStack10.itemID != Block.stairSingle.blockID) { ++// f27 = 0.5F; ++// } + + GL11.glScalef(f27, f27, f27); + +@@ -57,7 +57,7 @@ + GL11.glTranslatef(f16, f17, f18); + } + +- this.itemRenderBlocks.renderBlockOnInventory(Block.blocksList[itemStack10.itemID]); ++ this.itemRenderBlocks.renderBlockOnInventory(Block.blocksList[itemStack10.itemID], Math.max(itemStack10.itemMetadata, 0)); + GL11.glPopMatrix(); + } + } else { +@@ -117,7 +117,7 @@ + GL11.glRotatef(45.0F, 0.0F, 1.0F, 0.0F); + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + GL11.glScalef(1.0F, 1.0F, 1.0F); +- this.itemRenderBlocks.renderBlockOnInventory(block7); ++ this.itemRenderBlocks.renderBlockOnInventory(block7, Math.max(itemStack3.itemMetadata, 0)); + GL11.glPopMatrix(); + } else if(itemStack3.getIconIndex() >= 0) { + GL11.glDisable(GL11.GL_LIGHTING); diff --git a/patches_merged/net/minecraft/src/RenderLiving.java.patch b/patches_merged/net/minecraft/src/RenderLiving.java.patch new file mode 100644 index 0000000..6e514cf --- /dev/null +++ b/patches_merged/net/minecraft/src/RenderLiving.java.patch @@ -0,0 +1,39 @@ +--- a/net/minecraft/src/RenderLiving.java ++++ b/net/minecraft/src/RenderLiving.java +@@ -58,7 +58,7 @@ + GL11.glEnable(GL11.GL_ALPHA_TEST); + this.mainModel.render(f16, f15, f13, f11 - f10, f12, f14); + +- for(int i17 = 0; i17 < 4; ++i17) { ++ for(int i17 = 0; i17 < maxRenderPasses(); ++i17) { + if(this.shouldRenderPass(entityLiving1, i17)) { + this.renderPassModel.render(f16, f15, f13, f11 - f10, f12, f14); + GL11.glDisable(GL11.GL_BLEND); +@@ -79,7 +79,7 @@ + GL11.glColor4f(f25, 0.0F, 0.0F, 0.4F); + this.mainModel.render(f16, f15, f13, f11 - f10, f12, f14); + +- for(int i19 = 0; i19 < 4; ++i19) { ++ for(int i19 = 0; i19 < maxRenderPasses(); ++i19) { + if(this.shouldRenderPass(entityLiving1, i19)) { + GL11.glColor4f(f25, 0.0F, 0.0F, 0.4F); + this.renderPassModel.render(f16, f15, f13, f11 - f10, f12, f14); +@@ -95,7 +95,7 @@ + GL11.glColor4f(f26, f20, f21, f22); + this.mainModel.render(f16, f15, f13, f11 - f10, f12, f14); + +- for(int i23 = 0; i23 < 4; ++i23) { ++ for(int i23 = 0; i23 < maxRenderPasses(); ++i23) { + if(this.shouldRenderPass(entityLiving1, i23)) { + GL11.glColor4f(f26, f20, f21, f22); + this.renderPassModel.render(f16, f15, f13, f11 - f10, f12, f14); +@@ -146,5 +146,9 @@ + + public void doRender(Entity entity1, double d2, double d4, double d6, float f8, float f9) { + this.doRenderLiving((EntityLiving)entity1, d2, d4, d6, f8, f9); ++ } ++ ++ protected float maxRenderPasses() { ++ return 4; + } + } diff --git a/patches_merged/net/minecraft/src/RenderMinecart.java.patch b/patches_merged/net/minecraft/src/RenderMinecart.java.patch new file mode 100644 index 0000000..7c04cd6 --- /dev/null +++ b/patches_merged/net/minecraft/src/RenderMinecart.java.patch @@ -0,0 +1,14 @@ +--- a/net/minecraft/src/RenderMinecart.java ++++ b/net/minecraft/src/RenderMinecart.java +@@ -60,9 +60,9 @@ + GL11.glTranslatef(0.0F, 0.3125F, 0.0F); + GL11.glRotatef(90.0F, 0.0F, 1.0F, 0.0F); + if(entityMinecart1.minecartType == 1) { +- (new RenderBlocks()).renderBlockOnInventory(Block.chest); ++ (new RenderBlocks()).renderBlockOnInventory(Block.chest, 0); + } else if(entityMinecart1.minecartType == 2) { +- (new RenderBlocks()).renderBlockOnInventory(Block.stoneOvenIdle); ++ (new RenderBlocks()).renderBlockOnInventory(Block.stoneOvenIdle, 0); + } + + GL11.glRotatef(-90.0F, 0.0F, 1.0F, 0.0F); diff --git a/patches_merged/net/minecraft/src/RenderPlayer.java.patch b/patches_merged/net/minecraft/src/RenderPlayer.java.patch new file mode 100644 index 0000000..eea7dfa --- /dev/null +++ b/patches_merged/net/minecraft/src/RenderPlayer.java.patch @@ -0,0 +1,59 @@ +--- a/net/minecraft/src/RenderPlayer.java ++++ b/net/minecraft/src/RenderPlayer.java +@@ -1,11 +1,14 @@ + package net.minecraft.src; + ++import io.github.bluestaggo.mcdiverge.ItemCharm; + import org.lwjgl.opengl.GL11; + + public class RenderPlayer extends RenderLiving { + private ModelBiped modelBipedMain = (ModelBiped)this.mainModel; + private ModelBiped modelArmorChestplate = new ModelBiped(1.0F); + private ModelBiped modelArmor = new ModelBiped(0.5F); ++ private ModelBiped modelCharmUpper = new ModelBiped(1.1F); ++ private ModelBiped modelCharmLower = new ModelBiped(0.6F); + private static final String[] armorFilenamePrefix = new String[]{"cloth", "chain", "iron", "diamond", "gold"}; + + public RenderPlayer() { +@@ -13,7 +16,11 @@ + } + + protected boolean setArmorModel(EntityPlayer entityPlayer1, int i2) { +- ItemStack itemStack3 = entityPlayer1.inventory.armorItemInSlot(3 - i2); ++ boolean charmUpper = i2 == 5; ++ if (charmUpper) { ++ i2 = 4; ++ } ++ ItemStack itemStack3 = entityPlayer1.inventory.armorItemInSlot(4 - i2); + if(itemStack3 != null) { + Item item4 = itemStack3.getItem(); + if(item4 instanceof ItemArmor) { +@@ -29,6 +36,18 @@ + modelBiped6.bipedLeftLeg.showModel = i2 == 2 || i2 == 3; + this.setRenderPassModel(modelBiped6); + return true; ++ } else if(item4 instanceof ItemCharm && i2 == 4 && ((ItemCharm) item4).textureName != null) { ++ this.loadTexture("/charm/" + ((ItemCharm) item4).textureName + (charmUpper ? "_upper.png" : "_lower.png")); ++ ModelBiped modelCharm = charmUpper ? modelCharmUpper : modelCharmLower; ++ modelCharm.bipedHead.showModel = true; ++ modelCharm.bipedHeadwear.showModel = true; ++ modelCharm.bipedBody.showModel = true; ++ modelCharm.bipedRightArm.showModel = true; ++ modelCharm.bipedLeftArm.showModel = true; ++ modelCharm.bipedRightLeg.showModel = true; ++ modelCharm.bipedLeftLeg.showModel = true; ++ this.setRenderPassModel(modelCharm); ++ return true; + } + } + +@@ -144,5 +163,9 @@ + + public void doRender(Entity entity1, double d2, double d4, double d6, float f8, float f9) { + this.renderPlayer((EntityPlayer)entity1, d2, d4, d6, f8, f9); ++ } ++ ++ protected float maxRenderPasses() { ++ return 6; + } + } diff --git a/patches_merged/net/minecraft/src/RenderSnowball.java.patch b/patches_merged/net/minecraft/src/RenderSnowball.java.patch new file mode 100644 index 0000000..732071b --- /dev/null +++ b/patches_merged/net/minecraft/src/RenderSnowball.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/src/RenderSnowball.java ++++ b/net/minecraft/src/RenderSnowball.java +@@ -9,7 +9,7 @@ + GL11.glTranslatef((float)d2, (float)d4, (float)d6); + GL11.glEnable(GL12.GL_RESCALE_NORMAL); + GL11.glScalef(0.5F, 0.5F, 0.5F); +- int i10 = Item.snowball.getIconIndex((ItemStack)null); ++ int i10 = entitySnowball1.iconIndex; + this.loadTexture("/gui/items.png"); + Tessellator tessellator11 = Tessellator.instance; + float f12 = (float)(i10 % 16 * 16 + 0) / 256.0F; diff --git a/patches_merged/net/minecraft/src/RenderTNTPrimed.java.patch b/patches_merged/net/minecraft/src/RenderTNTPrimed.java.patch new file mode 100644 index 0000000..cb422c3 --- /dev/null +++ b/patches_merged/net/minecraft/src/RenderTNTPrimed.java.patch @@ -0,0 +1,19 @@ +--- a/net/minecraft/src/RenderTNTPrimed.java ++++ b/net/minecraft/src/RenderTNTPrimed.java +@@ -31,14 +31,14 @@ + + f10 = (1.0F - ((float)entityTNTPrimed1.fuse - f9 + 1.0F) / 100.0F) * 0.8F; + this.loadTexture("/terrain.png"); +- this.blockRenderer.renderBlockOnInventory(Block.tnt); ++ this.blockRenderer.renderBlockOnInventory(Block.tnt, 0); + if(entityTNTPrimed1.fuse / 5 % 2 == 0) { + GL11.glDisable(GL11.GL_TEXTURE_2D); + GL11.glDisable(GL11.GL_LIGHTING); + GL11.glEnable(GL11.GL_BLEND); + GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_DST_ALPHA); + GL11.glColor4f(1.0F, 1.0F, 1.0F, f10); +- this.blockRenderer.renderBlockOnInventory(Block.tnt); ++ this.blockRenderer.renderBlockOnInventory(Block.tnt, 0); + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + GL11.glDisable(GL11.GL_BLEND); + GL11.glEnable(GL11.GL_LIGHTING); diff --git a/patches_merged/net/minecraft/src/ServerConfigurationManager.java.patch b/patches_merged/net/minecraft/src/ServerConfigurationManager.java.patch new file mode 100644 index 0000000..58323ac --- /dev/null +++ b/patches_merged/net/minecraft/src/ServerConfigurationManager.java.patch @@ -0,0 +1,25 @@ +--- a/net/minecraft/src/ServerConfigurationManager.java ++++ b/net/minecraft/src/ServerConfigurationManager.java +@@ -187,6 +187,15 @@ + this.saveBannedList(); + } + ++ public void setPlayerCreative(String name, boolean creative) { ++ for (Object playerEntity : this.playerEntities) { ++ EntityPlayerMP player = (EntityPlayerMP) playerEntity; ++ if (player.username.equalsIgnoreCase(name)) { ++ player.creative = creative; ++ } ++ } ++ } ++ + private void loadBannedList() { + try { + this.bannedIPs.clear(); +@@ -318,6 +327,5 @@ + for(int i1 = 0; i1 < this.playerEntities.size(); ++i1) { + this.playerNBTManagerObj.writePlayerNBT((EntityPlayerMP)this.playerEntities.get(i1)); + } +- + } + } diff --git a/patches_merged/net/minecraft/src/Session.java.patch b/patches_merged/net/minecraft/src/Session.java.patch new file mode 100644 index 0000000..251b23e --- /dev/null +++ b/patches_merged/net/minecraft/src/Session.java.patch @@ -0,0 +1,39 @@ +--- a/net/minecraft/src/Session.java ++++ b/net/minecraft/src/Session.java +@@ -13,36 +13,4 @@ + this.username = string1; + this.sessionId = string2; + } +- +- static { +- registeredBlocksList.add(Block.stone); +- registeredBlocksList.add(Block.cobblestone); +- registeredBlocksList.add(Block.brick); +- registeredBlocksList.add(Block.dirt); +- registeredBlocksList.add(Block.planks); +- registeredBlocksList.add(Block.wood); +- registeredBlocksList.add(Block.leaves); +- registeredBlocksList.add(Block.torch); +- registeredBlocksList.add(Block.stairSingle); +- registeredBlocksList.add(Block.glass); +- registeredBlocksList.add(Block.cobblestoneMossy); +- registeredBlocksList.add(Block.sapling); +- registeredBlocksList.add(Block.plantYellow); +- registeredBlocksList.add(Block.plantRed); +- registeredBlocksList.add(Block.mushroomBrown); +- registeredBlocksList.add(Block.mushroomRed); +- registeredBlocksList.add(Block.sand); +- registeredBlocksList.add(Block.gravel); +- registeredBlocksList.add(Block.sponge); +- registeredBlocksList.add(Block.cloth); +- registeredBlocksList.add(Block.oreCoal); +- registeredBlocksList.add(Block.oreIron); +- registeredBlocksList.add(Block.oreGold); +- registeredBlocksList.add(Block.blockSteel); +- registeredBlocksList.add(Block.blockGold); +- registeredBlocksList.add(Block.bookshelf); +- registeredBlocksList.add(Block.tnt); +- registeredBlocksList.add(Block.obsidian); +- System.out.println(registeredBlocksList.size()); +- } + } diff --git a/patches_merged/net/minecraft/src/SlotArmor.java.patch b/patches_merged/net/minecraft/src/SlotArmor.java.patch new file mode 100644 index 0000000..c55892e --- /dev/null +++ b/patches_merged/net/minecraft/src/SlotArmor.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/src/SlotArmor.java ++++ b/net/minecraft/src/SlotArmor.java +@@ -11,7 +11,7 @@ + } + + public boolean isItemValid(ItemStack itemStack) { +- return itemStack.getItem() instanceof ItemArmor ? ((ItemArmor)itemStack.getItem()).armorType == this.armorType : false; ++ return itemStack.getItem() instanceof ItemEquipable && ((ItemEquipable) itemStack.getItem()).armorType == this.armorType; + } + + public int getBackgroundIconIndex() { diff --git a/patches_merged/net/minecraft/src/SlotInventory.java.patch b/patches_merged/net/minecraft/src/SlotInventory.java.patch new file mode 100644 index 0000000..13ec469 --- /dev/null +++ b/patches_merged/net/minecraft/src/SlotInventory.java.patch @@ -0,0 +1,20 @@ +--- a/net/minecraft/src/SlotInventory.java ++++ b/net/minecraft/src/SlotInventory.java +@@ -1,5 +1,7 @@ + package net.minecraft.src; + ++import io.github.bluestaggo.mcdiverge.ItemTooltip; ++ + public class SlotInventory extends Slot { + private final GuiContainer guiContainer; + public final int xDisplayPosition; +@@ -18,5 +20,9 @@ + x -= i3; + y -= i4; + return x >= this.xDisplayPosition - 1 && x < this.xDisplayPosition + 16 + 1 && y >= this.yDisplayPosition - 1 && y < this.yDisplayPosition + 16 + 1; ++ } ++ ++ public ItemTooltip getTooltip() { ++ return this.getStack().getTooltip(); + } + } diff --git a/patches_merged/net/minecraft/src/SoundManager.java.patch b/patches_merged/net/minecraft/src/SoundManager.java.patch new file mode 100644 index 0000000..bb26cc7 --- /dev/null +++ b/patches_merged/net/minecraft/src/SoundManager.java.patch @@ -0,0 +1,133 @@ +--- a/net/minecraft/src/SoundManager.java ++++ b/net/minecraft/src/SoundManager.java +@@ -10,15 +10,25 @@ + import paulscode.sound.libraries.LibraryLWJGLOpenAL; + + public class SoundManager { ++ public enum MusicType { ++ NORMAL, ++ CAVE, ++ TITLE ++ } ++ + private static SoundSystem sndSystem; +- private SoundPool soundPoolSounds = new SoundPool(); +- private SoundPool soundPoolStreaming = new SoundPool(); +- private SoundPool soundPoolMusic = new SoundPool(); ++ private final SoundPool soundPoolSounds = new SoundPool(); ++ private final SoundPool soundPoolStreaming = new SoundPool(); ++ private final SoundPool soundPoolMusic = new SoundPool(); ++ private final SoundPool soundPoolCaveMusic = new SoundPool(); ++ private final SoundPool soundPoolTitleMusic = new SoundPool(); + private int playedSoundsCount = 0; + private GameSettings options; + private static boolean loaded = false; + private Random rand = new Random(); +- private int ticksBeforeMusic = this.rand.nextInt(12000); ++ private int ticksBeforeMusic = 0; ++ private int fadeOutTicks = 0; ++ private MusicType musicType = MusicType.TITLE; + + public void loadSoundSettings(GameSettings settings) { + this.soundPoolStreaming.isGetRandomSound = false; +@@ -29,6 +39,10 @@ + + } + ++ public MusicType getMusicType() { ++ return this.musicType; ++ } ++ + private void tryToSetLibraryAndCodecs() { + try { + float f1 = this.options.soundVolume; +@@ -84,24 +98,84 @@ + this.soundPoolMusic.addSound(name, file); + } + +- public void playRandomMusicIfReady() { ++ public void addCaveMusic(String name, File file) { ++ this.soundPoolCaveMusic.addSound(name, file); ++ } ++ ++ public void addTitleMusic(String name, File file) { ++ this.soundPoolTitleMusic.addSound(name, file); ++ } ++ ++ public void tickMusic() { + if(loaded && this.options.musicVolume != 0.0F) { + if(!sndSystem.playing("BgMusic") && !sndSystem.playing("streaming")) { + if(this.ticksBeforeMusic > 0) { + --this.ticksBeforeMusic; ++ } ++ } ++ if(this.fadeOutTicks > 0) { ++ --this.fadeOutTicks; ++ } ++ } ++ } ++ ++ private void playRandomMusicFromPool(SoundPool soundPool, MusicType type) { ++ if(loaded && this.options.musicVolume != 0.0F) { ++ if(!sndSystem.playing("BgMusic") && !sndSystem.playing("streaming")) { ++ if(this.ticksBeforeMusic > 0) { + return; + } + +- SoundPoolEntry soundPoolEntry1 = this.soundPoolMusic.getRandomSound(); ++ SoundPoolEntry soundPoolEntry1 = soundPool.getRandomSound(); + if(soundPoolEntry1 != null) { +- this.ticksBeforeMusic = this.rand.nextInt(24000) + 24000; ++ this.ticksBeforeMusic = (int) ((this.rand.nextInt(12000) + 12000) * this.options.musicDelay); + sndSystem.backgroundMusic("BgMusic", soundPoolEntry1.soundUrl, soundPoolEntry1.soundName, false); + sndSystem.setVolume("BgMusic", this.options.musicVolume); + sndSystem.play("BgMusic"); ++ this.musicType = type; + } + } +- +- } ++ } ++ } ++ ++ public void playRandomMusicIfReady() { ++ playRandomMusicFromPool(this.soundPoolMusic, MusicType.NORMAL); ++ } ++ ++ public void playRandomCaveMusicIfReady() { ++ playRandomMusicFromPool(this.soundPoolCaveMusic, MusicType.CAVE); ++ } ++ ++ public void playRandomTitleMusicIfReady() { ++ playRandomMusicFromPool(this.soundPoolTitleMusic, MusicType.TITLE); ++ this.ticksBeforeMusic = 0; ++ } ++ ++ public void fadeOutBackgroundMusic() { ++ if (fadeOutTicks > 0 || !sndSystem.playing("BgMusic") || this.musicType == MusicType.TITLE) { ++ return; ++ } ++ sndSystem.fadeOut("BgMusic", null, 2500); ++ this.ticksBeforeMusic = 0; ++ this.fadeOutTicks = 60; ++ } ++ ++ public void fadeOutTitleMusic() { ++ if (fadeOutTicks > 0 || !sndSystem.playing("BgMusic") || this.musicType != MusicType.TITLE) { ++ return; ++ } ++ sndSystem.fadeOut("BgMusic", null, 2500); ++ this.ticksBeforeMusic = 0; ++ this.fadeOutTicks = 60; ++ } ++ ++ public void stopBackgroundMusic() { ++ if (!sndSystem.playing("BgMusic") || this.musicType == MusicType.TITLE) { ++ return; ++ } ++ sndSystem.stop("BgMusic"); ++ this.ticksBeforeMusic = 0; ++ this.fadeOutTicks = 0; + } + + public void setListener(EntityLiving listener, float partialTick) { diff --git a/patches_merged/net/minecraft/src/ThreadDownloadResources.java.patch b/patches_merged/net/minecraft/src/ThreadDownloadResources.java.patch new file mode 100644 index 0000000..c6348cd --- /dev/null +++ b/patches_merged/net/minecraft/src/ThreadDownloadResources.java.patch @@ -0,0 +1,50 @@ +--- a/net/minecraft/src/ThreadDownloadResources.java ++++ b/net/minecraft/src/ThreadDownloadResources.java +@@ -1,11 +1,8 @@ + package net.minecraft.src; + +-import java.io.DataInputStream; +-import java.io.DataOutputStream; +-import java.io.File; +-import java.io.FileOutputStream; +-import java.io.IOException; ++import java.io.*; + import java.net.URL; ++import java.nio.file.*; + import javax.xml.parsers.DocumentBuilder; + import javax.xml.parsers.DocumentBuilderFactory; + +@@ -55,11 +52,33 @@ + } + } + } ++ ++ InputStream customResStream = this.getClass().getResourceAsStream("/customres.txt"); ++ assert customResStream != null; ++ BufferedReader customResReader = new BufferedReader(new InputStreamReader(customResStream)); ++ String customResLine; ++ ++ while ((customResLine = customResReader.readLine()) != null) { ++ this.unpackCustomResource(customResLine); ++ } ++ ++ this.loadResource(this.resourcesFolder, ""); + } catch (Exception exception13) { + this.loadResource(this.resourcesFolder, ""); + exception13.printStackTrace(); + } ++ } + ++ private void unpackCustomResource(String path) throws IOException { ++ if (!path.equals("")) { ++ InputStream resStream = this.getClass().getResourceAsStream(path); ++ if (resStream == null) { ++ throw new IOException("Resource " + path + " is invalid."); ++ } ++ File res = new File(System.getProperty("user.dir") + path); ++ res.mkdirs(); ++ Files.copy(resStream, Paths.get(System.getProperty("user.dir") + path), StandardCopyOption.REPLACE_EXISTING); ++ } + } + + public void reloadResources() { diff --git a/patches_merged/net/minecraft/src/TileEntity.java.patch b/patches_merged/net/minecraft/src/TileEntity.java.patch new file mode 100644 index 0000000..87dab97 --- /dev/null +++ b/patches_merged/net/minecraft/src/TileEntity.java.patch @@ -0,0 +1,17 @@ +--- a/net/minecraft/src/TileEntity.java ++++ b/net/minecraft/src/TileEntity.java +@@ -1,5 +1,7 @@ + package net.minecraft.src; + ++import io.github.bluestaggo.mcdiverge.TileEntityRefabricator; ++ + import java.util.HashMap; + import java.util.Map; + +@@ -86,5 +88,6 @@ + addMapping(TileEntityChest.class, "Chest"); + addMapping(TileEntitySign.class, "Sign"); + addMapping(TileEntityMobSpawner.class, "MobSpawner"); ++ addMapping(TileEntityRefabricator.class, "Refabricator"); + } + } diff --git a/patches_merged/net/minecraft/src/TileEntityFurnace.java.patch b/patches_merged/net/minecraft/src/TileEntityFurnace.java.patch new file mode 100644 index 0000000..a63c1a9 --- /dev/null +++ b/patches_merged/net/minecraft/src/TileEntityFurnace.java.patch @@ -0,0 +1,193 @@ +--- a/net/minecraft/src/TileEntityFurnace.java ++++ b/net/minecraft/src/TileEntityFurnace.java +@@ -1,10 +1,27 @@ + package net.minecraft.src; + ++import io.github.bluestaggo.mcdiverge.FurnaceRecipeManager; ++ + public class TileEntityFurnace extends TileEntity implements IInventory { + private ItemStack[] furnaceItemStacks = new ItemStack[3]; + private int furnaceBurnTime = 0; + private int currentItemBurnTime = 0; + private int furnaceCookTime = 0; ++ private int furnaceMaxTime; ++ private int furnaceBurnTick; ++ ++ public TileEntityFurnace() { ++ this(200, 1); ++ } ++ ++ public TileEntityFurnace(int speed) { ++ this(speed, 1); ++ } ++ ++ public TileEntityFurnace(int speed, int burnTick) { ++ this.furnaceMaxTime = speed; ++ this.furnaceBurnTick = burnTick; ++ } + + public int getSizeInventory() { + return this.furnaceItemStacks.length; +@@ -20,15 +37,13 @@ + if(this.furnaceItemStacks[slot].stackSize <= stackSize) { + itemStack3 = this.furnaceItemStacks[slot]; + this.furnaceItemStacks[slot] = null; +- return itemStack3; + } else { + itemStack3 = this.furnaceItemStacks[slot].splitStack(stackSize); + if(this.furnaceItemStacks[slot].stackSize == 0) { + this.furnaceItemStacks[slot] = null; + } +- +- return itemStack3; + } ++ return itemStack3; + } else { + return null; + } +@@ -39,11 +54,10 @@ + if(itemStack != null && itemStack.stackSize > this.getInventoryStackLimit()) { + itemStack.stackSize = this.getInventoryStackLimit(); + } +- + } + + public String getInvName() { +- return "Chest"; ++ return "Furnace"; + } + + public void readFromNBT(NBTTagCompound compoundTag) { +@@ -60,14 +74,18 @@ + } + + this.furnaceBurnTime = compoundTag.getShort("BurnTime"); ++ this.furnaceBurnTick = compoundTag.getShort("BurnTick"); + this.furnaceCookTime = compoundTag.getShort("CookTime"); ++ this.furnaceMaxTime = compoundTag.getShort("MaxTime"); + this.currentItemBurnTime = this.getItemBurnTime(this.furnaceItemStacks[1]); + } + + public void writeToNBT(NBTTagCompound compoundTag) { + super.writeToNBT(compoundTag); +- compoundTag.setShort("BurnTime", (short)this.furnaceBurnTime); +- compoundTag.setShort("CookTime", (short)this.furnaceCookTime); ++ compoundTag.setShort("BurnTime", (short) this.furnaceBurnTime); ++ compoundTag.setShort("BurnTick", (short) this.furnaceBurnTick); ++ compoundTag.setShort("CookTime", (short) this.furnaceCookTime); ++ compoundTag.setShort("MaxTime", (short) this.furnaceMaxTime); + NBTTagList nBTTagList2 = new NBTTagList(); + + for(int i3 = 0; i3 < this.furnaceItemStacks.length; ++i3) { +@@ -87,12 +105,12 @@ + } + + public int getCookProgressScaled(int scale) { +- return this.furnaceCookTime * scale / 200; ++ return this.furnaceCookTime * scale / this.furnaceMaxTime; + } + + public int getBurnTimeRemainingScaled(int scale) { +- if(this.currentItemBurnTime == 0) { +- this.currentItemBurnTime = 200; ++ if (this.currentItemBurnTime == 0) { ++ this.currentItemBurnTime = this.furnaceMaxTime; + } + + return this.furnaceBurnTime * scale / this.currentItemBurnTime; +@@ -106,7 +124,7 @@ + boolean z1 = this.furnaceBurnTime > 0; + boolean z2 = false; + if(this.furnaceBurnTime > 0) { +- --this.furnaceBurnTime; ++ this.furnaceBurnTime -= this.furnaceBurnTick; + } + + if(!this.worldObj.multiplayerWorld) { +@@ -125,7 +143,7 @@ + + if(this.isBurning() && this.canSmelt()) { + ++this.furnaceCookTime; +- if(this.furnaceCookTime == 200) { ++ if(this.furnaceCookTime == this.furnaceMaxTime) { + this.furnaceCookTime = 0; + this.smeltItem(); + z2 = true; +@@ -136,7 +154,7 @@ + + if(z1 != this.furnaceBurnTime > 0) { + z2 = true; +- BlockFurnace.updateFurnaceBlockState(this.furnaceBurnTime > 0, this.worldObj, this.xCoord, this.yCoord, this.zCoord); ++ ((BlockFurnace) this.getBlockType()).updateFurnaceBlockState(this.furnaceBurnTime > 0, this.worldObj, this.xCoord, this.yCoord, this.zCoord); + } + } + +@@ -149,18 +167,25 @@ + private boolean canSmelt() { + if(this.furnaceItemStacks[0] == null) { + return false; +- } else { +- int i1 = this.getCookedItem(this.furnaceItemStacks[0].getItem().shiftedIndex); +- return i1 < 0 ? false : (this.furnaceItemStacks[2] == null ? true : (this.furnaceItemStacks[2].itemID != i1 ? false : (this.furnaceItemStacks[2].stackSize < this.getInventoryStackLimit() && this.furnaceItemStacks[2].stackSize < this.furnaceItemStacks[2].getMaxStackSize() ? true : this.furnaceItemStacks[2].stackSize < Item.itemsList[i1].getItemStackLimit()))); + } ++ ItemStack i1 = this.getCookedItem(this.furnaceItemStacks[0]); ++ ItemStack outSlot = this.furnaceItemStacks[2]; ++ return i1 != null ++ && (outSlot == null ++ || (outSlot.itemID == i1.itemID ++ && outSlot.itemMetadata == i1.itemMetadata ++ && outSlot.stackSize < this.getInventoryStackLimit() ++ && outSlot.stackSize < outSlot.getMaxStackSize() ++ && outSlot.stackSize < i1.getMaxStackSize() ) ); + } + + public void smeltItem() { + if(this.canSmelt()) { +- int i1 = this.getCookedItem(this.furnaceItemStacks[0].getItem().shiftedIndex); ++ ItemStack i1 = this.getCookedItem(this.furnaceItemStacks[0]); + if(this.furnaceItemStacks[2] == null) { +- this.furnaceItemStacks[2] = new ItemStack(i1, 1); +- } else if(this.furnaceItemStacks[2].itemID == i1) { ++ this.furnaceItemStacks[2] = new ItemStack(i1.itemID, 1).withMetadata(i1.itemMetadata); ++ } else if(this.furnaceItemStacks[2].itemID == i1.itemID ++ && this.furnaceItemStacks[2].itemMetadata == i1.itemMetadata) { + ++this.furnaceItemStacks[2].stackSize; + } + +@@ -168,12 +193,19 @@ + if(this.furnaceItemStacks[0].stackSize <= 0) { + this.furnaceItemStacks[0] = null; + } +- + } + } + +- private int getCookedItem(int id) { +- return id == Block.oreIron.blockID ? Item.ingotIron.shiftedIndex : (id == Block.oreGold.blockID ? Item.ingotGold.shiftedIndex : (id == Block.oreDiamond.blockID ? Item.diamond.shiftedIndex : (id == Block.sand.blockID ? Block.glass.blockID : (id == Item.porkRaw.shiftedIndex ? Item.porkCooked.shiftedIndex : (id == Block.cobblestone.blockID ? Block.stone.blockID : (id == Item.clay.shiftedIndex ? Item.brick.shiftedIndex : -1)))))); ++ private ItemStack getCookedItem(ItemStack input) { ++ return FurnaceRecipeManager.getInstance().findMatchingRecipe(input); ++// return id == Block.oreIron.blockID ? Item.ingotIron.shiftedIndex ++// : (id == Block.oreGold.blockID ? Item.ingotGold.shiftedIndex ++// : (id == Block.oreDiamond.blockID ? Item.diamond.shiftedIndex ++// : (id == Block.sand.blockID ? Block.glass.blockID ++// : (id == Item.porkRaw.shiftedIndex ? Item.porkCooked.shiftedIndex ++// : (id == Block.cobblestone.blockID ? Block.stone.blockID ++// : (id == Item.clay.shiftedIndex ? Item.brick.shiftedIndex ++// : -1)))))); + } + + private int getItemBurnTime(ItemStack itemStack) { +@@ -181,7 +213,12 @@ + return 0; + } else { + int i2 = itemStack.getItem().shiftedIndex; +- return i2 < 256 && Block.blocksList[i2].material == Material.wood ? 300 : (i2 == Item.stick.shiftedIndex ? 100 : (i2 == Item.coal.shiftedIndex ? 1600 : (i2 == Item.bucketLava.shiftedIndex ? 20000 : 0))); ++ return i2 < 256 && Block.blocksList[i2].material == Material.wood ? 300 ++ : i2 == Item.stick.shiftedIndex ? 100 ++ : i2 == Item.coal.shiftedIndex ? 1600 ++ : i2 == Item.bucketLava.shiftedIndex ? 20000 ++ : i2 == Item.starDust.shiftedIndex ? 6400 ++ : 0; + } + } + } diff --git a/patches_merged/net/minecraft/src/World.java.patch b/patches_merged/net/minecraft/src/World.java.patch new file mode 100644 index 0000000..965b856 --- /dev/null +++ b/patches_merged/net/minecraft/src/World.java.patch @@ -0,0 +1,204 @@ +--- a/net/minecraft/src/World.java ++++ b/net/minecraft/src/World.java +@@ -1,5 +1,8 @@ + package net.minecraft.src; + ++import io.github.bluestaggo.mcdiverge.CreateWorldInfo; ++import net.minecraft.client.Minecraft; ++ + import java.io.DataInputStream; + import java.io.DataOutputStream; + import java.io.File; +@@ -54,6 +57,9 @@ + private int soundCounter; + private List entitiesWithinAABBExcludingEntity; + public boolean multiplayerWorld; ++ public String displayName; ++ public boolean creative; ++ public int starfallChance; + + public static NBTTagCompound getLevelData(File file, String world) { + File file2 = new File(file, "saves"); +@@ -97,7 +103,7 @@ + } + + public World(File file, String name) { +- this(file, name, (new Random()).nextLong()); ++ this(file, name, (new Random()).nextLong(), null); + } + + public World(String name) { +@@ -130,11 +136,12 @@ + this.entitiesWithinAABBExcludingEntity = new ArrayList(); + this.multiplayerWorld = false; + this.levelName = name; ++ this.displayName = name; + this.chunkProvider = this.getChunkProvider(this.saveDirectory); + this.calculateInitialSkylight(); + } + +- public World(File file, String name, long seed) { ++ public World(File file, String name, long seed, CreateWorldInfo info) { + this.lightingToUpdate = new ArrayList(); + this.loadedEntityList = new ArrayList(); + this.unloadedEntityList = new ArrayList(); +@@ -164,6 +171,7 @@ + this.entitiesWithinAABBExcludingEntity = new ArrayList(); + this.multiplayerWorld = false; + this.levelName = name; ++ this.displayName = name; + file.mkdirs(); + this.saveDirectory = new File(file, name); + this.saveDirectory.mkdirs(); +@@ -182,6 +190,8 @@ + throw new RuntimeException("Failed to check session lock, aborting"); + } + ++ boolean z15 = false; ++ + file5 = new File(this.saveDirectory, "level.dat"); + this.isNewWorld = !file5.exists(); + if(file5.exists()) { +@@ -195,6 +205,12 @@ + this.worldTime = nBTTagCompound7.getLong("Time"); + this.sizeOnDisk = nBTTagCompound7.getLong("SizeOnDisk"); + this.snowCovered = nBTTagCompound7.getBoolean("SnowCovered"); ++ this.displayName = nBTTagCompound7.getString("DisplayName"); ++ this.creative = nBTTagCompound7.getBoolean("Creative"); ++ this.starfallChance = nBTTagCompound7.getInteger("StarfallChance"); ++ if(this.displayName.isEmpty()) { ++ this.displayName = name; ++ } + if(nBTTagCompound7.hasKey("Player")) { + this.nbtCompoundPlayer = nBTTagCompound7.getCompoundTag("Player"); + } +@@ -202,10 +218,11 @@ + exception11.printStackTrace(); + } + } else { +- this.snowCovered = this.rand.nextInt(4) == 0; ++// this.snowCovered = this.rand.nextInt(4) == 0; ++ this.applyCreationInfo(info); ++ z15 = true; + } + +- boolean z15 = false; + if(this.randomSeed == 0L) { + this.randomSeed = seed; + z15 = true; +@@ -295,6 +312,9 @@ + nBTTagCompound1.setLong("Time", this.worldTime); + nBTTagCompound1.setLong("SizeOnDisk", this.sizeOnDisk); + nBTTagCompound1.setBoolean("SnowCovered", this.snowCovered); ++ nBTTagCompound1.setString("DisplayName", this.displayName); ++ nBTTagCompound1.setBoolean("Creative", this.creative); ++ nBTTagCompound1.setInteger("StarfallChance", this.starfallChance); + nBTTagCompound1.setLong("LastPlayed", System.currentTimeMillis()); + EntityPlayer entityPlayer2 = null; + if(this.playerEntities.size() > 0) { +@@ -543,7 +563,8 @@ + int i5; + if(update) { + i5 = this.getBlockId(x, y, z); +- if(i5 == Block.stairSingle.blockID || i5 == Block.tilledField.blockID) { ++ Block b = Block.blocksList[i5]; ++ if((b instanceof BlockStep && !((BlockStep) b).blockType) || i5 == Block.tilledField.blockID) { + int i6 = this.getBlockLightValue_do(x, y + 1, z, false); + int i7 = this.getBlockLightValue_do(x + 1, y, z, false); + int i8 = this.getBlockLightValue_do(x - 1, y, z, false); +@@ -838,9 +859,9 @@ + + } + +- public void playRecord(String record, int x, int y, int z) { ++ public void playRecord(String record, int x, int y, int z, String author) { + for(int i5 = 0; i5 < this.worldAccesses.size(); ++i5) { +- ((IWorldAccess)this.worldAccesses.get(i5)).playRecord(record, x, y, z); ++ ((IWorldAccess)this.worldAccesses.get(i5)).playRecord(record, x, y, z, author); + } + + } +@@ -1501,11 +1522,11 @@ + } + + this.lightingToUpdate.add(new MetadataChunkBlock(skyBlock, minX, minY, minZ, maxX, maxY, maxZ)); +- if(this.lightingToUpdate.size() > 100000) { +- while(this.lightingToUpdate.size() > 50000) { +- this.updatingLighting(); +- } +- } ++// if(this.lightingToUpdate.size() > 100000) { ++// while(this.lightingToUpdate.size() > 50000) { ++// this.updatingLighting(); ++// } ++// } + + } + } +@@ -1534,6 +1555,7 @@ + this.saveWorld(false, (IProgressUpdate)null); + } + ++ this.miscUpdates(); + this.tickUpdates(false); + this.updateBlocksAndPlayCaveSounds(); + } +@@ -1572,7 +1594,7 @@ + int i8; + int i9; + int i10; +- if(this.soundCounter == 0) { ++ if(Minecraft.getOptions().caveSounds && this.soundCounter == 0) { + this.updateLCG = this.updateLCG * 3 + this.DIST_HASH_MAGIC; + i6 = this.updateLCG >> 2; + i7 = i6 & 15; +@@ -1970,6 +1992,42 @@ + + } + ++ public void applyCreationInfo(CreateWorldInfo info) { ++ this.displayName = info.name; ++ this.randomSeed = info.seed; ++ this.snowCovered = info.snowy; ++ this.creative = info.creative; ++ } ++ ++ public boolean hasSolidCeiling(int x, int y, int z) { ++ for (; y < 128; y++) { ++ if (this.getBlockMaterial(x, y, z).isSolid()) { ++ return true; ++ } ++ } ++ return false; ++ } ++ ++ public void miscUpdates() { ++ if (this.worldTime % 24000 >= 13000 && this.worldTime % 24000 < 23000) { ++ for (EntityPlayer player : (List)this.playerEntities) { ++ if (rand.nextInt(this.starfallChance) != 0) continue; ++ ++ EntityItem star = new EntityItem( ++ this, ++ player.posX + (rand.nextDouble() * 512.0 - 256.0), ++ 200, ++ player.posZ + (rand.nextDouble() * 512.0 - 256.0), ++ new ItemStack(Item.starChunk) ++ ); ++ this.spawnEntityInWorld(star); ++ star.age = 6000 - (23000 - ((int) this.worldTime % 24000)); ++ } ++ } else if (this.worldTime % 24000 < 13000) { ++ this.starfallChance = rand.nextInt(750) + 250; ++ } ++ } ++ + static { + float f0 = 0.05F; + +@@ -1977,6 +2035,5 @@ + float f2 = 1.0F - (float)i1 / 15.0F; + lightBrightnessTable[i1] = (1.0F - f2) / (f2 * 3.0F + 1.0F) * (1.0F - f0) + f0; + } +- + } + } diff --git a/patches_merged/net/minecraft/src/WorldGenDungeons.java.patch b/patches_merged/net/minecraft/src/WorldGenDungeons.java.patch new file mode 100644 index 0000000..724043b --- /dev/null +++ b/patches_merged/net/minecraft/src/WorldGenDungeons.java.patch @@ -0,0 +1,223 @@ +--- a/net/minecraft/src/WorldGenDungeons.java ++++ b/net/minecraft/src/WorldGenDungeons.java +@@ -3,47 +3,64 @@ + import java.util.Random; + + public class WorldGenDungeons extends WorldGenerator { +- public boolean generate(World world1, Random random2, int i3, int i4, int i5) { +- byte b6 = 3; +- int i7 = random2.nextInt(2) + 2; +- int i8 = random2.nextInt(2) + 2; ++ public boolean generate(World world1, Random random2, int spawnX, int spawnY, int spawnZ) { ++ // Variables ++ byte height = 3; ++ int width = random2.nextInt(4) + 2; ++ int depth = random2.nextInt(4) + 2; + int i9 = 0; + +- int i10; +- int i11; +- int i12; +- for(i10 = i3 - i7 - 1; i10 <= i3 + i7 + 1; ++i10) { +- for(i11 = i4 - 1; i11 <= i4 + b6 + 1; ++i11) { +- for(i12 = i5 - i8 - 1; i12 <= i5 + i8 + 1; ++i12) { +- Material material13 = world1.getBlockMaterial(i10, i11, i12); +- if(i11 == i4 - 1 && !material13.isSolid()) { +- return false; +- } +- +- if(i11 == i4 + b6 + 1 && !material13.isSolid()) { +- return false; +- } +- +- if((i10 == i3 - i7 - 1 || i10 == i3 + i7 + 1 || i12 == i5 - i8 - 1 || i12 == i5 + i8 + 1) && i11 == i4 && world1.getBlockId(i10, i11, i12) == 0 && world1.getBlockId(i10, i11 + 1, i12) == 0) { +- ++i9; ++ int x; ++ int y; ++ int z; ++ ++ // Check for space ++ for(x = spawnX - width - 1; x <= spawnX + width + 1; ++x) { ++ for(y = spawnY - 1; y <= spawnY + height + 1; ++y) { ++ for(z = spawnZ - depth - 1; z <= spawnZ + depth + 1; ++z) { ++ Material material13 = world1.getBlockMaterial(x, y, z); ++ if(y == spawnY - 1 && !material13.isSolid()) { ++// return false; ++ } ++ ++ if(y == spawnY + height + 1 && !material13.isSolid()) { ++// return false; ++ } ++ ++ if( ++ (x == spawnX - width - 1 ++ || x == spawnX + width + 1 ++ || z == spawnZ - depth - 1 ++ || z == spawnZ + depth + 1) ++ && y == spawnY && world1.getBlockId(x, y, z) == 0 ++ && world1.getBlockId(x, y + 1, z) == 0) { ++ ++i9; // Suitable entrance found + } + } + } + } + + if(i9 >= 1 && i9 <= 5) { +- for(i10 = i3 - i7 - 1; i10 <= i3 + i7 + 1; ++i10) { +- for(i11 = i4 + b6; i11 >= i4 - 1; --i11) { +- for(i12 = i5 - i8 - 1; i12 <= i5 + i8 + 1; ++i12) { +- if(i10 != i3 - i7 - 1 && i11 != i4 - 1 && i12 != i5 - i8 - 1 && i10 != i3 + i7 + 1 && i11 != i4 + b6 + 1 && i12 != i5 + i8 + 1) { +- world1.setBlockWithNotify(i10, i11, i12, 0); +- } else if(i11 >= 0 && !world1.getBlockMaterial(i10, i11 - 1, i12).isSolid()) { +- world1.setBlockWithNotify(i10, i11, i12, 0); +- } else if(world1.getBlockMaterial(i10, i11, i12).isSolid()) { +- if(i11 == i4 - 1 && random2.nextInt(4) != 0) { +- world1.setBlockWithNotify(i10, i11, i12, Block.cobblestoneMossy.blockID); ++ // Walls + floor ++ for(x = spawnX - width - 1; x <= spawnX + width + 1; ++x) { ++ for(y = spawnY + height; y >= spawnY - 1; --y) { ++ for(z = spawnZ - depth - 1; z <= spawnZ + depth + 1; ++z) { ++ if(x != spawnX - width - 1 ++ && y != spawnY - 1 ++ && z != spawnZ - depth - 1 ++ && x != spawnX + width + 1 ++ && y != spawnY + height + 1 ++ && z != spawnZ + depth + 1) { ++ world1.setBlockWithNotify(x, y, z, 0); ++ } else if(y >= 0 && !world1.getBlockMaterial(x, y - 1, z).isSolid()) { ++ world1.setBlockWithNotify(x, y, z, 0); ++ } else if(world1.getBlockMaterial(x, y, z).isSolid() ++ || y == spawnY + height + 1 ++ || y == spawnY - 1) { ++ if(y == spawnY - 1 && random2.nextInt(4) != 0) { ++ world1.setBlockWithNotify(x, y, z, Block.cobblestoneMossy.blockID); + } else { +- world1.setBlockWithNotify(i10, i11, i12, Block.cobblestone.blockID); ++ world1.setBlockWithNotify(x, y, z, Block.cobblestone.blockID); + } + } + } +@@ -51,35 +68,35 @@ + } + + label110: +- for(i10 = 0; i10 < 2; ++i10) { +- for(i11 = 0; i11 < 3; ++i11) { +- i12 = i3 + random2.nextInt(i7 * 2 + 1) - i7; +- int i14 = i5 + random2.nextInt(i8 * 2 + 1) - i8; +- if(world1.getBlockId(i12, i4, i14) == 0) { ++ for(x = 0; x < 4; ++x) { ++ for(y = 0; y < 4; ++y) { ++ z = spawnX + random2.nextInt(width * 2 + 1) - width; ++ int i14 = spawnZ + random2.nextInt(depth * 2 + 1) - depth; ++ if(world1.getBlockId(z, spawnY, i14) == 0) { + int i15 = 0; +- if(world1.getBlockMaterial(i12 - 1, i4, i14).isSolid()) { +- ++i15; +- } +- +- if(world1.getBlockMaterial(i12 + 1, i4, i14).isSolid()) { +- ++i15; +- } +- +- if(world1.getBlockMaterial(i12, i4, i14 - 1).isSolid()) { +- ++i15; +- } +- +- if(world1.getBlockMaterial(i12, i4, i14 + 1).isSolid()) { ++ if(world1.getBlockMaterial(z - 1, spawnY, i14).isSolid()) { ++ ++i15; ++ } ++ ++ if(world1.getBlockMaterial(z + 1, spawnY, i14).isSolid()) { ++ ++i15; ++ } ++ ++ if(world1.getBlockMaterial(z, spawnY, i14 - 1).isSolid()) { ++ ++i15; ++ } ++ ++ if(world1.getBlockMaterial(z, spawnY, i14 + 1).isSolid()) { + ++i15; + } + + if(i15 == 1) { +- world1.setBlockWithNotify(i12, i4, i14, Block.chest.blockID); +- TileEntityChest tileEntityChest16 = (TileEntityChest)world1.getBlockTileEntity(i12, i4, i14); ++ world1.setBlockWithNotify(z, spawnY, i14, Block.chest.blockID); ++ TileEntityChest tileEntityChest16 = (TileEntityChest)world1.getBlockTileEntity(z, spawnY, i14); + int i17 = 0; + + while(true) { +- if(i17 >= 8) { ++ if(i17 >= 16) { + continue label110; + } + +@@ -95,18 +112,61 @@ + } + } + +- world1.setBlockWithNotify(i3, i4, i5, Block.mobSpawner.blockID); +- TileEntityMobSpawner tileEntityMobSpawner19 = (TileEntityMobSpawner)world1.getBlockTileEntity(i3, i4, i5); +- tileEntityMobSpawner19.mobID = this.pickMobSpawner(random2); ++ int spawners = random2.nextInt(2) + 1; ++ int spx; ++ int spz; ++ for (int spi = 0; spi < spawners; spi++) { ++ do { ++ spx = spawnX + random2.nextInt(width * 2 + 1) - width; ++ spz = spawnZ + random2.nextInt(depth * 2 + 1) - depth; ++ } while (world1.getBlockId(spx, spawnY, spz) == Block.chest.blockID); ++ world1.setBlockWithNotify(spx, spawnY, spz, Block.mobSpawner.blockID); ++ TileEntityMobSpawner tileEntityMobSpawner19 = (TileEntityMobSpawner)world1.getBlockTileEntity(spx, spawnY, spz); ++ tileEntityMobSpawner19.mobID = this.pickMobSpawner(random2); ++ } + return true; + } else { + return false; + } + } + ++ private static final Item[] charms = new Item[] { ++ Item.quiver, ++ Item.wardingRing, ++ Item.repairKit, ++ Item.slimeShoes ++ }; ++ + private ItemStack pickCheckLootItem(Random random1) { +- int i2 = random1.nextInt(11); +- return i2 == 0 ? new ItemStack(Item.saddle) : (i2 == 1 ? new ItemStack(Item.ingotIron, random1.nextInt(4) + 1) : (i2 == 2 ? new ItemStack(Item.bread) : (i2 == 3 ? new ItemStack(Item.wheat, random1.nextInt(4) + 1) : (i2 == 4 ? new ItemStack(Item.gunpowder, random1.nextInt(4) + 1) : (i2 == 5 ? new ItemStack(Item.silk, random1.nextInt(4) + 1) : (i2 == 6 ? new ItemStack(Item.bucketEmpty) : (i2 == 7 && random1.nextInt(100) == 0 ? new ItemStack(Item.appleGold) : (i2 == 8 && random1.nextInt(2) == 0 ? new ItemStack(Item.redstone, random1.nextInt(4) + 1) : (i2 == 9 && random1.nextInt(10) == 0 ? new ItemStack(Item.itemsList[Item.record13.shiftedIndex + random1.nextInt(2)]) : null))))))))); ++ int i2 = random1.nextInt(13); ++ switch (i2) { ++ case 0: return new ItemStack(Item.silk); ++ case 1: return new ItemStack(Item.ingotIron, random1.nextInt(3) + 1); ++ case 2: return new ItemStack(Item.bread); ++ case 3: return new ItemStack(Item.wheat, random1.nextInt(3) + 1); ++ case 4: return new ItemStack(Item.gunpowder, random1.nextInt(3) + 1); ++ case 5: return new ItemStack(Item.silk, random1.nextInt(3) + 1); ++ case 6: return new ItemStack(Item.bucketEmpty); ++ } ++ if (i2 == 7 && random1.nextInt(100) == 0) { ++ return new ItemStack(Item.appleGold); ++ } ++ if (i2 == 8 && random1.nextInt(2) == 0) { ++ return new ItemStack(Item.redstone, random1.nextInt(3) + 1); ++ } ++ if (i2 == 9 && random1.nextInt(10) == 0) { ++ return new ItemStack(Item.itemsList[Item.record13.shiftedIndex + random1.nextInt(3)]); ++ } ++ if (i2 == 10 && random1.nextInt(20) == 0) { ++ return new ItemStack(Item.diamond, random1.nextInt(3) + 1); ++ } ++ if (i2 == 11 && random1.nextInt(10) == 0) { ++ return new ItemStack(Item.saddle); ++ } ++ if (i2 == 12 && random1.nextInt(50) == 0) { ++ return new ItemStack(charms[random1.nextInt(charms.length)]); ++ } ++ return null; + } + + private String pickMobSpawner(Random random1) { diff --git a/patches_merged/net/minecraft/src/WorldGenMinable.java.patch b/patches_merged/net/minecraft/src/WorldGenMinable.java.patch new file mode 100644 index 0000000..a7c101f --- /dev/null +++ b/patches_merged/net/minecraft/src/WorldGenMinable.java.patch @@ -0,0 +1,43 @@ +--- a/net/minecraft/src/WorldGenMinable.java ++++ b/net/minecraft/src/WorldGenMinable.java +@@ -3,12 +3,24 @@ + import java.util.Random; + + public class WorldGenMinable extends WorldGenerator { +- private int minableBlockId; +- private int numberOfBlocks; ++ private final int minableBlockId; ++ private final int numberOfBlocks; ++ private final int metadata; ++ private int slateMetadata; + + public WorldGenMinable(int i1, int i2) { ++ this(i1, i2, 0); ++ } ++ ++ public WorldGenMinable(int i1, int i2, int i3) { + this.minableBlockId = i1; + this.numberOfBlocks = i2; ++ this.metadata = this.slateMetadata = i3; ++ } ++ ++ public WorldGenMinable withSlateMetadata(int i1) { ++ this.slateMetadata = i1; ++ return this; + } + + public boolean generate(World world1, Random random2, int i3, int i4, int i5) { +@@ -35,7 +47,13 @@ + double d37 = ((double)i33 + 0.5D - d22) / (d30 / 2.0D); + double d39 = ((double)i34 + 0.5D - d24) / (d28 / 2.0D); + if(d35 * d35 + d37 * d37 + d39 * d39 < 1.0D && world1.getBlockId(i32, i33, i34) == Block.stone.blockID) { ++ boolean isSlate = world1.getBlockMetadata(i32, i33, i34) == 2; + world1.setBlock(i32, i33, i34, this.minableBlockId); ++ if (isSlate) { ++ world1.setBlockMetadata(i32, i33, i34, this.slateMetadata); ++ } else { ++ world1.setBlockMetadata(i32, i33, i34, this.metadata); ++ } + } + } + } diff --git a/patches_merged/net/minecraft/src/WorldManager.java.patch b/patches_merged/net/minecraft/src/WorldManager.java.patch new file mode 100644 index 0000000..1b16207 --- /dev/null +++ b/patches_merged/net/minecraft/src/WorldManager.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/src/WorldManager.java ++++ b/net/minecraft/src/WorldManager.java +@@ -33,7 +33,7 @@ + this.mcServer.configManager.markBlockNeedsUpdate(x, y, z); + } + +- public void playRecord(String name, int x, int y, int z) { ++ public void playRecord(String name, int x, int y, int z, String author) { + } + + public void doNothingWithTileEntity(int x, int y, int z, TileEntity tileEntity) { diff --git a/patches_merged/net/minecraft/src/WorldServer.java.patch b/patches_merged/net/minecraft/src/WorldServer.java.patch new file mode 100644 index 0000000..558a1b2 --- /dev/null +++ b/patches_merged/net/minecraft/src/WorldServer.java.patch @@ -0,0 +1,23 @@ +--- a/net/minecraft/src/WorldServer.java ++++ b/net/minecraft/src/WorldServer.java +@@ -1,5 +1,7 @@ + package net.minecraft.src; + ++import io.github.bluestaggo.mcdiverge.CreateWorldInfo; ++ + import java.io.File; + import java.util.ArrayList; + import java.util.List; +@@ -13,7 +15,11 @@ + private SpawnerAnimals animalSpawner = new SpawnerAnimals(15, EntityAnimal.class, new Class[]{EntitySheep.class, EntityPig.class, EntityCow.class, EntityChicken.class}); + + public WorldServer(File file1, String string2, boolean z3) { +- super(file1, string2); ++ this(file1, string2, z3, null); ++ } ++ ++ public WorldServer(File file1, String string2, boolean z3, CreateWorldInfo info) { ++ super(file1, string2, 0, info); + this.monsters = z3; + } + diff --git a/patches_merged/title/splashes.txt.patch b/patches_merged/title/splashes.txt.patch new file mode 100644 index 0000000..26a2082 --- /dev/null +++ b/patches_merged/title/splashes.txt.patch @@ -0,0 +1,257 @@ +--- /dev/null ++++ b/title/splashes.txt +@@ -1,0 +1,254 @@ ++Pre-beta! ++As seen on TV! ++Awesome! ++100% pure! ++May contain nuts! ++Better than Prey! ++More polygons! ++Moderately attractive! ++Limited edition! ++Flashing letters! ++Made by Notch! ++Coming soon! ++Best in class! ++When it's finished! ++Absolutely dragon free! ++Excitement! ++More than 500 sold! ++One of a kind! ++Heaps of hits on YouTube! ++Indev! ++Spiders everywhere! ++Check it out! ++Holy cow, man! ++It's a game! ++Made in Sweden! ++Uses LWJGL! ++Reticulating splines! ++Minecraft! ++Yaaay! ++Alpha version! ++Singleplayer! ++Keyboard compatible! ++Undocumented! ++Ingots! ++Exploding creepers! ++That's not a moon! ++l33t! ++Create! ++Survive! ++Dungeon! ++Exclusive! ++The bee's knees! ++Down with O.P.P.! ++Closed source! ++Classy! ++Wow! ++Not on steam! ++9.95 euro! ++Half price! ++Oh man! ++Check it out! ++Awesome community! ++Pixels! ++Teetsuuuuoooo! ++Kaaneeeedaaaa! ++Now with difficulty! ++Enhanced! ++90% bug free! ++Pretty! ++12 herbs and spices! ++Fat free! ++Absolutely no memes! ++Free dental! ++Ask your doctor! ++Minors welcome! ++Cloud computing! ++Legal in Finland! ++Hard to label! ++Technically good! ++Bringing home the bacon! ++Indie! ++GOTY! ++Ceci n'est pas une title screen! ++Euclidian! ++Now in 3D! ++Inspirational! ++Herregud! ++Complex cellular automata! ++Yes, sir! ++Played by cowboys! ++Legacy OpenGL 1.1! ++Thousands of colors! ++Try it! ++Age of Wonders is better! ++Try the mushroom stew! ++Sensational! ++Hot tamale, hot hot tamale! ++Play him off, keyboard cat! ++Guaranteed! ++Macroscopic! ++Bring it on! ++Random splash! ++Call your mother! ++Monster infighting! ++Loved by millions! ++Ultimate edition! ++Freaky! ++You've got a brand new key! ++Water proof! ++Uninflammable! ++Whoa, dude! ++All inclusive! ++Tell your friends! ++NP is not in P! ++Notch <3 ez! ++Music by C418! ++Livestreamed! ++Haunted! ++Polynomial! ++Terrestrial! ++All is full of love! ++Full of stars! ++Scientific! ++Cooler than Spock! ++Collaborate and listen! ++Never dig down! ++Take frequent breaks! ++Not linear! ++Han shot first! ++Nice to meet you! ++Buckets of lava! ++Ride the pig! ++Larger than Earth! ++sqrt(-1) love you! ++Phobos anomaly! ++Punching wood! ++Falling off cliffs! ++0% sugar! ++150% hyperbole! ++Synecdoche! ++Let's danec! ++Seecret Friday update! ++Reference implementation! ++Lewd with two dudes with food! ++Kiss the sky! ++20 GOTO 10! ++Verlet intregration! ++Peter Griffin! ++Do not distribute! ++Cogito ergo sum! ++4815162342 lines of code! ++A skeleton popped out! ++The Work of Notch! ++The sum of its parts! ++BTAF used to be good! ++I miss ADOM! ++umop-apisdn! ++OICU812! ++Bring me Ray Cokes! ++Finger-licking! ++Thematic! ++Pneumatic! ++Sublime! ++Octagonal! ++Une baguette! ++Gargamel plays it! ++Rita is the new top dog! ++SWM forever! ++Representing Edsbyn! ++Matt Damon! ++Superfragilisticexpialidocious! ++Consummate V's! ++Cow Tools! ++Double buffered! ++Fan fiction! ++Flaxkikare! ++Jason! Jason! Jason! ++Hotter than the sun! ++Internet enabled! ++Autonomous! ++Engage! ++Fantasy! ++DRR! DRR! DRR! ++Kick it root down! ++Regional resources! ++Woo, facepunch! ++Woo, somethingawful! ++Woo, /v/! ++Woo, tigsource! ++Woo, minecraftforum! ++Woo, worldofminecraft! ++Google anlyticsed! ++Now supports ! ++Give us Gordon! ++Tip your waiter! ++Very fun! ++12345 is a bad password! ++Vote for net neutrality! ++Lives in a pineapple under the sea! ++MAP11 has two names! ++Omnipotent! ++Gasp! ++...! ++Bees, bees, bees, bees! ++Jag känner en bot! ++This text is hard to read if you play the game at the default resolution, but at 1080p it's fine! ++Haha, LOL! ++Hampsterdance! ++Switches and ores! ++Menger sponge! ++idspispopd! ++Eple (original edit)! ++So fresh, so clean! ++Needs refactoring! ++Plenty of splash's (sic)! ++Touch some grass! ++Spaghetti code! ++3D Terraria! ++Also try Terraria! ++Also try Minecraft! ++Also try NSSS! ++Also try Better than Adventure! ++Also try New Frontier Craft! ++Also try Mango Pack! ++Also try Back in Time! ++Also try Classicube! ++Also try Betacraft! ++Run! ++Modded by BlueStag! ++DOHASDOSHIH! ++Modded in United Kingdom! ++Nobody expects the creeper inquisition! ++Nostalgia! ++The Multiverse of Madness! ++9 + 10 = 21! ++Hardcoded! ++An apple a day keeps the doctor away! ++Made with RetroMCP-Java! ++Unfinished side project! ++E ++This is not an écran titre! ++Bonjour! ++Hello, world! ++infdev 20100923! ++Diverge! ++BOO! ++Surprise! ++Random splashes go! ++254 splashes! ++Woo, reddit! ++Boo, twitter! ++Runs DOOM! ++Better than the Wild Update! ++Covfefe! ++That's a bit sussy! ++Woo, modification station! ++Smash that like button! ++FOSS! ++Not made by Microsoft! ++Golden age! ++Press F to pay respects! ++Long live the Queen! ++A on the tier list! ++Second edition!