From 3e58287efa9d0b343c901926431e0e59bf4d29ea Mon Sep 17 00:00:00 2001 From: Sen Date: Sat, 19 Jul 2025 23:55:20 +0200 Subject: [PATCH] update textures #3 + item code cleanup --- client/src/main/java/client/Client.java | 1 - .../java/client/renderer/EffectRenderer.java | 2 +- .../renderer/blockmodel/ModelBakery.java | 23 +- .../renderer/blockmodel/ModelBlock.java | 12 - .../java/client/renderer/entity/Render.java | 4 - .../client/renderer/entity/RenderItem.java | 2 +- .../client/renderer/layers/LayerArmor.java | 2 +- .../client/renderer/layers/LayerHeldItem.java | 3 +- .../TileEntityItemStackRenderer.java | 13 +- .../tileentity/TileEntitySignRenderer.java | 1 - .../java/client/util/PlayerController.java | 10 +- .../blocks/{carrot_0.png => carrots_0.png} | Bin .../blocks/{carrot_1.png => carrots_1.png} | Bin .../blocks/{carrot_2.png => carrots_2.png} | Bin .../blocks/{carrot_3.png => carrots_3.png} | Bin .../blocks/{potato_0.png => potatoes_0.png} | Bin .../blocks/{potato_1.png => potatoes_1.png} | Bin .../blocks/{potato_2.png => potatoes_2.png} | Bin .../blocks/{potato_3.png => potatoes_3.png} | Bin .../textures/blocks/pumpkin_face_off.png | Bin 240 -> 0 bytes .../textures/blocks/pumpkin_face_on.png | Bin 422 -> 0 bytes .../{soul_wart_0.png => soul_warts_0.png} | Bin .../{soul_wart_1.png => soul_warts_1.png} | Bin .../{soul_wart_2.png => soul_warts_2.png} | Bin .../blocks/{wheat_0.png => wheats_0.png} | Bin .../blocks/{wheat_1.png => wheats_1.png} | Bin .../blocks/{wheat_2.png => wheats_2.png} | Bin .../blocks/{wheat_3.png => wheats_3.png} | Bin .../blocks/{wheat_4.png => wheats_4.png} | Bin .../blocks/{wheat_5.png => wheats_5.png} | Bin .../blocks/{wheat_6.png => wheats_6.png} | Bin .../blocks/{wheat_7.png => wheats_7.png} | Bin .../items/{melon_stem.png => melon_seed.png} | Bin .../{pumpkin_stem.png => pumpkin_seed.png} | Bin .../main/resources/textures/items/wheat.png | Bin 142 -> 283 bytes .../resources/textures/items/wheat_seed.png | Bin 0 -> 142 bytes .../main/resources/textures/items/wheats.png | Bin 283 -> 0 bytes .../java/common/ai/EntityAIShareItems.java | 2 +- common/src/main/java/common/block/Block.java | 114 +- .../src/main/java/common/block/BlockAir.java | 4 +- .../common/block/artificial/BlockBed.java | 75 +- .../common/block/artificial/BlockDoor.java | 81 +- .../common/block/artificial/BlockFence.java | 9 +- .../block/artificial/BlockFloorPortal.java | 4 +- .../block/artificial/BlockFlowerPot.java | 7 +- .../block/artificial/BlockMetalBlock.java | 29 +- .../common/block/artificial/BlockPane.java | 13 +- .../common/block/artificial/BlockPortal.java | 4 +- .../common/block/artificial/BlockSlab.java | 27 +- .../artificial/BlockStainedGlassPane.java | 1 - .../common/block/artificial/BlockWall.java | 9 +- .../common/block/foliage/BlockCarrot.java | 10 +- .../java/common/block/foliage/BlockCrops.java | 14 +- .../block/foliage/BlockDoublePlant.java | 18 +- .../common/block/foliage/BlockLilyPad.java | 46 +- .../java/common/block/foliage/BlockMelon.java | 50 +- .../common/block/foliage/BlockPotato.java | 10 +- .../common/block/foliage/BlockPumpkin.java | 19 +- .../java/common/block/foliage/BlockReed.java | 4 +- .../java/common/block/foliage/BlockStem.java | 223 ++-- .../common/block/foliage/BlockTallGrass.java | 2 +- .../java/common/block/foliage/BlockWart.java | 16 +- .../java/common/block/liquid/BlockLiquid.java | 4 +- .../java/common/block/natural/BlockFire.java | 4 +- .../common/block/natural/BlockMetalOre.java | 29 +- .../java/common/block/natural/BlockSnow.java | 50 +- .../common/block/tech/BlockActiveDisplay.java | 4 +- .../block/tech/BlockBasePressurePlate.java | 8 +- .../java/common/block/tech/BlockButton.java | 7 +- .../java/common/block/tech/BlockCauldron.java | 2 +- .../java/common/block/tech/BlockFurnace.java | 4 +- .../java/common/block/tech/BlockLever.java | 1 - .../java/common/block/tech/BlockLitTorch.java | 4 +- .../java/common/block/tech/BlockNuke.java | 5 +- .../common/block/tech/BlockPistonBase.java | 13 +- .../common/block/tech/BlockPistonHead.java | 4 +- .../main/java/common/block/tech/BlockTNT.java | 19 +- .../block/tech/BlockToggleableLight.java | 4 +- .../java/common/block/tech/BlockTripWire.java | 4 +- .../common/block/tech/BlockTripWireHook.java | 1 - .../java/common/block/tech/BlockWire.java | 4 +- .../common/block/tile/BlockStandingSign.java | 70 +- .../java/common/block/tile/BlockWallSign.java | 4 +- .../java/common/enchantment/Enchantment.java | 2 +- .../common/enchantment/EnchantmentType.java | 6 +- .../java/common/entity/animal/EntityCat.java | 2 +- .../common/entity/animal/EntityChicken.java | 4 +- .../java/common/entity/animal/EntityCow.java | 2 +- .../common/entity/animal/EntityHorse.java | 6 +- .../common/entity/animal/EntityRabbit.java | 2 +- .../common/entity/animal/EntitySheep.java | 2 +- .../java/common/entity/animal/EntityWolf.java | 2 +- .../java/common/entity/npc/EntityMage.java | 2 +- .../java/common/entity/npc/EntityNPC.java | 10 +- .../common/entity/projectile/EntityDie.java | 2 +- .../entity/projectile/EntityPotion.java | 2 +- .../common/entity/types/EntityAnimal.java | 2 +- .../common/entity/types/EntityLiving.java | 2 +- .../main/java/common/init/BlockRegistry.java | 13 +- common/src/main/java/common/init/Blocks.java | 9 +- .../java/common/init/BrewingRegistry.java | 2 +- .../java/common/init/CraftingRegistry.java | 15 +- .../main/java/common/init/ItemRegistry.java | 80 +- common/src/main/java/common/init/Items.java | 1110 ++++++++--------- .../java/common/init/SmeltingRegistry.java | 2 +- .../main/java/common/init/TradeRegistry.java | 2 +- .../inventory/ContainerBrewingStand.java | 4 +- .../common/inventory/ContainerPlayer.java | 2 +- .../common/inventory/InventoryPlayer.java | 2 +- common/src/main/java/common/item/Item.java | 119 +- .../src/main/java/common/item/ItemEffect.java | 9 - .../main/java/common/item/ItemFragile.java | 7 - .../main/java/common/item/ItemMagnetic.java | 7 - .../src/main/java/common/item/ItemStack.java | 2 +- .../main/java/common/item/block/ItemBed.java | 104 -- .../java/common/item/block/ItemBlock.java | 128 -- .../java/common/item/block/ItemButton.java | 20 - .../main/java/common/item/block/ItemDoor.java | 112 -- .../common/item/block/ItemDoublePlant.java | 31 - .../java/common/item/block/ItemFence.java | 43 - .../java/common/item/block/ItemLilyPad.java | 63 - .../common/item/block/ItemMetalBlock.java | 57 - .../main/java/common/item/block/ItemPane.java | 19 - .../java/common/item/block/ItemPiston.java | 23 - .../common/item/block/ItemPressurePlate.java | 22 - .../main/java/common/item/block/ItemSign.java | 92 -- .../main/java/common/item/block/ItemSlab.java | 43 - .../main/java/common/item/block/ItemSnow.java | 64 - .../main/java/common/item/block/ItemTNT.java | 32 - .../main/java/common/item/block/ItemWall.java | 33 - .../{tool => consumable}/ItemAppleGold.java | 9 +- .../{tool => consumable}/ItemBucketMilk.java | 7 +- .../{tool => consumable}/ItemFishFood.java | 6 +- .../item/{tool => consumable}/ItemFood.java | 2 +- .../item/{tool => consumable}/ItemPotion.java | 19 +- .../{block => consumable}/ItemSeedFood.java | 12 +- .../item/{tool => consumable}/ItemSoup.java | 2 +- .../item/{tool => material}/ItemArmor.java | 12 +- .../ItemBottle.java} | 12 +- .../item/{tool => material}/ItemBucket.java | 13 +- .../item/material/ItemEnchantedBook.java | 12 +- .../{tool => material}/ItemHorseArmor.java | 12 +- .../java/common/item/material/ItemMetal.java | 6 +- .../java/common/item/material/ItemRecord.java | 4 +- .../item/{block => material}/ItemSeeds.java | 12 +- .../{tool => projectile}/ItemChargedOrb.java | 7 +- .../item/{tool => projectile}/ItemDie.java | 12 +- .../{tool => projectile}/ItemDynamite.java | 2 +- .../item/{tool => projectile}/ItemEgg.java | 2 +- .../{tool => projectile}/ItemExpBottle.java | 8 +- .../{tool => projectile}/ItemFireball.java | 2 +- .../{tool => projectile}/ItemSnowball.java | 2 +- .../common/item/spawner/ItemCharTemplate.java | 8 +- .../common/item/spawner/ItemMinecart.java | 5 +- .../common/item/spawner/ItemMobTemplate.java | 8 +- .../java/common/item/tool/ItemCamera.java | 5 +- .../java/common/item/tool/ItemEditor.java | 5 +- .../main/java/common/item/tool/ItemFire.java | 5 +- .../main/java/common/item/tool/ItemHoe.java | 6 +- .../main/java/common/item/tool/ItemKey.java | 7 +- .../java/common/item/tool/ItemMagnet.java | 5 +- .../java/common/item/tool/ItemShears.java | 6 +- .../common/item/tool/ItemSpaceNavigator.java | 5 +- .../main/java/common/item/tool/ItemTool.java | 6 +- .../main/java/common/item/tool/ItemWand.java | 5 +- .../common/item/tool/ItemWeatherToken.java | 5 +- .../item/{tool => weapon}/ItemAmmo.java | 7 +- .../item/{tool => weapon}/ItemArrow.java | 2 +- .../item/{tool => weapon}/ItemBanHammer.java | 8 +- .../item/{tool => weapon}/ItemBoltgun.java | 2 +- .../common/item/{tool => weapon}/ItemBow.java | 2 +- .../{tool => weapon}/ItemExterminator.java | 7 +- .../item/{tool => weapon}/ItemGunBase.java | 2 +- .../{tool => weapon}/ItemLauncherBase.java | 2 +- .../{tool => weapon}/ItemRocketLauncher.java | 2 +- .../item/{tool => weapon}/ItemSword.java | 8 +- .../item/{tool => weapon}/ItemTrident.java | 8 +- .../main/java/common/model/ModelProvider.java | 15 - .../tileentity/DeviceEffectGenerator.java | 2 +- .../tileentity/TileEntityBrewingStand.java | 4 +- .../common/tileentity/TileEntityFurnace.java | 17 +- .../server/clipboard/ReorderRegistry.java | 8 +- .../src/main/java/server/world/Converter.java | 83 +- .../main/java/server/world/WorldServer.java | 3 +- .../java/server/worldgen/LootConstants.java | 6 +- .../worldgen/foliage/WorldGenPumpkin.java | 4 +- .../worldgen/structure/StructureBridge.java | 4 +- .../structure/StructureComponent.java | 3 +- .../worldgen/structure/StructureVillage.java | 24 +- 189 files changed, 1649 insertions(+), 2258 deletions(-) rename client/src/main/resources/textures/blocks/{carrot_0.png => carrots_0.png} (100%) rename client/src/main/resources/textures/blocks/{carrot_1.png => carrots_1.png} (100%) rename client/src/main/resources/textures/blocks/{carrot_2.png => carrots_2.png} (100%) rename client/src/main/resources/textures/blocks/{carrot_3.png => carrots_3.png} (100%) rename client/src/main/resources/textures/blocks/{potato_0.png => potatoes_0.png} (100%) rename client/src/main/resources/textures/blocks/{potato_1.png => potatoes_1.png} (100%) rename client/src/main/resources/textures/blocks/{potato_2.png => potatoes_2.png} (100%) rename client/src/main/resources/textures/blocks/{potato_3.png => potatoes_3.png} (100%) delete mode 100755 client/src/main/resources/textures/blocks/pumpkin_face_off.png delete mode 100755 client/src/main/resources/textures/blocks/pumpkin_face_on.png rename client/src/main/resources/textures/blocks/{soul_wart_0.png => soul_warts_0.png} (100%) rename client/src/main/resources/textures/blocks/{soul_wart_1.png => soul_warts_1.png} (100%) rename client/src/main/resources/textures/blocks/{soul_wart_2.png => soul_warts_2.png} (100%) rename client/src/main/resources/textures/blocks/{wheat_0.png => wheats_0.png} (100%) rename client/src/main/resources/textures/blocks/{wheat_1.png => wheats_1.png} (100%) rename client/src/main/resources/textures/blocks/{wheat_2.png => wheats_2.png} (100%) rename client/src/main/resources/textures/blocks/{wheat_3.png => wheats_3.png} (100%) rename client/src/main/resources/textures/blocks/{wheat_4.png => wheats_4.png} (100%) rename client/src/main/resources/textures/blocks/{wheat_5.png => wheats_5.png} (100%) rename client/src/main/resources/textures/blocks/{wheat_6.png => wheats_6.png} (100%) rename client/src/main/resources/textures/blocks/{wheat_7.png => wheats_7.png} (100%) rename client/src/main/resources/textures/items/{melon_stem.png => melon_seed.png} (100%) rename client/src/main/resources/textures/items/{pumpkin_stem.png => pumpkin_seed.png} (100%) create mode 100755 client/src/main/resources/textures/items/wheat_seed.png delete mode 100755 client/src/main/resources/textures/items/wheats.png delete mode 100755 common/src/main/java/common/item/ItemEffect.java delete mode 100755 common/src/main/java/common/item/ItemFragile.java delete mode 100755 common/src/main/java/common/item/ItemMagnetic.java delete mode 100755 common/src/main/java/common/item/block/ItemBed.java delete mode 100755 common/src/main/java/common/item/block/ItemBlock.java delete mode 100755 common/src/main/java/common/item/block/ItemButton.java delete mode 100755 common/src/main/java/common/item/block/ItemDoor.java delete mode 100755 common/src/main/java/common/item/block/ItemDoublePlant.java delete mode 100755 common/src/main/java/common/item/block/ItemFence.java delete mode 100755 common/src/main/java/common/item/block/ItemLilyPad.java delete mode 100755 common/src/main/java/common/item/block/ItemMetalBlock.java delete mode 100644 common/src/main/java/common/item/block/ItemPane.java delete mode 100755 common/src/main/java/common/item/block/ItemPiston.java delete mode 100755 common/src/main/java/common/item/block/ItemPressurePlate.java delete mode 100755 common/src/main/java/common/item/block/ItemSign.java delete mode 100755 common/src/main/java/common/item/block/ItemSlab.java delete mode 100755 common/src/main/java/common/item/block/ItemSnow.java delete mode 100644 common/src/main/java/common/item/block/ItemTNT.java delete mode 100755 common/src/main/java/common/item/block/ItemWall.java rename common/src/main/java/common/item/{tool => consumable}/ItemAppleGold.java (90%) rename common/src/main/java/common/item/{tool => consumable}/ItemBucketMilk.java (95%) rename common/src/main/java/common/item/{tool => consumable}/ItemFishFood.java (93%) rename common/src/main/java/common/item/{tool => consumable}/ItemFood.java (99%) rename common/src/main/java/common/item/{tool => consumable}/ItemPotion.java (94%) rename common/src/main/java/common/item/{block => consumable}/ItemSeedFood.java (82%) rename common/src/main/java/common/item/{tool => consumable}/ItemSoup.java (95%) rename common/src/main/java/common/item/{tool => material}/ItemArmor.java (94%) rename common/src/main/java/common/item/{tool/ItemGlassBottle.java => material/ItemBottle.java} (85%) rename common/src/main/java/common/item/{tool => material}/ItemBucket.java (96%) rename common/src/main/java/common/item/{tool => material}/ItemHorseArmor.java (72%) rename common/src/main/java/common/item/{block => material}/ItemSeeds.java (84%) rename common/src/main/java/common/item/{tool => projectile}/ItemChargedOrb.java (97%) rename common/src/main/java/common/item/{tool => projectile}/ItemDie.java (89%) rename common/src/main/java/common/item/{tool => projectile}/ItemDynamite.java (97%) rename common/src/main/java/common/item/{tool => projectile}/ItemEgg.java (97%) rename common/src/main/java/common/item/{tool => projectile}/ItemExpBottle.java (93%) rename common/src/main/java/common/item/{tool => projectile}/ItemFireball.java (98%) rename common/src/main/java/common/item/{tool => projectile}/ItemSnowball.java (97%) rename common/src/main/java/common/item/{tool => weapon}/ItemAmmo.java (80%) rename common/src/main/java/common/item/{tool => weapon}/ItemArrow.java (95%) rename common/src/main/java/common/item/{tool => weapon}/ItemBanHammer.java (93%) rename common/src/main/java/common/item/{tool => weapon}/ItemBoltgun.java (90%) rename common/src/main/java/common/item/{tool => weapon}/ItemBow.java (99%) rename common/src/main/java/common/item/{tool => weapon}/ItemExterminator.java (91%) rename common/src/main/java/common/item/{tool => weapon}/ItemGunBase.java (98%) rename common/src/main/java/common/item/{tool => weapon}/ItemLauncherBase.java (97%) rename common/src/main/java/common/item/{tool => weapon}/ItemRocketLauncher.java (95%) rename common/src/main/java/common/item/{tool => weapon}/ItemSword.java (97%) rename common/src/main/java/common/item/{tool => weapon}/ItemTrident.java (88%) diff --git a/client/src/main/java/client/Client.java b/client/src/main/java/client/Client.java index 5e939e7f..b9e63626 100755 --- a/client/src/main/java/client/Client.java +++ b/client/src/main/java/client/Client.java @@ -128,7 +128,6 @@ import common.inventory.InventoryPlayer; import common.item.Item; import common.item.ItemControl; import common.item.ItemStack; -import common.item.block.ItemBlock; import common.log.Log; import common.log.LogLevel; import common.net.bootstrap.Bootstrap; diff --git a/client/src/main/java/client/renderer/EffectRenderer.java b/client/src/main/java/client/renderer/EffectRenderer.java index 60b05e08..87c4ee5f 100755 --- a/client/src/main/java/client/renderer/EffectRenderer.java +++ b/client/src/main/java/client/renderer/EffectRenderer.java @@ -19,7 +19,7 @@ import common.init.BlockRegistry; import common.init.Blocks; import common.init.ItemRegistry; import common.item.Item; -import common.item.tool.ItemPotion; +import common.item.consumable.ItemPotion; import common.rng.Random; import common.util.BlockPos; import common.util.ExtMath; diff --git a/client/src/main/java/client/renderer/blockmodel/ModelBakery.java b/client/src/main/java/client/renderer/blockmodel/ModelBakery.java index 4d317222..71b7b693 100755 --- a/client/src/main/java/client/renderer/blockmodel/ModelBakery.java +++ b/client/src/main/java/client/renderer/blockmodel/ModelBakery.java @@ -9,6 +9,7 @@ import java.util.Set; import client.renderer.texture.TextureAtlasSprite; import client.renderer.texture.TextureMap; +import common.block.Block; import common.block.liquid.BlockDynamicLiquid; import common.block.liquid.BlockLiquid; import common.block.liquid.BlockStaticLiquid; @@ -18,7 +19,10 @@ import common.collect.Sets; import common.init.BlockRegistry; import common.init.ItemRegistry; import common.item.Item; +import common.model.Model; +import common.model.ModelProvider; import common.model.ModelRotation; +import common.model.Transform; import common.util.Facing; import common.util.Pair; import common.world.State; @@ -64,13 +68,13 @@ public abstract class ModelBakery for (Item item : ItemRegistry.items()) { String loc = "item/" + ItemRegistry.getName(item); - models.put(loc, (ModelBlock)item.getModel(ModelBlock.PROVIDER, ItemRegistry.getName(item))); + models.put(loc, getModel(item, ModelBlock.PROVIDER, ItemRegistry.getName(item))); itemLocations.add(loc); String[] extra = item.getSprites(); if(extra != null) { for(String sprite : extra) { loc = "item/" + sprite; - models.put(loc, (ModelBlock)ModelBlock.PROVIDER.getModel(item.getTransform(), sprite)); + models.put(loc, new ModelBlock(Transform.IDENTITY, sprite)); itemLocations.add(loc); } } @@ -204,6 +208,21 @@ public abstract class ModelBakery return bakedRegistry; } + private static final ModelBlock getModel(Item item, ModelProvider provider, String name) { + ModelBlock model = (ModelBlock)item.getCustomModel(provider, name); + if(model != null) + return new ModelBlock(model, item.getCustomTransform()); + if(item.hasBuiltinModel()) + return new ModelBlock(MODEL_ENTITY, Transform.IDENTITY); + Block block = item.getBlock(); + if(block != null && block.getRenderType() != 3) + return new ModelBlock(MODEL_ENTITY, Transform.IDENTITY); + State state = block == null ? null : block.getItemState(); + if(state != null) + return state.getBlock().hasBlockFlatTexture() ? new ModelBlock(state.getBlock().getTransform(), "blocks/" + name) : new ModelBlock((ModelBlock)state.getBlock().getModel(provider, BlockRegistry.getName(state.getBlock()), state), state.getBlock().getTransform()); + return new ModelBlock(Transform.IDENTITY, item.getTextures(name)); + } + private static IBakedModel bakeModel(Map sprites, FaceBakery faceBakery, TextureAtlasSprite fallback, ModelBlock modelBlockIn, ModelRotation modelRotationIn, boolean uvLocked) { diff --git a/client/src/main/java/client/renderer/blockmodel/ModelBlock.java b/client/src/main/java/client/renderer/blockmodel/ModelBlock.java index dd26ac5a..76fb2635 100755 --- a/client/src/main/java/client/renderer/blockmodel/ModelBlock.java +++ b/client/src/main/java/client/renderer/blockmodel/ModelBlock.java @@ -17,18 +17,6 @@ public class ModelBlock extends Model { public Model getModel(String primary) { return new ModelBlock(primary); } - - public Model getModel(Transform transform, String... layers) { - return new ModelBlock(transform, layers); - } - - public Model getModel(Model parent, Transform transform) { - return new ModelBlock((ModelBlock)parent, transform); - } - - public Model getEntityModel() { - return ModelBakery.MODEL_ENTITY; - } }; private final List elements; diff --git a/client/src/main/java/client/renderer/entity/Render.java b/client/src/main/java/client/renderer/entity/Render.java index 9bf22b9c..7731f363 100755 --- a/client/src/main/java/client/renderer/entity/Render.java +++ b/client/src/main/java/client/renderer/entity/Render.java @@ -1,10 +1,6 @@ package client.renderer.entity; -import org.lwjgl.opengl.GL11; - -import client.renderer.Drawing; import client.renderer.Frustum; -import client.renderer.GlState; import common.entity.Entity; import common.util.BoundingBox; diff --git a/client/src/main/java/client/renderer/entity/RenderItem.java b/client/src/main/java/client/renderer/entity/RenderItem.java index 1354bb2c..13019f5e 100755 --- a/client/src/main/java/client/renderer/entity/RenderItem.java +++ b/client/src/main/java/client/renderer/entity/RenderItem.java @@ -153,7 +153,7 @@ public class RenderItem if (flag && bakedquad.hasTintIndex()) { - k = stack.getItem().getColorFromItemStack(stack, bakedquad.getTintIndex()); + k = stack.getItem().getRenderColor(stack, bakedquad.getTintIndex()); k = k | -16777216; } diff --git a/client/src/main/java/client/renderer/layers/LayerArmor.java b/client/src/main/java/client/renderer/layers/LayerArmor.java index 1025c63e..d57d29fc 100755 --- a/client/src/main/java/client/renderer/layers/LayerArmor.java +++ b/client/src/main/java/client/renderer/layers/LayerArmor.java @@ -9,7 +9,7 @@ import client.renderer.model.ModelArmor; import client.renderer.model.ModelBiped; import common.entity.types.EntityLiving; import common.item.ItemStack; -import common.item.tool.ItemArmor; +import common.item.material.ItemArmor; public class LayerArmor implements LayerRenderer { diff --git a/client/src/main/java/client/renderer/layers/LayerHeldItem.java b/client/src/main/java/client/renderer/layers/LayerHeldItem.java index 86808d20..2af5b8d2 100755 --- a/client/src/main/java/client/renderer/layers/LayerHeldItem.java +++ b/client/src/main/java/client/renderer/layers/LayerHeldItem.java @@ -10,7 +10,6 @@ import common.entity.types.EntityLiving; import common.init.Items; import common.item.Item; import common.item.ItemStack; -import common.item.block.ItemBlock; import common.model.Transform; public class LayerHeldItem implements LayerRenderer @@ -55,7 +54,7 @@ public class LayerHeldItem implements LayerRenderer Item item = itemstack.getItem(); Client gm = Client.CLIENT; - if (item instanceof ItemBlock && item.getBlock().getRenderType() == 2) + if (item.getBlock() != null && item.getBlock().getRenderType() == 2) { GL11.glTranslatef(0.0F, 0.1875F, -0.3125F); GL11.glRotatef(20.0F, 1.0F, 0.0F, 0.0F); diff --git a/client/src/main/java/client/renderer/tileentity/TileEntityItemStackRenderer.java b/client/src/main/java/client/renderer/tileentity/TileEntityItemStackRenderer.java index 6245ff4c..55e65843 100755 --- a/client/src/main/java/client/renderer/tileentity/TileEntityItemStackRenderer.java +++ b/client/src/main/java/client/renderer/tileentity/TileEntityItemStackRenderer.java @@ -7,14 +7,11 @@ import client.renderer.GlState; import client.renderer.layers.LayerArmor; import client.renderer.model.ModelHorse; import common.block.tech.BlockChest; -import common.block.tile.BlockSign; import common.block.tile.BlockStandingSign; import common.entity.types.EntityLiving; -import common.init.ItemRegistry; import common.item.ItemStack; -import common.item.block.ItemSign; -import common.item.tool.ItemArmor; -import common.item.tool.ItemHorseArmor; +import common.item.material.ItemArmor; +import common.item.material.ItemHorseArmor; import common.tileentity.TileEntityChest; import common.tileentity.TileEntitySign; import common.util.Facing; @@ -53,13 +50,13 @@ public class TileEntityItemStackRenderer { private final ModelHorse horse = new ModelHorse(); public void renderByItem(ItemStack stack) { - if(stack.getItem() != null && stack.getItem().getBlock() instanceof BlockChest chest) { + if(stack.getItem().getBlock() instanceof BlockChest chest) { this.state = chest.getState().withProperty(BlockChest.FACING, Facing.SOUTH); TileEntityRendererDispatcher.instance.renderTileEntityAt(this.chest, 0.0D, 0.0D, 0.0D, 0.0F); this.state = null; } - else if(stack.getItem() instanceof ItemSign sign) { - this.state = sign.getBlock().getState().withProperty(BlockStandingSign.ROTATION, 8); + else if(stack.getItem().getBlock() instanceof BlockStandingSign sign) { + this.state = sign.getState().withProperty(BlockStandingSign.ROTATION, 8); TileEntityRendererDispatcher.instance.renderTileEntityAt(this.sign, 0.0D, 0.0D, 0.0D, 0.0F); this.state = null; } diff --git a/client/src/main/java/client/renderer/tileentity/TileEntitySignRenderer.java b/client/src/main/java/client/renderer/tileentity/TileEntitySignRenderer.java index d3da4f57..c9122f11 100755 --- a/client/src/main/java/client/renderer/tileentity/TileEntitySignRenderer.java +++ b/client/src/main/java/client/renderer/tileentity/TileEntitySignRenderer.java @@ -5,7 +5,6 @@ import org.lwjgl.opengl.GL11; import client.renderer.Drawing; import client.renderer.GlState; import client.renderer.model.ModelSign; -import common.block.Block; import common.block.tile.BlockStandingSign; import common.block.tile.BlockWallSign; import common.init.Blocks; diff --git a/client/src/main/java/client/util/PlayerController.java b/client/src/main/java/client/util/PlayerController.java index 73a92b6f..c6655db1 100755 --- a/client/src/main/java/client/util/PlayerController.java +++ b/client/src/main/java/client/util/PlayerController.java @@ -14,7 +14,6 @@ import common.init.EntityRegistry; import common.init.UniverseRegistry; import common.item.ItemControl; import common.item.ItemStack; -import common.item.block.ItemBlock; import common.packet.CPacketAction; import common.packet.CPacketBreak; import common.packet.CPacketClick; @@ -233,13 +232,8 @@ public class PlayerController { flag = true; } - if(!flag && stack != null && stack.getItem() instanceof ItemBlock) { - ItemBlock itemblock = (ItemBlock)stack.getItem(); - - if(!itemblock.canPlaceBlockOnSide(world, pos, side, player, stack)) { - return false; - } - } + if(!flag && stack != null && stack.getItem().getBlock() != null && !stack.getItem().getBlock().canPlace(world, pos, side, player, stack)) + return false; } else { stack.getItem().onItemUse(stack, player, world, pos, side, f, f1, f2); diff --git a/client/src/main/resources/textures/blocks/carrot_0.png b/client/src/main/resources/textures/blocks/carrots_0.png similarity index 100% rename from client/src/main/resources/textures/blocks/carrot_0.png rename to client/src/main/resources/textures/blocks/carrots_0.png diff --git a/client/src/main/resources/textures/blocks/carrot_1.png b/client/src/main/resources/textures/blocks/carrots_1.png similarity index 100% rename from client/src/main/resources/textures/blocks/carrot_1.png rename to client/src/main/resources/textures/blocks/carrots_1.png diff --git a/client/src/main/resources/textures/blocks/carrot_2.png b/client/src/main/resources/textures/blocks/carrots_2.png similarity index 100% rename from client/src/main/resources/textures/blocks/carrot_2.png rename to client/src/main/resources/textures/blocks/carrots_2.png diff --git a/client/src/main/resources/textures/blocks/carrot_3.png b/client/src/main/resources/textures/blocks/carrots_3.png similarity index 100% rename from client/src/main/resources/textures/blocks/carrot_3.png rename to client/src/main/resources/textures/blocks/carrots_3.png diff --git a/client/src/main/resources/textures/blocks/potato_0.png b/client/src/main/resources/textures/blocks/potatoes_0.png similarity index 100% rename from client/src/main/resources/textures/blocks/potato_0.png rename to client/src/main/resources/textures/blocks/potatoes_0.png diff --git a/client/src/main/resources/textures/blocks/potato_1.png b/client/src/main/resources/textures/blocks/potatoes_1.png similarity index 100% rename from client/src/main/resources/textures/blocks/potato_1.png rename to client/src/main/resources/textures/blocks/potatoes_1.png diff --git a/client/src/main/resources/textures/blocks/potato_2.png b/client/src/main/resources/textures/blocks/potatoes_2.png similarity index 100% rename from client/src/main/resources/textures/blocks/potato_2.png rename to client/src/main/resources/textures/blocks/potatoes_2.png diff --git a/client/src/main/resources/textures/blocks/potato_3.png b/client/src/main/resources/textures/blocks/potatoes_3.png similarity index 100% rename from client/src/main/resources/textures/blocks/potato_3.png rename to client/src/main/resources/textures/blocks/potatoes_3.png diff --git a/client/src/main/resources/textures/blocks/pumpkin_face_off.png b/client/src/main/resources/textures/blocks/pumpkin_face_off.png deleted file mode 100755 index ecef0250cbc9c8932e4c766c6beb474aa8d56188..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 240 zcmVLOkH#cKvB8U qC@_3zdvTR(k4GPy#_j48j`C(E&gRfAZYrbz0000G^PF>^?t7klQ!^9w#yXp9bn$Mw!Jf}sJXQ@}d00#FsmzU8WvbaVy}q|v z)gpTj7%y6ks6bxsnu@pE%%73#7~dC1rN0zgL%<6k+E`{D%vp;fG_ zhhd-JzKr_(pp@}KUO)pZZb!C%nz56c0lT;#vg@Z2x0wirr%vB${>x@Bpi9KG$xG!y zw~3qxW{~t^sqTpv&?(r!P-&I}8nWDx?KN*fw=1+Yd~6>7ehW#@^uIjBAEJ_4XGmbA QzyJUM07*qoM6N<$f_k>W^#A|> diff --git a/client/src/main/resources/textures/blocks/soul_wart_0.png b/client/src/main/resources/textures/blocks/soul_warts_0.png similarity index 100% rename from client/src/main/resources/textures/blocks/soul_wart_0.png rename to client/src/main/resources/textures/blocks/soul_warts_0.png diff --git a/client/src/main/resources/textures/blocks/soul_wart_1.png b/client/src/main/resources/textures/blocks/soul_warts_1.png similarity index 100% rename from client/src/main/resources/textures/blocks/soul_wart_1.png rename to client/src/main/resources/textures/blocks/soul_warts_1.png diff --git a/client/src/main/resources/textures/blocks/soul_wart_2.png b/client/src/main/resources/textures/blocks/soul_warts_2.png similarity index 100% rename from client/src/main/resources/textures/blocks/soul_wart_2.png rename to client/src/main/resources/textures/blocks/soul_warts_2.png diff --git a/client/src/main/resources/textures/blocks/wheat_0.png b/client/src/main/resources/textures/blocks/wheats_0.png similarity index 100% rename from client/src/main/resources/textures/blocks/wheat_0.png rename to client/src/main/resources/textures/blocks/wheats_0.png diff --git a/client/src/main/resources/textures/blocks/wheat_1.png b/client/src/main/resources/textures/blocks/wheats_1.png similarity index 100% rename from client/src/main/resources/textures/blocks/wheat_1.png rename to client/src/main/resources/textures/blocks/wheats_1.png diff --git a/client/src/main/resources/textures/blocks/wheat_2.png b/client/src/main/resources/textures/blocks/wheats_2.png similarity index 100% rename from client/src/main/resources/textures/blocks/wheat_2.png rename to client/src/main/resources/textures/blocks/wheats_2.png diff --git a/client/src/main/resources/textures/blocks/wheat_3.png b/client/src/main/resources/textures/blocks/wheats_3.png similarity index 100% rename from client/src/main/resources/textures/blocks/wheat_3.png rename to client/src/main/resources/textures/blocks/wheats_3.png diff --git a/client/src/main/resources/textures/blocks/wheat_4.png b/client/src/main/resources/textures/blocks/wheats_4.png similarity index 100% rename from client/src/main/resources/textures/blocks/wheat_4.png rename to client/src/main/resources/textures/blocks/wheats_4.png diff --git a/client/src/main/resources/textures/blocks/wheat_5.png b/client/src/main/resources/textures/blocks/wheats_5.png similarity index 100% rename from client/src/main/resources/textures/blocks/wheat_5.png rename to client/src/main/resources/textures/blocks/wheats_5.png diff --git a/client/src/main/resources/textures/blocks/wheat_6.png b/client/src/main/resources/textures/blocks/wheats_6.png similarity index 100% rename from client/src/main/resources/textures/blocks/wheat_6.png rename to client/src/main/resources/textures/blocks/wheats_6.png diff --git a/client/src/main/resources/textures/blocks/wheat_7.png b/client/src/main/resources/textures/blocks/wheats_7.png similarity index 100% rename from client/src/main/resources/textures/blocks/wheat_7.png rename to client/src/main/resources/textures/blocks/wheats_7.png diff --git a/client/src/main/resources/textures/items/melon_stem.png b/client/src/main/resources/textures/items/melon_seed.png similarity index 100% rename from client/src/main/resources/textures/items/melon_stem.png rename to client/src/main/resources/textures/items/melon_seed.png diff --git a/client/src/main/resources/textures/items/pumpkin_stem.png b/client/src/main/resources/textures/items/pumpkin_seed.png similarity index 100% rename from client/src/main/resources/textures/items/pumpkin_stem.png rename to client/src/main/resources/textures/items/pumpkin_seed.png diff --git a/client/src/main/resources/textures/items/wheat.png b/client/src/main/resources/textures/items/wheat.png index 83d23a6ecc5e2ddd3225eb72fda3a686a7c18295..bbd2fd9d941ab1f9e56aea74a077ed353378f481 100755 GIT binary patch delta 255 zcmVw?{%0TuT)pM`f6WGq|1blHG6V$Pf@8WC+YP1YH8t45DG0KrRW46Z}tg+002ovPDHLk FV1l@7W=sG8 delta 113 zcmV-%0FM8g0*(QYBx+SjL_t(|+GAiC1=ztOf&V0lql3&17XL{$92w|2^ZdtWI9?0T zZ2&2DDN^~5Y&bp(;0COL+Co?Z4%>*|Ar-fh6C_w~98_-nuhO}= z`3$eve@`L0o$6!TTT(oe78HUwY)3m>Ggg+002ovPDHLkV1lKgXz~C6 diff --git a/common/src/main/java/common/ai/EntityAIShareItems.java b/common/src/main/java/common/ai/EntityAIShareItems.java index f022e9ae..acb9a079 100755 --- a/common/src/main/java/common/ai/EntityAIShareItems.java +++ b/common/src/main/java/common/ai/EntityAIShareItems.java @@ -66,7 +66,7 @@ public class EntityAIShareItems extends EntityAIWatchClosest2 itemstack.decrSize(l); itemstack1 = new ItemStack(item, l); } - else if (item == Items.wheats && itemstack.getSize() > 5) + else if (item == Items.wheat && itemstack.getSize() > 5) { int j = itemstack.getSize() / 2 / 3 * 3; int k = j / 3; diff --git a/common/src/main/java/common/block/Block.java b/common/src/main/java/common/block/Block.java index 7a484a63..1c4eac2b 100755 --- a/common/src/main/java/common/block/Block.java +++ b/common/src/main/java/common/block/Block.java @@ -13,7 +13,10 @@ import java.util.Set; import java.util.Map.Entry; import java.util.function.Function; +import common.attributes.Attribute; +import common.attributes.UsageSlot; import common.block.artificial.BlockSlab; +import common.block.natural.BlockSnow; import common.collect.ImmutableList; import common.collect.ImmutableMap; import common.collect.Iterables; @@ -21,6 +24,8 @@ import common.collect.Lists; import common.collect.Maps; import common.collect.Sets; import common.collect.UnmodifiableIterator; +import common.color.DyeColor; +import common.color.TextColor; import common.enchantment.EnchantmentHelper; import common.entity.Entity; import common.entity.item.EntityItem; @@ -28,10 +33,11 @@ import common.entity.item.EntityXp; import common.entity.npc.EntityNPC; import common.entity.types.EntityLiving; import common.init.BlockRegistry; +import common.init.Blocks; import common.item.CheatTab; import common.item.Item; import common.item.ItemStack; -import common.item.block.ItemBlock; +import common.item.StackSize; import common.model.BlockLayer; import common.model.Model; import common.model.ModelProvider; @@ -902,6 +908,10 @@ public class Block { public int getShearsEfficiency() { return this.shearsEfficiency; } + + public float getRadiation() { + return this.radiation; + } public boolean isMagnetic() { return false; @@ -914,6 +924,10 @@ public class Block { public Model getModel(ModelProvider provider, String name, State state) { return provider.getModel(name).add().all(); } + + public State getItemState() { + return this.getState(); + } public Property[] getIgnoredProperties() { return null; @@ -949,18 +963,14 @@ public class Block { return null; } - protected Item getItemToRegister() { - return new ItemBlock(this); + protected boolean hasRegisteredItem() { + return true; } public final Item registerItem() { - Item item = this.getItemToRegister(); - if(item == null) + if(!this.hasRegisteredItem()) return null; - if(item.getBlock() != this) - throw new IllegalArgumentException("Gegenstand für Block " + BlockRegistry.getName(this) + " stimmt nicht überein"); - this.item = item; - return item; + return this.item = new Item(this); } public Item getItem() { @@ -1053,7 +1063,89 @@ public class Block { return this.itemColored; } - public String getItemTexture(String name) { - return name; + public StackSize getMaxStackSize() { + return null; } + + public TextColor getItemColor() { + return this.radiation > 0.0f ? TextColor.GREEN : null; + } + + public boolean place(ItemStack stack, EntityNPC playerIn, World worldIn, BlockPos pos, Facing side, float hitX, float hitY, float hitZ) + { + State iblockstate = worldIn.getState(pos); + Block block = iblockstate.getBlock(); + + if(block == Blocks.snow_layer && iblockstate.getValue(BlockSnow.LAYERS).intValue() < 1) + side = Facing.UP; + else if (!block.isReplaceable(worldIn, pos)) + { + pos = pos.offset(side); + } + + if (stack.isEmpty()) + { + return false; + } + else if (!playerIn.canPlayerEdit(pos, side, stack)) + { + return false; + } + else if (worldIn.canBlockBePlaced(this, pos, false, side, (Entity)null, stack)) + { + State iblockstate1 = this.onBlockPlaced(worldIn, pos, side, hitX, hitY, hitZ, playerIn); + + if (worldIn.setState(pos, iblockstate1, 3)) + { + iblockstate1 = worldIn.getState(pos); + + if (iblockstate1.getBlock() == this) + { + this.onBlockPlacedBy(worldIn, pos, iblockstate1, playerIn); + } + + worldIn.playSound(this.sound.getPlaceSound(), (double)((float)pos.getX() + 0.5F), (double)((float)pos.getY() + 0.5F), (double)((float)pos.getZ() + 0.5F), 1.0F); + stack.decrSize(); + } + + return true; + } + else + { + return false; + } + } + + public boolean canPlace(World worldIn, BlockPos pos, Facing side, EntityNPC player, ItemStack stack) + { + Block block = worldIn.getState(pos).getBlock(); + + if (block == Blocks.snow_layer) + { + side = Facing.UP; + } + else if (!block.isReplaceable(worldIn, pos)) + { + pos = pos.offset(side); + } + + return worldIn.canBlockBePlaced(this, pos, false, side, (Entity)null, stack); + } + + public boolean prePlace(ItemStack itemStackIn, World worldIn, EntityNPC playerIn) + { + return false; + } + + public boolean dispense(World world, TileEntity source, Vec3 position, BlockPos blockpos, Facing facing, ItemStack stack) { + return false; + } + + public void addInformation(ItemStack stack, EntityNPC playerIn, List tooltip) + { + } + + public void getModifiers(Map map, UsageSlot slot) + { + } } diff --git a/common/src/main/java/common/block/BlockAir.java b/common/src/main/java/common/block/BlockAir.java index 074c999d..a058738f 100755 --- a/common/src/main/java/common/block/BlockAir.java +++ b/common/src/main/java/common/block/BlockAir.java @@ -38,7 +38,7 @@ public final class BlockAir extends Block { return false; } - protected Item getItemToRegister() { - return null; + protected boolean hasRegisteredItem() { + return false; } } diff --git a/common/src/main/java/common/block/artificial/BlockBed.java b/common/src/main/java/common/block/artificial/BlockBed.java index 56fe747d..741870bf 100755 --- a/common/src/main/java/common/block/artificial/BlockBed.java +++ b/common/src/main/java/common/block/artificial/BlockBed.java @@ -6,8 +6,10 @@ import common.block.Material; import common.color.DyeColor; import common.color.TextColor; import common.entity.npc.EntityNPC; +import common.item.CheatTab; import common.item.Item; -import common.item.block.ItemBed; +import common.item.ItemStack; +import common.item.StackSize; import common.model.BlockLayer; import common.model.Model; import common.model.ModelProvider; @@ -16,6 +18,7 @@ import common.properties.Property; import common.properties.PropertyEnum; import common.rng.Random; import common.util.BlockPos; +import common.util.ExtMath; import common.util.Facing; import common.util.Identifyable; import common.util.WorldPos; @@ -53,6 +56,7 @@ public class BlockBed extends Block implements Rotatable { super(Material.BURNABLE); this.color = color; this.setDefaultState(this.getBaseState().withProperty(PART, BlockBed.EnumPartType.FOOT)); + this.setTab(CheatTab.DECORATION); this.setBedBounds(); } @@ -193,8 +197,73 @@ public class BlockBed extends Block implements Rotatable { .add(0, 3, 0, 16, 3, 16) .d("oak_planks").noCull().rotate(ModelRotation.getNorthRot(state.getValue(FACING).getOpposite())); } + + public State getItemState() { + return this.getState().withProperty(PART, EnumPartType.HEAD).withProperty(FACING, Facing.NORTH); + } - protected Item getItemToRegister() { - return new ItemBed(this).setDisplay(this.color.getSubject(0) + " Bett"); + public StackSize getMaxStackSize() { + return StackSize.S; } + + public boolean place(ItemStack stack, EntityNPC playerIn, World worldIn, BlockPos pos, Facing side, float hitX, float hitY, float hitZ) + { + if (worldIn.client) + { + return true; + } + else if (side != Facing.UP) + { + return false; + } + else + { + State iblockstate = worldIn.getState(pos); + Block block = iblockstate.getBlock(); + boolean flag = block.isReplaceable(worldIn, pos); + + if (!flag) + { + pos = pos.up(); + } + + int i = ExtMath.floord((double)(playerIn.rotYaw * 4.0F / 360.0F) + 0.5D) & 3; + Facing enumfacing = Facing.getHorizontal(i); + BlockPos blockpos = pos.offset(enumfacing); + + if (playerIn.canPlayerEdit(pos, side, stack) && playerIn.canPlayerEdit(blockpos, side, stack)) + { + boolean flag1 = worldIn.getState(blockpos).getBlock().isReplaceable(worldIn, blockpos); + boolean flag2 = flag || worldIn.isAirBlock(pos); + boolean flag3 = flag1 || worldIn.isAirBlock(blockpos); + + if (flag2 && flag3 && worldIn.isBlockSolid(pos.down()) && worldIn.isBlockSolid(blockpos.down())) + { + State iblockstate1 = this.getState() /* .withProperty(BlockBed.OCCUPIED, Boolean.valueOf(false)) */ .withProperty(BlockBed.FACING, enumfacing).withProperty(BlockBed.PART, BlockBed.EnumPartType.FOOT); + + if (worldIn.setState(pos, iblockstate1, 3)) + { + State iblockstate2 = iblockstate1.withProperty(BlockBed.PART, BlockBed.EnumPartType.HEAD); + worldIn.setState(blockpos, iblockstate2, 3); + } + + stack.decrSize(); + return true; + } + else + { + return false; + } + } + else + { + return false; + } + } + } + + public boolean canPlace(World worldIn, BlockPos pos, Facing side, EntityNPC player, ItemStack stack) + { + return side == Facing.UP; + } } diff --git a/common/src/main/java/common/block/artificial/BlockDoor.java b/common/src/main/java/common/block/artificial/BlockDoor.java index 87ad3801..c0edd6a6 100755 --- a/common/src/main/java/common/block/artificial/BlockDoor.java +++ b/common/src/main/java/common/block/artificial/BlockDoor.java @@ -7,8 +7,11 @@ import common.block.Rotatable; import common.block.Material; import common.collect.Lists; import common.entity.npc.EntityNPC; +import common.init.Blocks; +import common.item.CheatTab; import common.item.Item; -import common.item.block.ItemDoor; +import common.item.ItemStack; +import common.item.StackSize; import common.item.tool.ItemKey; import common.model.BlockLayer; import common.model.Model; @@ -66,6 +69,7 @@ public class BlockDoor extends Block implements Rotatable { super(material); this.setDefaultState(this.getBaseState().withProperty(FACING, Facing.NORTH).withProperty(OPEN, false) .withProperty(HINGE, EnumHingePosition.LEFT).withProperty(HALF, EnumDoorHalf.LOWER)); + this.setTab(material == Material.WOOD ? CheatTab.WOOD : CheatTab.TECHNOLOGY); DOORS.add(this); } @@ -285,7 +289,78 @@ public class BlockDoor extends Block implements Rotatable { return Transform.PANE_SIDE; } - protected Item getItemToRegister() { - return new ItemDoor(this); + public State getItemState() { + return this.getState().withProperty(HALF, EnumDoorHalf.UPPER).withProperty(FACING, Facing.NORTH); + } + + public boolean isMagnetic() { + return this == Blocks.iron_door; + } + + public StackSize getMaxStackSize() { + return StackSize.S; } + + public boolean place(ItemStack stack, EntityNPC playerIn, World worldIn, BlockPos pos, Facing side, float hitX, float hitY, float hitZ) + { + if (side != Facing.UP) + { + return false; + } + else + { + State iblockstate = worldIn.getState(pos); + Block block = iblockstate.getBlock(); + + if (!block.isReplaceable(worldIn, pos)) + { + pos = pos.offset(side); + } + + if (!playerIn.canPlayerEdit(pos, side, stack)) + { + return false; + } + else if (!this.canPlaceBlockAt(worldIn, pos)) + { + return false; + } + else + { + placeDoor(worldIn, pos, Facing.fromAngle((double)playerIn.rotYaw), this, true); + stack.decrSize(); + return true; + } + } + } + + public boolean canPlace(World worldIn, BlockPos pos, Facing side, EntityNPC player, ItemStack stack) + { + return side == Facing.UP; + } + + public static void placeDoor(World worldIn, BlockPos pos, Facing facing, Block door, boolean update) + { + BlockPos blockpos = pos.offset(facing.rotateY()); + BlockPos blockpos1 = pos.offset(facing.rotateYCCW()); + int i = (worldIn.getState(blockpos1).getBlock().isNormalCube() ? 1 : 0) + (worldIn.getState(blockpos1.up()).getBlock().isNormalCube() ? 1 : 0); + int j = (worldIn.getState(blockpos).getBlock().isNormalCube() ? 1 : 0) + (worldIn.getState(blockpos.up()).getBlock().isNormalCube() ? 1 : 0); + boolean flag = worldIn.getState(blockpos1).getBlock() == door || worldIn.getState(blockpos1.up()).getBlock() == door; + boolean flag1 = worldIn.getState(blockpos).getBlock() == door || worldIn.getState(blockpos.up()).getBlock() == door; + boolean flag2 = false; + + if (flag && !flag1 || j > i) + { + flag2 = true; + } + + BlockPos blockpos2 = pos.up(); + State iblockstate = door.getState().withProperty(BlockDoor.FACING, facing).withProperty(BlockDoor.HINGE, flag2 ? BlockDoor.EnumHingePosition.RIGHT : BlockDoor.EnumHingePosition.LEFT); + worldIn.setState(pos, iblockstate.withProperty(BlockDoor.HALF, BlockDoor.EnumDoorHalf.LOWER), 2); + worldIn.setState(blockpos2, iblockstate.withProperty(BlockDoor.HALF, BlockDoor.EnumDoorHalf.UPPER), 2); + if(update) { + worldIn.notifyNeighborsOfStateChange(pos, door); + worldIn.notifyNeighborsOfStateChange(blockpos2, door); + } + } } diff --git a/common/src/main/java/common/block/artificial/BlockFence.java b/common/src/main/java/common/block/artificial/BlockFence.java index 7cc4570e..e10e9434 100755 --- a/common/src/main/java/common/block/artificial/BlockFence.java +++ b/common/src/main/java/common/block/artificial/BlockFence.java @@ -9,7 +9,6 @@ import common.entity.Entity; import common.entity.npc.EntityNPC; import common.item.CheatTab; import common.item.Item; -import common.item.block.ItemFence; import common.item.tool.ItemLead; import common.model.Model; import common.model.ModelProvider; @@ -373,10 +372,10 @@ public class BlockFence extends Block .e().uv(7, 7, 9, 10) .rotate(!w ? ModelRotation.X0_Y0 : (!e ? ModelRotation.X0_Y180 : (!s ? ModelRotation.X0_Y270 : ModelRotation.X0_Y90))); } - - protected Item getItemToRegister() { - return new ItemFence(this); - } + + public State getItemState() { + return this.getState().withProperty(EAST, false).withProperty(WEST, false).withProperty(NORTH, true).withProperty(SOUTH, true); + } public Property[] getUnsavedProperties() { return new Property[] {NORTH, SOUTH, WEST, EAST}; diff --git a/common/src/main/java/common/block/artificial/BlockFloorPortal.java b/common/src/main/java/common/block/artificial/BlockFloorPortal.java index 19814225..0bf62248 100755 --- a/common/src/main/java/common/block/artificial/BlockFloorPortal.java +++ b/common/src/main/java/common/block/artificial/BlockFloorPortal.java @@ -151,7 +151,7 @@ public class BlockFloorPortal extends Block return "obsidian"; } - protected Item getItemToRegister() { - return null; + protected boolean hasRegisteredItem() { + return false; } } diff --git a/common/src/main/java/common/block/artificial/BlockFlowerPot.java b/common/src/main/java/common/block/artificial/BlockFlowerPot.java index f798c408..3c2ca702 100755 --- a/common/src/main/java/common/block/artificial/BlockFlowerPot.java +++ b/common/src/main/java/common/block/artificial/BlockFlowerPot.java @@ -13,7 +13,6 @@ import common.init.Items; import common.item.CheatTab; import common.item.Item; import common.item.ItemStack; -import common.item.block.ItemBlock; import common.model.BlockLayer; import common.model.Model; import common.model.ModelProvider; @@ -141,7 +140,7 @@ public class BlockFlowerPot extends Block { ItemStack itemstack = playerIn.inventory.getCurrentItem(); - if (itemstack != null && itemstack.getItem() instanceof ItemBlock) + if (itemstack != null && itemstack.getItem().getBlock() != null) { if (this.content != null) { @@ -259,8 +258,8 @@ public class BlockFlowerPot extends Block } } - protected Item getItemToRegister() { - return this.content == null ? super.getItemToRegister() : null; + protected boolean hasRegisteredItem() { + return this.content == null; } public Transform getTransform() { diff --git a/common/src/main/java/common/block/artificial/BlockMetalBlock.java b/common/src/main/java/common/block/artificial/BlockMetalBlock.java index 443ee14d..ac88f45a 100644 --- a/common/src/main/java/common/block/artificial/BlockMetalBlock.java +++ b/common/src/main/java/common/block/artificial/BlockMetalBlock.java @@ -1,12 +1,18 @@ package common.block.artificial; +import java.util.List; +import java.util.Map; + +import common.attributes.Attribute; +import common.attributes.UsageSlot; import common.block.Block; import common.block.Material; import common.block.SoundType; +import common.entity.npc.EntityNPC; import common.init.MetalType; import common.item.CheatTab; import common.item.Item; -import common.item.block.ItemMetalBlock; +import common.item.ItemStack; public class BlockMetalBlock extends Block { private final MetalType metal; @@ -23,8 +29,23 @@ public class BlockMetalBlock extends Block { public MetalType getMetal() { return this.metal; } + + public boolean isMagnetic() { + return this.metal.isMagnetic(); + } + + public void addInformation(ItemStack stack, EntityNPC playerIn, List tooltip) + { + tooltip.add(this.metal.formatSymbol()); + if(this.metal.radioactivity > 0.0f) { + tooltip.add(this.metal.formatRadioactivity()); + } + tooltip.add(this.metal.formatRarity()); + } - protected Item getItemToRegister() { - return new ItemMetalBlock(this); - } + public void getModifiers(Map map, UsageSlot slot) + { + if((slot == null || slot == UsageSlot.INVENTORY) && this.metal.radioactivity > 0.0f) + map.put(Attribute.RADIATION, this.metal.radioactivity * 4.0f * 9.0f); + } } diff --git a/common/src/main/java/common/block/artificial/BlockPane.java b/common/src/main/java/common/block/artificial/BlockPane.java index 0a96a3cc..1d400495 100755 --- a/common/src/main/java/common/block/artificial/BlockPane.java +++ b/common/src/main/java/common/block/artificial/BlockPane.java @@ -8,7 +8,6 @@ import common.entity.Entity; import common.init.Blocks; import common.item.CheatTab; import common.item.Item; -import common.item.block.ItemPane; import common.model.BlockLayer; import common.model.Model; import common.model.ModelProvider; @@ -499,12 +498,8 @@ public class BlockPane extends Block public Transform getTransform() { return Transform.PANE; } - - protected Item getItemToRegister() { - return new ItemPane(this); - } - - public String getItemTexture(String name) { - return this.getPaneBase(); - } + + public State getItemState() { + return this.getState().withProperty(NORTH, false).withProperty(SOUTH, false).withProperty(WEST, true).withProperty(EAST, true); + } } diff --git a/common/src/main/java/common/block/artificial/BlockPortal.java b/common/src/main/java/common/block/artificial/BlockPortal.java index 404beee6..e811097e 100755 --- a/common/src/main/java/common/block/artificial/BlockPortal.java +++ b/common/src/main/java/common/block/artificial/BlockPortal.java @@ -268,8 +268,8 @@ public class BlockPortal extends Block map.put("portal", 1); } - protected Item getItemToRegister() { - return null; + protected boolean hasRegisteredItem() { + return false; } // public BlockPattern.PatternHelper func_181089_f(World p_181089_1_, BlockPos p_181089_2_) diff --git a/common/src/main/java/common/block/artificial/BlockSlab.java b/common/src/main/java/common/block/artificial/BlockSlab.java index b4b1585e..d2c2586d 100755 --- a/common/src/main/java/common/block/artificial/BlockSlab.java +++ b/common/src/main/java/common/block/artificial/BlockSlab.java @@ -7,11 +7,12 @@ import common.block.Directional; import common.block.Material; import common.collect.Lists; import common.entity.Entity; +import common.entity.npc.EntityNPC; import common.entity.types.EntityLiving; import common.init.BlockRegistry; import common.item.CheatTab; import common.item.Item; -import common.item.block.ItemSlab; +import common.item.ItemStack; import common.model.Model; import common.model.ModelProvider; import common.properties.Property; @@ -154,7 +155,27 @@ public class BlockSlab extends Block implements Directional { return true; } - protected Item getItemToRegister() { - return new ItemSlab(this); + public boolean place(ItemStack stack, EntityNPC playerIn, World worldIn, BlockPos pos, Facing side, float hitX, float hitY, float hitZ) { + return !stack.isEmpty() && playerIn.canPlayerEdit(pos.offset(side), side, stack) && + (this.tryVerticalPlace(stack, playerIn, worldIn, pos, side, hitX, hitY, hitZ) || super.place(stack, playerIn, worldIn, pos, side, hitX, hitY, hitZ)); + } + + private boolean tryVerticalPlace(ItemStack stack, EntityNPC playerIn, World worldIn, BlockPos pos, Facing side, float hitX, float hitY, float hitZ) { + if(hitY >= 0.34f && hitY <= 0.66f) { + State state = worldIn.getState(pos); + Block block = state.getBlock(); + if(!block.isReplaceable(worldIn, pos)) + pos = pos.offset(side); + if(worldIn.canBlockBePlaced(this, pos, false, side, null, stack)) { + State place = this.getState().withProperty(BlockSlab.FACING, playerIn.getHorizontalFacing()); + if(worldIn.setState(pos, place, 3)) { + worldIn.playSound(this.sound.getPlaceSound(), (double)((float)pos.getX() + 0.5F), (double)((float)pos.getY() + 0.5F), + (double)((float)pos.getZ() + 0.5F), 1.0F); + stack.decrSize(); + } + return true; + } + } + return false; } } diff --git a/common/src/main/java/common/block/artificial/BlockStainedGlassPane.java b/common/src/main/java/common/block/artificial/BlockStainedGlassPane.java index 4ee6f71b..109d1fe2 100755 --- a/common/src/main/java/common/block/artificial/BlockStainedGlassPane.java +++ b/common/src/main/java/common/block/artificial/BlockStainedGlassPane.java @@ -4,7 +4,6 @@ import common.block.Material; import common.color.DyeColor; import common.item.CheatTab; import common.item.Item; -import common.item.block.ItemBlock; import common.model.BlockLayer; import common.properties.Property; diff --git a/common/src/main/java/common/block/artificial/BlockWall.java b/common/src/main/java/common/block/artificial/BlockWall.java index 692d5cdd..c5a6f199 100755 --- a/common/src/main/java/common/block/artificial/BlockWall.java +++ b/common/src/main/java/common/block/artificial/BlockWall.java @@ -8,7 +8,6 @@ import common.collect.Lists; import common.init.Blocks; import common.item.CheatTab; import common.item.Item; -import common.item.block.ItemWall; import common.model.Model; import common.model.ModelProvider; import common.model.ModelRotation; @@ -291,10 +290,10 @@ public class BlockWall extends Block .e().uv(5, 3, 11, 16) .rotate(!w ? ModelRotation.X0_Y0 : (!e ? ModelRotation.X0_Y180 : (!s ? ModelRotation.X0_Y270 : ModelRotation.X0_Y90))); } - - protected Item getItemToRegister() { - return new ItemWall(this); - } + + public State getItemState() { + return this.getState().withProperty(UP, true).withProperty(NORTH, false).withProperty(SOUTH, false).withProperty(WEST, true).withProperty(EAST, true); + } public Property[] getUnsavedProperties() { return new Property[] {NORTH, SOUTH, UP, WEST, EAST}; diff --git a/common/src/main/java/common/block/foliage/BlockCarrot.java b/common/src/main/java/common/block/foliage/BlockCarrot.java index fbb24822..0eb00774 100755 --- a/common/src/main/java/common/block/foliage/BlockCarrot.java +++ b/common/src/main/java/common/block/foliage/BlockCarrot.java @@ -4,7 +4,7 @@ import common.init.Blocks; import common.init.Items; import common.item.Item; import common.item.StackSize; -import common.item.block.ItemSeedFood; +import common.item.consumable.ItemSeedFood; import common.model.Model; import common.model.ModelProvider; import common.world.State; @@ -15,13 +15,13 @@ public class BlockCarrot extends BlockCrops { return Items.carrot; } + + protected Item getDropItem() { + return Items.carrot; + } public Model getModel(ModelProvider provider, String name, State state) { int age = state.getValue(AGE); return crop(provider, name + "_" + (age == 6 ? 2 : (age / 2))); } - - protected Item getItemToRegister() { - return new ItemSeedFood(3, this, Blocks.farmland).setDisplay("Karotte").setMaxAmount(StackSize.L); - } } diff --git a/common/src/main/java/common/block/foliage/BlockCrops.java b/common/src/main/java/common/block/foliage/BlockCrops.java index eb0f57c9..c5449fb5 100755 --- a/common/src/main/java/common/block/foliage/BlockCrops.java +++ b/common/src/main/java/common/block/foliage/BlockCrops.java @@ -8,7 +8,7 @@ import common.item.CheatTab; import common.item.Item; import common.item.ItemStack; import common.item.StackSize; -import common.item.block.ItemSeeds; +import common.item.material.ItemSeeds; import common.model.Model; import common.model.ModelProvider; import common.properties.Property; @@ -138,9 +138,13 @@ public class BlockCrops extends BlockBush implements IGrowable protected Item getCrop() { - return Items.wheats; + return Items.wheat; } + protected Item getDropItem() { + return Items.wheat_seed; + } + /** * Spawns this Block's drops into the World as EntityItems. */ @@ -160,7 +164,7 @@ public class BlockCrops extends BlockBush implements IGrowable { if (worldIn.rand.zrange(15) <= i) { - spawnAsEntity(worldIn, pos, new ItemStack(this.getItem())); + spawnAsEntity(worldIn, pos, new ItemStack(this.getDropItem())); } } } @@ -218,7 +222,7 @@ public class BlockCrops extends BlockBush implements IGrowable .s().uv(0, 0, 16, 16).noCull(); } - protected Item getItemToRegister() { - return new ItemSeeds(this, Blocks.farmland).setDisplay("Weizenkörner").setMaxAmount(StackSize.XL); + protected boolean hasRegisteredItem() { + return false; } } diff --git a/common/src/main/java/common/block/foliage/BlockDoublePlant.java b/common/src/main/java/common/block/foliage/BlockDoublePlant.java index e4590341..5816a154 100755 --- a/common/src/main/java/common/block/foliage/BlockDoublePlant.java +++ b/common/src/main/java/common/block/foliage/BlockDoublePlant.java @@ -10,7 +10,7 @@ import common.init.Blocks; import common.init.Items; import common.item.Item; import common.item.ItemStack; -import common.item.block.ItemDoublePlant; +import common.item.StackSize; import common.item.tool.ItemShears; import common.model.Model; import common.model.ModelProvider; @@ -48,6 +48,8 @@ public class BlockDoublePlant extends BlockBush implements IGrowable this.setStepSound(SoundType.GRASS); this.setFlammable(60, 100); this.setFlatBlockTexture(); + if(this.type == BlockDoublePlant.EnumPlantType.GRASS || this.type == BlockDoublePlant.EnumPlantType.FERN) + this.setItemColored(); PLANTS[type.ordinal()] = this; } @@ -151,10 +153,14 @@ public class BlockDoublePlant extends BlockBush implements IGrowable } else { - return this.type == BlockDoublePlant.EnumPlantType.FERN ? null : (this.type == BlockDoublePlant.EnumPlantType.GRASS ? (rand.chance(8) ? Items.wheat : null) : super.getItemDropped(state, rand, fortune)); + return this.type == BlockDoublePlant.EnumPlantType.FERN ? null : (this.type == BlockDoublePlant.EnumPlantType.GRASS ? (rand.chance(8) ? Items.wheat_seed : null) : super.getItemDropped(state, rand, fortune)); } } + public int getRenderColor(State state) { + return this.type != BlockDoublePlant.EnumPlantType.GRASS && this.type != BlockDoublePlant.EnumPlantType.FERN ? 16777215 : Colorizer.getGrassColor(0.5D, 1.0D); + } + public int colorMultiplier(IWorldAccess worldIn, BlockPos pos, int renderPass) { return this.type != BlockDoublePlant.EnumPlantType.GRASS && this.type != BlockDoublePlant.EnumPlantType.FERN ? 16777215 : Colorizer.getGrassColor(worldIn, pos); @@ -283,9 +289,13 @@ public class BlockDoublePlant extends BlockBush implements IGrowable public Transform getTransform() { return Transform.CROSS; } + + public State getItemState() { + return this.getState().withProperty(HALF, EnumBlockHalf.UPPER); + } - protected Item getItemToRegister() { - return new ItemDoublePlant(this); + public StackSize getMaxStackSize() { + return StackSize.S; } public static enum EnumBlockHalf implements Identifyable diff --git a/common/src/main/java/common/block/foliage/BlockLilyPad.java b/common/src/main/java/common/block/foliage/BlockLilyPad.java index 3a68927c..2b8b5950 100755 --- a/common/src/main/java/common/block/foliage/BlockLilyPad.java +++ b/common/src/main/java/common/block/foliage/BlockLilyPad.java @@ -8,11 +8,12 @@ import common.block.liquid.BlockLiquid; import common.block.liquid.BlockStaticLiquid; import common.entity.Entity; import common.entity.item.EntityBoat; +import common.entity.npc.EntityNPC; import common.entity.types.EntityLiving; import common.init.Blocks; import common.item.CheatTab; import common.item.Item; -import common.item.block.ItemLilyPad; +import common.item.ItemStack; import common.model.Model; import common.model.ModelProvider; import common.model.ModelRotation; @@ -21,6 +22,7 @@ import common.properties.Property; import common.util.BlockPos; import common.util.BoundingBox; import common.util.Facing; +import common.util.HitPosition; import common.world.IWorldAccess; import common.world.State; import common.world.World; @@ -106,8 +108,42 @@ public class BlockLilyPad extends BlockBush implements Rotatable public Transform getTransform() { return Transform.SMALL_FLAT; } - - protected Item getItemToRegister() { - return new ItemLilyPad(this); - } + + public boolean prePlace(ItemStack itemStackIn, World worldIn, EntityNPC playerIn) + { + HitPosition movingobjectposition = Item.getMovingObjectPositionFromPlayer(worldIn, playerIn, true); + + if (movingobjectposition == null) + { + return false; + } + else + { + if (movingobjectposition.type == HitPosition.ObjectType.BLOCK) + { + BlockPos blockpos = movingobjectposition.block; + + if (!World.isValidXZ(blockpos)) + { + return false; + } + + if (!playerIn.canPlayerEdit(blockpos.offset(movingobjectposition.side), movingobjectposition.side, itemStackIn)) + { + return false; + } + + BlockPos blockpos1 = blockpos.up(); + State iblockstate = worldIn.getState(blockpos); + + if (iblockstate.getBlock().getMaterial().isColdLiquid() && ((Integer)iblockstate.getValue(BlockLiquid.LEVEL)).intValue() == 0 && worldIn.isAirBlock(blockpos1)) + { + worldIn.setState(blockpos1, Blocks.waterlily.getState().withProperty(BlockLilyPad.FACING, playerIn.getHorizontalFacing().getOpposite())); + itemStackIn.decrSize(); + return true; + } + } + } + return false; + } } diff --git a/common/src/main/java/common/block/foliage/BlockMelon.java b/common/src/main/java/common/block/foliage/BlockMelon.java index 5c6ec9d6..a55fb41e 100755 --- a/common/src/main/java/common/block/foliage/BlockMelon.java +++ b/common/src/main/java/common/block/foliage/BlockMelon.java @@ -10,39 +10,25 @@ import common.model.ModelProvider; import common.rng.Random; import common.world.State; -public class BlockMelon extends Block -{ - public BlockMelon() - { - super(Material.SOFT); - this.setTab(CheatTab.PLANTS); - } +public class BlockMelon extends Block { + public BlockMelon() { + super(Material.SOFT); + this.setTab(CheatTab.PLANTS); + } - /** - * Get the Item that this Block should drop when harvested. - */ - public Item getItemDropped(State state, Random rand, int fortune) - { - return Items.melon; - } + public Item getItemDropped(State state, Random rand, int fortune) { + return Items.melon; + } - /** - * Returns the quantity of items to drop on block destruction. - */ - protected int quantityDropped(Random random) - { - return random.range(3, 7); - } + protected int quantityDropped(Random random) { + return random.range(3, 7); + } - /** - * Get the quantity dropped based on the given fortune level - */ - protected int quantityDroppedWithBonus(int fortune, Random random) - { - return Math.min(9, this.quantityDropped(random) + random.zrange(1 + fortune)); - } - - public Model getModel(ModelProvider provider, String name, State state) { - return provider.getModel("melon_side").add().nswe().du("melon_top"); - } + protected int quantityDroppedWithBonus(int fortune, Random random) { + return Math.min(9, this.quantityDropped(random) + random.zrange(1 + fortune)); + } + + public Model getModel(ModelProvider provider, String name, State state) { + return provider.getModel("melon_side").add().nswe().du("melon_top"); + } } diff --git a/common/src/main/java/common/block/foliage/BlockPotato.java b/common/src/main/java/common/block/foliage/BlockPotato.java index c4b5c8d7..694f3d5b 100755 --- a/common/src/main/java/common/block/foliage/BlockPotato.java +++ b/common/src/main/java/common/block/foliage/BlockPotato.java @@ -5,7 +5,7 @@ import common.init.Items; import common.item.Item; import common.item.ItemStack; import common.item.StackSize; -import common.item.block.ItemSeedFood; +import common.item.consumable.ItemSeedFood; import common.model.Model; import common.model.ModelProvider; import common.util.BlockPos; @@ -19,6 +19,10 @@ public class BlockPotato extends BlockCrops return Items.potato; } + protected Item getDropItem() { + return Items.potato; + } + /** * Spawns this Block's drops into the World as EntityItems. */ @@ -39,8 +43,4 @@ public class BlockPotato extends BlockCrops int age = state.getValue(AGE); return crop(provider, name + "_" + (age == 6 ? 2 : (age / 2))); } - - protected Item getItemToRegister() { - return new ItemSeedFood(1, this, Blocks.farmland).setDisplay("Kartoffel").setMaxAmount(StackSize.L); - } } diff --git a/common/src/main/java/common/block/foliage/BlockPumpkin.java b/common/src/main/java/common/block/foliage/BlockPumpkin.java index 74e0d570..c6f572dc 100755 --- a/common/src/main/java/common/block/foliage/BlockPumpkin.java +++ b/common/src/main/java/common/block/foliage/BlockPumpkin.java @@ -1,23 +1,17 @@ package common.block.foliage; import common.block.Block; -import common.block.Rotatable; import common.block.Material; -import common.entity.types.EntityLiving; import common.item.CheatTab; import common.model.Model; import common.model.ModelProvider; -import common.model.ModelRotation; -import common.properties.Property; import common.util.BlockPos; -import common.util.Facing; import common.world.State; import common.world.World; -public class BlockPumpkin extends Block implements Rotatable { +public class BlockPumpkin extends Block { public BlockPumpkin() { super(Material.SOFT); - this.setDefaultState(this.getBaseState().withProperty(FACING, Facing.NORTH)); this.setTab(CheatTab.PLANTS); } @@ -25,16 +19,7 @@ public class BlockPumpkin extends Block implements Rotatable { return world.getState(pos).getBlock().getMaterial().isReplaceable() && world.isBlockSolid(pos.down()); } - public State onBlockPlaced(World world, BlockPos pos, Facing face, float hitX, float hitY, float hitZ, EntityLiving placer) { - return this.getState().withProperty(FACING, placer.getHorizontalFacing().getOpposite()); - } - - protected Property[] getProperties() { - return new Property[] {FACING}; - } - public Model getModel(ModelProvider provider, String name, State state) { - return provider.getModel("pumpkin_side").add().du("pumpkin_top").n("pumpkin_face_" + (this.getLightValue() == 0 ? "off" : "on")).s().we() - .rotate(ModelRotation.getNorthRot(state.getValue(FACING))); + return provider.getModel("pumpkin_side").add().nswe().du("pumpkin_top"); } } diff --git a/common/src/main/java/common/block/foliage/BlockReed.java b/common/src/main/java/common/block/foliage/BlockReed.java index c3072022..08f031c8 100755 --- a/common/src/main/java/common/block/foliage/BlockReed.java +++ b/common/src/main/java/common/block/foliage/BlockReed.java @@ -164,8 +164,8 @@ public class BlockReed extends Block return new Property[] {AGE}; } - protected Item getItemToRegister() { - return super.getItemToRegister().setMaxAmount(StackSize.L); + public StackSize getMaxStackSize() { + return StackSize.L; } public Transform getTransform() { diff --git a/common/src/main/java/common/block/foliage/BlockStem.java b/common/src/main/java/common/block/foliage/BlockStem.java index 316460cb..f88c9a86 100755 --- a/common/src/main/java/common/block/foliage/BlockStem.java +++ b/common/src/main/java/common/block/foliage/BlockStem.java @@ -1,17 +1,15 @@ package common.block.foliage; import common.block.Block; -import common.block.Directional; import common.init.Blocks; import common.init.Items; import common.item.CheatTab; import common.item.Item; import common.item.ItemStack; import common.item.StackSize; -import common.item.block.ItemSeeds; +import common.item.material.ItemSeeds; import common.model.Model; import common.model.ModelProvider; -import common.model.ModelRotation; import common.properties.Property; import common.properties.PropertyInteger; import common.rng.Random; @@ -23,44 +21,22 @@ import common.world.State; import common.world.World; import common.world.AWorldServer; -public class BlockStem extends BlockBush implements Directional, IGrowable +public class BlockStem extends BlockBush implements IGrowable { public static final PropertyInteger AGE = PropertyInteger.create("age", 0, 7); private final Block crop; - private final String itemName; - public BlockStem(Block crop, String itemName) + public BlockStem(Block crop) { - this.setDefaultState(this.getBaseState().withProperty(AGE, Integer.valueOf(0)).withProperty(FACING, Facing.UP)); + this.setDefaultState(this.getBaseState().withProperty(AGE, 0)); this.crop = crop; - this.itemName = itemName; this.setTickRandomly(); float f = 0.125F; this.setBlockBounds(0.5F - f, 0.0F, 0.5F - f, 0.5F + f, 0.25F, 0.5F + f); this.setTab((CheatTab)null); } - /** - * Get the actual Block state of this Block at the given position. This applies properties not visible in the - * metadata, such as fence connections. - */ - public State getActualState(State state, IWorldAccess worldIn, BlockPos pos) - { - state = state.withProperty(FACING, Facing.UP); - - for (Facing enumfacing : Facing.Plane.HORIZONTAL) - { - if (worldIn.getState(pos.offset(enumfacing)).getBlock() == this.crop) - { - state = state.withProperty(FACING, enumfacing); - break; - } - } - - return state; - } - /** * is the block grass, dirt or farmland */ @@ -88,20 +64,17 @@ public class BlockStem extends BlockBush implements Directional, IGrowable } else { - for (Facing enumfacing : Facing.Plane.HORIZONTAL) + BlockPos pos2 = pos.offset(Facing.Plane.HORIZONTAL.random(rand)); + Block block = worldIn.getState(pos2.down()).getBlock(); + Block block2 = worldIn.getState(pos2).getBlock(); + + if ((block2 == Blocks.air || block2 instanceof BlockStem) && (block == Blocks.farmland || block == Blocks.dirt || block == Blocks.grass)) { - if (worldIn.getState(pos.offset(enumfacing)).getBlock() == this.crop) - { - return; - } + worldIn.setState(pos, Blocks.air.getState()); + worldIn.setState(pos2, this.crop.getState()); } - - pos = pos.offset(Facing.Plane.HORIZONTAL.random(rand)); - Block block = worldIn.getState(pos.down()).getBlock(); - - if (worldIn.getState(pos).getBlock() == Blocks.air && (block == Blocks.farmland || block == Blocks.dirt || block == Blocks.grass)) - { - worldIn.setState(pos, this.crop.getState()); + else { + worldIn.setState(pos, this.crop.getState()); } } } @@ -166,20 +139,12 @@ public class BlockStem extends BlockBush implements Directional, IGrowable { if (worldIn.rand.zrange(15) <= i) { - spawnAsEntity(worldIn, pos, new ItemStack(this.getItem())); + spawnAsEntity(worldIn, pos, new ItemStack(this == Blocks.melon_stem ? Items.melon_seed : Items.pumpkin_seed)); } } } } - /** - * Get the Item that this Block should drop when harvested. - */ - public Item getItemDropped(State state, Random rand, int fortune) - { - return null; - } - /** * Whether this IGrowable can grow */ @@ -200,101 +165,81 @@ public class BlockStem extends BlockBush implements Directional, IGrowable protected Property[] getProperties() { - return new Property[] {AGE, FACING}; + return new Property[] {AGE}; } public Model getModel(ModelProvider provider, String name, State state) { String stem = name; - String upperstem = name + "_connected"; - if(state.getValue(FACING).getAxis().isVertical()) { - switch(state.getValue(AGE)) { - case 0: - return provider.getModel(stem) - .add(0, -1, 8, 16, 1, 8).rotate(8, 8, 8, Facing.Axis.Y, 45, true) - .n().uv(0, 0, 16, 2).tint().noCull() - .s().uv(16, 0, 0, 2).tint().noCull() - .add(8, -1, 0, 8, 1, 16).rotate(8, 8, 8, Facing.Axis.Y, 45, true) - .w().uv(0, 0, 16, 2).tint().noCull() - .e().uv(16, 0, 0, 2).tint().noCull(); - case 1: - return provider.getModel(stem) - .add(0, -1, 8, 16, 3, 8).rotate(8, 8, 8, Facing.Axis.Y, 45, true) - .n().uv(0, 0, 16, 4).tint().noCull() - .s().uv(16, 0, 0, 4).tint().noCull() - .add(8, -1, 0, 8, 3, 16).rotate(8, 8, 8, Facing.Axis.Y, 45, true) - .w().uv(0, 0, 16, 4).tint().noCull() - .e().uv(16, 0, 0, 4).tint().noCull(); - case 2: - return provider.getModel(stem) - .add(0, -1, 8, 16, 5, 8).rotate(8, 8, 8, Facing.Axis.Y, 45, true) - .n().uv(0, 0, 16, 6).tint().noCull() - .s().uv(16, 0, 0, 6).tint().noCull() - .add(8, -1, 0, 8, 5, 16).rotate(8, 8, 8, Facing.Axis.Y, 45, true) - .w().uv(0, 0, 16, 6).tint().noCull() - .e().uv(16, 0, 0, 6).tint().noCull(); - case 3: - return provider.getModel(stem) - .add(0, -1, 8, 16, 7, 8).rotate(8, 8, 8, Facing.Axis.Y, 45, true) - .n().uv(0, 0, 16, 8).tint().noCull() - .s().uv(16, 0, 0, 8).tint().noCull() - .add(8, -1, 0, 8, 7, 16).rotate(8, 8, 8, Facing.Axis.Y, 45, true) - .w().uv(0, 0, 16, 8).tint().noCull() - .e().uv(16, 0, 0, 8).tint().noCull(); - case 4: - return provider.getModel(stem) - .add(0, -1, 8, 16, 9, 8).rotate(8, 8, 8, Facing.Axis.Y, 45, true) - .n().uv(0, 0, 16, 10).tint().noCull() - .s().uv(16, 0, 0, 10).tint().noCull() - .add(8, -1, 0, 8, 9, 16).rotate(8, 8, 8, Facing.Axis.Y, 45, true) - .w().uv(0, 0, 16, 10).tint().noCull() - .e().uv(16, 0, 0, 10).tint().noCull(); - case 5: - return provider.getModel(stem) - .add(0, -1, 8, 16, 11, 8).rotate(8, 8, 8, Facing.Axis.Y, 45, true) - .n().uv(0, 0, 16, 12).tint().noCull() - .s().uv(16, 0, 0, 12).tint().noCull() - .add(8, -1, 0, 8, 11, 16).rotate(8, 8, 8, Facing.Axis.Y, 45, true) - .w().uv(0, 0, 16, 12).tint().noCull() - .e().uv(16, 0, 0, 12).tint().noCull(); - case 6: - return provider.getModel(stem) - .add(0, -1, 8, 16, 13, 8).rotate(8, 8, 8, Facing.Axis.Y, 45, true) - .n().uv(0, 0, 16, 14).tint().noCull() - .s().uv(16, 0, 0, 14).tint().noCull() - .add(8, -1, 0, 8, 13, 16).rotate(8, 8, 8, Facing.Axis.Y, 45, true) - .w().uv(0, 0, 16, 14).tint().noCull() - .e().uv(16, 0, 0, 14).tint().noCull(); - case 7: - default: - return provider.getModel(stem) - .add(0, -1, 8, 16, 15, 8).rotate(8, 8, 8, Facing.Axis.Y, 45, true) - .n().uv(0, 0, 16, 16).tint().noCull() - .s().uv(16, 0, 0, 16).tint().noCull() - .add(8, -1, 0, 8, 15, 16).rotate(8, 8, 8, Facing.Axis.Y, 45, true) - .w().uv(0, 0, 16, 16).tint().noCull() - .e().uv(16, 0, 0, 16).tint().noCull(); - } - } - else { - return provider.getModel(stem) - .add(0, -1, 8, 16, 7, 8).rotate(8, 8, 8, Facing.Axis.Y, 45, true) - .n().uv(0, 0, 16, 8).tint().noCull() - .s().uv(16, 0, 0, 8).tint().noCull() - .add(8, -1, 0, 8, 7, 16).rotate(8, 8, 8, Facing.Axis.Y, 45, true) - .w().uv(0, 0, 16, 8).tint().noCull() - .e().uv(16, 0, 0, 8).tint().noCull() - .add(0, 0, 8, 9, 16, 8) - .n(upperstem).uv(9, 0, 0, 16).tint().noCull() - .s(upperstem).uv(0, 0, 9, 16).tint().noCull() - .rotate(ModelRotation.getEastRot(state.getValue(FACING).getOpposite(), false)); - } + switch(state.getValue(AGE)) { + case 0: + return provider.getModel(stem) + .add(0, -1, 8, 16, 1, 8).rotate(8, 8, 8, Facing.Axis.Y, 45, true) + .n().uv(0, 0, 16, 2).tint().noCull() + .s().uv(16, 0, 0, 2).tint().noCull() + .add(8, -1, 0, 8, 1, 16).rotate(8, 8, 8, Facing.Axis.Y, 45, true) + .w().uv(0, 0, 16, 2).tint().noCull() + .e().uv(16, 0, 0, 2).tint().noCull(); + case 1: + return provider.getModel(stem) + .add(0, -1, 8, 16, 3, 8).rotate(8, 8, 8, Facing.Axis.Y, 45, true) + .n().uv(0, 0, 16, 4).tint().noCull() + .s().uv(16, 0, 0, 4).tint().noCull() + .add(8, -1, 0, 8, 3, 16).rotate(8, 8, 8, Facing.Axis.Y, 45, true) + .w().uv(0, 0, 16, 4).tint().noCull() + .e().uv(16, 0, 0, 4).tint().noCull(); + case 2: + return provider.getModel(stem) + .add(0, -1, 8, 16, 5, 8).rotate(8, 8, 8, Facing.Axis.Y, 45, true) + .n().uv(0, 0, 16, 6).tint().noCull() + .s().uv(16, 0, 0, 6).tint().noCull() + .add(8, -1, 0, 8, 5, 16).rotate(8, 8, 8, Facing.Axis.Y, 45, true) + .w().uv(0, 0, 16, 6).tint().noCull() + .e().uv(16, 0, 0, 6).tint().noCull(); + case 3: + return provider.getModel(stem) + .add(0, -1, 8, 16, 7, 8).rotate(8, 8, 8, Facing.Axis.Y, 45, true) + .n().uv(0, 0, 16, 8).tint().noCull() + .s().uv(16, 0, 0, 8).tint().noCull() + .add(8, -1, 0, 8, 7, 16).rotate(8, 8, 8, Facing.Axis.Y, 45, true) + .w().uv(0, 0, 16, 8).tint().noCull() + .e().uv(16, 0, 0, 8).tint().noCull(); + case 4: + return provider.getModel(stem) + .add(0, -1, 8, 16, 9, 8).rotate(8, 8, 8, Facing.Axis.Y, 45, true) + .n().uv(0, 0, 16, 10).tint().noCull() + .s().uv(16, 0, 0, 10).tint().noCull() + .add(8, -1, 0, 8, 9, 16).rotate(8, 8, 8, Facing.Axis.Y, 45, true) + .w().uv(0, 0, 16, 10).tint().noCull() + .e().uv(16, 0, 0, 10).tint().noCull(); + case 5: + return provider.getModel(stem) + .add(0, -1, 8, 16, 11, 8).rotate(8, 8, 8, Facing.Axis.Y, 45, true) + .n().uv(0, 0, 16, 12).tint().noCull() + .s().uv(16, 0, 0, 12).tint().noCull() + .add(8, -1, 0, 8, 11, 16).rotate(8, 8, 8, Facing.Axis.Y, 45, true) + .w().uv(0, 0, 16, 12).tint().noCull() + .e().uv(16, 0, 0, 12).tint().noCull(); + case 6: + return provider.getModel(stem) + .add(0, -1, 8, 16, 13, 8).rotate(8, 8, 8, Facing.Axis.Y, 45, true) + .n().uv(0, 0, 16, 14).tint().noCull() + .s().uv(16, 0, 0, 14).tint().noCull() + .add(8, -1, 0, 8, 13, 16).rotate(8, 8, 8, Facing.Axis.Y, 45, true) + .w().uv(0, 0, 16, 14).tint().noCull() + .e().uv(16, 0, 0, 14).tint().noCull(); + case 7: + default: + return provider.getModel(stem) + .add(0, -1, 8, 16, 15, 8).rotate(8, 8, 8, Facing.Axis.Y, 45, true) + .n().uv(0, 0, 16, 16).tint().noCull() + .s().uv(16, 0, 0, 16).tint().noCull() + .add(8, -1, 0, 8, 15, 16).rotate(8, 8, 8, Facing.Axis.Y, 45, true) + .w().uv(0, 0, 16, 16).tint().noCull() + .e().uv(16, 0, 0, 16).tint().noCull(); + } } - protected Item getItemToRegister() { - return new ItemSeeds(this, Blocks.farmland).setDisplay(this.itemName).setMaxAmount(StackSize.XL); - } - - public Property[] getUnsavedProperties() { - return new Property[] {FACING}; + protected boolean hasRegisteredItem() { + return false; } } diff --git a/common/src/main/java/common/block/foliage/BlockTallGrass.java b/common/src/main/java/common/block/foliage/BlockTallGrass.java index 94de0ed2..708ab0b2 100755 --- a/common/src/main/java/common/block/foliage/BlockTallGrass.java +++ b/common/src/main/java/common/block/foliage/BlockTallGrass.java @@ -93,7 +93,7 @@ public class BlockTallGrass extends BlockBush implements IGrowable */ public Item getItemDropped(State state, Random rand, int fortune) { - return rand.chance(8) ? Items.wheat : null; + return rand.chance(8) ? Items.wheat_seed : null; } /** diff --git a/common/src/main/java/common/block/foliage/BlockWart.java b/common/src/main/java/common/block/foliage/BlockWart.java index aeb62260..cd30eaa2 100755 --- a/common/src/main/java/common/block/foliage/BlockWart.java +++ b/common/src/main/java/common/block/foliage/BlockWart.java @@ -8,7 +8,7 @@ import common.item.CheatTab; import common.item.Item; import common.item.ItemStack; import common.item.StackSize; -import common.item.block.ItemSeeds; +import common.item.material.ItemSeeds; import common.model.Model; import common.model.ModelProvider; import common.properties.Property; @@ -83,19 +83,11 @@ public class BlockWart extends BlockBush for (int j = 0; j < i; ++j) { - spawnAsEntity(worldIn, pos, new ItemStack(this.getItem())); + spawnAsEntity(worldIn, pos, new ItemStack(Items.soul_wart)); } } } - /** - * Get the Item that this Block should drop when harvested. - */ - public Item getItemDropped(State state, Random rand, int fortune) - { - return null; - } - /** * Returns the quantity of items to drop on block destruction. */ @@ -114,7 +106,7 @@ public class BlockWart extends BlockBush return BlockCrops.crop(provider, name + "_" + (age >= 2 ? age - 1 : age)); } - protected Item getItemToRegister() { - return new ItemSeeds(this, Blocks.soul_sand).setDisplay("Seelenwarze").setMaxAmount(StackSize.L); + protected boolean hasRegisteredItem() { + return false; } } diff --git a/common/src/main/java/common/block/liquid/BlockLiquid.java b/common/src/main/java/common/block/liquid/BlockLiquid.java index 15ef996e..6860e29e 100755 --- a/common/src/main/java/common/block/liquid/BlockLiquid.java +++ b/common/src/main/java/common/block/liquid/BlockLiquid.java @@ -363,7 +363,7 @@ public abstract class BlockLiquid extends Block return true; } - protected Item getItemToRegister() { - return null; + protected boolean hasRegisteredItem() { + return false; } } diff --git a/common/src/main/java/common/block/natural/BlockFire.java b/common/src/main/java/common/block/natural/BlockFire.java index 365a584d..819d4e11 100755 --- a/common/src/main/java/common/block/natural/BlockFire.java +++ b/common/src/main/java/common/block/natural/BlockFire.java @@ -1137,8 +1137,8 @@ public class BlockFire extends Block return true; } - protected Item getItemToRegister() { - return null; + protected boolean hasRegisteredItem() { + return false; } public Property[] getUnsavedProperties() { diff --git a/common/src/main/java/common/block/natural/BlockMetalOre.java b/common/src/main/java/common/block/natural/BlockMetalOre.java index 87c1bd6c..1261c632 100644 --- a/common/src/main/java/common/block/natural/BlockMetalOre.java +++ b/common/src/main/java/common/block/natural/BlockMetalOre.java @@ -1,9 +1,15 @@ package common.block.natural; +import java.util.List; +import java.util.Map; + +import common.attributes.Attribute; +import common.attributes.UsageSlot; import common.block.SoundType; +import common.entity.npc.EntityNPC; import common.init.MetalType; import common.item.Item; -import common.item.block.ItemMetalBlock; +import common.item.ItemStack; public class BlockMetalOre extends BlockOre { private final MetalType metal; @@ -18,8 +24,23 @@ public class BlockMetalOre extends BlockOre { public MetalType getMetal() { return this.metal; } + + public boolean isMagnetic() { + return this.metal.isMagnetic(); + } + + public void addInformation(ItemStack stack, EntityNPC playerIn, List tooltip) + { + tooltip.add(this.metal.formatSymbol()); + if(this.metal.radioactivity > 0.0f) { + tooltip.add(this.metal.formatRadioactivity()); + } + tooltip.add(this.metal.formatRarity()); + } - protected Item getItemToRegister() { - return new ItemMetalBlock(this); - } + public void getModifiers(Map map, UsageSlot slot) + { + if((slot == null || slot == UsageSlot.INVENTORY) && this.metal.radioactivity > 0.0f) + map.put(Attribute.RADIATION, this.metal.radioactivity * 4.0f * 2.0f); + } } diff --git a/common/src/main/java/common/block/natural/BlockSnow.java b/common/src/main/java/common/block/natural/BlockSnow.java index a8ae396b..d69a590f 100755 --- a/common/src/main/java/common/block/natural/BlockSnow.java +++ b/common/src/main/java/common/block/natural/BlockSnow.java @@ -8,7 +8,6 @@ import common.init.Items; import common.item.CheatTab; import common.item.Item; import common.item.ItemStack; -import common.item.block.ItemSnow; import common.model.Model; import common.model.ModelProvider; import common.model.Transform; @@ -171,8 +170,49 @@ public class BlockSnow extends Block return height == 16 ? provider.getModel("snow").add().all() : provider.getModel("snow").add(0, 0, 0, 16, height, 16).u().noCull().d().nswe().uv(0, 16 - height, 16, 16); } - - protected Item getItemToRegister() { - return new ItemSnow(this); - } + + public boolean place(ItemStack stack, EntityNPC playerIn, World worldIn, BlockPos pos, Facing side, float hitX, float hitY, float hitZ) + { + if (stack.isEmpty()) + { + return false; + } + else if (!playerIn.canPlayerEdit(pos, side, stack)) + { + return false; + } + else + { + State iblockstate = worldIn.getState(pos); + Block block = iblockstate.getBlock(); + BlockPos blockpos = pos; + + if ((side != Facing.UP || block != this) && !block.isReplaceable(worldIn, pos)) + { + blockpos = pos.offset(side); + iblockstate = worldIn.getState(blockpos); + block = iblockstate.getBlock(); + } + + if (block == this) + { + int i = ((Integer)iblockstate.getValue(BlockSnow.LAYERS)).intValue(); + + if (i <= 7) + { + State iblockstate1 = iblockstate.withProperty(BlockSnow.LAYERS, Integer.valueOf(i + 1)); + BoundingBox axisalignedbb = this.getCollisionBoundingBox(worldIn, blockpos, iblockstate1); + + if (axisalignedbb != null && worldIn.checkNoEntityCollision(axisalignedbb) && worldIn.setState(blockpos, iblockstate1, 2)) + { + worldIn.playSound(this.sound.getPlaceSound(), (double)((float)blockpos.getX() + 0.5F), (double)((float)blockpos.getY() + 0.5F), (double)((float)blockpos.getZ() + 0.5F), 1.0F); + stack.decrSize(); + return true; + } + } + } + + return super.place(stack, playerIn, worldIn, blockpos, side, hitX, hitY, hitZ); + } + } } diff --git a/common/src/main/java/common/block/tech/BlockActiveDisplay.java b/common/src/main/java/common/block/tech/BlockActiveDisplay.java index 19e6f4fd..ad379b70 100644 --- a/common/src/main/java/common/block/tech/BlockActiveDisplay.java +++ b/common/src/main/java/common/block/tech/BlockActiveDisplay.java @@ -42,8 +42,8 @@ public class BlockActiveDisplay extends BlockDisplay implements ITileEntityProvi return new TileEntityDisplay(this.density); } - protected Item getItemToRegister() { - return null; + protected boolean hasRegisteredItem() { + return false; } public boolean onBlockActivated(World worldIn, BlockPos pos, State state, EntityNPC playerIn, Facing side, float hitX, float hitY, float hitZ) { diff --git a/common/src/main/java/common/block/tech/BlockBasePressurePlate.java b/common/src/main/java/common/block/tech/BlockBasePressurePlate.java index 6df48695..9880dd34 100755 --- a/common/src/main/java/common/block/tech/BlockBasePressurePlate.java +++ b/common/src/main/java/common/block/tech/BlockBasePressurePlate.java @@ -7,9 +7,9 @@ import common.entity.Entity; import common.init.SoundEvent; import common.item.CheatTab; import common.item.Item; -import common.item.block.ItemPressurePlate; import common.model.Model; import common.model.ModelProvider; +import common.model.Transform; import common.rng.Random; import common.util.BlockPos; import common.util.BoundingBox; @@ -249,9 +249,9 @@ public abstract class BlockBasePressurePlate extends Block .w().uv(1, 15, 15, 16).noCull() .e().uv(1, 15, 15, 16).noCull(); } - - protected Item getItemToRegister() { - return new ItemPressurePlate(this); + + public Transform getTransform() { + return Transform.SMALL_FLAT; } public abstract String getTexture(); diff --git a/common/src/main/java/common/block/tech/BlockButton.java b/common/src/main/java/common/block/tech/BlockButton.java index befe78e5..5cabf9b4 100755 --- a/common/src/main/java/common/block/tech/BlockButton.java +++ b/common/src/main/java/common/block/tech/BlockButton.java @@ -13,7 +13,6 @@ import common.entity.types.EntityLiving; import common.init.SoundEvent; import common.item.CheatTab; import common.item.Item; -import common.item.block.ItemButton; import common.model.Model; import common.model.ModelProvider; import common.model.ModelRotation; @@ -348,8 +347,8 @@ public class BlockButton extends Block implements Directional .ns().uv(5, pressed ? 15 : 14, 11, 16).noCull().we().uv(6, pressed ? 15 : 14, 10, 16).noCull() .rotate(getRotation(state.getValue(FACING))); } - - protected Item getItemToRegister() { - return new ItemButton(this); + + public Transform getTransform() { + return Transform.PANE_SIDE; } } diff --git a/common/src/main/java/common/block/tech/BlockCauldron.java b/common/src/main/java/common/block/tech/BlockCauldron.java index 14577c9c..5a227676 100755 --- a/common/src/main/java/common/block/tech/BlockCauldron.java +++ b/common/src/main/java/common/block/tech/BlockCauldron.java @@ -503,7 +503,7 @@ public class BlockCauldron extends Block return true; } - else if (item == Items.glass_bottle) + else if (item == Items.bottle) { if (i > 0) { diff --git a/common/src/main/java/common/block/tech/BlockFurnace.java b/common/src/main/java/common/block/tech/BlockFurnace.java index 65e4487f..256b866b 100755 --- a/common/src/main/java/common/block/tech/BlockFurnace.java +++ b/common/src/main/java/common/block/tech/BlockFurnace.java @@ -210,7 +210,7 @@ public class BlockFurnace extends Block implements ITileEntityProvider, Rotatabl .s().we().rotate(ModelRotation.getNorthRot(state.getValue(FACING))); } - protected Item getItemToRegister() { - return this.isBurning ? null : super.getItemToRegister(); + protected boolean hasRegisteredItem() { + return !this.isBurning; } } diff --git a/common/src/main/java/common/block/tech/BlockLever.java b/common/src/main/java/common/block/tech/BlockLever.java index 383eb914..fa562a10 100755 --- a/common/src/main/java/common/block/tech/BlockLever.java +++ b/common/src/main/java/common/block/tech/BlockLever.java @@ -7,7 +7,6 @@ import common.entity.types.EntityLiving; import common.init.SoundEvent; import common.item.CheatTab; import common.item.Item; -import common.item.block.ItemBlock; import common.model.Model; import common.model.ModelProvider; import common.model.ModelRotation; diff --git a/common/src/main/java/common/block/tech/BlockLitTorch.java b/common/src/main/java/common/block/tech/BlockLitTorch.java index 6975083f..a7c1d989 100755 --- a/common/src/main/java/common/block/tech/BlockLitTorch.java +++ b/common/src/main/java/common/block/tech/BlockLitTorch.java @@ -107,8 +107,8 @@ public class BlockLitTorch extends BlockTorch { return new Property[] {FUEL}; } - protected Item getItemToRegister() { - return null; + protected boolean hasRegisteredItem() { + return false; } public Item getItem() { diff --git a/common/src/main/java/common/block/tech/BlockNuke.java b/common/src/main/java/common/block/tech/BlockNuke.java index ea27d126..24806dba 100755 --- a/common/src/main/java/common/block/tech/BlockNuke.java +++ b/common/src/main/java/common/block/tech/BlockNuke.java @@ -8,7 +8,6 @@ import common.init.Blocks; import common.init.SoundEvent; import common.item.CheatTab; import common.item.Item; -import common.item.block.ItemBlock; import common.model.Model; import common.model.ModelProvider; import common.util.BlockPos; @@ -56,7 +55,7 @@ public class BlockNuke extends Block return provider.getModel("nuke_side").add().nswe().d("nuke_bottom").u("nuke_top"); } - protected Item getItemToRegister() { - return super.getItemToRegister().setColor(TextColor.RED); + public TextColor getItemColor() { + return TextColor.RED; } } diff --git a/common/src/main/java/common/block/tech/BlockPistonBase.java b/common/src/main/java/common/block/tech/BlockPistonBase.java index 08b693ab..62c8cf68 100755 --- a/common/src/main/java/common/block/tech/BlockPistonBase.java +++ b/common/src/main/java/common/block/tech/BlockPistonBase.java @@ -14,7 +14,6 @@ import common.init.Blocks; import common.init.SoundEvent; import common.item.CheatTab; import common.item.Item; -import common.item.block.ItemPiston; import common.model.Model; import common.model.ModelProvider; import common.model.ModelRotation; @@ -679,8 +678,12 @@ public class BlockPistonBase extends Block implements Directional .rotate(ModelRotation.getNorthRot(state.getValue(FACING).getAxis() == Facing.Axis.Y ? state.getValue(FACING).getOpposite() : state.getValue(FACING))); } - - protected Item getItemToRegister() { - return new ItemPiston(this); - } + + public State getItemState() { + return this.getState().withProperty(FACING, Facing.UP); + } + + public boolean isMagnetic() { + return true; + } } diff --git a/common/src/main/java/common/block/tech/BlockPistonHead.java b/common/src/main/java/common/block/tech/BlockPistonHead.java index 240a1b73..86597acb 100755 --- a/common/src/main/java/common/block/tech/BlockPistonHead.java +++ b/common/src/main/java/common/block/tech/BlockPistonHead.java @@ -229,7 +229,7 @@ public class BlockPistonHead extends Block implements Directional ? state.getValue(FACING).getOpposite() : state.getValue(FACING))); } - protected Item getItemToRegister() { - return null; + protected boolean hasRegisteredItem() { + return false; } } diff --git a/common/src/main/java/common/block/tech/BlockTNT.java b/common/src/main/java/common/block/tech/BlockTNT.java index ab476614..e4dc028d 100755 --- a/common/src/main/java/common/block/tech/BlockTNT.java +++ b/common/src/main/java/common/block/tech/BlockTNT.java @@ -2,6 +2,8 @@ package common.block.tech; import common.block.Block; import common.block.Material; +import common.color.DyeColor; +import common.color.TextColor; import common.entity.Entity; import common.entity.item.EntityTnt; import common.entity.npc.EntityNPC; @@ -11,14 +13,16 @@ import common.init.Items; import common.init.SoundEvent; import common.item.CheatTab; import common.item.Item; -import common.item.block.ItemTNT; +import common.item.ItemStack; import common.model.Model; import common.model.ModelProvider; import common.properties.Property; import common.properties.PropertyBool; +import common.tileentity.TileEntity; import common.util.BlockPos; import common.util.ExtMath; import common.util.Facing; +import common.util.Vec3; import common.world.Explosion; import common.world.State; import common.world.World; @@ -157,7 +161,16 @@ public class BlockTNT extends Block this.onBlockDestroyedByPlayer(world, pos, state.withProperty(BlockTNT.EXPLODE, Boolean.valueOf(true))); } - protected Item getItemToRegister() { - return new ItemTNT(this); + public TextColor getItemColor() { + return TextColor.RED; + } + + public boolean dispense(World world, TileEntity source, Vec3 position, BlockPos blockpos, Facing facing, ItemStack stack) { + blockpos = blockpos.offset(facing); + EntityTnt entitytntprimed = new EntityTnt(world, (double)blockpos.getX() + 0.5D, (double)blockpos.getY(), (double)blockpos.getZ() + 0.5D, (EntityLiving)null, this.power); + world.spawnEntityInWorld(entitytntprimed); + world.playSoundAtEntity(entitytntprimed, SoundEvent.FUSE, 1.0F); + stack.decrSize(); + return true; } } diff --git a/common/src/main/java/common/block/tech/BlockToggleableLight.java b/common/src/main/java/common/block/tech/BlockToggleableLight.java index 18128cb2..6f553711 100755 --- a/common/src/main/java/common/block/tech/BlockToggleableLight.java +++ b/common/src/main/java/common/block/tech/BlockToggleableLight.java @@ -52,7 +52,7 @@ public class BlockToggleableLight extends Block { return true; } - protected Item getItemToRegister() { - return this.isOn ? null : super.getItemToRegister(); + protected boolean hasRegisteredItem() { + return !this.isOn; } } diff --git a/common/src/main/java/common/block/tech/BlockTripWire.java b/common/src/main/java/common/block/tech/BlockTripWire.java index 64c41f85..5691f83e 100755 --- a/common/src/main/java/common/block/tech/BlockTripWire.java +++ b/common/src/main/java/common/block/tech/BlockTripWire.java @@ -649,8 +649,8 @@ public class BlockTripWire extends Block return new Property[] {DISARMED, POWERED}; } - protected Item getItemToRegister() { - return super.getItemToRegister().setMaxAmount(StackSize.XXXL); + public StackSize getMaxStackSize() { + return StackSize.XXXL; } public Property[] getUnsavedProperties() { diff --git a/common/src/main/java/common/block/tech/BlockTripWireHook.java b/common/src/main/java/common/block/tech/BlockTripWireHook.java index cc560bc9..b21e45bf 100755 --- a/common/src/main/java/common/block/tech/BlockTripWireHook.java +++ b/common/src/main/java/common/block/tech/BlockTripWireHook.java @@ -8,7 +8,6 @@ import common.init.Blocks; import common.init.SoundEvent; import common.item.CheatTab; import common.item.Item; -import common.item.block.ItemBlock; import common.model.BlockLayer; import common.model.Model; import common.model.ModelProvider; diff --git a/common/src/main/java/common/block/tech/BlockWire.java b/common/src/main/java/common/block/tech/BlockWire.java index 8727cc0b..474f49d8 100755 --- a/common/src/main/java/common/block/tech/BlockWire.java +++ b/common/src/main/java/common/block/tech/BlockWire.java @@ -535,8 +535,8 @@ public class BlockWire extends Block return wire_none; } - protected Item getItemToRegister() { - return super.getItemToRegister().setMaxAmount(StackSize.XL); + public StackSize getMaxStackSize() { + return StackSize.XL; } public Property[] getUnsavedProperties() { diff --git a/common/src/main/java/common/block/tile/BlockStandingSign.java b/common/src/main/java/common/block/tile/BlockStandingSign.java index 51e364e5..f1d8a776 100755 --- a/common/src/main/java/common/block/tile/BlockStandingSign.java +++ b/common/src/main/java/common/block/tile/BlockStandingSign.java @@ -1,11 +1,18 @@ package common.block.tile; import common.block.Block; +import common.entity.npc.EntityNPC; +import common.init.Blocks; +import common.item.CheatTab; import common.item.Item; -import common.item.block.ItemSign; +import common.item.ItemStack; import common.properties.Property; import common.properties.PropertyInteger; +import common.tileentity.TileEntity; +import common.tileentity.TileEntitySign; import common.util.BlockPos; +import common.util.ExtMath; +import common.util.Facing; import common.world.State; import common.world.World; @@ -16,6 +23,7 @@ public class BlockStandingSign extends BlockSign public BlockStandingSign() { this.setDefaultState(this.getBaseState().withProperty(ROTATION, Integer.valueOf(0))); + this.setTab(CheatTab.DECORATION); } /** @@ -36,8 +44,60 @@ public class BlockStandingSign extends BlockSign { return new Property[] {ROTATION}; } - - protected Item getItemToRegister() { - return new ItemSign(this).setDisplay("Schild"); - } + + public boolean place(ItemStack stack, EntityNPC playerIn, World worldIn, BlockPos pos, Facing side, float hitX, float hitY, float hitZ) + { + if (side == Facing.DOWN) + { + return false; + } + else if (!worldIn.getState(pos).getBlock().getMaterial().isSolid()) + { + return false; + } + else + { + pos = pos.offset(side); + + if (!playerIn.canPlayerEdit(pos, side, stack)) + { + return false; + } + else if (!this.canPlaceBlockAt(worldIn, pos)) + { + return false; + } + else if (worldIn.client) + { + return true; + } + else + { + if (side == Facing.UP) + { + int i = ExtMath.floord((double)((playerIn.rotYaw + 180.0F) * 16.0F / 360.0F) + 0.5D) & 15; + worldIn.setState(pos, Blocks.sign.getState().withProperty(BlockStandingSign.ROTATION, Integer.valueOf(i)), 3); + } + else + { + worldIn.setState(pos, Blocks.wall_sign.getState().withProperty(BlockWallSign.FACING, side), 3); + } + + stack.decrSize(); + TileEntity tileentity = worldIn.getTileEntity(pos); + + if (tileentity instanceof TileEntitySign) + { + playerIn.connection.show((TileEntitySign)tileentity); + } + + return true; + } + } + } + + public boolean canPlace(World worldIn, BlockPos pos, Facing side, EntityNPC player, ItemStack stack) + { + return side != Facing.DOWN && worldIn.getState(pos).getBlock().getMaterial().isSolid(); + } } diff --git a/common/src/main/java/common/block/tile/BlockWallSign.java b/common/src/main/java/common/block/tile/BlockWallSign.java index 62590513..0728c9c1 100755 --- a/common/src/main/java/common/block/tile/BlockWallSign.java +++ b/common/src/main/java/common/block/tile/BlockWallSign.java @@ -68,7 +68,7 @@ public class BlockWallSign extends BlockSign implements Rotatable return new Property[] {FACING}; } - protected Item getItemToRegister() { - return null; + protected boolean hasRegisteredItem() { + return false; } } diff --git a/common/src/main/java/common/enchantment/Enchantment.java b/common/src/main/java/common/enchantment/Enchantment.java index 462c2af6..94d30c18 100755 --- a/common/src/main/java/common/enchantment/Enchantment.java +++ b/common/src/main/java/common/enchantment/Enchantment.java @@ -6,7 +6,7 @@ import common.entity.DamageSource; import common.entity.Entity; import common.entity.types.EntityLiving; import common.item.ItemStack; -import common.item.tool.ItemArmor; +import common.item.material.ItemArmor; import common.item.tool.ItemAxe; import common.item.tool.ItemShears; import common.rng.Random; diff --git a/common/src/main/java/common/enchantment/EnchantmentType.java b/common/src/main/java/common/enchantment/EnchantmentType.java index 10264403..7a92cc68 100755 --- a/common/src/main/java/common/enchantment/EnchantmentType.java +++ b/common/src/main/java/common/enchantment/EnchantmentType.java @@ -2,11 +2,11 @@ package common.enchantment; import common.attributes.UsageSlot; import common.item.Item; -import common.item.tool.ItemArmor; -import common.item.tool.ItemBow; +import common.item.material.ItemArmor; import common.item.tool.ItemFishingRod; -import common.item.tool.ItemSword; import common.item.tool.ItemTool; +import common.item.weapon.ItemBow; +import common.item.weapon.ItemSword; public enum EnchantmentType { diff --git a/common/src/main/java/common/entity/animal/EntityCat.java b/common/src/main/java/common/entity/animal/EntityCat.java index 7305c7e8..2593f1c1 100755 --- a/common/src/main/java/common/entity/animal/EntityCat.java +++ b/common/src/main/java/common/entity/animal/EntityCat.java @@ -24,7 +24,7 @@ import common.init.Items; import common.init.SoundEvent; import common.item.Item; import common.item.ItemStack; -import common.item.tool.ItemFishFood; +import common.item.consumable.ItemFishFood; import common.pathfinding.PathNavigateGround; import common.tags.TagObject; import common.vars.Vars; diff --git a/common/src/main/java/common/entity/animal/EntityChicken.java b/common/src/main/java/common/entity/animal/EntityChicken.java index eeae9711..87ab1578 100755 --- a/common/src/main/java/common/entity/animal/EntityChicken.java +++ b/common/src/main/java/common/entity/animal/EntityChicken.java @@ -45,7 +45,7 @@ public class EntityChicken extends EntityAnimal { this.tasks.addTask(0, new EntityAISwimming(this)); this.tasks.addTask(1, new EntityAIPanic(this, 1.4D)); this.tasks.addTask(2, new EntityAIMate(this, 1.0D)); - this.tasks.addTask(3, new EntityAITempt(this, 1.0D, Items.wheat, false)); + this.tasks.addTask(3, new EntityAITempt(this, 1.0D, Items.wheat_seed, false)); this.tasks.addTask(4, new EntityAIFollowParent(this, 1.1D)); this.tasks.addTask(5, new EntityAIWander(this, 1.0D)); this.tasks.addTask(6, new EntityAIWatchClosest(this, null, 6.0F)); @@ -135,7 +135,7 @@ public class EntityChicken extends EntityAnimal { } public boolean isBreedingItem(ItemStack stack) { - return stack != null && stack.getItem() == Items.wheat; + return stack != null && stack.getItem() == Items.wheat_seed; } public void readEntity(TagObject tag) { diff --git a/common/src/main/java/common/entity/animal/EntityCow.java b/common/src/main/java/common/entity/animal/EntityCow.java index 711a0bb1..da199551 100755 --- a/common/src/main/java/common/entity/animal/EntityCow.java +++ b/common/src/main/java/common/entity/animal/EntityCow.java @@ -28,7 +28,7 @@ public class EntityCow extends EntityAnimal this.tasks.addTask(0, new EntityAISwimming(this)); this.tasks.addTask(1, new EntityAIPanic(this, 2.0D)); this.tasks.addTask(2, new EntityAIMate(this, 1.0D)); - this.tasks.addTask(3, new EntityAITempt(this, 1.25D, Items.wheats, false)); + this.tasks.addTask(3, new EntityAITempt(this, 1.25D, Items.wheat, false)); this.tasks.addTask(4, new EntityAIFollowParent(this, 1.25D)); this.tasks.addTask(5, new EntityAIWander(this, 1.0D)); this.tasks.addTask(6, new EntityAIWatchClosest(this, null, 6.0F)); diff --git a/common/src/main/java/common/entity/animal/EntityHorse.java b/common/src/main/java/common/entity/animal/EntityHorse.java index f1af09e4..d504a4c0 100755 --- a/common/src/main/java/common/entity/animal/EntityHorse.java +++ b/common/src/main/java/common/entity/animal/EntityHorse.java @@ -27,8 +27,8 @@ import common.inventory.IInvBasic; import common.inventory.InventoryBasic; import common.item.Item; import common.item.ItemStack; +import common.item.material.ItemHorseArmor; import common.item.spawner.ItemMobTemplate; -import common.item.tool.ItemHorseArmor; import common.pathfinding.PathNavigateGround; import common.tags.TagObject; import java.util.List; @@ -815,7 +815,7 @@ public class EntityHorse extends EntityAnimal implements IInvBasic int j = 0; int k = 0; - if (itemstack.getItem() == Items.wheats) + if (itemstack.getItem() == Items.wheat) { hp = 2; j = 20; @@ -827,7 +827,7 @@ public class EntityHorse extends EntityAnimal implements IInvBasic j = 30; k = 3; } - else if (itemstack.getItem().getBlock() == Blocks.hay_block) + else if (itemstack.getItem() == Items.hay_block) { hp = 20; j = 180; diff --git a/common/src/main/java/common/entity/animal/EntityRabbit.java b/common/src/main/java/common/entity/animal/EntityRabbit.java index c61374f5..f55445f6 100755 --- a/common/src/main/java/common/entity/animal/EntityRabbit.java +++ b/common/src/main/java/common/entity/animal/EntityRabbit.java @@ -477,7 +477,7 @@ public class EntityRabbit extends EntityAnimal { Block block = state.getBlock(); if(Vars.rabidRabbits) return block != Blocks.bedrock; - return block == Blocks.carrot || block == Blocks.potato || block == Blocks.wheat || block == Blocks.brown_mushroom || + return block == Blocks.carrots || block == Blocks.potatoes || block == Blocks.wheats || block == Blocks.brown_mushroom || block instanceof BlockFlower || block == Blocks.blue_mushroom || block == Blocks.tallgrass; } diff --git a/common/src/main/java/common/entity/animal/EntitySheep.java b/common/src/main/java/common/entity/animal/EntitySheep.java index 7a63f34a..b8fff03e 100755 --- a/common/src/main/java/common/entity/animal/EntitySheep.java +++ b/common/src/main/java/common/entity/animal/EntitySheep.java @@ -70,7 +70,7 @@ public class EntitySheep extends EntityAnimal this.tasks.addTask(0, new EntityAISwimming(this)); this.tasks.addTask(1, new EntityAIPanic(this, 1.25D)); this.tasks.addTask(2, new EntityAIMate(this, 1.0D)); - this.tasks.addTask(3, new EntityAITempt(this, 1.1D, Items.wheats, false)); + this.tasks.addTask(3, new EntityAITempt(this, 1.1D, Items.wheat, false)); this.tasks.addTask(4, new EntityAIFollowParent(this, 1.1D)); this.tasks.addTask(5, this.entityAIEatGrass); this.tasks.addTask(6, new EntityAIWander(this, 1.0D)); diff --git a/common/src/main/java/common/entity/animal/EntityWolf.java b/common/src/main/java/common/entity/animal/EntityWolf.java index b54e234e..e6e709e2 100755 --- a/common/src/main/java/common/entity/animal/EntityWolf.java +++ b/common/src/main/java/common/entity/animal/EntityWolf.java @@ -27,8 +27,8 @@ import common.init.Items; import common.init.SoundEvent; import common.item.Item; import common.item.ItemStack; +import common.item.consumable.ItemFood; import common.item.material.ItemDye; -import common.item.tool.ItemFood; import common.pathfinding.PathNavigateGround; import common.tags.TagObject; import common.util.ExtMath; diff --git a/common/src/main/java/common/entity/npc/EntityMage.java b/common/src/main/java/common/entity/npc/EntityMage.java index 6750a0b4..ab0c3e2e 100755 --- a/common/src/main/java/common/entity/npc/EntityMage.java +++ b/common/src/main/java/common/entity/npc/EntityMage.java @@ -6,7 +6,7 @@ import common.entity.effect.EntityLightning; import common.entity.types.EntityLiving; import common.init.Items; import common.item.ItemStack; -import common.item.tool.ItemPotion; +import common.item.consumable.ItemPotion; import common.rng.Random; import common.util.ExtMath; import common.world.World; diff --git a/common/src/main/java/common/entity/npc/EntityNPC.java b/common/src/main/java/common/entity/npc/EntityNPC.java index e91d17d3..24de5ad3 100755 --- a/common/src/main/java/common/entity/npc/EntityNPC.java +++ b/common/src/main/java/common/entity/npc/EntityNPC.java @@ -62,15 +62,15 @@ import common.inventory.InventoryWarpChest; import common.item.Item; import common.item.ItemAction; import common.item.ItemStack; -import common.item.tool.ItemArmor; -import common.item.tool.ItemBow; -import common.item.tool.ItemGunBase; +import common.item.consumable.ItemPotion; +import common.item.material.ItemArmor; import common.item.tool.ItemHoe; import common.item.tool.ItemKey; -import common.item.tool.ItemPotion; import common.item.tool.ItemShears; -import common.item.tool.ItemSword; import common.item.tool.ItemTool; +import common.item.weapon.ItemBow; +import common.item.weapon.ItemGunBase; +import common.item.weapon.ItemSword; import common.network.IClientPlayer; import common.network.IPlayer; import common.packet.CPacketPlayerPosition; diff --git a/common/src/main/java/common/entity/projectile/EntityDie.java b/common/src/main/java/common/entity/projectile/EntityDie.java index a0736634..1bc3fe3d 100755 --- a/common/src/main/java/common/entity/projectile/EntityDie.java +++ b/common/src/main/java/common/entity/projectile/EntityDie.java @@ -7,7 +7,7 @@ import common.entity.types.EntityThrowable; import common.entity.types.IObjectData; import common.init.SoundEvent; import common.item.ItemStack; -import common.item.tool.ItemDie; +import common.item.projectile.ItemDie; import common.tags.TagObject; import common.util.HitPosition; import common.world.World; diff --git a/common/src/main/java/common/entity/projectile/EntityPotion.java b/common/src/main/java/common/entity/projectile/EntityPotion.java index ca9e808b..5ab29306 100755 --- a/common/src/main/java/common/entity/projectile/EntityPotion.java +++ b/common/src/main/java/common/entity/projectile/EntityPotion.java @@ -10,7 +10,7 @@ import common.entity.types.IObjectData; import common.init.ItemRegistry; import common.init.Items; import common.item.ItemStack; -import common.item.tool.ItemPotion; +import common.item.consumable.ItemPotion; import common.tags.TagObject; import common.util.BlockPos; import common.util.BoundingBox; diff --git a/common/src/main/java/common/entity/types/EntityAnimal.java b/common/src/main/java/common/entity/types/EntityAnimal.java index 590af207..515979e3 100755 --- a/common/src/main/java/common/entity/types/EntityAnimal.java +++ b/common/src/main/java/common/entity/types/EntityAnimal.java @@ -153,7 +153,7 @@ public abstract class EntityAnimal extends EntityLiving */ public boolean isBreedingItem(ItemStack stack) { - return stack == null ? false : stack.getItem() == Items.wheats; + return stack == null ? false : stack.getItem() == Items.wheat; } /** diff --git a/common/src/main/java/common/entity/types/EntityLiving.java b/common/src/main/java/common/entity/types/EntityLiving.java index 7b53caa9..4014fbdf 100755 --- a/common/src/main/java/common/entity/types/EntityLiving.java +++ b/common/src/main/java/common/entity/types/EntityLiving.java @@ -42,8 +42,8 @@ import common.init.Items; import common.init.SoundEvent; import common.item.Item; import common.item.ItemStack; +import common.item.material.ItemArmor; import common.item.spawner.ItemMobTemplate; -import common.item.tool.ItemArmor; import common.network.IPlayer; import common.packet.SPacketEntityAttach; import common.packet.SPacketAnimation; diff --git a/common/src/main/java/common/init/BlockRegistry.java b/common/src/main/java/common/init/BlockRegistry.java index 0ed12445..a6204592 100755 --- a/common/src/main/java/common/init/BlockRegistry.java +++ b/common/src/main/java/common/init/BlockRegistry.java @@ -377,10 +377,10 @@ public abstract class BlockRegistry { Block pumpkin = (new BlockPumpkin()).setHardness(1.0F).setStepSound(SoundType.WOOD).setDisplay("Kürbis"); register("pumpkin", pumpkin); - register("pumpkin_stem", (new BlockStem(pumpkin, "Kürbiskerne")).setHardness(0.0F).setStepSound(SoundType.WOOD).setDisplay("Kürbisstamm")); + register("pumpkin_stem", (new BlockStem(pumpkin)).setHardness(0.0F).setStepSound(SoundType.WOOD).setDisplay("Kürbisstamm")); Block melon = (new BlockMelon()).setHardness(1.0F).setStepSound(SoundType.WOOD).setDisplay("Melone"); register("melon_block", melon); - register("melon_stem", (new BlockStem(melon, "Melonenkerne")).setHardness(0.0F).setStepSound(SoundType.WOOD).setDisplay("Melonenstamm")); + register("melon_stem", (new BlockStem(melon)).setHardness(0.0F).setStepSound(SoundType.WOOD).setDisplay("Melonenstamm")); register("dry_leaves", (new BlockDryLeaves()).setDisplay("Vertrocknetes Laub")); @@ -441,7 +441,6 @@ public abstract class BlockRegistry { register("sponge", (new Block(Material.LOOSE)).setHardness(0.6F).setStepSound(SoundType.GRASS).setDisplay("Schwamm") .setTab(CheatTab.DECORATION)); register("skull", (new BlockSkull()).setHardness(1.0F).setStepSound(SoundType.STONE).setDisplay("Schädel").setTab(CheatTab.DECORATION)); - register("lit_pumpkin", (new BlockPumpkin()).setHardness(1.0F).setStepSound(SoundType.WOOD).setLightLevel(1.0F).setDisplay("Kürbislaterne")); register("hay_block", (new BlockHay()).setHardness(0.5F).setStepSound(SoundType.GRASS).setDisplay("Strohballen") .setTab(CheatTab.DECORATION)); register("sign", (new BlockStandingSign()).setHardness(1.0F).setStepSound(SoundType.WOOD).setDisplay("Schild")); @@ -461,10 +460,10 @@ public abstract class BlockRegistry { register("farmland", (new BlockFarmland()).setHardness(0.6F).setStepSound(SoundType.GRAVEL).setDisplay("Ackerboden") .setShovelHarvestable().setTab(CheatTab.PLANTS)); - register("wheat", (new BlockCrops()).setDisplay("Getreide")); - register("carrot", (new BlockCarrot()).setDisplay("Karotten")); - register("potato", (new BlockPotato()).setDisplay("Kartoffeln")); - register("soul_wart", (new BlockWart()).setDisplay("Seelenwarze")); + register("wheats", (new BlockCrops()).setDisplay("Getreide")); + register("carrots", (new BlockCarrot()).setDisplay("Karotten")); + register("potatoes", (new BlockPotato()).setDisplay("Kartoffeln")); + register("soul_warts", (new BlockWart()).setDisplay("Seelenwarze")); diff --git a/common/src/main/java/common/init/Blocks.java b/common/src/main/java/common/init/Blocks.java index 6a56a125..c56bddff 100755 --- a/common/src/main/java/common/init/Blocks.java +++ b/common/src/main/java/common/init/Blocks.java @@ -131,7 +131,7 @@ public abstract class Blocks { public static final BlockCake cake = get("cake"); public static final Block calcium_block = get("calcium_block"); public static final BlockOre calcium_ore = get("calcium_ore"); - public static final BlockCarrot carrot = get("carrot"); + public static final BlockCarrot carrots = get("carrots"); public static final BlockSandStone carved_sandstone = get("carved_sandstone"); public static final Block carved_stonebrick = get("carved_stonebrick"); public static final BlockCauldron cauldron = get("cauldron"); @@ -304,7 +304,6 @@ public abstract class Blocks { public static final BlockStainedGlassPane lime_glass_pane = get("lime_glass_pane"); public static final BlockWool lime_wool = get("lime_wool"); public static final BlockFurnace lit_furnace = get("lit_furnace"); - public static final BlockPumpkin lit_pumpkin = get("lit_pumpkin"); public static final Block lithium_block = get("lithium_block"); public static final BlockOre lithium_ore = get("lithium_ore"); public static final BlockCarpet magenta_carpet = get("magenta_carpet"); @@ -396,7 +395,7 @@ public abstract class Blocks { public static final BlockPortalFrame portal_frame = get("portal_frame"); public static final Block potassium_block = get("potassium_block"); public static final BlockOre potassium_ore = get("potassium_ore"); - public static final BlockPotato potato = get("potato"); + public static final BlockPotato potatoes = get("potatoes"); public static final Block praseodymium_block = get("praseodymium_block"); public static final BlockOre praseodymium_ore = get("praseodymium_ore"); public static final BlockPumpkin pumpkin = get("pumpkin"); @@ -462,7 +461,7 @@ public abstract class Blocks { public static final BlockOre sodium_ore = get("sodium_ore"); public static final BlockSoulFire soul_fire = get("soul_fire"); public static final BlockSoulSand soul_sand = get("soul_sand"); - public static final BlockWart soul_wart = get("soul_wart"); + public static final BlockWart soul_warts = get("soul_warts"); public static final Block sponge = get("sponge"); public static final BlockStaticLiquid springwater = get("springwater"); public static final BlockDoor spruce_door = get("spruce_door"); @@ -537,7 +536,7 @@ public abstract class Blocks { public static final BlockStaticLiquid water = get("water"); public static final BlockLilyPad waterlily = get("waterlily"); public static final BlockWeb web = get("web"); - public static final BlockCrops wheat = get("wheat"); + public static final BlockCrops wheats = get("wheats"); public static final BlockBed white_bed = get("white_bed"); public static final BlockCarpet white_carpet = get("white_carpet"); public static final BlockColoredClay white_clay = get("white_clay"); diff --git a/common/src/main/java/common/init/BrewingRegistry.java b/common/src/main/java/common/init/BrewingRegistry.java index 0169f607..d09438ac 100755 --- a/common/src/main/java/common/init/BrewingRegistry.java +++ b/common/src/main/java/common/init/BrewingRegistry.java @@ -1,7 +1,7 @@ package common.init; import common.item.ItemStack; -import common.item.tool.ItemPotion; +import common.item.consumable.ItemPotion; public abstract class BrewingRegistry { public static ItemPotion applyIngredient(ItemPotion potion, ItemStack ingredient) { diff --git a/common/src/main/java/common/init/CraftingRegistry.java b/common/src/main/java/common/init/CraftingRegistry.java index 8661cee9..284d8475 100755 --- a/common/src/main/java/common/init/CraftingRegistry.java +++ b/common/src/main/java/common/init/CraftingRegistry.java @@ -35,7 +35,7 @@ public abstract class CraftingRegistry {Items.lapis_block, new ItemStack(Items.lapis_lazuli, 9)}, {Items.charged_block, new ItemStack(Items.charged_powder, 9)}, {Items.coal_block, new ItemStack(Items.coal, 9)}, - {Items.hay_block, new ItemStack(Items.wheats, 9)}, + {Items.hay_block, new ItemStack(Items.wheat, 9)}, {Items.slime_block, new ItemStack(Items.slime_ball, 9)} }; @@ -134,10 +134,10 @@ public abstract class CraftingRegistry add(new ItemStack(Items.gold_nugget, 9), "#", '#', Items.gold_ingot); addShapeless(new ItemStack(Items.mushroom_stew), Items.brown_mushroom, Items.red_mushroom, Items.bowl); - add(new ItemStack(Items.cookie, 8), "#X#", 'X', Items.cocoa_powder, '#', Items.wheats); + add(new ItemStack(Items.cookie, 8), "#X#", 'X', Items.cocoa_powder, '#', Items.wheat); add(new ItemStack(Items.melon_block), "MMM", "MMM", "MMM", 'M', Items.melon); - add(new ItemStack(Items.melon_stem), "M", 'M', Items.melon); - add(new ItemStack(Items.pumpkin_stem, 4), "M", 'M', Items.pumpkin); + add(new ItemStack(Items.melon_seed), "M", 'M', Items.melon); + add(new ItemStack(Items.pumpkin_seed, 4), "M", 'M', Items.pumpkin); addShapeless(new ItemStack(Items.pumpkin_pie), Items.pumpkin, Items.sugar, Items.egg); addShapeless(new ItemStack(Items.fermented_spider_eye), Items.spider_eye, Items.brown_mushroom, Items.sugar); addShapeless(new ItemStack(Items.blazing_powder, 2), Items.demon_rod); @@ -266,22 +266,21 @@ public abstract class CraftingRegistry add(new ItemStack(Items.iron_door, 3), "##", "##", "##", '#', Items.iron_ingot); add(new ItemStack(Items.iron_trapdoor, 1), "##", "##", '#', Items.iron_ingot); - add(new ItemStack(Items.cake, 1), "AAA", "BEB", "CCC", 'A', Items.milk_bucket, 'B', Items.sugar, 'C', Items.wheats, 'E', Items.egg); + add(new ItemStack(Items.cake, 1), "AAA", "BEB", "CCC", 'A', Items.milk_bucket, 'B', Items.sugar, 'C', Items.wheat, 'E', Items.egg); add(new ItemStack(Items.sugar, 1), "#", '#', Items.reeds); add(new ItemStack(Items.torch, 4), "X", "#", 'X', Items.coal, '#', Items.stick); add(new ItemStack(Items.torch, 4), "X", "#", 'X', Items.charcoal, '#', Items.stick); - add(new ItemStack(Items.glass_bottle, 3), "# #", " # ", '#', Items.glass); + add(new ItemStack(Items.bottle, 3), "# #", " # ", '#', Items.glass); add(new ItemStack(Items.rail, 16), "X X", "X#X", "X X", 'X', Items.iron_ingot, '#', Items.stick); add(new ItemStack(Items.minecart, 1), "# #", "###", '#', Items.iron_ingot); add(new ItemStack(Items.cauldron, 1), "# #", "# #", "###", '#', Items.iron_ingot); add(new ItemStack(Items.brewing_stand, 1), " B ", "###", '#', Items.cobblestone, 'B', Items.demon_rod); - add(new ItemStack(Items.lit_pumpkin, 1), "A", "B", 'A', Items.pumpkin, 'B', Items.torch); add(new ItemStack(Items.tnt_minecart, 1), "A", "B", 'A', Items.tnt, 'B', Items.minecart); add(new ItemStack(Items.bucket, 1), "# #", " # ", '#', Items.iron_ingot); add(new ItemStack(Items.flowerpot, 1), "# #", " # ", '#', Items.brick); addShapeless(new ItemStack(Items.lighter, 1), new ItemStack(Items.iron_ingot, 1), new ItemStack(Items.flint, 1)); - add(new ItemStack(Items.bread, 1), "###", '#', Items.wheats); + add(new ItemStack(Items.bread, 1), "###", '#', Items.wheat); add(new ItemStack(Items.fishing_rod, 1), " #", " #X", "# X", '#', Items.stick, 'X', Items.string); add(new ItemStack(Items.carrot_on_a_stick, 1), "# ", " X", '#', Items.fishing_rod, 'X', Items.carrot); diff --git a/common/src/main/java/common/init/ItemRegistry.java b/common/src/main/java/common/init/ItemRegistry.java index 6b6f550c..a5ee760f 100755 --- a/common/src/main/java/common/init/ItemRegistry.java +++ b/common/src/main/java/common/init/ItemRegistry.java @@ -23,65 +23,64 @@ import common.enchantment.Enchantment; import common.entity.npc.CharacterInfo; import common.entity.npc.SpeciesInfo; import common.item.CheatTab; -import common.item.Item; -import common.item.ItemEffect; -import common.item.ItemFragile; -import common.item.ItemMagnetic; +import common.item.Item; import common.item.ItemStack; import common.item.StackSize; +import common.item.consumable.ItemAppleGold; +import common.item.consumable.ItemBucketMilk; +import common.item.consumable.ItemFishFood; +import common.item.consumable.ItemFood; +import common.item.consumable.ItemPotion; +import common.item.consumable.ItemSeedFood; +import common.item.consumable.ItemSoup; +import common.item.material.ItemArmor; import common.item.material.ItemBook; +import common.item.material.ItemBottle; +import common.item.material.ItemBucket; import common.item.material.ItemDye; import common.item.material.ItemEnchantedBook; +import common.item.material.ItemHorseArmor; import common.item.material.ItemMetal; import common.item.material.ItemRecord; +import common.item.material.ItemSeeds; +import common.item.projectile.ItemChargedOrb; +import common.item.projectile.ItemDie; +import common.item.projectile.ItemDynamite; +import common.item.projectile.ItemEgg; +import common.item.projectile.ItemExpBottle; +import common.item.projectile.ItemFireball; +import common.item.projectile.ItemSnowball; import common.item.spawner.ItemBoat; import common.item.spawner.ItemMinecart; import common.item.spawner.ItemMobTemplate; import common.item.spawner.ItemCharTemplate; -import common.item.tool.ItemAmmo; -import common.item.tool.ItemAppleGold; -import common.item.tool.ItemArmor; -import common.item.tool.ItemArrow; import common.item.tool.ItemAxe; -import common.item.tool.ItemBanHammer; -import common.item.tool.ItemBoltgun; -import common.item.tool.ItemBow; -import common.item.tool.ItemBucket; -import common.item.tool.ItemBucketMilk; import common.item.tool.ItemCamera; import common.item.tool.ItemCarrotOnAStick; -import common.item.tool.ItemChargedOrb; -import common.item.tool.ItemDie; -import common.item.tool.ItemDynamite; import common.item.tool.ItemEditor; -import common.item.tool.ItemEgg; -import common.item.tool.ItemExpBottle; -import common.item.tool.ItemExterminator; -import common.item.tool.ItemFireball; -import common.item.tool.ItemRocketLauncher; -import common.item.tool.ItemFishFood; import common.item.tool.ItemFishingRod; import common.item.tool.ItemFire; -import common.item.tool.ItemFood; -import common.item.tool.ItemGlassBottle; import common.item.tool.ItemHoe; -import common.item.tool.ItemHorseArmor; import common.item.tool.ItemScanner; import common.item.tool.ItemKey; import common.item.tool.ItemLead; -import common.item.tool.ItemTrident; import common.item.tool.ItemMagnet; import common.item.tool.ItemNameTag; import common.item.tool.ItemPickaxe; -import common.item.tool.ItemPotion; import common.item.tool.ItemSaddle; import common.item.tool.ItemShears; import common.item.tool.ItemShovel; -import common.item.tool.ItemSnowball; -import common.item.tool.ItemSoup; import common.item.tool.ItemSpaceNavigator; -import common.item.tool.ItemSword; import common.item.tool.ItemWeatherToken; +import common.item.weapon.ItemAmmo; +import common.item.weapon.ItemArrow; +import common.item.weapon.ItemBanHammer; +import common.item.weapon.ItemBoltgun; +import common.item.weapon.ItemBow; +import common.item.weapon.ItemExterminator; +import common.item.weapon.ItemRocketLauncher; +import common.item.weapon.ItemSword; +import common.item.weapon.ItemTrident; import common.log.Log; import common.util.Pair; import common.util.Util; @@ -240,7 +239,7 @@ public abstract class ItemRegistry { register("mushroom_stew", (new ItemSoup(6)).setDisplay("Pilzsuppe")); register("feather", (new Item()).setDisplay("Feder").setTab(CheatTab.MATERIALS).setMaxAmount(StackSize.XXL)); register("gunpowder", (new Item()).setDisplay("Schwarzpulver").setTab(CheatTab.MATERIALS).setMaxAmount(StackSize.XL)); - register("wheats", (new Item()).setDisplay("Weizen").setTab(CheatTab.MATERIALS).setMaxAmount(StackSize.L)); + register("wheat", (new Item()).setDisplay("Weizen").setTab(CheatTab.MATERIALS).setMaxAmount(StackSize.L)); register("bread", (new ItemFood(5, false)).setDisplay("Brot")); register("flint", (new Item()).setDisplay("Feuerstein").setTab(CheatTab.MATERIALS).setMaxAmount(StackSize.L)); register("porkchop", (new ItemFood(3, true)).setDisplay("Rohes Schweinefleisch")); @@ -284,11 +283,11 @@ public abstract class ItemRegistry { register("chicken", (new ItemFood(2, true)).setDisplay("Rohes Hühnchen")); register("cooked_chicken", (new ItemFood(6, true)).setDisplay("Gebratenes Hühnchen")); register("rotten_flesh", (new ItemFood(4, true)).setDisplay("Verrottetes Fleisch")); - register("orb", (new ItemFragile()).setDisplay("Kugel").setTab(CheatTab.MAGIC)); + register("orb", (new Item()).setDisplay("Kugel").setTab(CheatTab.MAGIC).setFragile()); register("demon_rod", (new Item()).setDisplay("Dämonenrute").setTab(CheatTab.MATERIALS).setMaxAmount(StackSize.XL)); register("gold_coin", (new Item()).setDisplay("Goldmünze").setTab(CheatTab.MATERIALS).setMaxAmount(StackSize.XL)); register("gold_nugget", (new Item()).setDisplay("Goldnugget").setTab(CheatTab.METALS).setMaxAmount(StackSize.XL)); - register("glass_bottle", (new ItemGlassBottle()).setDisplay("Glasflasche")); + register("bottle", (new ItemBottle()).setDisplay("Flasche")); for(Pair pot : ItemPotion.getBasePotions()) { register(pot.first(), new ItemPotion(pot.second(), null)); } @@ -311,12 +310,21 @@ public abstract class ItemRegistry { register("written_book", (new Item()).setDisplay("Beschriebenes Buch").setTab(CheatTab.MISC)); Item emerald = (new Item()).setDisplay("Smaragd").setTab(CheatTab.METALS); register("emerald", emerald); + + + register("carrot", new ItemSeedFood(3, Blocks.carrots, Blocks.farmland).setDisplay("Karotte").setMaxAmount(StackSize.L)); + register("potato", new ItemSeedFood(1, Blocks.potatoes, Blocks.farmland).setDisplay("Kartoffel").setMaxAmount(StackSize.L)); + register("wheat_seed", new ItemSeeds(Blocks.wheats, Blocks.farmland).setDisplay("Weizenkörner").setMaxAmount(StackSize.XL)); + register("soul_wart", new ItemSeeds(Blocks.soul_warts, Blocks.soul_sand).setDisplay("Seelenwarze").setMaxAmount(StackSize.L)); + register("pumpkin_seed", new ItemSeeds(Blocks.pumpkin_stem, Blocks.farmland).setDisplay("Kürbiskerne").setMaxAmount(StackSize.XL)); + register("melon_seed", new ItemSeeds(Blocks.melon_stem, Blocks.farmland).setDisplay("Melonenkerne").setMaxAmount(StackSize.XL)); + register("baked_potato", (new ItemFood(5, false)).setDisplay("Ofenkartoffel").setMaxAmount(StackSize.L)); register("poisonous_potato", (new ItemFood(2, false)).setPotionEffect(Effect.POISON, 5, 0, 0.6F).setDisplay("Giftige Kartoffel").setMaxAmount(StackSize.L)); register("golden_carrot", (new ItemFood(6, false)).setDisplay("Goldene Karotte") ); register("carrot_on_a_stick", (new ItemCarrotOnAStick()).setDisplay("Karottenrute")); - register("charge_crystal", (new ItemEffect()).setDisplay("Energiekristall").setTab(CheatTab.MISC).setColor(TextColor.DMAGENTA)); + register("charge_crystal", (new Item()).setDisplay("Energiekristall").setTab(CheatTab.MISC).setColor(TextColor.DMAGENTA).setGleaming()); register("pumpkin_pie", (new ItemFood(8, false)).setDisplay("Kürbiskuchen").setTab(CheatTab.FOOD)); for(Enchantment ench : Enchantment.values()) { register("enchanted_book_" + ench.getName(), (new ItemEnchantedBook(ench, 1)).setUnstackable().setDisplay("Verzaubertes Buch mit " + ench.getFormattedName(1)).setTab(CheatTab.ENCHANTMENTS)); @@ -337,8 +345,8 @@ public abstract class ItemRegistry { for(int z = 0; z < ItemDynamite.DYNAMITE.length; z++) { register("dynamite" + (z == 0 ? "" : ("_" + z)), (new ItemDynamite(z)).setDisplay("Dynamit" + Util.getTierSuffix(z)).setColor(TextColor.RED)); } - register("chain", (new ItemMagnetic()).setDisplay("Kette").setTab(CheatTab.MATERIALS)); - Item chargedPowder = (new ItemMagnetic()).setDisplay("Geladener Staub").setTab(CheatTab.METALS); + register("chain", (new Item()).setDisplay("Kette").setTab(CheatTab.MATERIALS).setMagnetic()); + Item chargedPowder = (new Item()).setDisplay("Geladener Staub").setTab(CheatTab.METALS).setMagnetic(); register("charged_powder", chargedPowder); for(OreType ore : OreType.values()) { diff --git a/common/src/main/java/common/init/Items.java b/common/src/main/java/common/init/Items.java index b303c49b..7f2b07de 100755 --- a/common/src/main/java/common/init/Items.java +++ b/common/src/main/java/common/init/Items.java @@ -11,324 +11,309 @@ import java.util.Set; import common.collect.Lists; import common.collect.Sets; import common.item.*; -import common.item.block.ItemBed; -import common.item.block.ItemBlock; -import common.item.block.ItemButton; -import common.item.block.ItemBlock; -import common.item.block.ItemDoor; -import common.item.block.ItemDoublePlant; -import common.item.block.ItemFence; -import common.item.block.ItemLilyPad; -import common.item.block.ItemMetalBlock; -import common.item.block.ItemPiston; -import common.item.block.ItemPressurePlate; -import common.item.block.ItemSeedFood; -import common.item.block.ItemSeeds; -import common.item.block.ItemSign; -import common.item.block.ItemSlab; -import common.item.block.ItemSnow; -import common.item.block.ItemWall; +import common.item.consumable.ItemAppleGold; +import common.item.consumable.ItemBucketMilk; +import common.item.consumable.ItemFishFood; +import common.item.consumable.ItemFood; +import common.item.consumable.ItemPotion; +import common.item.consumable.ItemSeedFood; +import common.item.consumable.ItemSoup; +import common.item.material.ItemArmor; import common.item.material.ItemBook; +import common.item.material.ItemBottle; +import common.item.material.ItemBucket; import common.item.material.ItemDye; import common.item.material.ItemEnchantedBook; +import common.item.material.ItemHorseArmor; import common.item.material.ItemMetal; import common.item.material.ItemRecord; +import common.item.material.ItemSeeds; +import common.item.projectile.ItemChargedOrb; +import common.item.projectile.ItemDie; +import common.item.projectile.ItemDynamite; +import common.item.projectile.ItemEgg; +import common.item.projectile.ItemExpBottle; +import common.item.projectile.ItemFireball; +import common.item.projectile.ItemSnowball; import common.item.spawner.ItemBoat; import common.item.spawner.ItemMinecart; import common.item.spawner.ItemMobTemplate; import common.item.spawner.ItemCharTemplate; -import common.item.tool.ItemAmmo; -import common.item.tool.ItemAppleGold; -import common.item.tool.ItemArmor; import common.item.tool.ItemAxe; -import common.item.tool.ItemBanHammer; -import common.item.tool.ItemBoltgun; -import common.item.tool.ItemBow; -import common.item.tool.ItemBucket; -import common.item.tool.ItemBucketMilk; import common.item.tool.ItemCamera; import common.item.tool.ItemCarrotOnAStick; -import common.item.tool.ItemChargedOrb; -import common.item.tool.ItemDie; -import common.item.tool.ItemDynamite; import common.item.tool.ItemEditor; -import common.item.tool.ItemEgg; -import common.item.tool.ItemExpBottle; -import common.item.tool.ItemExterminator; -import common.item.tool.ItemFireball; -import common.item.tool.ItemRocketLauncher; -import common.item.tool.ItemFishFood; import common.item.tool.ItemFishingRod; import common.item.tool.ItemFire; -import common.item.tool.ItemFood; -import common.item.tool.ItemGlassBottle; import common.item.tool.ItemHoe; -import common.item.tool.ItemHorseArmor; import common.item.tool.ItemScanner; import common.item.tool.ItemKey; import common.item.tool.ItemLead; -import common.item.tool.ItemTrident; import common.item.tool.ItemMagnet; import common.item.tool.ItemNameTag; import common.item.tool.ItemPickaxe; -import common.item.tool.ItemPotion; import common.item.tool.ItemSaddle; import common.item.tool.ItemShears; import common.item.tool.ItemShovel; -import common.item.tool.ItemSnowball; -import common.item.tool.ItemSoup; import common.item.tool.ItemSpaceNavigator; -import common.item.tool.ItemSword; import common.item.tool.ItemWeatherToken; +import common.item.weapon.ItemAmmo; +import common.item.weapon.ItemBanHammer; +import common.item.weapon.ItemBoltgun; +import common.item.weapon.ItemBow; +import common.item.weapon.ItemExterminator; +import common.item.weapon.ItemRocketLauncher; +import common.item.weapon.ItemSword; +import common.item.weapon.ItemTrident; import common.util.Util; public abstract class Items { public static final ItemMobTemplate dna_sample_fox = get("dna_sample_fox"); public static final ItemCharTemplate dna_sample_highelf = get("dna_sample_highelf"); - public static final ItemDoor acacia_door = get("acacia_door"); - public static final ItemFence acacia_fence = get("acacia_fence"); - public static final ItemBlock acacia_fence_gate = get("acacia_fence_gate"); - public static final ItemBlock acacia_leaves_autumn = get("acacia_leaves_autumn"); - public static final ItemBlock acacia_leaves_snowy = get("acacia_leaves_snowy"); - public static final ItemBlock acacia_leaves_spring = get("acacia_leaves_spring"); - public static final ItemBlock acacia_leaves_summer = get("acacia_leaves_summer"); - public static final ItemBlock acacia_leaves_winter = get("acacia_leaves_winter"); - public static final ItemBlock acacia_log = get("acacia_log"); - public static final ItemBlock acacia_planks = get("acacia_planks"); - public static final ItemBlock acacia_sapling = get("acacia_sapling"); - public static final ItemSlab acacia_slab = get("acacia_slab"); - public static final ItemBlock acacia_stairs = get("acacia_stairs"); + public static final Item acacia_door = get("acacia_door"); + public static final Item acacia_fence = get("acacia_fence"); + public static final Item acacia_fence_gate = get("acacia_fence_gate"); + public static final Item acacia_leaves_autumn = get("acacia_leaves_autumn"); + public static final Item acacia_leaves_snowy = get("acacia_leaves_snowy"); + public static final Item acacia_leaves_spring = get("acacia_leaves_spring"); + public static final Item acacia_leaves_summer = get("acacia_leaves_summer"); + public static final Item acacia_leaves_winter = get("acacia_leaves_winter"); + public static final Item acacia_log = get("acacia_log"); + public static final Item acacia_planks = get("acacia_planks"); + public static final Item acacia_sapling = get("acacia_sapling"); + public static final Item acacia_slab = get("acacia_slab"); + public static final Item acacia_stairs = get("acacia_stairs"); public static final ItemBucket acid_bucket = get("acid_bucket"); public static final Item ahrd_fragment = get("ahrd_fragment"); - public static final ItemBlock allium = get("allium"); - public static final ItemMetalBlock aluminium_block = get("aluminium_block"); + public static final Item allium = get("allium"); + public static final Item aluminium_block = get("aluminium_block"); public static final ItemMetal aluminium_ingot = get("aluminium_ingot"); - public static final ItemMetalBlock aluminium_ore = get("aluminium_ore"); - public static final ItemMetalBlock antimony_block = get("antimony_block"); - public static final ItemMetalBlock antimony_ore = get("antimony_ore"); + public static final Item aluminium_ore = get("aluminium_ore"); + public static final Item antimony_block = get("antimony_block"); + public static final Item antimony_ore = get("antimony_ore"); public static final ItemMetal antimony_powder = get("antimony_powder"); - public static final ItemBlock anvil = get("anvil"); - public static final ItemBlock anvil_damaged_1 = get("anvil_damaged_1"); - public static final ItemBlock anvil_damaged_2 = get("anvil_damaged_2"); + public static final Item anvil = get("anvil"); + public static final Item anvil_damaged_1 = get("anvil_damaged_1"); + public static final Item anvil_damaged_2 = get("anvil_damaged_2"); public static final ItemFood apple = get("apple"); - public static final ItemBlock ardite_block = get("ardite_block"); + public static final Item ardite_block = get("ardite_block"); public static final ItemArmor ardite_boots = get("ardite_boots"); public static final ItemArmor ardite_chestplate = get("ardite_chestplate"); public static final ItemArmor ardite_helmet = get("ardite_helmet"); public static final ItemArmor ardite_leggings = get("ardite_leggings"); - public static final ItemBlock ardite_ore = get("ardite_ore"); + public static final Item ardite_ore = get("ardite_ore"); public static final ItemSword ardite_sword = get("ardite_sword"); public static final Item arrow = get("arrow"); - public static final ItemMetalBlock arsenic_block = get("arsenic_block"); - public static final ItemMetalBlock arsenic_ore = get("arsenic_ore"); + public static final Item arsenic_block = get("arsenic_block"); + public static final Item arsenic_ore = get("arsenic_ore"); public static final ItemMetal arsenic_powder = get("arsenic_powder"); - public static final ItemBlock ash = get("ash"); - public static final ItemBlock assembly_unit = get("assembly_unit"); + public static final Item ash = get("ash"); + public static final Item assembly_unit = get("assembly_unit"); public static final ItemFood baked_potato = get("baked_potato"); public static final ItemBanHammer banhammer = get("banhammer"); - public static final ItemBlock effect_generator = get("effect_generator"); - public static final ItemBlock bedrock = get("bedrock"); + public static final Item effect_generator = get("effect_generator"); + public static final Item bedrock = get("bedrock"); public static final ItemFood beef = get("beef"); - public static final ItemDoor birch_door = get("birch_door"); - public static final ItemFence birch_fence = get("birch_fence"); - public static final ItemBlock birch_fence_gate = get("birch_fence_gate"); - public static final ItemBlock birch_leaves_autumn = get("birch_leaves_autumn"); - public static final ItemBlock birch_leaves_snowy = get("birch_leaves_snowy"); - public static final ItemBlock birch_leaves_spring = get("birch_leaves_spring"); - public static final ItemBlock birch_leaves_summer = get("birch_leaves_summer"); - public static final ItemBlock birch_leaves_winter = get("birch_leaves_winter"); - public static final ItemBlock birch_log = get("birch_log"); - public static final ItemBlock birch_planks = get("birch_planks"); - public static final ItemBlock birch_sapling = get("birch_sapling"); - public static final ItemSlab birch_slab = get("birch_slab"); - public static final ItemBlock birch_stairs = get("birch_stairs"); - public static final ItemMetalBlock bismuth_block = get("bismuth_block"); + public static final Item birch_door = get("birch_door"); + public static final Item birch_fence = get("birch_fence"); + public static final Item birch_fence_gate = get("birch_fence_gate"); + public static final Item birch_leaves_autumn = get("birch_leaves_autumn"); + public static final Item birch_leaves_snowy = get("birch_leaves_snowy"); + public static final Item birch_leaves_spring = get("birch_leaves_spring"); + public static final Item birch_leaves_summer = get("birch_leaves_summer"); + public static final Item birch_leaves_winter = get("birch_leaves_winter"); + public static final Item birch_log = get("birch_log"); + public static final Item birch_planks = get("birch_planks"); + public static final Item birch_sapling = get("birch_sapling"); + public static final Item birch_slab = get("birch_slab"); + public static final Item birch_stairs = get("birch_stairs"); + public static final Item bismuth_block = get("bismuth_block"); public static final ItemMetal bismuth_ingot = get("bismuth_ingot"); - public static final ItemMetalBlock bismuth_ore = get("bismuth_ore"); - public static final ItemBed black_bed = get("black_bed"); - public static final ItemBlock black_brick = get("black_brick"); - public static final ItemFence black_brick_fence = get("black_brick_fence"); - public static final ItemSlab black_brick_slab = get("black_brick_slab"); - public static final ItemBlock black_brick_stairs = get("black_brick_stairs"); - public static final ItemBlock black_carpet = get("black_carpet"); - public static final ItemBlock black_clay = get("black_clay"); - public static final ItemBlock black_glass = get("black_glass"); - public static final ItemBlock black_glass_pane = get("black_glass_pane"); - public static final ItemBlock black_lotus = get("black_lotus"); - public static final ItemMetalBlock black_metal_block = get("black_metal_block"); + public static final Item bismuth_ore = get("bismuth_ore"); + public static final Item black_bed = get("black_bed"); + public static final Item black_brick = get("black_brick"); + public static final Item black_brick_fence = get("black_brick_fence"); + public static final Item black_brick_slab = get("black_brick_slab"); + public static final Item black_brick_stairs = get("black_brick_stairs"); + public static final Item black_carpet = get("black_carpet"); + public static final Item black_clay = get("black_clay"); + public static final Item black_glass = get("black_glass"); + public static final Item black_glass_pane = get("black_glass_pane"); + public static final Item black_lotus = get("black_lotus"); + public static final Item black_metal_block = get("black_metal_block"); public static final ItemMetal black_metal_ingot = get("black_metal_ingot"); - public static final ItemMetalBlock black_metal_ore = get("black_metal_ore"); + public static final Item black_metal_ore = get("black_metal_ore"); public static final Item black_quartz = get("black_quartz"); - public static final ItemBlock black_quartz_block = get("black_quartz_block"); - public static final ItemBlock black_quartz_ore = get("black_quartz_ore"); - public static final ItemBlock black_quartz_ornaments = get("black_quartz_ornaments"); - public static final ItemBlock black_quartz_pillar = get("black_quartz_pillar"); - public static final ItemSlab black_quartz_slab = get("black_quartz_slab"); - public static final ItemBlock black_quartz_stairs = get("black_quartz_stairs"); - public static final ItemBlock black_wool = get("black_wool"); + public static final Item black_quartz_block = get("black_quartz_block"); + public static final Item black_quartz_ore = get("black_quartz_ore"); + public static final Item black_quartz_ornaments = get("black_quartz_ornaments"); + public static final Item black_quartz_pillar = get("black_quartz_pillar"); + public static final Item black_quartz_slab = get("black_quartz_slab"); + public static final Item black_quartz_stairs = get("black_quartz_stairs"); + public static final Item black_wool = get("black_wool"); public static final Item blackbrick = get("blackbrick"); - public static final ItemBlock blackened_cobble = get("blackened_cobble"); - public static final ItemBlock blackened_dirt = get("blackened_dirt"); - public static final ItemBlock blackened_soil = get("blackened_soil"); - public static final ItemBlock blackened_stone = get("blackened_stone"); - public static final ItemDoor blackwood_door = get("blackwood_door"); - public static final ItemFence blackwood_fence = get("blackwood_fence"); - public static final ItemBlock blackwood_fence_gate = get("blackwood_fence_gate"); - public static final ItemBlock blackwood_leaves_autumn = get("blackwood_leaves_autumn"); - public static final ItemBlock blackwood_leaves_snowy = get("blackwood_leaves_snowy"); - public static final ItemBlock blackwood_leaves_spring = get("blackwood_leaves_spring"); - public static final ItemBlock blackwood_leaves_summer = get("blackwood_leaves_summer"); - public static final ItemBlock blackwood_leaves_winter = get("blackwood_leaves_winter"); - public static final ItemBlock blackwood_log = get("blackwood_log"); - public static final ItemBlock blackwood_planks = get("blackwood_planks"); - public static final ItemBlock blackwood_sapling = get("blackwood_sapling"); - public static final ItemSlab blackwood_slab = get("blackwood_slab"); - public static final ItemBlock blackwood_stairs = get("blackwood_stairs"); + public static final Item blackened_cobble = get("blackened_cobble"); + public static final Item blackened_dirt = get("blackened_dirt"); + public static final Item blackened_soil = get("blackened_soil"); + public static final Item blackened_stone = get("blackened_stone"); + public static final Item blackwood_door = get("blackwood_door"); + public static final Item blackwood_fence = get("blackwood_fence"); + public static final Item blackwood_fence_gate = get("blackwood_fence_gate"); + public static final Item blackwood_leaves_autumn = get("blackwood_leaves_autumn"); + public static final Item blackwood_leaves_snowy = get("blackwood_leaves_snowy"); + public static final Item blackwood_leaves_spring = get("blackwood_leaves_spring"); + public static final Item blackwood_leaves_summer = get("blackwood_leaves_summer"); + public static final Item blackwood_leaves_winter = get("blackwood_leaves_winter"); + public static final Item blackwood_log = get("blackwood_log"); + public static final Item blackwood_planks = get("blackwood_planks"); + public static final Item blackwood_sapling = get("blackwood_sapling"); + public static final Item blackwood_slab = get("blackwood_slab"); + public static final Item blackwood_stairs = get("blackwood_stairs"); public static final Item blazing_powder = get("blazing_powder"); public static final Item demon_rod = get("demon_rod"); - public static final ItemBlock blood_brick = get("blood_brick"); - public static final ItemFence blood_brick_fence = get("blood_brick_fence"); - public static final ItemSlab blood_brick_slab = get("blood_brick_slab"); - public static final ItemBlock blood_brick_stairs = get("blood_brick_stairs"); + public static final Item blood_brick = get("blood_brick"); + public static final Item blood_brick_fence = get("blood_brick_fence"); + public static final Item blood_brick_slab = get("blood_brick_slab"); + public static final Item blood_brick_stairs = get("blood_brick_stairs"); public static final ItemBucket blood_bucket = get("blood_bucket"); public static final Item bloodbrick = get("bloodbrick"); - public static final ItemBlock blue_carpet = get("blue_carpet"); - public static final ItemBlock blue_clay = get("blue_clay"); - public static final ItemBlock blue_glass = get("blue_glass"); - public static final ItemBlock blue_glass_pane = get("blue_glass_pane"); - public static final ItemBlock blue_mushroom = get("blue_mushroom"); - public static final ItemBlock blue_orchid = get("blue_orchid"); - public static final ItemBlock blue_wool = get("blue_wool"); + public static final Item blue_carpet = get("blue_carpet"); + public static final Item blue_clay = get("blue_clay"); + public static final Item blue_glass = get("blue_glass"); + public static final Item blue_glass_pane = get("blue_glass_pane"); + public static final Item blue_mushroom = get("blue_mushroom"); + public static final Item blue_orchid = get("blue_orchid"); + public static final Item blue_wool = get("blue_wool"); public static final ItemBoat boat = get("boat"); public static final ItemAmmo bolt = get("bolt"); public static final ItemBoltgun boltgun = get("boltgun"); public static final Item bone = get("bone"); public static final ItemDye bonemeal = get("bonemeal"); public static final ItemBook book = get("book"); - public static final ItemBlock bookshelf = get("bookshelf"); + public static final Item bookshelf = get("bookshelf"); public static final ItemBow bow = get("bow"); public static final Item bowl = get("bowl"); public static final ItemFood bread = get("bread"); - public static final ItemBlock brewing_stand = get("brewing_stand"); + public static final Item brewing_stand = get("brewing_stand"); public static final Item brick = get("brick"); - public static final ItemBlock brick_block = get("brick_block"); - public static final ItemSlab brick_slab = get("brick_slab"); - public static final ItemBlock brick_stairs = get("brick_stairs"); - public static final ItemBlock brown_carpet = get("brown_carpet"); - public static final ItemBlock brown_clay = get("brown_clay"); - public static final ItemBlock brown_glass = get("brown_glass"); - public static final ItemBlock brown_glass_pane = get("brown_glass_pane"); - public static final ItemBlock brown_mushroom = get("brown_mushroom"); - public static final ItemBlock brown_mushroom_block = get("brown_mushroom_block"); - public static final ItemBlock brown_wool = get("brown_wool"); + public static final Item brick_block = get("brick_block"); + public static final Item brick_slab = get("brick_slab"); + public static final Item brick_stairs = get("brick_stairs"); + public static final Item brown_carpet = get("brown_carpet"); + public static final Item brown_clay = get("brown_clay"); + public static final Item brown_glass = get("brown_glass"); + public static final Item brown_glass_pane = get("brown_glass_pane"); + public static final Item brown_mushroom = get("brown_mushroom"); + public static final Item brown_mushroom_block = get("brown_mushroom_block"); + public static final Item brown_wool = get("brown_wool"); public static final ItemBucket bucket = get("bucket"); public static final ItemFire burning_soul = get("burning_soul"); - public static final ItemBlock cactus = get("cactus"); + public static final Item cactus = get("cactus"); public static final ItemDye cactus_green = get("cactus_green"); - public static final ItemBlock cake = get("cake"); - public static final ItemMetalBlock calcium_block = get("calcium_block"); - public static final ItemMetalBlock calcium_ore = get("calcium_ore"); + public static final Item cake = get("cake"); + public static final Item calcium_block = get("calcium_block"); + public static final Item calcium_ore = get("calcium_ore"); public static final ItemMetal calcium_powder = get("calcium_powder"); public static final ItemCamera camera = get("camera"); public static final ItemSeedFood carrot = get("carrot"); public static final ItemCarrotOnAStick carrot_on_a_stick = get("carrot_on_a_stick"); - public static final ItemBlock carved_sandstone = get("carved_sandstone"); - public static final ItemBlock carved_stonebrick = get("carved_stonebrick"); - public static final ItemBlock cauldron = get("cauldron"); - public static final ItemBlock cell_rock = get("cell_rock"); - public static final ItemMagnetic chain = get("chain"); + public static final Item carved_sandstone = get("carved_sandstone"); + public static final Item carved_stonebrick = get("carved_stonebrick"); + public static final Item cauldron = get("cauldron"); + public static final Item cell_rock = get("cell_rock"); + public static final Item chain = get("chain"); public static final ItemArmor chain_boots = get("chain_boots"); public static final ItemArmor chain_chestplate = get("chain_chestplate"); public static final ItemArmor chain_helmet = get("chain_helmet"); public static final ItemArmor chain_leggings = get("chain_leggings"); public static final Item charcoal = get("charcoal"); - public static final ItemEffect charge_crystal = get("charge_crystal"); + public static final Item charge_crystal = get("charge_crystal"); public static final ItemChargedOrb charged_orb = get("charged_orb"); - public static final ItemDoor cherry_door = get("cherry_door"); - public static final ItemFence cherry_fence = get("cherry_fence"); - public static final ItemBlock cherry_fence_gate = get("cherry_fence_gate"); - public static final ItemBlock cherry_leaves_autumn = get("cherry_leaves_autumn"); - public static final ItemBlock cherry_leaves_snowy = get("cherry_leaves_snowy"); - public static final ItemBlock cherry_leaves_spring = get("cherry_leaves_spring"); - public static final ItemBlock cherry_leaves_summer = get("cherry_leaves_summer"); - public static final ItemBlock cherry_leaves_winter = get("cherry_leaves_winter"); - public static final ItemBlock cherry_log = get("cherry_log"); - public static final ItemBlock cherry_planks = get("cherry_planks"); - public static final ItemBlock cherry_sapling = get("cherry_sapling"); - public static final ItemSlab cherry_slab = get("cherry_slab"); - public static final ItemBlock cherry_stairs = get("cherry_stairs"); - public static final ItemBlock chest = get("chest"); + public static final Item cherry_door = get("cherry_door"); + public static final Item cherry_fence = get("cherry_fence"); + public static final Item cherry_fence_gate = get("cherry_fence_gate"); + public static final Item cherry_leaves_autumn = get("cherry_leaves_autumn"); + public static final Item cherry_leaves_snowy = get("cherry_leaves_snowy"); + public static final Item cherry_leaves_spring = get("cherry_leaves_spring"); + public static final Item cherry_leaves_summer = get("cherry_leaves_summer"); + public static final Item cherry_leaves_winter = get("cherry_leaves_winter"); + public static final Item cherry_log = get("cherry_log"); + public static final Item cherry_planks = get("cherry_planks"); + public static final Item cherry_sapling = get("cherry_sapling"); + public static final Item cherry_slab = get("cherry_slab"); + public static final Item cherry_stairs = get("cherry_stairs"); + public static final Item chest = get("chest"); public static final ItemMagnet chick_magnet = get("chick_magnet"); public static final ItemFood chicken = get("chicken"); - public static final ItemMetalBlock chrome_block = get("chrome_block"); + public static final Item chrome_block = get("chrome_block"); public static final ItemMetal chrome_ingot = get("chrome_ingot"); - public static final ItemMetalBlock chrome_ore = get("chrome_ore"); + public static final Item chrome_ore = get("chrome_ore"); public static final Item cinnabar = get("cinnabar"); - public static final ItemBlock cinnabar_block = get("cinnabar_block"); - public static final ItemBlock cinnabar_ore = get("cinnabar_ore"); - public static final ItemBlock clay = get("clay"); + public static final Item cinnabar_block = get("cinnabar_block"); + public static final Item cinnabar_ore = get("cinnabar_ore"); + public static final Item clay = get("clay"); public static final Item clay_ball = get("clay_ball"); public static final ItemArmor cloth_boots = get("cloth_boots"); public static final ItemArmor cloth_chestplate = get("cloth_chestplate"); public static final ItemArmor cloth_helmet = get("cloth_helmet"); public static final ItemArmor cloth_leggings = get("cloth_leggings"); public static final Item coal = get("coal"); - public static final ItemBlock coal_block = get("coal_block"); - public static final ItemBlock coal_ore = get("coal_ore"); - public static final ItemBlock coarse_dirt = get("coarse_dirt"); - public static final ItemMetalBlock cobalt_block = get("cobalt_block"); + public static final Item coal_block = get("coal_block"); + public static final Item coal_ore = get("coal_ore"); + public static final Item coarse_dirt = get("coarse_dirt"); + public static final Item cobalt_block = get("cobalt_block"); public static final ItemMetal cobalt_ingot = get("cobalt_ingot"); - public static final ItemMetalBlock cobalt_ore = get("cobalt_ore"); - public static final ItemBlock cobblestone = get("cobblestone"); - public static final ItemSlab cobblestone_slab = get("cobblestone_slab"); - public static final ItemBlock cobblestone_stairs = get("cobblestone_stairs"); - public static final ItemWall cobblestone_wall = get("cobblestone_wall"); + public static final Item cobalt_ore = get("cobalt_ore"); + public static final Item cobblestone = get("cobblestone"); + public static final Item cobblestone_slab = get("cobblestone_slab"); + public static final Item cobblestone_stairs = get("cobblestone_stairs"); + public static final Item cobblestone_wall = get("cobblestone_wall"); public static final ItemDye cocoa_powder = get("cocoa_powder"); - public static final ItemBlock construction_table = get("construction_table"); + public static final Item construction_table = get("construction_table"); public static final ItemFood cooked_beef = get("cooked_beef"); public static final ItemFood cooked_chicken = get("cooked_chicken"); public static final ItemFood cooked_porkchop = get("cooked_porkchop"); public static final ItemFood cookie = get("cookie"); - public static final ItemMetalBlock copper_block = get("copper_block"); + public static final Item copper_block = get("copper_block"); public static final ItemMetal copper_ingot = get("copper_ingot"); - public static final ItemMetalBlock copper_ore = get("copper_ore"); - public static final ItemBlock core = get("core"); - public static final ItemBlock cracked_stonebrick = get("cracked_stonebrick"); - public static final ItemBlock cyan_carpet = get("cyan_carpet"); - public static final ItemBlock cyan_clay = get("cyan_clay"); + public static final Item copper_ore = get("copper_ore"); + public static final Item core = get("core"); + public static final Item cracked_stonebrick = get("cracked_stonebrick"); + public static final Item cyan_carpet = get("cyan_carpet"); + public static final Item cyan_clay = get("cyan_clay"); public static final ItemDye cyan_dye = get("cyan_dye"); - public static final ItemBlock cyan_glass = get("cyan_glass"); - public static final ItemBlock cyan_glass_pane = get("cyan_glass_pane"); - public static final ItemBlock cyan_wool = get("cyan_wool"); - public static final ItemBlock daisy = get("daisy"); - public static final ItemBlock dandelion = get("dandelion"); + public static final Item cyan_glass = get("cyan_glass"); + public static final Item cyan_glass_pane = get("cyan_glass_pane"); + public static final Item cyan_wool = get("cyan_wool"); + public static final Item daisy = get("daisy"); + public static final Item dandelion = get("dandelion"); public static final ItemFire dark_lighter = get("dark_lighter"); - public static final ItemDoor dark_oak_door = get("dark_oak_door"); - public static final ItemFence dark_oak_fence = get("dark_oak_fence"); - public static final ItemBlock dark_oak_fence_gate = get("dark_oak_fence_gate"); - public static final ItemBlock dark_oak_leaves_autumn = get("dark_oak_leaves_autumn"); - public static final ItemBlock dark_oak_leaves_snowy = get("dark_oak_leaves_snowy"); - public static final ItemBlock dark_oak_leaves_spring = get("dark_oak_leaves_spring"); - public static final ItemBlock dark_oak_leaves_summer = get("dark_oak_leaves_summer"); - public static final ItemBlock dark_oak_leaves_winter = get("dark_oak_leaves_winter"); - public static final ItemBlock dark_oak_log = get("dark_oak_log"); - public static final ItemBlock dark_oak_planks = get("dark_oak_planks"); - public static final ItemBlock dark_oak_sapling = get("dark_oak_sapling"); - public static final ItemSlab dark_oak_slab = get("dark_oak_slab"); - public static final ItemBlock dark_oak_stairs = get("dark_oak_stairs"); - public static final ItemBlock dead_bush = get("dead_bush"); - public static final ItemBlock deadbush = get("deadbush"); + public static final Item dark_oak_door = get("dark_oak_door"); + public static final Item dark_oak_fence = get("dark_oak_fence"); + public static final Item dark_oak_fence_gate = get("dark_oak_fence_gate"); + public static final Item dark_oak_leaves_autumn = get("dark_oak_leaves_autumn"); + public static final Item dark_oak_leaves_snowy = get("dark_oak_leaves_snowy"); + public static final Item dark_oak_leaves_spring = get("dark_oak_leaves_spring"); + public static final Item dark_oak_leaves_summer = get("dark_oak_leaves_summer"); + public static final Item dark_oak_leaves_winter = get("dark_oak_leaves_winter"); + public static final Item dark_oak_log = get("dark_oak_log"); + public static final Item dark_oak_planks = get("dark_oak_planks"); + public static final Item dark_oak_sapling = get("dark_oak_sapling"); + public static final Item dark_oak_slab = get("dark_oak_slab"); + public static final Item dark_oak_stairs = get("dark_oak_stairs"); + public static final Item dead_bush = get("dead_bush"); + public static final Item deadbush = get("deadbush"); public static final Item diamond = get("diamond"); public static final ItemAxe diamond_axe = get("diamond_axe"); - public static final ItemBlock diamond_block = get("diamond_block"); + public static final Item diamond_block = get("diamond_block"); public static final ItemArmor diamond_boots = get("diamond_boots"); public static final ItemArmor diamond_chestplate = get("diamond_chestplate"); public static final ItemArmor diamond_helmet = get("diamond_helmet"); public static final ItemHoe diamond_hoe = get("diamond_hoe"); public static final ItemHorseArmor diamond_horse_armor = get("diamond_horse_armor"); public static final ItemArmor diamond_leggings = get("diamond_leggings"); - public static final ItemBlock diamond_ore = get("diamond_ore"); + public static final Item diamond_ore = get("diamond_ore"); public static final ItemPickaxe diamond_pickaxe = get("diamond_pickaxe"); public static final ItemShears diamond_shears = get("diamond_shears"); public static final ItemShovel diamond_shovel = get("diamond_shovel"); @@ -339,11 +324,11 @@ public abstract class Items { public static final ItemDie die_4 = get("die_4"); public static final ItemDie die_6 = get("die_6"); public static final ItemDie die_8 = get("die_8"); - public static final ItemBlock dirt = get("dirt"); - public static final ItemBlock dispenser = get("dispenser"); - public static final ItemBlock dragon_egg = get("dragon_egg"); - public static final ItemBlock dropper = get("dropper"); - public static final ItemBlock dry_leaves = get("dry_leaves"); + public static final Item dirt = get("dirt"); + public static final Item dispenser = get("dispenser"); + public static final Item dragon_egg = get("dragon_egg"); + public static final Item dropper = get("dropper"); + public static final Item dry_leaves = get("dry_leaves"); public static final ItemDynamite dynamite = get("dynamite"); public static final ItemDynamite dynamite_1 = get("dynamite_1"); public static final ItemDynamite dynamite_2 = get("dynamite_2"); @@ -354,34 +339,34 @@ public abstract class Items { public static final ItemDynamite dynamite_7 = get("dynamite_7"); public static final ItemEgg egg = get("egg"); public static final Item emerald = get("emerald"); - public static final ItemBlock emerald_block = get("emerald_block"); - public static final ItemBlock emerald_ore = get("emerald_ore"); - public static final ItemBlock enchanting_table = get("enchanting_table"); + public static final Item emerald_block = get("emerald_block"); + public static final Item emerald_ore = get("emerald_ore"); + public static final Item enchanting_table = get("enchanting_table"); public static final ItemExpBottle experience_bottle = get("experience_bottle"); public static final ItemExterminator exterminator = get("exterminator"); - public static final ItemBlock farmland = get("farmland"); + public static final Item farmland = get("farmland"); public static final Item feather = get("feather"); public static final Item fermented_spider_eye = get("fermented_spider_eye"); - public static final ItemBlock fern = get("fern"); + public static final Item fern = get("fern"); public static final ItemFireball fireball = get("fireball"); public static final ItemFishingRod fishing_rod = get("fishing_rod"); public static final Item flint = get("flint"); public static final ItemFire lighter = get("lighter"); - public static final ItemBlock floor_tiles = get("floor_tiles"); - public static final ItemBlock floor_tiles_black = get("floor_tiles_black"); - public static final ItemBlock floor_tiles_red = get("floor_tiles_red"); - public static final ItemBlock floor_tiles_white = get("floor_tiles_white"); - public static final ItemBlock flowerpot = get("flowerpot"); - public static final ItemBlock furnace = get("furnace"); + public static final Item floor_tiles = get("floor_tiles"); + public static final Item floor_tiles_black = get("floor_tiles_black"); + public static final Item floor_tiles_red = get("floor_tiles_red"); + public static final Item floor_tiles_white = get("floor_tiles_white"); + public static final Item flowerpot = get("flowerpot"); + public static final Item furnace = get("furnace"); public static final Item gold_coin = get("gold_coin"); public static final Item ghi_fragment = get("ghi_fragment"); - public static final ItemBlock glass = get("glass"); - public static final ItemGlassBottle glass_bottle = get("glass_bottle"); - public static final ItemBlock glass_pane = get("glass_pane"); - public static final ItemBlock glowstone = get("glowstone"); + public static final Item glass = get("glass"); + public static final ItemBottle bottle = get("bottle"); + public static final Item glass_pane = get("glass_pane"); + public static final Item glowstone = get("glowstone"); public static final Item glowstone_dust = get("glowstone_dust"); public static final ItemAxe gold_axe = get("gold_axe"); - public static final ItemMetalBlock gold_block = get("gold_block"); + public static final Item gold_block = get("gold_block"); public static final ItemArmor gold_boots = get("gold_boots"); public static final ItemArmor gold_chestplate = get("gold_chestplate"); public static final ItemArmor gold_helmet = get("gold_helmet"); @@ -390,7 +375,7 @@ public abstract class Items { public static final ItemMetal gold_ingot = get("gold_ingot"); public static final ItemArmor gold_leggings = get("gold_leggings"); public static final Item gold_nugget = get("gold_nugget"); - public static final ItemMetalBlock gold_ore = get("gold_ore"); + public static final Item gold_ore = get("gold_ore"); public static final ItemPickaxe gold_pickaxe = get("gold_pickaxe"); public static final ItemShears gold_shears = get("gold_shears"); public static final ItemShovel gold_shovel = get("gold_shovel"); @@ -399,250 +384,249 @@ public abstract class Items { public static final ItemAppleGold charged_apple = get("charged_apple"); public static final ItemFood golden_carrot = get("golden_carrot"); public static final ItemBucket goo_bucket = get("goo_bucket"); - public static final ItemBlock grass = get("grass"); - public static final ItemBlock gravel = get("gravel"); - public static final ItemBlock gray_carpet = get("gray_carpet"); - public static final ItemBlock gray_clay = get("gray_clay"); + public static final Item grass = get("grass"); + public static final Item gravel = get("gravel"); + public static final Item gray_carpet = get("gray_carpet"); + public static final Item gray_clay = get("gray_clay"); public static final ItemDye gray_dye = get("gray_dye"); - public static final ItemBlock gray_glass = get("gray_glass"); - public static final ItemBlock gray_glass_pane = get("gray_glass_pane"); - public static final ItemBlock gray_wool = get("gray_wool"); - public static final ItemBlock green_carpet = get("green_carpet"); - public static final ItemBlock green_clay = get("green_clay"); - public static final ItemBlock green_glass = get("green_glass"); - public static final ItemBlock green_glass_pane = get("green_glass_pane"); - public static final ItemBlock green_wool = get("green_wool"); + public static final Item gray_glass = get("gray_glass"); + public static final Item gray_glass_pane = get("gray_glass_pane"); + public static final Item gray_wool = get("gray_wool"); + public static final Item green_carpet = get("green_carpet"); + public static final Item green_clay = get("green_clay"); + public static final Item green_glass = get("green_glass"); + public static final Item green_glass_pane = get("green_glass_pane"); + public static final Item green_wool = get("green_wool"); public static final Item gunpowder = get("gunpowder"); public static final ItemAxe gyriyn_axe = get("gyriyn_axe"); - public static final ItemBlock gyriyn_block = get("gyriyn_block"); + public static final Item gyriyn_block = get("gyriyn_block"); public static final ItemHoe gyriyn_hoe = get("gyriyn_hoe"); - public static final ItemBlock gyriyn_ore = get("gyriyn_ore"); + public static final Item gyriyn_ore = get("gyriyn_ore"); public static final ItemPickaxe gyriyn_pickaxe = get("gyriyn_pickaxe"); public static final ItemShovel gyriyn_shovel = get("gyriyn_shovel"); - public static final ItemBlock hardened_clay = get("hardened_clay"); - public static final ItemBlock hay_block = get("hay_block"); - public static final ItemPressurePlate heavy_weighted_pressure_plate = get("heavy_weighted_pressure_plate"); - public static final ItemBlock hellrock = get("hellrock"); - public static final ItemBlock hopper = get("hopper"); - public static final ItemBlock houstonia = get("houstonia"); + public static final Item hardened_clay = get("hardened_clay"); + public static final Item hay_block = get("hay_block"); + public static final Item heavy_weighted_pressure_plate = get("heavy_weighted_pressure_plate"); + public static final Item hellrock = get("hellrock"); + public static final Item hopper = get("hopper"); + public static final Item houstonia = get("houstonia"); public static final ItemBucket hydrogen_bucket = get("hydrogen_bucket"); - public static final ItemBlock ice = get("ice"); + public static final Item ice = get("ice"); public static final ItemScanner scanner = get("scanner"); public static final ItemDye ink_sack = get("ink_sack"); - public static final ItemMetalBlock iodine_block = get("iodine_block"); - public static final ItemMetalBlock iodine_ore = get("iodine_ore"); + public static final Item iodine_block = get("iodine_block"); + public static final Item iodine_ore = get("iodine_ore"); public static final ItemMetal iodine_powder = get("iodine_powder"); public static final ItemAxe iron_axe = get("iron_axe"); - public static final ItemBlock iron_bars = get("iron_bars"); - public static final ItemMetalBlock iron_block = get("iron_block"); + public static final Item iron_bars = get("iron_bars"); + public static final Item iron_block = get("iron_block"); public static final ItemArmor iron_boots = get("iron_boots"); public static final ItemArmor iron_chestplate = get("iron_chestplate"); - public static final ItemDoor iron_door = get("iron_door"); + public static final Item iron_door = get("iron_door"); public static final ItemArmor iron_helmet = get("iron_helmet"); public static final ItemHoe iron_hoe = get("iron_hoe"); public static final ItemHorseArmor iron_horse_armor = get("iron_horse_armor"); public static final ItemMetal iron_ingot = get("iron_ingot"); public static final ItemArmor iron_leggings = get("iron_leggings"); - public static final ItemMetalBlock iron_ore = get("iron_ore"); + public static final Item iron_ore = get("iron_ore"); public static final ItemPickaxe iron_pickaxe = get("iron_pickaxe"); public static final ItemShears iron_shears = get("iron_shears"); public static final ItemShovel iron_shovel = get("iron_shovel"); public static final ItemSword iron_sword = get("iron_sword"); - public static final ItemBlock iron_trapdoor = get("iron_trapdoor"); - public static final ItemDoor jungle_door = get("jungle_door"); - public static final ItemFence jungle_fence = get("jungle_fence"); - public static final ItemBlock jungle_fence_gate = get("jungle_fence_gate"); - public static final ItemBlock jungle_leaves_autumn = get("jungle_leaves_autumn"); - public static final ItemBlock jungle_leaves_snowy = get("jungle_leaves_snowy"); - public static final ItemBlock jungle_leaves_spring = get("jungle_leaves_spring"); - public static final ItemBlock jungle_leaves_summer = get("jungle_leaves_summer"); - public static final ItemBlock jungle_leaves_winter = get("jungle_leaves_winter"); - public static final ItemBlock jungle_log = get("jungle_log"); - public static final ItemBlock jungle_planks = get("jungle_planks"); - public static final ItemBlock jungle_sapling = get("jungle_sapling"); - public static final ItemSlab jungle_slab = get("jungle_slab"); - public static final ItemBlock jungle_stairs = get("jungle_stairs"); - public static final ItemBlock ladder = get("ladder"); - public static final ItemBlock lapis_block = get("lapis_block"); + public static final Item iron_trapdoor = get("iron_trapdoor"); + public static final Item jungle_door = get("jungle_door"); + public static final Item jungle_fence = get("jungle_fence"); + public static final Item jungle_fence_gate = get("jungle_fence_gate"); + public static final Item jungle_leaves_autumn = get("jungle_leaves_autumn"); + public static final Item jungle_leaves_snowy = get("jungle_leaves_snowy"); + public static final Item jungle_leaves_spring = get("jungle_leaves_spring"); + public static final Item jungle_leaves_summer = get("jungle_leaves_summer"); + public static final Item jungle_leaves_winter = get("jungle_leaves_winter"); + public static final Item jungle_log = get("jungle_log"); + public static final Item jungle_planks = get("jungle_planks"); + public static final Item jungle_sapling = get("jungle_sapling"); + public static final Item jungle_slab = get("jungle_slab"); + public static final Item jungle_stairs = get("jungle_stairs"); + public static final Item ladder = get("ladder"); + public static final Item lapis_block = get("lapis_block"); public static final ItemDye lapis_lazuli = get("lapis_lazuli"); - public static final ItemBlock lapis_ore = get("lapis_ore"); - public static final ItemDoublePlant large_fern = get("large_fern"); - public static final ItemDoublePlant large_tallgrass = get("large_tallgrass"); + public static final Item lapis_ore = get("lapis_ore"); + public static final Item large_fern = get("large_fern"); + public static final Item large_tallgrass = get("large_tallgrass"); public static final ItemBucket lava_bucket = get("lava_bucket"); public static final ItemLead lead = get("lead"); - public static final ItemMetalBlock lead_block = get("lead_block"); + public static final Item lead_block = get("lead_block"); public static final ItemMetal lead_ingot = get("lead_ingot"); - public static final ItemMetalBlock lead_ore = get("lead_ore"); + public static final Item lead_ore = get("lead_ore"); public static final Item leather = get("leather"); public static final ItemArmor leather_boots = get("leather_boots"); public static final ItemArmor leather_chestplate = get("leather_chestplate"); public static final ItemArmor leather_helmet = get("leather_helmet"); public static final ItemArmor leather_leggings = get("leather_leggings"); - public static final ItemBlock lever = get("lever"); - public static final ItemBlock light_blue_carpet = get("light_blue_carpet"); - public static final ItemBlock light_blue_clay = get("light_blue_clay"); + public static final Item lever = get("lever"); + public static final Item light_blue_carpet = get("light_blue_carpet"); + public static final Item light_blue_clay = get("light_blue_clay"); public static final ItemDye light_blue_dye = get("light_blue_dye"); - public static final ItemBlock light_blue_glass = get("light_blue_glass"); - public static final ItemBlock light_blue_glass_pane = get("light_blue_glass_pane"); - public static final ItemBlock light_blue_wool = get("light_blue_wool"); - public static final ItemPressurePlate light_weighted_pressure_plate = get("light_weighted_pressure_plate"); + public static final Item light_blue_glass = get("light_blue_glass"); + public static final Item light_blue_glass_pane = get("light_blue_glass_pane"); + public static final Item light_blue_wool = get("light_blue_wool"); + public static final Item light_weighted_pressure_plate = get("light_weighted_pressure_plate"); public static final ItemTrident trident = get("trident"); - public static final ItemBlock lime_carpet = get("lime_carpet"); - public static final ItemBlock lime_clay = get("lime_clay"); + public static final Item lime_carpet = get("lime_carpet"); + public static final Item lime_clay = get("lime_clay"); public static final ItemDye lime_dye = get("lime_dye"); - public static final ItemBlock lime_glass = get("lime_glass"); - public static final ItemBlock lime_glass_pane = get("lime_glass_pane"); - public static final ItemBlock lime_wool = get("lime_wool"); - public static final ItemBlock lit_pumpkin = get("lit_pumpkin"); - public static final ItemMetalBlock lithium_block = get("lithium_block"); + public static final Item lime_glass = get("lime_glass"); + public static final Item lime_glass_pane = get("lime_glass_pane"); + public static final Item lime_wool = get("lime_wool"); + public static final Item lithium_block = get("lithium_block"); public static final ItemMetal lithium_ingot = get("lithium_ingot"); - public static final ItemMetalBlock lithium_ore = get("lithium_ore"); - public static final ItemBlock magenta_carpet = get("magenta_carpet"); - public static final ItemBlock magenta_clay = get("magenta_clay"); + public static final Item lithium_ore = get("lithium_ore"); + public static final Item magenta_carpet = get("magenta_carpet"); + public static final Item magenta_clay = get("magenta_clay"); public static final ItemDye magenta_dye = get("magenta_dye"); - public static final ItemBlock magenta_glass = get("magenta_glass"); - public static final ItemBlock magenta_glass_pane = get("magenta_glass_pane"); - public static final ItemBlock magenta_wool = get("magenta_wool"); + public static final Item magenta_glass = get("magenta_glass"); + public static final Item magenta_glass_pane = get("magenta_glass_pane"); + public static final Item magenta_wool = get("magenta_wool"); public static final ItemBucket magma_bucket = get("magma_bucket"); public static final Item magma_cream = get("magma_cream"); - public static final ItemMetalBlock magnesium_block = get("magnesium_block"); - public static final ItemMetalBlock magnesium_ore = get("magnesium_ore"); + public static final Item magnesium_block = get("magnesium_block"); + public static final Item magnesium_ore = get("magnesium_ore"); public static final ItemMetal magnesium_powder = get("magnesium_powder"); public static final ItemMagnet magnet = get("magnet"); - public static final ItemMetalBlock manganese_block = get("manganese_block"); + public static final Item manganese_block = get("manganese_block"); public static final ItemMetal manganese_ingot = get("manganese_ingot"); - public static final ItemMetalBlock manganese_ore = get("manganese_ore"); - public static final ItemDoor maple_door = get("maple_door"); - public static final ItemFence maple_fence = get("maple_fence"); - public static final ItemBlock maple_fence_gate = get("maple_fence_gate"); - public static final ItemBlock maple_leaves_autumn = get("maple_leaves_autumn"); - public static final ItemBlock maple_leaves_snowy = get("maple_leaves_snowy"); - public static final ItemBlock maple_leaves_spring = get("maple_leaves_spring"); - public static final ItemBlock maple_leaves_summer = get("maple_leaves_summer"); - public static final ItemBlock maple_leaves_winter = get("maple_leaves_winter"); - public static final ItemBlock maple_log = get("maple_log"); - public static final ItemBlock maple_planks = get("maple_planks"); - public static final ItemBlock maple_sapling = get("maple_sapling"); - public static final ItemSlab maple_slab = get("maple_slab"); - public static final ItemBlock maple_stairs = get("maple_stairs"); + public static final Item manganese_ore = get("manganese_ore"); + public static final Item maple_door = get("maple_door"); + public static final Item maple_fence = get("maple_fence"); + public static final Item maple_fence_gate = get("maple_fence_gate"); + public static final Item maple_leaves_autumn = get("maple_leaves_autumn"); + public static final Item maple_leaves_snowy = get("maple_leaves_snowy"); + public static final Item maple_leaves_spring = get("maple_leaves_spring"); + public static final Item maple_leaves_summer = get("maple_leaves_summer"); + public static final Item maple_leaves_winter = get("maple_leaves_winter"); + public static final Item maple_log = get("maple_log"); + public static final Item maple_planks = get("maple_planks"); + public static final Item maple_sapling = get("maple_sapling"); + public static final Item maple_slab = get("maple_slab"); + public static final Item maple_stairs = get("maple_stairs"); public static final ItemFood melon = get("melon"); - public static final ItemBlock melon_block = get("melon_block"); - public static final ItemSeeds melon_stem = get("melon_stem"); + public static final Item melon_block = get("melon_block"); + public static final ItemSeeds melon_seed = get("melon_seed"); public static final ItemBucket mercury_bucket = get("mercury_bucket"); public static final ItemBucketMilk milk_bucket = get("milk_bucket"); public static final ItemMinecart minecart = get("minecart"); - public static final ItemBlock mob_spawner = get("mob_spawner"); - public static final ItemBlock moon_cheese = get("moon_cheese"); - public static final ItemBlock moon_rock = get("moon_rock"); - public static final ItemBlock mossy_cobblestone = get("mossy_cobblestone"); - public static final ItemWall mossy_cobblestone_wall = get("mossy_cobblestone_wall"); - public static final ItemBlock mossy_stonebrick = get("mossy_stonebrick"); + public static final Item mob_spawner = get("mob_spawner"); + public static final Item moon_cheese = get("moon_cheese"); + public static final Item moon_rock = get("moon_rock"); + public static final Item mossy_cobblestone = get("mossy_cobblestone"); + public static final Item mossy_cobblestone_wall = get("mossy_cobblestone_wall"); + public static final Item mossy_stonebrick = get("mossy_stonebrick"); public static final ItemSoup mushroom_stew = get("mushroom_stew"); - public static final ItemBlock mycelium = get("mycelium"); + public static final Item mycelium = get("mycelium"); public static final ItemNameTag name_tag = get("name_tag"); public static final ItemSpaceNavigator navigator = get("navigator"); - public static final ItemMetalBlock neodymium_block = get("neodymium_block"); + public static final Item neodymium_block = get("neodymium_block"); public static final ItemMetal neodymium_ingot = get("neodymium_ingot"); - public static final ItemMetalBlock neodymium_ore = get("neodymium_ore"); - public static final ItemMetalBlock neptunium_block = get("neptunium_block"); + public static final Item neodymium_ore = get("neodymium_ore"); + public static final Item neptunium_block = get("neptunium_block"); public static final ItemMetal neptunium_ingot = get("neptunium_ingot"); - public static final ItemMetalBlock neptunium_ore = get("neptunium_ore"); + public static final Item neptunium_ore = get("neptunium_ore"); public static final ItemAxe nichun_axe = get("nichun_axe"); - public static final ItemBlock nichun_block = get("nichun_block"); + public static final Item nichun_block = get("nichun_block"); public static final ItemArmor nichun_boots = get("nichun_boots"); public static final ItemArmor nichun_chestplate = get("nichun_chestplate"); public static final ItemArmor nichun_helmet = get("nichun_helmet"); public static final ItemHoe nichun_hoe = get("nichun_hoe"); public static final ItemArmor nichun_leggings = get("nichun_leggings"); - public static final ItemBlock nichun_ore = get("nichun_ore"); + public static final Item nichun_ore = get("nichun_ore"); public static final ItemPickaxe nichun_pickaxe = get("nichun_pickaxe"); public static final ItemShovel nichun_shovel = get("nichun_shovel"); public static final ItemSword nichun_sword = get("nichun_sword"); - public static final ItemMetalBlock nickel_block = get("nickel_block"); + public static final Item nickel_block = get("nickel_block"); public static final ItemMetal nickel_ingot = get("nickel_ingot"); - public static final ItemMetalBlock nickel_ore = get("nickel_ore"); + public static final Item nickel_ore = get("nickel_ore"); public static final Item nieh_fragment = get("nieh_fragment"); public static final ItemBucket nukage_bucket = get("nukage_bucket"); - public static final ItemBlock nuke = get("nuke"); - public static final ItemDoor oak_door = get("oak_door"); - public static final ItemFence oak_fence = get("oak_fence"); - public static final ItemBlock oak_fence_gate = get("oak_fence_gate"); - public static final ItemBlock oak_leaves_autumn = get("oak_leaves_autumn"); - public static final ItemBlock oak_leaves_snowy = get("oak_leaves_snowy"); - public static final ItemBlock oak_leaves_spring = get("oak_leaves_spring"); - public static final ItemBlock oak_leaves_summer = get("oak_leaves_summer"); - public static final ItemBlock oak_leaves_winter = get("oak_leaves_winter"); - public static final ItemBlock oak_log = get("oak_log"); - public static final ItemBlock oak_planks = get("oak_planks"); - public static final ItemBlock oak_sapling = get("oak_sapling"); - public static final ItemSlab oak_slab = get("oak_slab"); - public static final ItemBlock oak_stairs = get("oak_stairs"); - public static final ItemBlock obsidian = get("obsidian"); - public static final ItemBlock orange_carpet = get("orange_carpet"); - public static final ItemBlock orange_clay = get("orange_clay"); + public static final Item nuke = get("nuke"); + public static final Item oak_door = get("oak_door"); + public static final Item oak_fence = get("oak_fence"); + public static final Item oak_fence_gate = get("oak_fence_gate"); + public static final Item oak_leaves_autumn = get("oak_leaves_autumn"); + public static final Item oak_leaves_snowy = get("oak_leaves_snowy"); + public static final Item oak_leaves_spring = get("oak_leaves_spring"); + public static final Item oak_leaves_summer = get("oak_leaves_summer"); + public static final Item oak_leaves_winter = get("oak_leaves_winter"); + public static final Item oak_log = get("oak_log"); + public static final Item oak_planks = get("oak_planks"); + public static final Item oak_sapling = get("oak_sapling"); + public static final Item oak_slab = get("oak_slab"); + public static final Item oak_stairs = get("oak_stairs"); + public static final Item obsidian = get("obsidian"); + public static final Item orange_carpet = get("orange_carpet"); + public static final Item orange_clay = get("orange_clay"); public static final ItemDye orange_dye = get("orange_dye"); - public static final ItemBlock orange_glass = get("orange_glass"); - public static final ItemBlock orange_glass_pane = get("orange_glass_pane"); - public static final ItemBlock orange_tulip = get("orange_tulip"); - public static final ItemBlock orange_wool = get("orange_wool"); - public static final ItemFragile orb = get("orb"); - public static final ItemBlock packed_ice = get("packed_ice"); - public static final ItemDoublePlant paeonia = get("paeonia"); - public static final ItemMetalBlock palladium_block = get("palladium_block"); + public static final Item orange_glass = get("orange_glass"); + public static final Item orange_glass_pane = get("orange_glass_pane"); + public static final Item orange_tulip = get("orange_tulip"); + public static final Item orange_wool = get("orange_wool"); + public static final Item orb = get("orb"); + public static final Item packed_ice = get("packed_ice"); + public static final Item paeonia = get("paeonia"); + public static final Item palladium_block = get("palladium_block"); public static final ItemMetal palladium_ingot = get("palladium_ingot"); - public static final ItemMetalBlock palladium_ore = get("palladium_ore"); + public static final Item palladium_ore = get("palladium_ore"); public static final Item paper = get("paper"); - public static final ItemBlock pentagram = get("pentagram"); - public static final ItemMetalBlock phosphor_block = get("phosphor_block"); - public static final ItemMetalBlock phosphor_ore = get("phosphor_ore"); + public static final Item pentagram = get("pentagram"); + public static final Item phosphor_block = get("phosphor_block"); + public static final Item phosphor_ore = get("phosphor_ore"); public static final ItemMetal phosphor_powder = get("phosphor_powder"); - public static final ItemBlock pink_carpet = get("pink_carpet"); - public static final ItemBlock pink_clay = get("pink_clay"); + public static final Item pink_carpet = get("pink_carpet"); + public static final Item pink_clay = get("pink_clay"); public static final ItemDye pink_dye = get("pink_dye"); - public static final ItemBlock pink_glass = get("pink_glass"); - public static final ItemBlock pink_glass_pane = get("pink_glass_pane"); - public static final ItemBlock pink_tulip = get("pink_tulip"); - public static final ItemBlock pink_wool = get("pink_wool"); - public static final ItemPiston piston = get("piston"); - public static final ItemMetalBlock platinum_block = get("platinum_block"); + public static final Item pink_glass = get("pink_glass"); + public static final Item pink_glass_pane = get("pink_glass_pane"); + public static final Item pink_tulip = get("pink_tulip"); + public static final Item pink_wool = get("pink_wool"); + public static final Item piston = get("piston"); + public static final Item platinum_block = get("platinum_block"); public static final ItemMetal platinum_ingot = get("platinum_ingot"); - public static final ItemMetalBlock platinum_ore = get("platinum_ore"); - public static final ItemMetalBlock plutonium_block = get("plutonium_block"); + public static final Item platinum_ore = get("platinum_ore"); + public static final Item plutonium_block = get("plutonium_block"); public static final ItemMetal plutonium_ingot = get("plutonium_ingot"); - public static final ItemMetalBlock plutonium_ore = get("plutonium_ore"); - public static final ItemBlock podzol = get("podzol"); + public static final Item plutonium_ore = get("plutonium_ore"); + public static final Item podzol = get("podzol"); public static final ItemFood poisonous_potato = get("poisonous_potato"); - public static final ItemBlock poppy = get("poppy"); + public static final Item poppy = get("poppy"); public static final ItemFood porkchop = get("porkchop"); - public static final ItemBlock portal_frame = get("portal_frame"); - public static final ItemMetalBlock potassium_block = get("potassium_block"); - public static final ItemMetalBlock potassium_ore = get("potassium_ore"); + public static final Item portal_frame = get("portal_frame"); + public static final Item potassium_block = get("potassium_block"); + public static final Item potassium_ore = get("potassium_ore"); public static final ItemMetal potassium_powder = get("potassium_powder"); public static final ItemSeedFood potato = get("potato"); - public static final ItemMetalBlock praseodymium_block = get("praseodymium_block"); + public static final Item praseodymium_block = get("praseodymium_block"); public static final ItemMetal praseodymium_ingot = get("praseodymium_ingot"); - public static final ItemMetalBlock praseodymium_ore = get("praseodymium_ore"); - public static final ItemBlock pumpkin = get("pumpkin"); + public static final Item praseodymium_ore = get("praseodymium_ore"); + public static final Item pumpkin = get("pumpkin"); public static final ItemFood pumpkin_pie = get("pumpkin_pie"); - public static final ItemSeeds pumpkin_stem = get("pumpkin_stem"); - public static final ItemBed purple_bed = get("purple_bed"); - public static final ItemBlock purple_carpet = get("purple_carpet"); - public static final ItemBlock purple_clay = get("purple_clay"); + public static final ItemSeeds pumpkin_seed = get("pumpkin_seed"); + public static final Item purple_bed = get("purple_bed"); + public static final Item purple_carpet = get("purple_carpet"); + public static final Item purple_clay = get("purple_clay"); public static final ItemDye purple_dye = get("purple_dye"); - public static final ItemBlock purple_glass = get("purple_glass"); - public static final ItemBlock purple_glass_pane = get("purple_glass_pane"); - public static final ItemBlock purple_wool = get("purple_wool"); + public static final Item purple_glass = get("purple_glass"); + public static final Item purple_glass_pane = get("purple_glass_pane"); + public static final Item purple_wool = get("purple_wool"); public static final Item quartz = get("quartz"); - public static final ItemBlock quartz_block = get("quartz_block"); - public static final ItemBlock quartz_ore = get("quartz_ore"); - public static final ItemBlock quartz_ornaments = get("quartz_ornaments"); - public static final ItemBlock quartz_pillar = get("quartz_pillar"); - public static final ItemSlab quartz_slab = get("quartz_slab"); - public static final ItemBlock quartz_stairs = get("quartz_stairs"); - public static final ItemMetalBlock radium_block = get("radium_block"); + public static final Item quartz_block = get("quartz_block"); + public static final Item quartz_ore = get("quartz_ore"); + public static final Item quartz_ornaments = get("quartz_ornaments"); + public static final Item quartz_pillar = get("quartz_pillar"); + public static final Item quartz_slab = get("quartz_slab"); + public static final Item quartz_stairs = get("quartz_stairs"); + public static final Item radium_block = get("radium_block"); public static final ItemMetal radium_ingot = get("radium_ingot"); - public static final ItemMetalBlock radium_ore = get("radium_ore"); - public static final ItemBlock rail = get("rail"); + public static final Item radium_ore = get("radium_ore"); + public static final Item rail = get("rail"); public static final ItemRecord record_11 = get("record_11"); public static final ItemRecord record_13 = get("record_13"); public static final ItemRecord record_blocks = get("record_blocks"); @@ -669,160 +653,160 @@ public abstract class Items { public static final ItemBucket recursive_slime_bucket = get("recursive_slime_bucket"); public static final ItemBucket recursive_springwater_bucket = get("recursive_springwater_bucket"); public static final ItemBucket recursive_water_bucket = get("recursive_water_bucket"); - public static final ItemBed red_bed = get("red_bed"); - public static final ItemButton red_button = get("red_button"); - public static final ItemBlock red_carpet = get("red_carpet"); - public static final ItemBlock red_clay = get("red_clay"); + public static final Item red_bed = get("red_bed"); + public static final Item red_button = get("red_button"); + public static final Item red_carpet = get("red_carpet"); + public static final Item red_clay = get("red_clay"); public static final ItemDye red_dye = get("red_dye"); - public static final ItemBlock red_glass = get("red_glass"); - public static final ItemBlock red_glass_pane = get("red_glass_pane"); - public static final ItemBlock red_mushroom = get("red_mushroom"); - public static final ItemBlock red_mushroom_block = get("red_mushroom_block"); - public static final ItemBlock red_sand = get("red_sand"); - public static final ItemBlock red_tulip = get("red_tulip"); - public static final ItemBlock red_wool = get("red_wool"); - public static final ItemBlock reeds = get("reeds"); - public static final ItemBlock rock = get("rock"); - public static final ItemBlock rose = get("rose"); - public static final ItemDoublePlant rose_bush = get("rose_bush"); + public static final Item red_glass = get("red_glass"); + public static final Item red_glass_pane = get("red_glass_pane"); + public static final Item red_mushroom = get("red_mushroom"); + public static final Item red_mushroom_block = get("red_mushroom_block"); + public static final Item red_sand = get("red_sand"); + public static final Item red_tulip = get("red_tulip"); + public static final Item red_wool = get("red_wool"); + public static final Item reeds = get("reeds"); + public static final Item rock = get("rock"); + public static final Item rose = get("rose"); + public static final Item rose_bush = get("rose_bush"); public static final ItemFood rotten_flesh = get("rotten_flesh"); public static final Item ruby = get("ruby"); - public static final ItemBlock ruby_block = get("ruby_block"); - public static final ItemBlock ruby_ore = get("ruby_ore"); + public static final Item ruby_block = get("ruby_block"); + public static final Item ruby_ore = get("ruby_ore"); public static final ItemSaddle saddle = get("saddle"); - public static final ItemBlock sand = get("sand"); - public static final ItemBlock sandstone = get("sandstone"); - public static final ItemSlab sandstone_slab = get("sandstone_slab"); - public static final ItemBlock sandstone_stairs = get("sandstone_stairs"); - public static final ItemMetalBlock selenium_block = get("selenium_block"); - public static final ItemMetalBlock selenium_ore = get("selenium_ore"); + public static final Item sand = get("sand"); + public static final Item sandstone = get("sandstone"); + public static final Item sandstone_slab = get("sandstone_slab"); + public static final Item sandstone_stairs = get("sandstone_stairs"); + public static final Item selenium_block = get("selenium_block"); + public static final Item selenium_ore = get("selenium_ore"); public static final ItemMetal selenium_powder = get("selenium_powder"); - public static final ItemSign sign = get("sign"); - public static final ItemMetalBlock silicon_block = get("silicon_block"); + public static final Item sign = get("sign"); + public static final Item silicon_block = get("silicon_block"); public static final ItemMetal silicon_ingot = get("silicon_ingot"); - public static final ItemMetalBlock silicon_ore = get("silicon_ore"); - public static final ItemMetalBlock silver_block = get("silver_block"); - public static final ItemBlock silver_carpet = get("silver_carpet"); - public static final ItemBlock silver_clay = get("silver_clay"); + public static final Item silicon_ore = get("silicon_ore"); + public static final Item silver_block = get("silver_block"); + public static final Item silver_carpet = get("silver_carpet"); + public static final Item silver_clay = get("silver_clay"); public static final ItemDye silver_dye = get("silver_dye"); - public static final ItemBlock silver_glass = get("silver_glass"); - public static final ItemBlock silver_glass_pane = get("silver_glass_pane"); + public static final Item silver_glass = get("silver_glass"); + public static final Item silver_glass_pane = get("silver_glass_pane"); public static final ItemMetal silver_ingot = get("silver_ingot"); - public static final ItemMetalBlock silver_ore = get("silver_ore"); - public static final ItemBlock silver_wool = get("silver_wool"); - public static final ItemBlock skull = get("skull"); + public static final Item silver_ore = get("silver_ore"); + public static final Item silver_wool = get("silver_wool"); + public static final Item skull = get("skull"); public static final Item slime_ball = get("slime_ball"); - public static final ItemBlock slime_block = get("slime_block"); + public static final Item slime_block = get("slime_block"); public static final ItemBucket slime_bucket = get("slime_bucket"); - public static final ItemBlock smooth_rock = get("smooth_rock"); - public static final ItemBlock smooth_sandstone = get("smooth_sandstone"); - public static final ItemBlock snow = get("snow"); - public static final ItemSnow snow_layer = get("snow_layer"); + public static final Item smooth_rock = get("smooth_rock"); + public static final Item smooth_sandstone = get("smooth_sandstone"); + public static final Item snow = get("snow"); + public static final Item snow_layer = get("snow_layer"); public static final ItemSnowball snowball = get("snowball"); - public static final ItemMetalBlock sodium_block = get("sodium_block"); - public static final ItemMetalBlock sodium_ore = get("sodium_ore"); + public static final Item sodium_block = get("sodium_block"); + public static final Item sodium_ore = get("sodium_ore"); public static final ItemMetal sodium_powder = get("sodium_powder"); - public static final ItemBlock soul_sand = get("soul_sand"); + public static final Item soul_sand = get("soul_sand"); public static final ItemSeeds soul_wart = get("soul_wart"); public static final Item speckled_melon = get("speckled_melon"); public static final ItemFood spider_eye = get("spider_eye"); - public static final ItemBlock sponge = get("sponge"); + public static final Item sponge = get("sponge"); public static final ItemBucket springwater_bucket = get("springwater_bucket"); - public static final ItemDoor spruce_door = get("spruce_door"); - public static final ItemFence spruce_fence = get("spruce_fence"); - public static final ItemBlock spruce_fence_gate = get("spruce_fence_gate"); - public static final ItemBlock spruce_leaves_autumn = get("spruce_leaves_autumn"); - public static final ItemBlock spruce_leaves_snowy = get("spruce_leaves_snowy"); - public static final ItemBlock spruce_leaves_spring = get("spruce_leaves_spring"); - public static final ItemBlock spruce_leaves_summer = get("spruce_leaves_summer"); - public static final ItemBlock spruce_leaves_winter = get("spruce_leaves_winter"); - public static final ItemBlock spruce_log = get("spruce_log"); - public static final ItemBlock spruce_planks = get("spruce_planks"); - public static final ItemBlock spruce_sapling = get("spruce_sapling"); - public static final ItemSlab spruce_slab = get("spruce_slab"); - public static final ItemBlock spruce_stairs = get("spruce_stairs"); + public static final Item spruce_door = get("spruce_door"); + public static final Item spruce_fence = get("spruce_fence"); + public static final Item spruce_fence_gate = get("spruce_fence_gate"); + public static final Item spruce_leaves_autumn = get("spruce_leaves_autumn"); + public static final Item spruce_leaves_snowy = get("spruce_leaves_snowy"); + public static final Item spruce_leaves_spring = get("spruce_leaves_spring"); + public static final Item spruce_leaves_summer = get("spruce_leaves_summer"); + public static final Item spruce_leaves_winter = get("spruce_leaves_winter"); + public static final Item spruce_log = get("spruce_log"); + public static final Item spruce_planks = get("spruce_planks"); + public static final Item spruce_sapling = get("spruce_sapling"); + public static final Item spruce_slab = get("spruce_slab"); + public static final Item spruce_stairs = get("spruce_stairs"); public static final Item stick = get("stick"); - public static final ItemPiston sticky_piston = get("sticky_piston"); - public static final ItemBlock stone = get("stone"); + public static final Item sticky_piston = get("sticky_piston"); + public static final Item stone = get("stone"); public static final ItemAxe stone_axe = get("stone_axe"); - public static final ItemButton stone_button = get("stone_button"); + public static final Item stone_button = get("stone_button"); public static final ItemHoe stone_hoe = get("stone_hoe"); public static final ItemPickaxe stone_pickaxe = get("stone_pickaxe"); - public static final ItemPressurePlate stone_pressure_plate = get("stone_pressure_plate"); + public static final Item stone_pressure_plate = get("stone_pressure_plate"); public static final ItemShovel stone_shovel = get("stone_shovel"); - public static final ItemSlab stone_slab = get("stone_slab"); - public static final ItemBlock stone_stairs = get("stone_stairs"); + public static final Item stone_slab = get("stone_slab"); + public static final Item stone_stairs = get("stone_stairs"); public static final ItemSword stone_sword = get("stone_sword"); - public static final ItemBlock stonebrick = get("stonebrick"); - public static final ItemSlab stonebrick_slab = get("stonebrick_slab"); - public static final ItemBlock stonebrick_stairs = get("stonebrick_stairs"); - public static final ItemBlock string = get("string"); + public static final Item stonebrick = get("stonebrick"); + public static final Item stonebrick_slab = get("stonebrick_slab"); + public static final Item stonebrick_stairs = get("stonebrick_stairs"); + public static final Item string = get("string"); public static final Item sugar = get("sugar"); - public static final ItemMetalBlock sulfur_block = get("sulfur_block"); - public static final ItemMetalBlock sulfur_ore = get("sulfur_ore"); + public static final Item sulfur_block = get("sulfur_block"); + public static final Item sulfur_ore = get("sulfur_ore"); public static final ItemMetal sulfur_powder = get("sulfur_powder"); - public static final ItemDoublePlant sunflower = get("sunflower"); - public static final ItemDoublePlant syringa = get("syringa"); - public static final ItemBlock tallgrass = get("tallgrass"); + public static final Item sunflower = get("sunflower"); + public static final Item syringa = get("syringa"); + public static final Item tallgrass = get("tallgrass"); public static final ItemAxe thetium_axe = get("thetium_axe"); - public static final ItemBlock thetium_block = get("thetium_block"); + public static final Item thetium_block = get("thetium_block"); public static final ItemArmor thetium_boots = get("thetium_boots"); public static final ItemArmor thetium_chestplate = get("thetium_chestplate"); public static final ItemArmor thetium_helmet = get("thetium_helmet"); public static final ItemHoe thetium_hoe = get("thetium_hoe"); public static final ItemArmor thetium_leggings = get("thetium_leggings"); - public static final ItemBlock thetium_ore = get("thetium_ore"); + public static final Item thetium_ore = get("thetium_ore"); public static final ItemPickaxe thetium_pickaxe = get("thetium_pickaxe"); public static final ItemShovel thetium_shovel = get("thetium_shovel"); public static final ItemSword thetium_sword = get("thetium_sword"); public static final Item thi_fragment = get("thi_fragment"); - public static final ItemBlock tian = get("tian"); - public static final ItemDoor tian_door = get("tian_door"); - public static final ItemFence tian_fence = get("tian_fence"); - public static final ItemBlock tian_fence_gate = get("tian_fence_gate"); - public static final ItemBlock tian_leaves_autumn = get("tian_leaves_autumn"); - public static final ItemBlock tian_leaves_snowy = get("tian_leaves_snowy"); - public static final ItemBlock tian_leaves_spring = get("tian_leaves_spring"); - public static final ItemBlock tian_leaves_summer = get("tian_leaves_summer"); - public static final ItemBlock tian_leaves_winter = get("tian_leaves_winter"); - public static final ItemBlock tian_log = get("tian_log"); - public static final ItemBlock tian_planks = get("tian_planks"); - public static final ItemBlock tian_reactor = get("tian_reactor"); - public static final ItemBlock tian_sapling = get("tian_sapling"); - public static final ItemSlab tian_slab = get("tian_slab"); - public static final ItemBlock tian_soil = get("tian_soil"); - public static final ItemBlock tian_stairs = get("tian_stairs"); - public static final ItemMetalBlock tin_block = get("tin_block"); + public static final Item tian = get("tian"); + public static final Item tian_door = get("tian_door"); + public static final Item tian_fence = get("tian_fence"); + public static final Item tian_fence_gate = get("tian_fence_gate"); + public static final Item tian_leaves_autumn = get("tian_leaves_autumn"); + public static final Item tian_leaves_snowy = get("tian_leaves_snowy"); + public static final Item tian_leaves_spring = get("tian_leaves_spring"); + public static final Item tian_leaves_summer = get("tian_leaves_summer"); + public static final Item tian_leaves_winter = get("tian_leaves_winter"); + public static final Item tian_log = get("tian_log"); + public static final Item tian_planks = get("tian_planks"); + public static final Item tian_reactor = get("tian_reactor"); + public static final Item tian_sapling = get("tian_sapling"); + public static final Item tian_slab = get("tian_slab"); + public static final Item tian_soil = get("tian_soil"); + public static final Item tian_stairs = get("tian_stairs"); + public static final Item tin_block = get("tin_block"); public static final ItemMetal tin_ingot = get("tin_ingot"); - public static final ItemMetalBlock tin_ore = get("tin_ore"); - public static final ItemMetalBlock titanium_block = get("titanium_block"); + public static final Item tin_ore = get("tin_ore"); + public static final Item titanium_block = get("titanium_block"); public static final ItemMetal titanium_ingot = get("titanium_ingot"); - public static final ItemMetalBlock titanium_ore = get("titanium_ore"); - public static final ItemBlock tnt = get("tnt"); - public static final ItemBlock tnt_1 = get("tnt_1"); - public static final ItemBlock tnt_2 = get("tnt_2"); - public static final ItemBlock tnt_3 = get("tnt_3"); - public static final ItemBlock tnt_4 = get("tnt_4"); - public static final ItemBlock tnt_5 = get("tnt_5"); - public static final ItemBlock tnt_6 = get("tnt_6"); - public static final ItemBlock tnt_7 = get("tnt_7"); + public static final Item titanium_ore = get("titanium_ore"); + public static final Item tnt = get("tnt"); + public static final Item tnt_1 = get("tnt_1"); + public static final Item tnt_2 = get("tnt_2"); + public static final Item tnt_3 = get("tnt_3"); + public static final Item tnt_4 = get("tnt_4"); + public static final Item tnt_5 = get("tnt_5"); + public static final Item tnt_6 = get("tnt_6"); + public static final Item tnt_7 = get("tnt_7"); public static final ItemMinecart tnt_minecart = get("tnt_minecart"); - public static final ItemBlock trapdoor = get("trapdoor"); - public static final ItemBlock tripwire_hook = get("tripwire_hook"); - public static final ItemMetalBlock tungsten_block = get("tungsten_block"); + public static final Item trapdoor = get("trapdoor"); + public static final Item tripwire_hook = get("tripwire_hook"); + public static final Item tungsten_block = get("tungsten_block"); public static final ItemMetal tungsten_ingot = get("tungsten_ingot"); - public static final ItemMetalBlock tungsten_ore = get("tungsten_ore"); - public static final ItemMetalBlock uranium_block = get("uranium_block"); + public static final Item tungsten_ore = get("tungsten_ore"); + public static final Item uranium_block = get("uranium_block"); public static final ItemMetal uranium_ingot = get("uranium_ingot"); - public static final ItemMetalBlock uranium_ore = get("uranium_ore"); - public static final ItemMetalBlock vanadium_block = get("vanadium_block"); + public static final Item uranium_ore = get("uranium_ore"); + public static final Item vanadium_block = get("vanadium_block"); public static final ItemMetal vanadium_ingot = get("vanadium_ingot"); - public static final ItemMetalBlock vanadium_ore = get("vanadium_ore"); - public static final ItemBlock vine = get("vine"); + public static final Item vanadium_ore = get("vanadium_ore"); + public static final Item vine = get("vine"); public static final ItemEditor editor = get("editor"); - public static final ItemBlock warp_chest = get("warp_chest"); + public static final Item warp_chest = get("warp_chest"); public static final ItemBucket water_bucket = get("water_bucket"); - public static final ItemLilyPad waterlily = get("waterlily"); + public static final Item waterlily = get("waterlily"); public static final ItemWeatherToken weather_token_chilled = get("weather_token_chilled"); public static final ItemWeatherToken weather_token_clear = get("weather_token_clear"); public static final ItemWeatherToken weather_token_cold = get("weather_token_cold"); @@ -840,57 +824,57 @@ public abstract class Items { public static final ItemWeatherToken weather_token_snowstorm = get("weather_token_snowstorm"); public static final ItemWeatherToken weather_token_storm = get("weather_token_storm"); public static final ItemWeatherToken weather_token_thunder = get("weather_token_thunder"); - public static final ItemBlock web = get("web"); - public static final ItemSeeds wheat = get("wheat"); - public static final Item wheats = get("wheats"); - public static final ItemBed white_bed = get("white_bed"); - public static final ItemBlock white_carpet = get("white_carpet"); - public static final ItemBlock white_clay = get("white_clay"); - public static final ItemBlock white_glass = get("white_glass"); - public static final ItemBlock white_glass_pane = get("white_glass_pane"); - public static final ItemBlock white_tulip = get("white_tulip"); - public static final ItemBlock white_wool = get("white_wool"); + public static final Item web = get("web"); + public static final ItemSeeds wheat_seed = get("wheat_seed"); + public static final Item wheat = get("wheat"); + public static final Item white_bed = get("white_bed"); + public static final Item white_carpet = get("white_carpet"); + public static final Item white_clay = get("white_clay"); + public static final Item white_glass = get("white_glass"); + public static final Item white_glass_pane = get("white_glass_pane"); + public static final Item white_tulip = get("white_tulip"); + public static final Item white_wool = get("white_wool"); public static final ItemAxe wood_axe = get("wood_axe"); public static final ItemHoe wood_hoe = get("wood_hoe"); public static final ItemPickaxe wood_pickaxe = get("wood_pickaxe"); public static final ItemShovel wood_shovel = get("wood_shovel"); public static final ItemSword wood_sword = get("wood_sword"); - public static final ItemButton wooden_button = get("wooden_button"); - public static final ItemPressurePlate wooden_pressure_plate = get("wooden_pressure_plate"); - public static final ItemBlock workbench = get("workbench"); + public static final Item wooden_button = get("wooden_button"); + public static final Item wooden_pressure_plate = get("wooden_pressure_plate"); + public static final Item workbench = get("workbench"); public static final Item writable_book = get("writable_book"); public static final Item written_book = get("written_book"); - public static final ItemBlock yellow_carpet = get("yellow_carpet"); - public static final ItemBlock yellow_clay = get("yellow_clay"); + public static final Item yellow_carpet = get("yellow_carpet"); + public static final Item yellow_clay = get("yellow_clay"); public static final ItemDye yellow_dye = get("yellow_dye"); - public static final ItemBlock yellow_glass = get("yellow_glass"); - public static final ItemBlock yellow_glass_pane = get("yellow_glass_pane"); - public static final ItemBlock yellow_wool = get("yellow_wool"); - public static final ItemMetalBlock zinc_block = get("zinc_block"); + public static final Item yellow_glass = get("yellow_glass"); + public static final Item yellow_glass_pane = get("yellow_glass_pane"); + public static final Item yellow_wool = get("yellow_wool"); + public static final Item zinc_block = get("zinc_block"); public static final ItemMetal zinc_ingot = get("zinc_ingot"); - public static final ItemMetalBlock zinc_ore = get("zinc_ore"); + public static final Item zinc_ore = get("zinc_ore"); public static final ItemFishFood cod = get("cod"); public static final ItemFishFood cooked_cod = get("cooked_cod"); public static final ItemFishFood salmon = get("salmon"); public static final ItemFishFood cooked_salmon = get("cooked_salmon"); public static final ItemFishFood clownfish = get("clownfish"); public static final ItemFishFood pufferfish = get("pufferfish"); - public static final ItemBlock concrete = get("concrete"); - public static final ItemSlab concrete_slab = get("concrete_slab"); - public static final ItemBlock concrete_stairs = get("concrete_stairs"); - public static final ItemSlab floor_tiles_black_slab = get("floor_tiles_black_slab"); - public static final ItemBlock floor_tiles_black_stairs = get("floor_tiles_black_stairs"); - public static final ItemSlab floor_tiles_red_slab = get("floor_tiles_red_slab"); - public static final ItemBlock floor_tiles_red_stairs = get("floor_tiles_red_stairs"); - public static final ItemSlab floor_tiles_slab = get("floor_tiles_slab"); - public static final ItemBlock floor_tiles_stairs = get("floor_tiles_stairs"); - public static final ItemSlab floor_tiles_white_slab = get("floor_tiles_white_slab"); - public static final ItemBlock floor_tiles_white_stairs = get("floor_tiles_white_stairs"); - public static final ItemSlab pentagram_slab = get("pentagram_slab"); - public static final ItemBlock pentagram_stairs = get("pentagram_stairs"); - public static final ItemBlock display = get("display"); - public static final ItemBlock display2 = get("display2"); - public static final ItemBlock display4 = get("display4"); + public static final Item concrete = get("concrete"); + public static final Item concrete_slab = get("concrete_slab"); + public static final Item concrete_stairs = get("concrete_stairs"); + public static final Item floor_tiles_black_slab = get("floor_tiles_black_slab"); + public static final Item floor_tiles_black_stairs = get("floor_tiles_black_stairs"); + public static final Item floor_tiles_red_slab = get("floor_tiles_red_slab"); + public static final Item floor_tiles_red_stairs = get("floor_tiles_red_stairs"); + public static final Item floor_tiles_slab = get("floor_tiles_slab"); + public static final Item floor_tiles_stairs = get("floor_tiles_stairs"); + public static final Item floor_tiles_white_slab = get("floor_tiles_white_slab"); + public static final Item floor_tiles_white_stairs = get("floor_tiles_white_stairs"); + public static final Item pentagram_slab = get("pentagram_slab"); + public static final Item pentagram_stairs = get("pentagram_stairs"); + public static final Item display = get("display"); + public static final Item display2 = get("display2"); + public static final Item display4 = get("display4"); public static final ItemEnchantedBook enchanted_book_blast_protection = get("enchanted_book_blast_protection"); public static final ItemEnchantedBook enchanted_book_blast_protection_4 = get("enchanted_book_blast_protection_4"); public static final ItemEnchantedBook enchanted_book_draining = get("enchanted_book_draining"); @@ -982,13 +966,13 @@ public abstract class Items { public static final ItemPotion potion_weakness = get("potion_weakness"); public static final ItemPotion potion_weakness_base = get("potion_weakness_base"); public static final ItemPotion potion_weakness_extended = get("potion_weakness_extended"); - public static final ItemBlock large_chest = get("large_chest"); - public static final ItemBlock giant_chest = get("giant_chest"); - public static final ItemBlock huge_chest = get("huge_chest"); - public static final ItemBlock toolarge_chest = get("toolarge_chest"); - public static final ItemBlock xlarge_chest = get("xlarge_chest"); - public static final ItemBlock xxlarge_chest = get("xxlarge_chest"); - public static final ItemBlock xxxlarge_chest = get("xxxlarge_chest"); + public static final Item large_chest = get("large_chest"); + public static final Item giant_chest = get("giant_chest"); + public static final Item huge_chest = get("huge_chest"); + public static final Item toolarge_chest = get("toolarge_chest"); + public static final Item xlarge_chest = get("xlarge_chest"); + public static final Item xxlarge_chest = get("xxlarge_chest"); + public static final Item xxxlarge_chest = get("xxxlarge_chest"); public static final ItemKey key = get("key"); public static final ItemKey black_key = get("black_key"); public static final ItemKey black_keycard = get("black_keycard"); @@ -997,14 +981,14 @@ public abstract class Items { public static final ItemKey red_keycard = get("red_keycard"); public static final ItemKey rusty_key = get("rusty_key"); public static final ItemKey shiny_key = get("shiny_key"); - public static final ItemBlock lamp = get("lamp"); - public static final ItemMagnetic charged_powder = get("charged_powder"); - public static final ItemBlock wire = get("wire"); - public static final ItemBlock charged_block = get("charged_block"); - public static final ItemBlock charge_ore = get("charge_ore"); - public static final ItemBlock torch = get("torch"); - public static final ItemBlock soul_torch = get("soul_torch"); - public static final ItemBlock tian_torch = get("tian_torch"); + public static final Item lamp = get("lamp"); + public static final Item charged_powder = get("charged_powder"); + public static final Item wire = get("wire"); + public static final Item charged_block = get("charged_block"); + public static final Item charge_ore = get("charge_ore"); + public static final Item torch = get("torch"); + public static final Item soul_torch = get("soul_torch"); + public static final Item tian_torch = get("tian_torch"); public static final ItemBucket plasma_bucket = get("plasma_bucket"); public static final ItemBucket recursive_plasma_bucket = get("recursive_plasma_bucket"); diff --git a/common/src/main/java/common/init/SmeltingRegistry.java b/common/src/main/java/common/init/SmeltingRegistry.java index 1cfc03ef..34d76396 100755 --- a/common/src/main/java/common/init/SmeltingRegistry.java +++ b/common/src/main/java/common/init/SmeltingRegistry.java @@ -6,7 +6,7 @@ import java.util.Map.Entry; import common.collect.Maps; import common.item.Item; import common.item.ItemStack; -import common.item.tool.ItemFishFood; +import common.item.consumable.ItemFishFood; import java.util.Set; diff --git a/common/src/main/java/common/init/TradeRegistry.java b/common/src/main/java/common/init/TradeRegistry.java index dcdf1b4a..36d265a7 100755 --- a/common/src/main/java/common/init/TradeRegistry.java +++ b/common/src/main/java/common/init/TradeRegistry.java @@ -15,7 +15,7 @@ public abstract class TradeRegistry { } public static final ITradeList[] TRADES = new ITradeList[] { - new GemForItem(Items.wheats, new PriceInfo(18, 22)), + new GemForItem(Items.wheat, new PriceInfo(18, 22)), new GemForItem(Items.potato, new PriceInfo(15, 19)), new GemForItem(Items.carrot, new PriceInfo(15, 19)), new ItemForGem(Items.bread, new PriceInfo(-4, -2)), diff --git a/common/src/main/java/common/inventory/ContainerBrewingStand.java b/common/src/main/java/common/inventory/ContainerBrewingStand.java index 03098723..b961e649 100755 --- a/common/src/main/java/common/inventory/ContainerBrewingStand.java +++ b/common/src/main/java/common/inventory/ContainerBrewingStand.java @@ -4,7 +4,7 @@ import common.entity.npc.EntityNPC; import common.init.BrewingRegistry; import common.init.Items; import common.item.ItemStack; -import common.item.tool.ItemPotion; +import common.item.consumable.ItemPotion; import common.network.IPlayer; public class ContainerBrewingStand extends Container @@ -205,7 +205,7 @@ public class ContainerBrewingStand extends Container public static boolean canHoldPotion(ItemStack stack) { - return stack != null && (stack.getItem() instanceof ItemPotion || stack.getItem() == Items.glass_bottle); + return stack != null && (stack.getItem() instanceof ItemPotion || stack.getItem() == Items.bottle); } } } diff --git a/common/src/main/java/common/inventory/ContainerPlayer.java b/common/src/main/java/common/inventory/ContainerPlayer.java index 6ec0e538..eb38a0d0 100755 --- a/common/src/main/java/common/inventory/ContainerPlayer.java +++ b/common/src/main/java/common/inventory/ContainerPlayer.java @@ -8,7 +8,7 @@ import common.collect.Lists; import common.entity.npc.EntityNPC; import common.init.CraftingRegistry; import common.item.ItemStack; -import common.item.tool.ItemArmor; +import common.item.material.ItemArmor; public class ContainerPlayer extends Container { private final InventoryCrafting baseCrafting = new InventoryCrafting(new Container() { diff --git a/common/src/main/java/common/inventory/InventoryPlayer.java b/common/src/main/java/common/inventory/InventoryPlayer.java index 8d7d8e86..f1eddcb6 100755 --- a/common/src/main/java/common/inventory/InventoryPlayer.java +++ b/common/src/main/java/common/inventory/InventoryPlayer.java @@ -4,7 +4,7 @@ import common.block.Block; import common.entity.npc.EntityNPC; import common.item.Item; import common.item.ItemStack; -import common.item.tool.ItemArmor; +import common.item.material.ItemArmor; import common.tags.TagObject; import java.util.List; diff --git a/common/src/main/java/common/item/Item.java b/common/src/main/java/common/item/Item.java index 9c5680a3..57f49b13 100755 --- a/common/src/main/java/common/item/Item.java +++ b/common/src/main/java/common/item/Item.java @@ -23,6 +23,8 @@ import common.util.Vec3; import common.world.World; public class Item { + private final Block block; + private int maxAmount = StackSize.M.getAmount(); private int maxDamage = 0; private Item containerItem; @@ -30,6 +32,25 @@ public class Item { private CheatTab tab; private TextColor color = null; private int defColor = 0xffffffff; + private boolean magnetic = false; + private boolean gleaming = false; + private boolean fragile = false; + + public Item() { + this.block = null; + } + + public Item(Block block) { + this.block = block; + this.setDisplay(this.block.getDisplay()); + this.setTab(this.block.getTab()); + if(this.block.isMagnetic()) + this.setMagnetic(); + if(this.block.getMaxStackSize() != null) + this.setMaxAmount(this.block.getMaxStackSize()); + if(this.block.getItemColor() != null) + this.setColor(this.block.getItemColor()); + } public final Item setUnstackable() { this.maxAmount = 1; @@ -49,7 +70,7 @@ public class Item { return this; } - public Item setDisplay(String name) { + public final Item setDisplay(String name) { this.display = name; return this; } @@ -64,11 +85,30 @@ public class Item { return this; } - public Item setColor(TextColor color) { + public final Item setColor(TextColor color) { this.color = color; return this; } + public final Item setMagnetic() { + this.magnetic = true; + return this; + } + + public final Item setGleaming() { + this.gleaming = true; + return this; + } + + public final Item setFragile() { + this.fragile = true; + return this; + } + + public final Block getBlock() { + return this.block; + } + public final int getMaxAmount() { return this.maxAmount; } @@ -101,7 +141,19 @@ public class Item { return this.tab; } - protected final HitPosition getMovingObjectPositionFromPlayer(World worldIn, EntityNPC playerIn, boolean useLiquids) { + public final boolean isMagnetic() { + return this.magnetic; + } + + public final boolean hasEffect(ItemStack stack) { + return this.gleaming || stack.isItemEnchanted(); + } + + public final boolean isFragile() { + return this.fragile; + } + + public static final HitPosition getMovingObjectPositionFromPlayer(World worldIn, EntityNPC playerIn, boolean useLiquids) { float f = playerIn.rotPitch; float f1 = playerIn.rotYaw; double d0 = playerIn.posX; @@ -131,12 +183,8 @@ public class Item { return stack; } - public Block getBlock() { - return null; - } - public boolean onItemUse(ItemStack stack, EntityNPC playerIn, World worldIn, BlockPos pos, Facing side, float hitX, float hitY, float hitZ) { - return false; + return this.block != null && this.block.place(stack, playerIn, worldIn, pos, side, hitX, hitY, hitZ); } public boolean onAction(ItemStack stack, EntityNPC player, World world, ItemControl control, BlockPos block) { @@ -152,6 +200,8 @@ public class Item { } public ItemStack onItemRightClick(ItemStack itemStackIn, World worldIn, EntityNPC playerIn) { + if(this.block != null) + this.block.prePlace(itemStackIn, worldIn, playerIn); return itemStackIn; } @@ -175,13 +225,6 @@ public class Item { return false; } - public int getColorFromItemStack(ItemStack stack, int renderPass) { - if(renderPass > 0) - return 16777215; - int i = stack.getDyeColor(); - return i < 0 ? 16777215 : i; - } - public ItemAction getItemUseAction() { return ItemAction.NONE; } @@ -198,10 +241,8 @@ public class Item { } public void addInformation(ItemStack stack, EntityNPC playerIn, List tooltip) { - } - - public boolean hasEffect(ItemStack stack) { - return stack.isItemEnchanted(); + if(this.block != null) + this.block.addInformation(stack, playerIn, tooltip); } public boolean canEnchant(ItemStack stack) { @@ -221,18 +262,12 @@ public class Item { } public void getModifiers(Map map, UsageSlot slot) { - } - - public boolean isFragile() { - return false; + if(this.block != null) + this.block.getModifiers(map, slot); } public float getRadiation(ItemStack stack) { - return 0.0f; - } - - public boolean isMagnetic() { - return false; + return this.block != null ? this.block.getRadiation() * (float)stack.getSize() : 0.0f; } public boolean canRenderHand() { @@ -251,12 +286,29 @@ public class Item { return stack.getColoredName(); } - public Transform getTransform() { - return Transform.IDENTITY; + public int getRenderColor(ItemStack stack, int pass) { + if(this.block != null && this.block.isItemColored()) + return this.block.getRenderColor(this.block.getState()); + if(pass > 0) + return 16777215; + int i = stack.getDyeColor(); + return i < 0 ? 16777215 : i; + } + + public boolean hasBuiltinModel() { + return false; + } + + public String[] getTextures(String name) { + return new String[] {name}; } - public Model getModel(ModelProvider provider, String name) { - return provider.getModel(this.getTransform(), name); + public Model getCustomModel(ModelProvider provider, String name) { + return null; + } + + public Transform getCustomTransform() { + return null; } public String[] getSprites() { @@ -268,7 +320,8 @@ public class Item { } public ItemStack dispenseStack(World world, TileEntity source, Vec3 position, BlockPos blockpos, Facing facing, ItemStack stack) { - BlockDispenser.dispense(world, 6.0, facing, position, stack.split(1)); + if(this.block == null || !this.block.dispense(world, source, position, blockpos, facing, stack)) + BlockDispenser.dispense(world, 6.0, facing, position, stack.split(1)); return stack; } diff --git a/common/src/main/java/common/item/ItemEffect.java b/common/src/main/java/common/item/ItemEffect.java deleted file mode 100755 index c68b31a9..00000000 --- a/common/src/main/java/common/item/ItemEffect.java +++ /dev/null @@ -1,9 +0,0 @@ -package common.item; - -public class ItemEffect extends Item -{ - public boolean hasEffect(ItemStack stack) - { - return true; - } -} diff --git a/common/src/main/java/common/item/ItemFragile.java b/common/src/main/java/common/item/ItemFragile.java deleted file mode 100755 index 3905b3a1..00000000 --- a/common/src/main/java/common/item/ItemFragile.java +++ /dev/null @@ -1,7 +0,0 @@ -package common.item; - -public class ItemFragile extends Item { - public boolean isFragile() { - return true; - } -} diff --git a/common/src/main/java/common/item/ItemMagnetic.java b/common/src/main/java/common/item/ItemMagnetic.java deleted file mode 100755 index bcf2d1cb..00000000 --- a/common/src/main/java/common/item/ItemMagnetic.java +++ /dev/null @@ -1,7 +0,0 @@ -package common.item; - -public class ItemMagnetic extends Item { - public boolean isMagnetic() { - return true; - } -} diff --git a/common/src/main/java/common/item/ItemStack.java b/common/src/main/java/common/item/ItemStack.java index e80fc013..05be4baa 100755 --- a/common/src/main/java/common/item/ItemStack.java +++ b/common/src/main/java/common/item/ItemStack.java @@ -15,7 +15,7 @@ import common.enchantment.EnchantmentHelper; import common.entity.npc.EntityNPC; import common.entity.types.EntityLiving; import common.init.ItemRegistry; -import common.item.tool.ItemBow; +import common.item.weapon.ItemBow; import common.rng.Random; import common.tags.TagObject; diff --git a/common/src/main/java/common/item/block/ItemBed.java b/common/src/main/java/common/item/block/ItemBed.java deleted file mode 100755 index 43a4b11b..00000000 --- a/common/src/main/java/common/item/block/ItemBed.java +++ /dev/null @@ -1,104 +0,0 @@ -package common.item.block; - -import common.block.Block; -import common.block.artificial.BlockBed; -import common.block.artificial.BlockPane; -import common.entity.npc.EntityNPC; -import common.init.BlockRegistry; -import common.item.CheatTab; -import common.item.Item; -import common.item.ItemStack; -import common.item.StackSize; -import common.model.Model; -import common.model.ModelProvider; -import common.model.Transform; -import common.util.BlockPos; -import common.util.ExtMath; -import common.util.Facing; -import common.world.State; -import common.world.World; - -public class ItemBed extends Item -{ - private final BlockBed bedBlock; - - public ItemBed(BlockBed bedBlock) - { - this.bedBlock = bedBlock; - this.setTab(CheatTab.DECORATION); - this.setMaxAmount(StackSize.S); - } - - public Block getBlock() - { - return this.bedBlock; - } - - /** - * Called when a Block is right-clicked with this Item - */ - public boolean onItemUse(ItemStack stack, EntityNPC playerIn, World worldIn, BlockPos pos, Facing side, float hitX, float hitY, float hitZ) - { - if (worldIn.client) - { - return true; - } - else if (side != Facing.UP) - { - return false; - } - else - { - State iblockstate = worldIn.getState(pos); - Block block = iblockstate.getBlock(); - boolean flag = block.isReplaceable(worldIn, pos); - - if (!flag) - { - pos = pos.up(); - } - - int i = ExtMath.floord((double)(playerIn.rotYaw * 4.0F / 360.0F) + 0.5D) & 3; - Facing enumfacing = Facing.getHorizontal(i); - BlockPos blockpos = pos.offset(enumfacing); - - if (playerIn.canPlayerEdit(pos, side, stack) && playerIn.canPlayerEdit(blockpos, side, stack)) - { - boolean flag1 = worldIn.getState(blockpos).getBlock().isReplaceable(worldIn, blockpos); - boolean flag2 = flag || worldIn.isAirBlock(pos); - boolean flag3 = flag1 || worldIn.isAirBlock(blockpos); - - if (flag2 && flag3 && worldIn.isBlockSolid(pos.down()) && worldIn.isBlockSolid(blockpos.down())) - { - State iblockstate1 = this.bedBlock.getState() /* .withProperty(BlockBed.OCCUPIED, Boolean.valueOf(false)) */ .withProperty(BlockBed.FACING, enumfacing).withProperty(BlockBed.PART, BlockBed.EnumPartType.FOOT); - - if (worldIn.setState(pos, iblockstate1, 3)) - { - State iblockstate2 = iblockstate1.withProperty(BlockBed.PART, BlockBed.EnumPartType.HEAD); - worldIn.setState(blockpos, iblockstate2, 3); - } - - stack.decrSize(); - return true; - } - else - { - return false; - } - } - else - { - return false; - } - } - } - - public Transform getTransform() { - return this.bedBlock.getTransform(); - } - - public Model getModel(ModelProvider provider, String name) { - return provider.getModel(this.bedBlock.getModel(provider, - BlockRegistry.getName(this.bedBlock), this.bedBlock.getState().withProperty(BlockBed.PART, BlockBed.EnumPartType.HEAD).withProperty(BlockBed.FACING, Facing.NORTH)), this.getTransform()); - } -} diff --git a/common/src/main/java/common/item/block/ItemBlock.java b/common/src/main/java/common/item/block/ItemBlock.java deleted file mode 100755 index 52762d75..00000000 --- a/common/src/main/java/common/item/block/ItemBlock.java +++ /dev/null @@ -1,128 +0,0 @@ -package common.item.block; - -import common.block.Block; -import common.block.natural.BlockSnow; -import common.color.TextColor; -import common.entity.Entity; -import common.entity.npc.EntityNPC; -import common.init.BlockRegistry; -import common.init.Blocks; -import common.item.Item; -import common.item.ItemStack; -import common.model.Model; -import common.model.ModelProvider; -import common.model.Transform; -import common.util.BlockPos; -import common.util.Facing; -import common.world.State; -import common.world.World; - -public class ItemBlock extends Item -{ - protected final Block block; - - public ItemBlock(Block block) - { - this.block = block; - this.setDisplay(this.block.getDisplay()); - this.setTab(this.block.getTab()); - } - - public ItemBlock setDisplay(String unlocalizedName) - { - super.setDisplay(unlocalizedName); - return this; - } - - public ItemBlock setColor(TextColor color) - { - super.setColor(color); - return this; - } - - public boolean onItemUse(ItemStack stack, EntityNPC playerIn, World worldIn, BlockPos pos, Facing side, float hitX, float hitY, float hitZ) - { - State iblockstate = worldIn.getState(pos); - Block block = iblockstate.getBlock(); - - if(block == Blocks.snow_layer && iblockstate.getValue(BlockSnow.LAYERS).intValue() < 1) - side = Facing.UP; - else if (!block.isReplaceable(worldIn, pos)) - { - pos = pos.offset(side); - } - - if (stack.isEmpty()) - { - return false; - } - else if (!playerIn.canPlayerEdit(pos, side, stack)) - { - return false; - } - else if (worldIn.canBlockBePlaced(this.block, pos, false, side, (Entity)null, stack)) - { - State iblockstate1 = this.block.onBlockPlaced(worldIn, pos, side, hitX, hitY, hitZ, playerIn); - - if (worldIn.setState(pos, iblockstate1, 3)) - { - iblockstate1 = worldIn.getState(pos); - - if (iblockstate1.getBlock() == this.block) - { - this.block.onBlockPlacedBy(worldIn, pos, iblockstate1, playerIn); - } - - worldIn.playSound(this.block.sound.getPlaceSound(), (double)((float)pos.getX() + 0.5F), (double)((float)pos.getY() + 0.5F), (double)((float)pos.getZ() + 0.5F), 1.0F); - stack.decrSize(); - } - - return true; - } - else - { - return false; - } - } - - public boolean canPlaceBlockOnSide(World worldIn, BlockPos pos, Facing side, EntityNPC player, ItemStack stack) - { - Block block = worldIn.getState(pos).getBlock(); - - if (block == Blocks.snow_layer) - { - side = Facing.UP; - } - else if (!block.isReplaceable(worldIn, pos)) - { - pos = pos.offset(side); - } - - return worldIn.canBlockBePlaced(this.block, pos, false, side, (Entity)null, stack); - } - - public Block getBlock() - { - return this.block; - } - - public boolean isMagnetic() { - return this.block.isMagnetic(); - } - - public Transform getTransform() { - return this.block.getRenderType() == 2 ? super.getTransform() : (this.block.hasBlockFlatTexture() ? super.getTransform() : this.block.getTransform()); - } - - public Model getModel(ModelProvider provider, String name) { - if(this.block.getRenderType() == 2) - return provider.getModel(provider.getEntityModel(), this.getTransform()); - return this.block.hasBlockFlatTexture() ? provider.getModel(this.getTransform(), "blocks/" + this.block.getItemTexture(name)) : - provider.getModel(this.block.getModel(provider, - BlockRegistry.getName(this.block), this.block.getState()), this.getTransform()); - } - - public int getColorFromItemStack(ItemStack stack, int renderPass) { - return this.block.isItemColored() ? this.block.getRenderColor(this.block.getState()) : super.getColorFromItemStack(stack, renderPass); - } -} diff --git a/common/src/main/java/common/item/block/ItemButton.java b/common/src/main/java/common/item/block/ItemButton.java deleted file mode 100755 index ebb000e7..00000000 --- a/common/src/main/java/common/item/block/ItemButton.java +++ /dev/null @@ -1,20 +0,0 @@ -package common.item.block; - -import common.block.tech.BlockButton; -import common.model.Model; -import common.model.ModelProvider; - -public class ItemButton extends ItemBlock { - private final BlockButton button; - - public ItemButton(BlockButton block) { - super(block); - this.button = block; - } - - public Model getModel(ModelProvider provider, String name) { - return provider.getModel(provider.getModel(this.button.getTexture()).add(5, 6, 6, 11, 10, 10) - .d().uv(5, 6, 11, 10).noCull().u().uv(5, 10, 11, 6).noCull() - .ns().uv(5, 12, 11, 16).noCull().we().uv(6, 12, 10, 16).noCull(), this.getTransform()); - } -} diff --git a/common/src/main/java/common/item/block/ItemDoor.java b/common/src/main/java/common/item/block/ItemDoor.java deleted file mode 100755 index 31257acd..00000000 --- a/common/src/main/java/common/item/block/ItemDoor.java +++ /dev/null @@ -1,112 +0,0 @@ -package common.item.block; - -import common.block.Block; -import common.block.Material; -import common.block.artificial.BlockBed; -import common.block.artificial.BlockDoor; -import common.entity.npc.EntityNPC; -import common.init.BlockRegistry; -import common.init.Blocks; -import common.item.CheatTab; -import common.item.Item; -import common.item.ItemStack; -import common.item.StackSize; -import common.model.Model; -import common.model.ModelProvider; -import common.model.Transform; -import common.util.BlockPos; -import common.util.Facing; -import common.world.State; -import common.world.World; - -public class ItemDoor extends Item -{ - private final BlockDoor block; - - public ItemDoor(BlockDoor block) - { - this.block = block; - this.setTab(block.getMaterial() == Material.WOOD ? CheatTab.WOOD : CheatTab.TECHNOLOGY); - this.setDisplay(this.block.getDisplay()); - this.setMaxAmount(StackSize.S); - } - - public Block getBlock() - { - return this.block; - } - - /** - * Called when a Block is right-clicked with this Item - */ - public boolean onItemUse(ItemStack stack, EntityNPC playerIn, World worldIn, BlockPos pos, Facing side, float hitX, float hitY, float hitZ) - { - if (side != Facing.UP) - { - return false; - } - else - { - State iblockstate = worldIn.getState(pos); - Block block = iblockstate.getBlock(); - - if (!block.isReplaceable(worldIn, pos)) - { - pos = pos.offset(side); - } - - if (!playerIn.canPlayerEdit(pos, side, stack)) - { - return false; - } - else if (!this.block.canPlaceBlockAt(worldIn, pos)) - { - return false; - } - else - { - placeDoor(worldIn, pos, Facing.fromAngle((double)playerIn.rotYaw), this.block, true); - stack.decrSize(); - return true; - } - } - } - - public static void placeDoor(World worldIn, BlockPos pos, Facing facing, Block door, boolean update) - { - BlockPos blockpos = pos.offset(facing.rotateY()); - BlockPos blockpos1 = pos.offset(facing.rotateYCCW()); - int i = (worldIn.getState(blockpos1).getBlock().isNormalCube() ? 1 : 0) + (worldIn.getState(blockpos1.up()).getBlock().isNormalCube() ? 1 : 0); - int j = (worldIn.getState(blockpos).getBlock().isNormalCube() ? 1 : 0) + (worldIn.getState(blockpos.up()).getBlock().isNormalCube() ? 1 : 0); - boolean flag = worldIn.getState(blockpos1).getBlock() == door || worldIn.getState(blockpos1.up()).getBlock() == door; - boolean flag1 = worldIn.getState(blockpos).getBlock() == door || worldIn.getState(blockpos.up()).getBlock() == door; - boolean flag2 = false; - - if (flag && !flag1 || j > i) - { - flag2 = true; - } - - BlockPos blockpos2 = pos.up(); - State iblockstate = door.getState().withProperty(BlockDoor.FACING, facing).withProperty(BlockDoor.HINGE, flag2 ? BlockDoor.EnumHingePosition.RIGHT : BlockDoor.EnumHingePosition.LEFT); - worldIn.setState(pos, iblockstate.withProperty(BlockDoor.HALF, BlockDoor.EnumDoorHalf.LOWER), 2); - worldIn.setState(blockpos2, iblockstate.withProperty(BlockDoor.HALF, BlockDoor.EnumDoorHalf.UPPER), 2); - if(update) { - worldIn.notifyNeighborsOfStateChange(pos, door); - worldIn.notifyNeighborsOfStateChange(blockpos2, door); - } - } - - public boolean isMagnetic() { - return this.block == Blocks.iron_door; - } - - public Transform getTransform() { - return this.block.getTransform(); - } - - public Model getModel(ModelProvider provider, String name) { - return provider.getModel(this.block.getModel(provider, - BlockRegistry.getName(this.block), this.block.getState().withProperty(BlockDoor.HALF, BlockDoor.EnumDoorHalf.UPPER).withProperty(BlockDoor.FACING, Facing.NORTH)), this.getTransform()); - } -} diff --git a/common/src/main/java/common/item/block/ItemDoublePlant.java b/common/src/main/java/common/item/block/ItemDoublePlant.java deleted file mode 100755 index 3a70097f..00000000 --- a/common/src/main/java/common/item/block/ItemDoublePlant.java +++ /dev/null @@ -1,31 +0,0 @@ -package common.item.block; - -import common.block.foliage.BlockDoublePlant; -import common.color.Colorizer; -import common.init.BlockRegistry; -import common.item.ItemStack; -import common.item.StackSize; -import common.model.Model; -import common.model.ModelProvider; - -public class ItemDoublePlant extends ItemBlock -{ - private final BlockDoublePlant.EnumPlantType type; - - public ItemDoublePlant(BlockDoublePlant block) - { - super(block); - this.type = block.getType(); - this.setMaxAmount(StackSize.S); - } - - public int getColorFromItemStack(ItemStack stack, int renderPass) - { - return this.type != BlockDoublePlant.EnumPlantType.GRASS && this.type != BlockDoublePlant.EnumPlantType.FERN ? super.getColorFromItemStack(stack, renderPass) : Colorizer.getGrassColor(0.5D, 1.0D); - } - - public Model getModel(ModelProvider provider, String name) { - return provider.getModel(this.block.getModel(provider, - BlockRegistry.getName(this.block), this.block.getState().withProperty(BlockDoublePlant.HALF, BlockDoublePlant.EnumBlockHalf.UPPER)), this.getTransform()); - } -} diff --git a/common/src/main/java/common/item/block/ItemFence.java b/common/src/main/java/common/item/block/ItemFence.java deleted file mode 100755 index dacd8c02..00000000 --- a/common/src/main/java/common/item/block/ItemFence.java +++ /dev/null @@ -1,43 +0,0 @@ -package common.item.block; - -import common.block.artificial.BlockFence; -import common.model.Model; -import common.model.ModelProvider; - -public class ItemFence extends ItemBlock { - public ItemFence(BlockFence block) { - super(block); - } - - public Model getModel(ModelProvider provider, String name) { - return provider.getModel(provider.getModel(((BlockFence)this.block).getTexture()) - .add(6, 0, 0, 10, 16, 4) - .d().uv(6, 0, 10, 4) - .u().uv(6, 0, 10, 4).noCull() - .n().uv(6, 0, 10, 16).noCull() - .s().uv(6, 0, 10, 16).noCull() - .w().uv(0, 0, 4, 16).noCull() - .e().uv(0, 0, 4, 16).noCull() - .add(6, 0, 12, 10, 16, 16) - .d().uv(6, 12, 10, 16) - .u().uv(6, 12, 10, 16).noCull() - .n().uv(6, 0, 10, 16).noCull() - .s().uv(6, 0, 10, 16).noCull() - .w().uv(12, 0, 16, 16).noCull() - .e().uv(12, 0, 16, 16).noCull() - .add(7, 13, -2, 9, 15, 18) - .d().uv(7, 0, 9, 16).noCull() - .u().uv(7, 0, 9, 16).noCull() - .n().uv(7, 1, 9, 3).noCull() - .s().uv(7, 1, 9, 3).noCull() - .w().uv(0, 1, 16, 3).noCull() - .e().uv(0, 1, 16, 3).noCull() - .add(7, 5, -2, 9, 7, 18) - .d().uv(7, 0, 9, 16).noCull() - .u().uv(7, 0, 9, 16).noCull() - .n().uv(7, 9, 9, 11).noCull() - .s().uv(7, 9, 9, 11).noCull() - .w().uv(0, 9, 16, 11).noCull() - .e().uv(0, 9, 16, 11).noCull(), this.getTransform()); - } -} diff --git a/common/src/main/java/common/item/block/ItemLilyPad.java b/common/src/main/java/common/item/block/ItemLilyPad.java deleted file mode 100755 index ad252bec..00000000 --- a/common/src/main/java/common/item/block/ItemLilyPad.java +++ /dev/null @@ -1,63 +0,0 @@ -package common.item.block; - -import common.block.foliage.BlockLilyPad; -import common.block.liquid.BlockLiquid; -import common.entity.npc.EntityNPC; -import common.init.Blocks; -import common.item.ItemStack; -import common.util.BlockPos; -import common.util.HitPosition; -import common.world.State; -import common.world.World; - -public class ItemLilyPad extends ItemBlock -{ - public ItemLilyPad(BlockLilyPad block) - { - super(block); - } - - public ItemStack onItemRightClick(ItemStack itemStackIn, World worldIn, EntityNPC playerIn) - { - HitPosition movingobjectposition = this.getMovingObjectPositionFromPlayer(worldIn, playerIn, true); - - if (movingobjectposition == null) - { - return itemStackIn; - } - else - { - if (movingobjectposition.type == HitPosition.ObjectType.BLOCK) - { - BlockPos blockpos = movingobjectposition.block; - - if (!World.isValidXZ(blockpos)) - { - return itemStackIn; - } - - if (!playerIn.canPlayerEdit(blockpos.offset(movingobjectposition.side), movingobjectposition.side, itemStackIn)) - { - return itemStackIn; - } - - BlockPos blockpos1 = blockpos.up(); - State iblockstate = worldIn.getState(blockpos); - - if (iblockstate.getBlock().getMaterial().isColdLiquid() && ((Integer)iblockstate.getValue(BlockLiquid.LEVEL)).intValue() == 0 && worldIn.isAirBlock(blockpos1)) - { - worldIn.setState(blockpos1, Blocks.waterlily.getState().withProperty(BlockLilyPad.FACING, playerIn.getHorizontalFacing().getOpposite())); - -// if (!playerIn.creative) -// { - itemStackIn.decrSize(); -// } - -// playerIn.triggerAchievement(StatRegistry.objectUseStats[ItemRegistry.getIdFromItem(this)]); - } - } - - return itemStackIn; - } - } -} diff --git a/common/src/main/java/common/item/block/ItemMetalBlock.java b/common/src/main/java/common/item/block/ItemMetalBlock.java deleted file mode 100755 index 47b04713..00000000 --- a/common/src/main/java/common/item/block/ItemMetalBlock.java +++ /dev/null @@ -1,57 +0,0 @@ -package common.item.block; - -import java.util.List; -import java.util.Map; -import common.attributes.Attribute; -import common.attributes.UsageSlot; -import common.block.Block; -import common.block.artificial.BlockMetalBlock; -import common.block.natural.BlockMetalOre; -import common.color.TextColor; -import common.entity.npc.EntityNPC; -import common.init.MetalType; -import common.item.ItemStack; - -public class ItemMetalBlock extends ItemBlock { - private final MetalType metal; - private final boolean ore; - - private ItemMetalBlock(Block block, MetalType metal, boolean ore) { - super(block); - this.metal = metal; - this.ore = ore; - if(this.metal.radioactivity > 0.0f) - this.setColor(TextColor.GREEN); - } - - public ItemMetalBlock(BlockMetalBlock block) { - this(block, block.getMetal(), false); - } - - public ItemMetalBlock(BlockMetalOre block) { - this(block, block.getMetal(), true); - } - - public void addInformation(ItemStack stack, EntityNPC playerIn, List tooltip) - { - tooltip.add(this.metal.formatSymbol()); - if(this.metal.radioactivity > 0.0f) { - tooltip.add(this.metal.formatRadioactivity()); - } - tooltip.add(this.metal.formatRarity()); - } - - public void getModifiers(Map map, UsageSlot slot) - { - if((slot == null || slot == UsageSlot.INVENTORY) && this.metal.radioactivity > 0.0f) - map.put(Attribute.RADIATION, this.metal.radioactivity * 4.0f * (this.ore ? 2.0f : 9.0f)); - } - - public float getRadiation(ItemStack stack) { - return this.metal.radioactivity * (this.ore ? 0.5f : 2.0f) * (float)stack.getSize(); - } - - public boolean isMagnetic() { - return this.metal.isMagnetic(); - } -} diff --git a/common/src/main/java/common/item/block/ItemPane.java b/common/src/main/java/common/item/block/ItemPane.java deleted file mode 100644 index c6e23f7b..00000000 --- a/common/src/main/java/common/item/block/ItemPane.java +++ /dev/null @@ -1,19 +0,0 @@ -package common.item.block; - -import common.block.artificial.BlockPane; -import common.init.BlockRegistry; -import common.model.Model; -import common.model.ModelProvider; - -public class ItemPane extends ItemBlock -{ - public ItemPane(BlockPane block) - { - super(block); - } - - public Model getModel(ModelProvider provider, String name) { - return provider.getModel(this.block.getModel(provider, - BlockRegistry.getName(this.block), this.block.getState().withProperty(BlockPane.NORTH, false).withProperty(BlockPane.SOUTH, false).withProperty(BlockPane.WEST, true).withProperty(BlockPane.EAST, true)), this.getTransform()); - } -} diff --git a/common/src/main/java/common/item/block/ItemPiston.java b/common/src/main/java/common/item/block/ItemPiston.java deleted file mode 100755 index 11585564..00000000 --- a/common/src/main/java/common/item/block/ItemPiston.java +++ /dev/null @@ -1,23 +0,0 @@ -package common.item.block; - -import common.block.tech.BlockPistonBase; -import common.init.Blocks; -import common.model.Model; -import common.model.ModelProvider; - -public class ItemPiston extends ItemBlock -{ - public ItemPiston(BlockPistonBase block) - { - super(block); - } - - public boolean isMagnetic() { - return true; - } - - public Model getModel(ModelProvider provider, String name) { - return provider.getModel(provider.getModel("piston_side").add().nswe().d("piston_bottom").u("piston_top" + (this.block == - Blocks.sticky_piston ? "_sticky" : "")), this.getTransform()); - } -} diff --git a/common/src/main/java/common/item/block/ItemPressurePlate.java b/common/src/main/java/common/item/block/ItemPressurePlate.java deleted file mode 100755 index 396b5a88..00000000 --- a/common/src/main/java/common/item/block/ItemPressurePlate.java +++ /dev/null @@ -1,22 +0,0 @@ -package common.item.block; - -import common.block.tech.BlockBasePressurePlate; -import common.model.Model; -import common.model.ModelProvider; - -public class ItemPressurePlate extends ItemBlock { - public ItemPressurePlate(BlockBasePressurePlate block) { - super(block); - } - - public Model getModel(ModelProvider provider, String name) { - return provider.getModel(provider.getModel(((BlockBasePressurePlate)this.block).getTexture()) - .add(1, 6, 1, 15, 10, 15) - .d().uv(1, 1, 15, 15).noCull() - .u().uv(1, 1, 15, 15).noCull() - .n().uv(1, 6, 15, 10).noCull() - .s().uv(1, 6, 15, 10).noCull() - .w().uv(1, 6, 15, 10).noCull() - .e().uv(1, 6, 15, 10).noCull(), this.getTransform()); - } -} diff --git a/common/src/main/java/common/item/block/ItemSign.java b/common/src/main/java/common/item/block/ItemSign.java deleted file mode 100755 index 18297ab4..00000000 --- a/common/src/main/java/common/item/block/ItemSign.java +++ /dev/null @@ -1,92 +0,0 @@ -package common.item.block; - -import common.block.Block; -import common.block.tile.BlockStandingSign; -import common.block.tile.BlockWallSign; -import common.entity.npc.EntityNPC; -import common.init.Blocks; -import common.item.CheatTab; -import common.item.Item; -import common.item.ItemStack; -import common.model.Model; -import common.model.ModelProvider; -import common.tileentity.TileEntity; -import common.tileentity.TileEntitySign; -import common.util.BlockPos; -import common.util.ExtMath; -import common.util.Facing; -import common.world.World; - -public class ItemSign extends Item -{ - private final BlockStandingSign block; - - public ItemSign(BlockStandingSign block) - { - this.block = block; - this.setTab(CheatTab.DECORATION); - } - - public Block getBlock() - { - return this.block; - } - - /** - * Called when a Block is right-clicked with this Item - */ - public boolean onItemUse(ItemStack stack, EntityNPC playerIn, World worldIn, BlockPos pos, Facing side, float hitX, float hitY, float hitZ) - { - if (side == Facing.DOWN) - { - return false; - } - else if (!worldIn.getState(pos).getBlock().getMaterial().isSolid()) - { - return false; - } - else - { - pos = pos.offset(side); - - if (!playerIn.canPlayerEdit(pos, side, stack)) - { - return false; - } - else if (!this.block.canPlaceBlockAt(worldIn, pos)) - { - return false; - } - else if (worldIn.client) - { - return true; - } - else - { - if (side == Facing.UP) - { - int i = ExtMath.floord((double)((playerIn.rotYaw + 180.0F) * 16.0F / 360.0F) + 0.5D) & 15; - worldIn.setState(pos, Blocks.sign.getState().withProperty(BlockStandingSign.ROTATION, Integer.valueOf(i)), 3); - } - else - { - worldIn.setState(pos, Blocks.wall_sign.getState().withProperty(BlockWallSign.FACING, side), 3); - } - - stack.decrSize(); - TileEntity tileentity = worldIn.getTileEntity(pos); - - if (tileentity instanceof TileEntitySign) - { - playerIn.connection.show((TileEntitySign)tileentity); - } - - return true; - } - } - } - - public Model getModel(ModelProvider provider, String name) { - return provider.getModel(provider.getEntityModel(), this.getTransform()); - } -} diff --git a/common/src/main/java/common/item/block/ItemSlab.java b/common/src/main/java/common/item/block/ItemSlab.java deleted file mode 100755 index 2a4d04a8..00000000 --- a/common/src/main/java/common/item/block/ItemSlab.java +++ /dev/null @@ -1,43 +0,0 @@ -package common.item.block; - -import common.block.Block; -import common.block.artificial.BlockSlab; -import common.entity.npc.EntityNPC; -import common.item.ItemStack; -import common.util.BlockPos; -import common.util.Facing; -import common.world.State; -import common.world.World; - -public class ItemSlab extends ItemBlock { - private final BlockSlab slab; - - public ItemSlab(BlockSlab slab) { - super(slab); - this.slab = slab; - } - - public boolean onItemUse(ItemStack stack, EntityNPC playerIn, World worldIn, BlockPos pos, Facing side, float hitX, float hitY, float hitZ) { - return !stack.isEmpty() && playerIn.canPlayerEdit(pos.offset(side), side, stack) && - (this.tryVerticalPlace(stack, playerIn, worldIn, pos, side, hitX, hitY, hitZ) || super.onItemUse(stack, playerIn, worldIn, pos, side, hitX, hitY, hitZ)); - } - - private boolean tryVerticalPlace(ItemStack stack, EntityNPC playerIn, World worldIn, BlockPos pos, Facing side, float hitX, float hitY, float hitZ) { - if(hitY >= 0.34f && hitY <= 0.66f) { - State state = worldIn.getState(pos); - Block block = state.getBlock(); - if(!block.isReplaceable(worldIn, pos)) - pos = pos.offset(side); - if(worldIn.canBlockBePlaced(this.slab, pos, false, side, null, stack)) { - State place = this.slab.getState().withProperty(BlockSlab.FACING, playerIn.getHorizontalFacing()); - if(worldIn.setState(pos, place, 3)) { - worldIn.playSound(this.slab.sound.getPlaceSound(), (double)((float)pos.getX() + 0.5F), (double)((float)pos.getY() + 0.5F), - (double)((float)pos.getZ() + 0.5F), 1.0F); - stack.decrSize(); - } - return true; - } - } - return false; - } -} diff --git a/common/src/main/java/common/item/block/ItemSnow.java b/common/src/main/java/common/item/block/ItemSnow.java deleted file mode 100755 index 80feb27f..00000000 --- a/common/src/main/java/common/item/block/ItemSnow.java +++ /dev/null @@ -1,64 +0,0 @@ -package common.item.block; - -import common.block.Block; -import common.block.natural.BlockSnow; -import common.entity.npc.EntityNPC; -import common.item.ItemStack; -import common.util.BlockPos; -import common.util.BoundingBox; -import common.util.Facing; -import common.world.State; -import common.world.World; - -public class ItemSnow extends ItemBlock -{ - public ItemSnow(BlockSnow block) - { - super(block); - } - - public boolean onItemUse(ItemStack stack, EntityNPC playerIn, World worldIn, BlockPos pos, Facing side, float hitX, float hitY, float hitZ) - { - if (stack.isEmpty()) - { - return false; - } - else if (!playerIn.canPlayerEdit(pos, side, stack)) - { - return false; - } - else - { - State iblockstate = worldIn.getState(pos); - Block block = iblockstate.getBlock(); - BlockPos blockpos = pos; - - if ((side != Facing.UP || block != this.block) && !block.isReplaceable(worldIn, pos)) - { - blockpos = pos.offset(side); - iblockstate = worldIn.getState(blockpos); - block = iblockstate.getBlock(); - } - - if (block == this.block) - { - int i = ((Integer)iblockstate.getValue(BlockSnow.LAYERS)).intValue(); - - if (i <= 7) - { - State iblockstate1 = iblockstate.withProperty(BlockSnow.LAYERS, Integer.valueOf(i + 1)); - BoundingBox axisalignedbb = this.block.getCollisionBoundingBox(worldIn, blockpos, iblockstate1); - - if (axisalignedbb != null && worldIn.checkNoEntityCollision(axisalignedbb) && worldIn.setState(blockpos, iblockstate1, 2)) - { - worldIn.playSound(this.block.sound.getPlaceSound(), (double)((float)blockpos.getX() + 0.5F), (double)((float)blockpos.getY() + 0.5F), (double)((float)blockpos.getZ() + 0.5F), 1.0F); - stack.decrSize(); - return true; - } - } - } - - return super.onItemUse(stack, playerIn, worldIn, blockpos, side, hitX, hitY, hitZ); - } - } -} diff --git a/common/src/main/java/common/item/block/ItemTNT.java b/common/src/main/java/common/item/block/ItemTNT.java deleted file mode 100644 index 3124e1e6..00000000 --- a/common/src/main/java/common/item/block/ItemTNT.java +++ /dev/null @@ -1,32 +0,0 @@ -package common.item.block; - -import common.block.tech.BlockTNT; -import common.color.TextColor; -import common.entity.item.EntityTnt; -import common.entity.types.EntityLiving; -import common.init.SoundEvent; -import common.item.ItemStack; -import common.tileentity.TileEntity; -import common.util.BlockPos; -import common.util.Facing; -import common.util.Vec3; -import common.world.World; - -public class ItemTNT extends ItemBlock { - private final int power; - - public ItemTNT(BlockTNT block) { - super(block); - this.power = block.getExplosionPower(); - this.setColor(TextColor.RED); - } - - public ItemStack dispenseStack(World world, TileEntity source, Vec3 position, BlockPos blockpos, Facing facing, ItemStack stack) { - blockpos = blockpos.offset(facing); - EntityTnt entitytntprimed = new EntityTnt(world, (double)blockpos.getX() + 0.5D, (double)blockpos.getY(), (double)blockpos.getZ() + 0.5D, (EntityLiving)null, this.power); - world.spawnEntityInWorld(entitytntprimed); - world.playSoundAtEntity(entitytntprimed, SoundEvent.FUSE, 1.0F); - stack.decrSize(); - return stack; - } -} diff --git a/common/src/main/java/common/item/block/ItemWall.java b/common/src/main/java/common/item/block/ItemWall.java deleted file mode 100755 index 7b900079..00000000 --- a/common/src/main/java/common/item/block/ItemWall.java +++ /dev/null @@ -1,33 +0,0 @@ -package common.item.block; - -import common.block.artificial.BlockWall; -import common.model.Model; -import common.model.ModelProvider; - -public class ItemWall extends ItemBlock { - private final BlockWall wallBlock; - - public ItemWall(BlockWall block) { - super(block); - this.wallBlock = block; - } - - public Model getModel(ModelProvider provider, String name) { - return provider.getModel( - provider.getModel(this.wallBlock.getTexture()) - .add(4, 0, 4, 12, 16, 12) - .d().uv(4, 4, 12, 12) - .u().uv(4, 4, 12, 12).noCull() - .n().uv(4, 0, 12, 16).noCull() - .s().uv(4, 0, 12, 16).noCull() - .w().uv(4, 0, 12, 16).noCull() - .e().uv(4, 0, 12, 16).noCull() - .add(5, 0, 0, 11, 13, 16) - .d().uv(5, 0, 11, 16) - .u().uv(5, 0, 11, 16).noCull() - .n().uv(5, 3, 11, 16) - .s().uv(5, 3, 11, 16) - .w().uv(0, 3, 16, 16).noCull() - .e().uv(0, 3, 16, 16).noCull(), this.getTransform()); - } -} diff --git a/common/src/main/java/common/item/tool/ItemAppleGold.java b/common/src/main/java/common/item/consumable/ItemAppleGold.java similarity index 90% rename from common/src/main/java/common/item/tool/ItemAppleGold.java rename to common/src/main/java/common/item/consumable/ItemAppleGold.java index 1c463c60..40330746 100755 --- a/common/src/main/java/common/item/tool/ItemAppleGold.java +++ b/common/src/main/java/common/item/consumable/ItemAppleGold.java @@ -1,4 +1,4 @@ -package common.item.tool; +package common.item.consumable; import common.color.TextColor; import common.effect.Effect; @@ -16,11 +16,8 @@ public class ItemAppleGold extends ItemFood super(amount, false); this.powered = powered; this.setColor(powered ? TextColor.MAGENTA : TextColor.NEON); - } - - public boolean hasEffect(ItemStack stack) - { - return this.powered; + if(this.powered) + this.setGleaming(); } protected void onFoodEaten(ItemStack stack, World worldIn, EntityNPC player) diff --git a/common/src/main/java/common/item/tool/ItemBucketMilk.java b/common/src/main/java/common/item/consumable/ItemBucketMilk.java similarity index 95% rename from common/src/main/java/common/item/tool/ItemBucketMilk.java rename to common/src/main/java/common/item/consumable/ItemBucketMilk.java index 2d9fceba..4f39be2a 100755 --- a/common/src/main/java/common/item/tool/ItemBucketMilk.java +++ b/common/src/main/java/common/item/consumable/ItemBucketMilk.java @@ -1,4 +1,4 @@ -package common.item.tool; +package common.item.consumable; import java.util.Map; import common.attributes.Attribute; @@ -17,6 +17,7 @@ public class ItemBucketMilk extends Item { this.setUnstackable(); this.setTab(CheatTab.TOOLS); + this.setMagnetic(); } /** @@ -69,8 +70,4 @@ public class ItemBucketMilk extends Item if(slot == null || slot == UsageSlot.INVENTORY) map.put(Attribute.RADIATION, -5.0f); } - - public boolean isMagnetic() { - return true; - } } diff --git a/common/src/main/java/common/item/tool/ItemFishFood.java b/common/src/main/java/common/item/consumable/ItemFishFood.java similarity index 93% rename from common/src/main/java/common/item/tool/ItemFishFood.java rename to common/src/main/java/common/item/consumable/ItemFishFood.java index f739935a..12aa9651 100755 --- a/common/src/main/java/common/item/tool/ItemFishFood.java +++ b/common/src/main/java/common/item/consumable/ItemFishFood.java @@ -1,4 +1,4 @@ -package common.item.tool; +package common.item.consumable; import common.effect.Effect; import common.effect.StatusEffect; @@ -45,10 +45,6 @@ public class ItemFishFood extends ItemFood super.onFoodEaten(stack, worldIn, player); } - public Model getModel(ModelProvider provider, String name) { - return provider.getModel(this.getTransform(), (this.cooked ? "cooked_" : "") + this.type.getName()); - } - public static enum FishType { COD("cod", "Kabeljau", 2, 5), diff --git a/common/src/main/java/common/item/tool/ItemFood.java b/common/src/main/java/common/item/consumable/ItemFood.java similarity index 99% rename from common/src/main/java/common/item/tool/ItemFood.java rename to common/src/main/java/common/item/consumable/ItemFood.java index ce7318e0..05d7d305 100755 --- a/common/src/main/java/common/item/tool/ItemFood.java +++ b/common/src/main/java/common/item/consumable/ItemFood.java @@ -1,4 +1,4 @@ -package common.item.tool; +package common.item.consumable; import common.effect.Effect; import common.effect.StatusEffect; diff --git a/common/src/main/java/common/item/tool/ItemPotion.java b/common/src/main/java/common/item/consumable/ItemPotion.java similarity index 94% rename from common/src/main/java/common/item/tool/ItemPotion.java rename to common/src/main/java/common/item/consumable/ItemPotion.java index b7d720cb..821a8589 100755 --- a/common/src/main/java/common/item/tool/ItemPotion.java +++ b/common/src/main/java/common/item/consumable/ItemPotion.java @@ -1,4 +1,4 @@ -package common.item.tool; +package common.item.consumable; import java.util.Collection; import java.util.List; @@ -74,6 +74,8 @@ public class ItemPotion extends Item this.setTab(CheatTab.POTIONS); this.setColor(TextColor.ORK); this.setDisplay(getDisplay(this)); + if(this.effect != null) + this.setGleaming(); POTIONS.add(this); } @@ -115,10 +117,10 @@ public class ItemPotion extends Item // { if (stack.isEmpty()) { - return new ItemStack(Items.glass_bottle); + return new ItemStack(Items.bottle); } - playerIn.inventory.addItemStackToInventory(new ItemStack(Items.glass_bottle)); + playerIn.inventory.addItemStackToInventory(new ItemStack(Items.bottle)); // } return stack; @@ -165,7 +167,7 @@ public class ItemPotion extends Item return this.effect == null ? 0x385dc6 : this.effect.getPotion().getColor(); } - public int getColorFromItemStack(ItemStack stack, int renderPass) + public int getRenderColor(ItemStack stack, int renderPass) { return renderPass > 0 ? 16777215 : this.getPotionColor(); } @@ -222,11 +224,6 @@ public class ItemPotion extends Item tooltip.add(TextColor.LGRAY + "Wirkungslos"); } } - - public boolean hasEffect(ItemStack stack) - { - return this.effect != null; - } public static List> getBasePotions() { List> effects = Lists.newArrayList(); @@ -253,8 +250,8 @@ public class ItemPotion extends Item return effects; } - public Model getModel(ModelProvider provider, String name) { - return provider.getModel(this.getTransform(), "potion_overlay", "bottle"); + public String[] getTextures(String name) { + return new String[] {"potion_overlay", "bottle"}; } public ItemStack dispenseStack(World world, TileEntity source, Vec3 position, BlockPos blockpos, Facing facing, ItemStack stack) { diff --git a/common/src/main/java/common/item/block/ItemSeedFood.java b/common/src/main/java/common/item/consumable/ItemSeedFood.java similarity index 82% rename from common/src/main/java/common/item/block/ItemSeedFood.java rename to common/src/main/java/common/item/consumable/ItemSeedFood.java index e9b7e0ab..376a0558 100755 --- a/common/src/main/java/common/item/block/ItemSeedFood.java +++ b/common/src/main/java/common/item/consumable/ItemSeedFood.java @@ -1,11 +1,10 @@ -package common.item.block; +package common.item.consumable; import common.block.Block; import common.block.foliage.BlockCrops; import common.entity.npc.EntityNPC; import common.item.CheatTab; import common.item.ItemStack; -import common.item.tool.ItemFood; import common.util.BlockPos; import common.util.Facing; import common.world.World; @@ -20,17 +19,8 @@ public class ItemSeedFood extends ItemFood super(healAmount, false); this.crops = crops; this.soil = soil; - this.setTab(CheatTab.PLANTS); } - public Block getBlock() - { - return this.crops; - } - - /** - * Called when a Block is right-clicked with this Item - */ public boolean onItemUse(ItemStack stack, EntityNPC playerIn, World worldIn, BlockPos pos, Facing side, float hitX, float hitY, float hitZ) { if (side != Facing.UP) diff --git a/common/src/main/java/common/item/tool/ItemSoup.java b/common/src/main/java/common/item/consumable/ItemSoup.java similarity index 95% rename from common/src/main/java/common/item/tool/ItemSoup.java rename to common/src/main/java/common/item/consumable/ItemSoup.java index bcdb5a3b..2705cc88 100755 --- a/common/src/main/java/common/item/tool/ItemSoup.java +++ b/common/src/main/java/common/item/consumable/ItemSoup.java @@ -1,4 +1,4 @@ -package common.item.tool; +package common.item.consumable; import common.entity.npc.EntityNPC; import common.init.Items; diff --git a/common/src/main/java/common/item/tool/ItemArmor.java b/common/src/main/java/common/item/material/ItemArmor.java similarity index 94% rename from common/src/main/java/common/item/tool/ItemArmor.java rename to common/src/main/java/common/item/material/ItemArmor.java index e076896d..b0219659 100755 --- a/common/src/main/java/common/item/tool/ItemArmor.java +++ b/common/src/main/java/common/item/material/ItemArmor.java @@ -1,4 +1,4 @@ -package common.item.tool; +package common.item.material; import java.util.List; import java.util.Map; @@ -38,6 +38,8 @@ public class ItemArmor extends Item this.setTab(CheatTab.ARMOR); if(this.material.canBeDyed()) this.setDefaultColor(this.material.getDefaultColor()); + if(this.material.isMagnetic()) + this.setMagnetic(); } /** @@ -99,13 +101,9 @@ public class ItemArmor extends Item if(this.material.getMagicReduction(this.armorType) > 0.0f) map.put(Attribute.MAGIC_RESISTANCE, this.material.getMagicReduction(this.armorType)); } - - public boolean isMagnetic() { - return this.material.isMagnetic(); - } - public Model getModel(ModelProvider provider, String name) { - return provider.getModel(provider.getEntityModel(), this.getTransform()); + public boolean hasBuiltinModel() { + return true; } public static int getArmorPosition(ItemStack stack) { diff --git a/common/src/main/java/common/item/tool/ItemGlassBottle.java b/common/src/main/java/common/item/material/ItemBottle.java similarity index 85% rename from common/src/main/java/common/item/tool/ItemGlassBottle.java rename to common/src/main/java/common/item/material/ItemBottle.java index 815b2ee3..5c19d9a1 100755 --- a/common/src/main/java/common/item/tool/ItemGlassBottle.java +++ b/common/src/main/java/common/item/material/ItemBottle.java @@ -1,4 +1,4 @@ -package common.item.tool; +package common.item.material; import common.block.Material; import common.entity.npc.EntityNPC; @@ -12,9 +12,9 @@ import common.util.BlockPos; import common.util.HitPosition; import common.world.World; -public class ItemGlassBottle extends Item +public class ItemBottle extends Item { - public ItemGlassBottle() + public ItemBottle() { this.setTab(CheatTab.TOOLS); } @@ -24,7 +24,7 @@ public class ItemGlassBottle extends Item */ public ItemStack onItemRightClick(ItemStack itemStackIn, World worldIn, EntityNPC playerIn) { - HitPosition movingobjectposition = this.getMovingObjectPositionFromPlayer(worldIn, playerIn, true); + HitPosition movingobjectposition = getMovingObjectPositionFromPlayer(worldIn, playerIn, true); if (movingobjectposition == null) { @@ -65,8 +65,4 @@ public class ItemGlassBottle extends Item return itemStackIn; } } - - public Model getModel(ModelProvider provider, String name) { - return provider.getModel(this.getTransform(), "bottle"); - } } diff --git a/common/src/main/java/common/item/tool/ItemBucket.java b/common/src/main/java/common/item/material/ItemBucket.java similarity index 96% rename from common/src/main/java/common/item/tool/ItemBucket.java rename to common/src/main/java/common/item/material/ItemBucket.java index 726a7f16..79aff7af 100755 --- a/common/src/main/java/common/item/tool/ItemBucket.java +++ b/common/src/main/java/common/item/material/ItemBucket.java @@ -1,4 +1,4 @@ -package common.item.tool; +package common.item.material; import java.util.ArrayDeque; import java.util.ArrayList; @@ -123,6 +123,7 @@ public class ItemBucket extends Item this.liquid = liquid; this.recursive = recursive; this.setTab(liquid == null ? CheatTab.TOOLS : CheatTab.LIQUIDS); + this.setMagnetic(); if(liquid != null && !recursive) { MAPPING.put(liquid, this); MAPPING.put(liquid.getStaticBlock(), this); @@ -139,7 +140,7 @@ public class ItemBucket extends Item public ItemStack onItemRightClick(ItemStack itemStackIn, World worldIn, EntityNPC playerIn) { // boolean flag = this.fillBlock == Blocks.air; - HitPosition movingobjectposition = this.getMovingObjectPositionFromPlayer(worldIn, playerIn, this.liquid == null); + HitPosition movingobjectposition = getMovingObjectPositionFromPlayer(worldIn, playerIn, this.liquid == null); if (movingobjectposition == null) { @@ -317,13 +318,9 @@ public class ItemBucket extends Item // { // return this.fillBlock == null && renderPass == 1 ? FluidRegistry.getLiquidColor(stack.getMetadata()) : 16777215; // } - - public boolean isMagnetic() { - return true; - } - public Model getModel(ModelProvider provider, String name) { - return this.recursive ? provider.getModel(this.getTransform(), name.substring("recursive_".length())) : super.getModel(provider, name); + public String[] getTextures(String name) { + return super.getTextures(this.recursive ? name.substring("recursive_".length()) : name); } public ItemStack dispenseStack(World world, TileEntity source, Vec3 position, BlockPos blockpos, Facing facing, ItemStack stack) { diff --git a/common/src/main/java/common/item/material/ItemEnchantedBook.java b/common/src/main/java/common/item/material/ItemEnchantedBook.java index 76f27931..02fd5a3c 100755 --- a/common/src/main/java/common/item/material/ItemEnchantedBook.java +++ b/common/src/main/java/common/item/material/ItemEnchantedBook.java @@ -27,6 +27,7 @@ public class ItemEnchantedBook extends Item public ItemEnchantedBook(Enchantment enchantment, int level) { this.setColor(TextColor.YELLOW); + this.setGleaming(); this.enchantment = enchantment; this.level = level; BOOKS.add(this); @@ -43,11 +44,6 @@ public class ItemEnchantedBook extends Item public int getLevel() { return this.level; } - - public boolean hasEffect(ItemStack stack) - { - return true; - } public void addInformation(ItemStack stack, EntityNPC playerIn, List tooltip) { @@ -55,9 +51,9 @@ public class ItemEnchantedBook extends Item tooltip.add(this.enchantment.getFormattedName(this.level)); } - public Model getModel(ModelProvider provider, String name) { - return provider.getModel(this.getTransform(), "enchanted_book"); - } + public String[] getTextures(String name) { + return new String[] {"enchanted_book"}; + } public static ItemEnchantedBook getEnchantedBook(Enchantment enchantment, int level) { List list = MAPPING.get(enchantment); diff --git a/common/src/main/java/common/item/tool/ItemHorseArmor.java b/common/src/main/java/common/item/material/ItemHorseArmor.java similarity index 72% rename from common/src/main/java/common/item/tool/ItemHorseArmor.java rename to common/src/main/java/common/item/material/ItemHorseArmor.java index 3c0e8341..450848ca 100755 --- a/common/src/main/java/common/item/tool/ItemHorseArmor.java +++ b/common/src/main/java/common/item/material/ItemHorseArmor.java @@ -1,4 +1,4 @@ -package common.item.tool; +package common.item.material; import common.attributes.UsageSlot; import common.init.ToolMaterial; @@ -16,6 +16,8 @@ public class ItemHorseArmor extends Item { this.texture = texture; this.setUnstackable(); this.setTab(CheatTab.ARMOR); + if(this.material.isMagnetic()) + this.setMagnetic(); } public int getArmorValue() { @@ -26,11 +28,7 @@ public class ItemHorseArmor extends Item { return this.texture; } - public boolean isMagnetic() { - return this.material.isMagnetic(); - } - - public Model getModel(ModelProvider provider, String name) { - return provider.getModel(provider.getEntityModel(), this.getTransform()); + public boolean hasBuiltinModel() { + return true; } } diff --git a/common/src/main/java/common/item/material/ItemMetal.java b/common/src/main/java/common/item/material/ItemMetal.java index 82020bc4..1b6b3af5 100755 --- a/common/src/main/java/common/item/material/ItemMetal.java +++ b/common/src/main/java/common/item/material/ItemMetal.java @@ -17,6 +17,8 @@ public class ItemMetal extends Item { this.metal = metal; if(this.metal.radioactivity > 0.0f) this.setColor(TextColor.GREEN); + if(this.metal.isMagnetic()) + this.setMagnetic(); } public void addInformation(ItemStack stack, EntityNPC playerIn, List tooltip) @@ -42,8 +44,4 @@ public class ItemMetal extends Item { public float getRadiation(ItemStack stack) { return this.metal.radioactivity * 0.25f * (float)stack.getSize(); } - - public boolean isMagnetic() { - return this.metal.isMagnetic(); - } } diff --git a/common/src/main/java/common/item/material/ItemRecord.java b/common/src/main/java/common/item/material/ItemRecord.java index 76b39b48..dc3e32e7 100755 --- a/common/src/main/java/common/item/material/ItemRecord.java +++ b/common/src/main/java/common/item/material/ItemRecord.java @@ -10,7 +10,7 @@ public class ItemRecord extends Item { this.setTab(CheatTab.MISC); } - public Model getModel(ModelProvider provider, String name) { - return provider.getModel(this.getTransform(), "record_old"); + public String[] getTextures(String name) { + return new String[] {"record_old"}; } } diff --git a/common/src/main/java/common/item/block/ItemSeeds.java b/common/src/main/java/common/item/material/ItemSeeds.java similarity index 84% rename from common/src/main/java/common/item/block/ItemSeeds.java rename to common/src/main/java/common/item/material/ItemSeeds.java index cdb3e54e..67e24046 100755 --- a/common/src/main/java/common/item/block/ItemSeeds.java +++ b/common/src/main/java/common/item/material/ItemSeeds.java @@ -1,4 +1,4 @@ -package common.item.block; +package common.item.material; import common.block.Block; import common.block.foliage.BlockBush; @@ -20,17 +20,9 @@ public class ItemSeeds extends Item { this.crops = crops; this.soil = soil; - this.setTab(CheatTab.PLANTS); + this.setTab(CheatTab.MATERIALS); } - public Block getBlock() - { - return this.crops; - } - - /** - * Called when a Block is right-clicked with this Item - */ public boolean onItemUse(ItemStack stack, EntityNPC playerIn, World worldIn, BlockPos pos, Facing side, float hitX, float hitY, float hitZ) { if (side != Facing.UP) diff --git a/common/src/main/java/common/item/tool/ItemChargedOrb.java b/common/src/main/java/common/item/projectile/ItemChargedOrb.java similarity index 97% rename from common/src/main/java/common/item/tool/ItemChargedOrb.java rename to common/src/main/java/common/item/projectile/ItemChargedOrb.java index d528a3b2..c73dc41e 100755 --- a/common/src/main/java/common/item/tool/ItemChargedOrb.java +++ b/common/src/main/java/common/item/projectile/ItemChargedOrb.java @@ -1,4 +1,4 @@ -package common.item.tool; +package common.item.projectile; import common.block.artificial.BlockPortalFrame; import common.color.TextColor; @@ -8,7 +8,7 @@ import common.init.Blocks; import common.init.Items; import common.init.SoundEvent; import common.item.CheatTab; -import common.item.ItemFragile; +import common.item.Item; import common.item.ItemStack; import common.util.BlockPos; import common.util.Facing; @@ -16,13 +16,14 @@ import common.util.ParticleType; import common.world.State; import common.world.World; -public class ItemChargedOrb extends ItemFragile +public class ItemChargedOrb extends Item { public ItemChargedOrb() { this.setTab(CheatTab.MAGIC); this.setMaxDamage(16); this.setColor(TextColor.DMAGENTA); + this.setFragile(); } public ItemStack onItemRightClick(ItemStack itemStackIn, World worldIn, EntityNPC playerIn) diff --git a/common/src/main/java/common/item/tool/ItemDie.java b/common/src/main/java/common/item/projectile/ItemDie.java similarity index 89% rename from common/src/main/java/common/item/tool/ItemDie.java rename to common/src/main/java/common/item/projectile/ItemDie.java index e0883354..9f17b508 100755 --- a/common/src/main/java/common/item/tool/ItemDie.java +++ b/common/src/main/java/common/item/projectile/ItemDie.java @@ -1,4 +1,4 @@ -package common.item.tool; +package common.item.projectile; import java.util.Collection; import java.util.Map; @@ -80,13 +80,13 @@ public class ItemDie extends Item return itemStackIn; } - public Transform getTransform() { - return Transform.DICE; + public Model getCustomModel(ModelProvider provider, String name) { + return provider.getModel("items/die_d" + this.sides + "_side").add(4.8f, 4.8f, 4.8f, 11.2f, 11.2f, 11.2f).nswe().uv(0, 0, 16, 16) + .du("items/die_d" + this.sides + "_top").uv(0, 0, 16, 16); } - public Model getModel(ModelProvider provider, String name) { - return provider.getModel(provider.getModel("items/die_d" + this.sides + "_side").add(4.8f, 4.8f, 4.8f, 11.2f, 11.2f, 11.2f).nswe().uv(0, 0, 16, 16) - .du("items/die_d" + this.sides + "_top").uv(0, 0, 16, 16), this.getTransform()); + public Transform getCustomTransform() { + return Transform.DICE; } public ItemStack dispenseStack(World world, TileEntity source, Vec3 position, BlockPos blockpos, Facing facing, ItemStack stack) { diff --git a/common/src/main/java/common/item/tool/ItemDynamite.java b/common/src/main/java/common/item/projectile/ItemDynamite.java similarity index 97% rename from common/src/main/java/common/item/tool/ItemDynamite.java rename to common/src/main/java/common/item/projectile/ItemDynamite.java index 16c7269c..b4b5a924 100755 --- a/common/src/main/java/common/item/tool/ItemDynamite.java +++ b/common/src/main/java/common/item/projectile/ItemDynamite.java @@ -1,4 +1,4 @@ -package common.item.tool; +package common.item.projectile; import common.entity.npc.EntityNPC; import common.entity.projectile.EntityDynamite; diff --git a/common/src/main/java/common/item/tool/ItemEgg.java b/common/src/main/java/common/item/projectile/ItemEgg.java similarity index 97% rename from common/src/main/java/common/item/tool/ItemEgg.java rename to common/src/main/java/common/item/projectile/ItemEgg.java index 939c24e8..a8750067 100755 --- a/common/src/main/java/common/item/tool/ItemEgg.java +++ b/common/src/main/java/common/item/projectile/ItemEgg.java @@ -1,4 +1,4 @@ -package common.item.tool; +package common.item.projectile; import common.entity.npc.EntityNPC; import common.entity.projectile.EntityEgg; diff --git a/common/src/main/java/common/item/tool/ItemExpBottle.java b/common/src/main/java/common/item/projectile/ItemExpBottle.java similarity index 93% rename from common/src/main/java/common/item/tool/ItemExpBottle.java rename to common/src/main/java/common/item/projectile/ItemExpBottle.java index 0671a981..411c7690 100755 --- a/common/src/main/java/common/item/tool/ItemExpBottle.java +++ b/common/src/main/java/common/item/projectile/ItemExpBottle.java @@ -1,4 +1,4 @@ -package common.item.tool; +package common.item.projectile; import common.entity.item.EntityXpBottle; import common.entity.npc.EntityNPC; @@ -17,11 +17,7 @@ public class ItemExpBottle extends Item public ItemExpBottle() { this.setTab(CheatTab.MAGIC); - } - - public boolean hasEffect(ItemStack stack) - { - return true; + this.setGleaming(); } /** diff --git a/common/src/main/java/common/item/tool/ItemFireball.java b/common/src/main/java/common/item/projectile/ItemFireball.java similarity index 98% rename from common/src/main/java/common/item/tool/ItemFireball.java rename to common/src/main/java/common/item/projectile/ItemFireball.java index cfa74ea7..1cddb116 100755 --- a/common/src/main/java/common/item/tool/ItemFireball.java +++ b/common/src/main/java/common/item/projectile/ItemFireball.java @@ -1,4 +1,4 @@ -package common.item.tool; +package common.item.projectile; import common.entity.npc.EntityNPC; import common.entity.projectile.EntityFireCharge; diff --git a/common/src/main/java/common/item/tool/ItemSnowball.java b/common/src/main/java/common/item/projectile/ItemSnowball.java similarity index 97% rename from common/src/main/java/common/item/tool/ItemSnowball.java rename to common/src/main/java/common/item/projectile/ItemSnowball.java index b4136cd3..38e99d48 100755 --- a/common/src/main/java/common/item/tool/ItemSnowball.java +++ b/common/src/main/java/common/item/projectile/ItemSnowball.java @@ -1,4 +1,4 @@ -package common.item.tool; +package common.item.projectile; import common.entity.npc.EntityNPC; import common.entity.projectile.EntitySnowball; diff --git a/common/src/main/java/common/item/spawner/ItemCharTemplate.java b/common/src/main/java/common/item/spawner/ItemCharTemplate.java index 0aa1af6d..83e44812 100755 --- a/common/src/main/java/common/item/spawner/ItemCharTemplate.java +++ b/common/src/main/java/common/item/spawner/ItemCharTemplate.java @@ -58,7 +58,7 @@ public class ItemCharTemplate extends Item return species + (character.isEmpty() ? "" : (" " + character)); } - public int getColorFromItemStack(ItemStack stack, int renderPass) + public int getRenderColor(ItemStack stack, int renderPass) { return renderPass == 0 ? this.spawned.color1 : this.spawned.color2; } @@ -119,7 +119,7 @@ public class ItemCharTemplate extends Item } else { - HitPosition movingobjectposition = this.getMovingObjectPositionFromPlayer(worldIn, playerIn, true); + HitPosition movingobjectposition = getMovingObjectPositionFromPlayer(worldIn, playerIn, true); if (movingobjectposition == null) { @@ -189,7 +189,7 @@ public class ItemCharTemplate extends Item return entity; } - public Model getModel(ModelProvider provider, String name) { - return provider.getModel(this.getTransform(), "dna_sample_char", "dna_sample_char_overlay"); + public String[] getTextures(String name) { + return new String[] {"dna_sample_char", "dna_sample_char_overlay"}; } } diff --git a/common/src/main/java/common/item/spawner/ItemMinecart.java b/common/src/main/java/common/item/spawner/ItemMinecart.java index 66b57c0a..5256313c 100755 --- a/common/src/main/java/common/item/spawner/ItemMinecart.java +++ b/common/src/main/java/common/item/spawner/ItemMinecart.java @@ -25,6 +25,7 @@ public class ItemMinecart extends Item this.setUnstackable(); this.tnt = tnt; this.setTab(tnt ? CheatTab.EXPLOSIVES : CheatTab.VEHICLES); + this.setMagnetic(); } private EntityCart getMinecart(World worldIn, double x, double y, double z) @@ -81,10 +82,6 @@ public class ItemMinecart extends Item } } - public boolean isMagnetic() { - return true; - } - public ItemStack dispenseStack(World world, TileEntity source, Vec3 position, BlockPos blockpos, Facing facing, ItemStack stack) { double d0 = blockpos.getX() + 0.5 + (double)facing.getFrontOffsetX() * 1.125D; double d1 = Math.floor(blockpos.getY() + 0.5) + (double)facing.getFrontOffsetY(); diff --git a/common/src/main/java/common/item/spawner/ItemMobTemplate.java b/common/src/main/java/common/item/spawner/ItemMobTemplate.java index d917e2dc..2a5880b1 100755 --- a/common/src/main/java/common/item/spawner/ItemMobTemplate.java +++ b/common/src/main/java/common/item/spawner/ItemMobTemplate.java @@ -47,7 +47,7 @@ public class ItemMobTemplate extends Item return this.entityId; } - public int getColorFromItemStack(ItemStack stack, int renderPass) + public int getRenderColor(ItemStack stack, int renderPass) { EntityInfo egg = EntityRegistry.DNA.get(this.entityId); return egg != null ? (renderPass == 0 ? egg.color1() : egg.color2()) : 16777215; @@ -124,7 +124,7 @@ public class ItemMobTemplate extends Item } else { - HitPosition movingobjectposition = this.getMovingObjectPositionFromPlayer(worldIn, playerIn, true); + HitPosition movingobjectposition = getMovingObjectPositionFromPlayer(worldIn, playerIn, true); if (movingobjectposition == null) { @@ -197,7 +197,7 @@ public class ItemMobTemplate extends Item return living; } - public Model getModel(ModelProvider provider, String name) { - return provider.getModel(this.getTransform(), "dna_sample", "dna_sample_overlay"); + public String[] getTextures(String name) { + return new String[] {"dna_sample", "dna_sample_overlay"}; } } diff --git a/common/src/main/java/common/item/tool/ItemCamera.java b/common/src/main/java/common/item/tool/ItemCamera.java index f62f03f2..715408cc 100755 --- a/common/src/main/java/common/item/tool/ItemCamera.java +++ b/common/src/main/java/common/item/tool/ItemCamera.java @@ -2,14 +2,15 @@ package common.item.tool; import common.entity.npc.EntityNPC; import common.item.ItemControl; -import common.item.ItemMagnetic; +import common.item.Item; import common.item.ItemStack; import common.util.BlockPos; import common.world.World; -public class ItemCamera extends ItemMagnetic { +public class ItemCamera extends Item { public ItemCamera() { this.setUnstackable(); + this.setMagnetic(); } public boolean onAction(ItemStack stack, EntityNPC player, World world, ItemControl control, BlockPos block) { diff --git a/common/src/main/java/common/item/tool/ItemEditor.java b/common/src/main/java/common/item/tool/ItemEditor.java index 6dad049a..8d4682ac 100755 --- a/common/src/main/java/common/item/tool/ItemEditor.java +++ b/common/src/main/java/common/item/tool/ItemEditor.java @@ -13,11 +13,8 @@ public class ItemEditor extends Item { public ItemEditor() { this.setUnstackable(); this.setTab(CheatTab.TOOLS); + this.setGleaming(); } - - public boolean hasEffect(ItemStack stack) { - return true; - } public boolean onAction(ItemStack stack, EntityNPC player, World world, ItemControl control, BlockPos block) { if(!world.client && control == ItemControl.TERTIARY && player.connection.isAdmin()) diff --git a/common/src/main/java/common/item/tool/ItemFire.java b/common/src/main/java/common/item/tool/ItemFire.java index a4daf348..a1917b84 100755 --- a/common/src/main/java/common/item/tool/ItemFire.java +++ b/common/src/main/java/common/item/tool/ItemFire.java @@ -23,6 +23,7 @@ public class ItemFire extends Item this.fireBlock = fireBlock; this.setMaxDamage(64); this.setTab(CheatTab.TOOLS); + this.setMagnetic(); } /** @@ -49,10 +50,6 @@ public class ItemFire extends Item } } - public boolean isMagnetic() { - return true; - } - public ItemStack dispenseStack(World world, TileEntity source, Vec3 position, BlockPos blockpos, Facing facing, ItemStack stack) { BlockPos pos = blockpos = blockpos.offset(facing); diff --git a/common/src/main/java/common/item/tool/ItemHoe.java b/common/src/main/java/common/item/tool/ItemHoe.java index 7228b6a1..e712e9e4 100755 --- a/common/src/main/java/common/item/tool/ItemHoe.java +++ b/common/src/main/java/common/item/tool/ItemHoe.java @@ -23,6 +23,8 @@ public class ItemHoe extends Item this.theToolMaterial = material; this.setMaxDamage(material.getDurability()); this.setTab(CheatTab.TOOLS); + if(this.theToolMaterial.isMagnetic()) + this.setMagnetic(); } @@ -96,10 +98,6 @@ public class ItemHoe extends Item // { // return this.theToolMaterial.toString(); // } - - public boolean isMagnetic() { - return this.theToolMaterial.isMagnetic(); - } public ToolMaterial getToolMaterial() { diff --git a/common/src/main/java/common/item/tool/ItemKey.java b/common/src/main/java/common/item/tool/ItemKey.java index caf3217e..224d7a92 100755 --- a/common/src/main/java/common/item/tool/ItemKey.java +++ b/common/src/main/java/common/item/tool/ItemKey.java @@ -1,6 +1,9 @@ package common.item.tool; -import common.item.ItemMagnetic; +import common.item.Item; -public class ItemKey extends ItemMagnetic { +public class ItemKey extends Item { + public ItemKey() { + this.setMagnetic(); + } } diff --git a/common/src/main/java/common/item/tool/ItemMagnet.java b/common/src/main/java/common/item/tool/ItemMagnet.java index e47d3695..b125f932 100755 --- a/common/src/main/java/common/item/tool/ItemMagnet.java +++ b/common/src/main/java/common/item/tool/ItemMagnet.java @@ -21,6 +21,7 @@ public class ItemMagnet extends Item { public ItemMagnet(boolean chicken) { this.setTab(CheatTab.TOOLS); this.setUnstackable(); + this.setMagnetic(); this.chicken = chicken; } @@ -61,10 +62,6 @@ public class ItemMagnet extends Item { // playerIn.triggerAchievement(StatRegistry.objectUseStats[ItemRegistry.getIdFromItem(this)]); return itemStackIn; } - - public boolean isMagnetic() { - return true; - } public WieldType getWieldType() { return WieldType.TOOL_FLIP; diff --git a/common/src/main/java/common/item/tool/ItemShears.java b/common/src/main/java/common/item/tool/ItemShears.java index 29a17426..6b576d76 100755 --- a/common/src/main/java/common/item/tool/ItemShears.java +++ b/common/src/main/java/common/item/tool/ItemShears.java @@ -22,6 +22,8 @@ public class ItemShears extends Item this.setMaxDamage(material.getDurability() - 12); this.setTab(CheatTab.TOOLS); this.material = material; + if(this.material.isMagnetic()) + this.setMagnetic(); } public boolean onBlockDestroyed(ItemStack stack, World worldIn, Block blockIn, BlockPos pos, EntityLiving playerIn) @@ -53,10 +55,6 @@ public class ItemShears extends Item return this.material.isRepairItem(repair.getItem()) ? true : super.getIsRepairable(toRepair, repair); } - public boolean isMagnetic() { - return this.material.isMagnetic(); - } - public WieldType getWieldType() { return WieldType.TOOL; } diff --git a/common/src/main/java/common/item/tool/ItemSpaceNavigator.java b/common/src/main/java/common/item/tool/ItemSpaceNavigator.java index cc74ea6f..73d61db9 100755 --- a/common/src/main/java/common/item/tool/ItemSpaceNavigator.java +++ b/common/src/main/java/common/item/tool/ItemSpaceNavigator.java @@ -4,14 +4,15 @@ import java.util.List; import common.color.TextColor; import common.entity.npc.EntityNPC; -import common.item.ItemMagnetic; +import common.item.Item; import common.item.ItemStack; import common.util.BlockPos; -public class ItemSpaceNavigator extends ItemMagnetic { +public class ItemSpaceNavigator extends Item { public ItemSpaceNavigator() { this.setUnstackable(); this.setColor(TextColor.DGREEN); + this.setMagnetic(); } public String getHotbarText(EntityNPC player, ItemStack stack) { diff --git a/common/src/main/java/common/item/tool/ItemTool.java b/common/src/main/java/common/item/tool/ItemTool.java index 1eb28b93..1283d2e1 100755 --- a/common/src/main/java/common/item/tool/ItemTool.java +++ b/common/src/main/java/common/item/tool/ItemTool.java @@ -22,6 +22,8 @@ public abstract class ItemTool extends Item { this.efficiency = material.getEfficiency(); this.damage = damage + material.getDamage(); this.setTab(CheatTab.TOOLS); + if(this.material.isMagnetic()) + this.setMagnetic(); } public abstract boolean canUseOn(ItemStack stack, Block block); @@ -57,10 +59,6 @@ public abstract class ItemTool extends Item { return this.damage; } - public boolean isMagnetic() { - return this.material.isMagnetic(); - } - public WieldType getWieldType() { return WieldType.TOOL; } diff --git a/common/src/main/java/common/item/tool/ItemWand.java b/common/src/main/java/common/item/tool/ItemWand.java index 09defc53..2c75541d 100755 --- a/common/src/main/java/common/item/tool/ItemWand.java +++ b/common/src/main/java/common/item/tool/ItemWand.java @@ -21,6 +21,7 @@ public abstract class ItemWand extends Item { public ItemWand() { this.setUnstackable(); this.setTab(CheatTab.TOOLS); + this.setGleaming(); } // public boolean canBreakBlocks() { @@ -30,10 +31,6 @@ public abstract class ItemWand extends Item { // public final boolean canUseInAir() { // return true; // } - - public boolean hasEffect(ItemStack stack) { - return true; - } // public boolean ignoresBlocks() { // return true; diff --git a/common/src/main/java/common/item/tool/ItemWeatherToken.java b/common/src/main/java/common/item/tool/ItemWeatherToken.java index beefc9cc..241bd340 100755 --- a/common/src/main/java/common/item/tool/ItemWeatherToken.java +++ b/common/src/main/java/common/item/tool/ItemWeatherToken.java @@ -3,13 +3,13 @@ package common.item.tool; import common.color.TextColor; import common.entity.npc.EntityNPC; import common.init.SoundEvent; -import common.item.ItemMagnetic; +import common.item.Item; import common.item.ItemStack; import common.world.Weather; import common.world.World; import common.world.AWorldServer; -public class ItemWeatherToken extends ItemMagnetic { +public class ItemWeatherToken extends Item { private final Weather weather; public ItemWeatherToken(Weather weather) { @@ -17,6 +17,7 @@ public class ItemWeatherToken extends ItemMagnetic { this.setUnstackable(); this.setColor(TextColor.VIOLET); this.setDisplay("Wetterkristall (" + this.weather.getDisplay() + ")"); + this.setMagnetic(); } public ItemStack onItemRightClick(ItemStack itemStackIn, World worldIn, EntityNPC playerIn) diff --git a/common/src/main/java/common/item/tool/ItemAmmo.java b/common/src/main/java/common/item/weapon/ItemAmmo.java similarity index 80% rename from common/src/main/java/common/item/tool/ItemAmmo.java rename to common/src/main/java/common/item/weapon/ItemAmmo.java index 65a8bae8..319d027d 100755 --- a/common/src/main/java/common/item/tool/ItemAmmo.java +++ b/common/src/main/java/common/item/weapon/ItemAmmo.java @@ -1,17 +1,18 @@ -package common.item.tool; +package common.item.weapon; import common.item.CheatTab; -import common.item.ItemMagnetic; +import common.item.Item; import common.item.ItemStack; import common.item.StackSize; -public class ItemAmmo extends ItemMagnetic { +public class ItemAmmo extends Item { private final int damage; private final float explosion; public ItemAmmo(int damage, float explosion, StackSize stack) { this.setMaxAmount(stack); this.setTab(CheatTab.WEAPONS); + this.setMagnetic(); this.damage = damage; this.explosion = explosion; } diff --git a/common/src/main/java/common/item/tool/ItemArrow.java b/common/src/main/java/common/item/weapon/ItemArrow.java similarity index 95% rename from common/src/main/java/common/item/tool/ItemArrow.java rename to common/src/main/java/common/item/weapon/ItemArrow.java index 6ddeef8d..6cca79f4 100644 --- a/common/src/main/java/common/item/tool/ItemArrow.java +++ b/common/src/main/java/common/item/weapon/ItemArrow.java @@ -1,4 +1,4 @@ -package common.item.tool; +package common.item.weapon; import common.entity.projectile.EntityArrow; import common.item.Item; diff --git a/common/src/main/java/common/item/tool/ItemBanHammer.java b/common/src/main/java/common/item/weapon/ItemBanHammer.java similarity index 93% rename from common/src/main/java/common/item/tool/ItemBanHammer.java rename to common/src/main/java/common/item/weapon/ItemBanHammer.java index 73a872ce..ed57727b 100755 --- a/common/src/main/java/common/item/tool/ItemBanHammer.java +++ b/common/src/main/java/common/item/weapon/ItemBanHammer.java @@ -1,4 +1,4 @@ -package common.item.tool; +package common.item.weapon; import java.util.List; @@ -8,6 +8,7 @@ import common.entity.npc.EntityNPC; import common.entity.types.EntityLiving; import common.item.CheatTab; import common.item.ItemStack; +import common.item.tool.ItemWand; import common.util.BoundingBox; import common.util.Vec3; import common.world.AWorldServer; @@ -16,6 +17,7 @@ public class ItemBanHammer extends ItemWand { public ItemBanHammer() { this.setColor(TextColor.DRED); this.setTab(CheatTab.WEAPONS); + this.setMagnetic(); } public void onUse(ItemStack stack, EntityNPC player, AWorldServer world, Vec3 vec) { @@ -30,10 +32,6 @@ public class ItemBanHammer extends ItemWand { vec.zCoord - 0.5 + world.rand.drange(-2.5, 2.5), 0x6f0000, 0, false, player); } } - - public boolean isMagnetic() { - return true; - } public int getRange(ItemStack stack, EntityNPC player) { return 120; diff --git a/common/src/main/java/common/item/tool/ItemBoltgun.java b/common/src/main/java/common/item/weapon/ItemBoltgun.java similarity index 90% rename from common/src/main/java/common/item/tool/ItemBoltgun.java rename to common/src/main/java/common/item/weapon/ItemBoltgun.java index 4d15cca7..80f5f0a9 100755 --- a/common/src/main/java/common/item/tool/ItemBoltgun.java +++ b/common/src/main/java/common/item/weapon/ItemBoltgun.java @@ -1,4 +1,4 @@ -package common.item.tool; +package common.item.weapon; import common.init.Items; import common.rng.Random; diff --git a/common/src/main/java/common/item/tool/ItemBow.java b/common/src/main/java/common/item/weapon/ItemBow.java similarity index 99% rename from common/src/main/java/common/item/tool/ItemBow.java rename to common/src/main/java/common/item/weapon/ItemBow.java index 2f441399..a3ef230f 100755 --- a/common/src/main/java/common/item/tool/ItemBow.java +++ b/common/src/main/java/common/item/weapon/ItemBow.java @@ -1,4 +1,4 @@ -package common.item.tool; +package common.item.weapon; import common.enchantment.Enchantment; import common.enchantment.EnchantmentHelper; diff --git a/common/src/main/java/common/item/tool/ItemExterminator.java b/common/src/main/java/common/item/weapon/ItemExterminator.java similarity index 91% rename from common/src/main/java/common/item/tool/ItemExterminator.java rename to common/src/main/java/common/item/weapon/ItemExterminator.java index a2ec2645..903869d4 100755 --- a/common/src/main/java/common/item/tool/ItemExterminator.java +++ b/common/src/main/java/common/item/weapon/ItemExterminator.java @@ -1,20 +1,21 @@ -package common.item.tool; +package common.item.weapon; import common.color.TextColor; import common.dimension.Space; import common.entity.npc.EntityNPC; import common.init.SoundEvent; import common.item.CheatTab; -import common.item.ItemMagnetic; +import common.item.Item; import common.item.ItemStack; import common.world.World; import common.world.AWorldServer; -public class ItemExterminator extends ItemMagnetic { +public class ItemExterminator extends Item { public ItemExterminator() { this.setUnstackable(); this.setColor(TextColor.DRED); this.setTab(CheatTab.WEAPONS); + this.setMagnetic(); } public ItemStack onItemRightClick(ItemStack stack, World world, EntityNPC player) { diff --git a/common/src/main/java/common/item/tool/ItemGunBase.java b/common/src/main/java/common/item/weapon/ItemGunBase.java similarity index 98% rename from common/src/main/java/common/item/tool/ItemGunBase.java rename to common/src/main/java/common/item/weapon/ItemGunBase.java index 4fb6fcc9..4003dd14 100755 --- a/common/src/main/java/common/item/tool/ItemGunBase.java +++ b/common/src/main/java/common/item/weapon/ItemGunBase.java @@ -1,4 +1,4 @@ -package common.item.tool; +package common.item.weapon; import common.enchantment.Enchantment; import common.enchantment.EnchantmentHelper; diff --git a/common/src/main/java/common/item/tool/ItemLauncherBase.java b/common/src/main/java/common/item/weapon/ItemLauncherBase.java similarity index 97% rename from common/src/main/java/common/item/tool/ItemLauncherBase.java rename to common/src/main/java/common/item/weapon/ItemLauncherBase.java index 15ac466c..4f0cc67b 100644 --- a/common/src/main/java/common/item/tool/ItemLauncherBase.java +++ b/common/src/main/java/common/item/weapon/ItemLauncherBase.java @@ -1,4 +1,4 @@ -package common.item.tool; +package common.item.weapon; import common.entity.npc.EntityNPC; import common.entity.projectile.EntityBullet; diff --git a/common/src/main/java/common/item/tool/ItemRocketLauncher.java b/common/src/main/java/common/item/weapon/ItemRocketLauncher.java similarity index 95% rename from common/src/main/java/common/item/tool/ItemRocketLauncher.java rename to common/src/main/java/common/item/weapon/ItemRocketLauncher.java index d2bccb40..fef2229a 100755 --- a/common/src/main/java/common/item/tool/ItemRocketLauncher.java +++ b/common/src/main/java/common/item/weapon/ItemRocketLauncher.java @@ -1,4 +1,4 @@ -package common.item.tool; +package common.item.weapon; import common.entity.npc.EntityNPC; import common.init.Items; diff --git a/common/src/main/java/common/item/tool/ItemSword.java b/common/src/main/java/common/item/weapon/ItemSword.java similarity index 97% rename from common/src/main/java/common/item/tool/ItemSword.java rename to common/src/main/java/common/item/weapon/ItemSword.java index 9e50b398..1b3bf96b 100755 --- a/common/src/main/java/common/item/tool/ItemSword.java +++ b/common/src/main/java/common/item/weapon/ItemSword.java @@ -1,4 +1,4 @@ -package common.item.tool; +package common.item.weapon; import common.block.Block; import common.block.Material; @@ -26,6 +26,8 @@ public class ItemSword extends Item this.setMaxDamage(material.getDurability()); this.setTab(CheatTab.WEAPONS); this.attackDamage = 4 + material.getDamage(); + if(this.material.isMagnetic()) + this.setMagnetic(); } /** @@ -150,10 +152,6 @@ public class ItemSword extends Item // return false; // } - public boolean isMagnetic() { - return this.material.isMagnetic(); - } - public WieldType getWieldType() { return WieldType.TOOL; } diff --git a/common/src/main/java/common/item/tool/ItemTrident.java b/common/src/main/java/common/item/weapon/ItemTrident.java similarity index 88% rename from common/src/main/java/common/item/tool/ItemTrident.java rename to common/src/main/java/common/item/weapon/ItemTrident.java index 894d1eb8..b04367a7 100755 --- a/common/src/main/java/common/item/tool/ItemTrident.java +++ b/common/src/main/java/common/item/weapon/ItemTrident.java @@ -1,9 +1,10 @@ -package common.item.tool; +package common.item.weapon; import common.color.TextColor; import common.entity.npc.EntityNPC; import common.item.CheatTab; import common.item.ItemStack; +import common.item.tool.ItemWand; import common.util.Vec3; import common.world.AWorldServer; @@ -11,6 +12,7 @@ public class ItemTrident extends ItemWand { public ItemTrident() { this.setColor(TextColor.NEON); this.setTab(CheatTab.WEAPONS); + this.setMagnetic(); } public void onUse(ItemStack stack, EntityNPC player, AWorldServer world, Vec3 vec) @@ -18,10 +20,6 @@ public class ItemTrident extends ItemWand { if(player.useMana(5)) world.strikeLightning(vec.xCoord - 0.5, vec.yCoord, vec.zCoord - 0.5, 0x532380, 230, true, player); } - - public boolean isMagnetic() { - return true; - } public int getRange(ItemStack stack, EntityNPC player) { return 100; diff --git a/common/src/main/java/common/model/ModelProvider.java b/common/src/main/java/common/model/ModelProvider.java index a8416aaf..ab32f33e 100644 --- a/common/src/main/java/common/model/ModelProvider.java +++ b/common/src/main/java/common/model/ModelProvider.java @@ -5,9 +5,6 @@ import common.util.Facing.Axis; public interface ModelProvider { Model getModel(String primary); - Model getModel(Transform transform, String ... layers); - Model getModel(Model parent, Transform transform); - Model getEntityModel(); public static class DummyModel extends Model { public Model uvLock() { @@ -58,21 +55,9 @@ public interface ModelProvider { public static class BlockModelProvider { private static ModelProvider provider = new ModelProvider() { - public Model getModel(Model parent, Transform transform) { - return new DummyModel(); - } - - public Model getModel(Transform transform, String... layers) { - return new DummyModel(); - } - public Model getModel(String primary) { return new DummyModel(); } - - public Model getEntityModel() { - return new DummyModel(); - } }; } diff --git a/common/src/main/java/common/tileentity/DeviceEffectGenerator.java b/common/src/main/java/common/tileentity/DeviceEffectGenerator.java index 83272011..5d30133a 100755 --- a/common/src/main/java/common/tileentity/DeviceEffectGenerator.java +++ b/common/src/main/java/common/tileentity/DeviceEffectGenerator.java @@ -7,7 +7,7 @@ import common.entity.npc.EntityNPC; import common.init.Items; import common.inventory.ContainerTile; import common.item.ItemStack; -import common.item.tool.ItemPotion; +import common.item.consumable.ItemPotion; import common.util.BoundingBox; import common.world.World; diff --git a/common/src/main/java/common/tileentity/TileEntityBrewingStand.java b/common/src/main/java/common/tileentity/TileEntityBrewingStand.java index ef07a583..ddf06db7 100755 --- a/common/src/main/java/common/tileentity/TileEntityBrewingStand.java +++ b/common/src/main/java/common/tileentity/TileEntityBrewingStand.java @@ -15,7 +15,7 @@ import common.inventory.ISidedInventory; import common.inventory.InventoryPlayer; import common.item.Item; import common.item.ItemStack; -import common.item.tool.ItemPotion; +import common.item.consumable.ItemPotion; import common.tags.TagObject; import common.util.Facing; import common.world.State; @@ -310,7 +310,7 @@ public class TileEntityBrewingStand extends TileEntityInventory implements ITick */ public boolean isItemValidForSlot(int index, ItemStack stack) { - return index == 3 ? BrewingRegistry.isIngredient(stack) : stack.getItem() instanceof ItemPotion || stack.getItem() == Items.glass_bottle; + return index == 3 ? BrewingRegistry.isIngredient(stack) : stack.getItem() instanceof ItemPotion || stack.getItem() == Items.bottle; } public boolean[] func_174902_m() diff --git a/common/src/main/java/common/tileentity/TileEntityFurnace.java b/common/src/main/java/common/tileentity/TileEntityFurnace.java index 6abd1d68..250c95a1 100755 --- a/common/src/main/java/common/tileentity/TileEntityFurnace.java +++ b/common/src/main/java/common/tileentity/TileEntityFurnace.java @@ -19,11 +19,10 @@ import common.inventory.InventoryPlayer; import common.inventory.SlotFurnaceFuel; import common.item.Item; import common.item.ItemStack; -import common.item.block.ItemBlock; -import common.item.tool.ItemBucket; +import common.item.material.ItemBucket; import common.item.tool.ItemHoe; -import common.item.tool.ItemSword; import common.item.tool.ItemTool; +import common.item.weapon.ItemSword; import common.tags.TagObject; import java.util.List; import common.util.ExtMath; @@ -337,7 +336,7 @@ public class TileEntityFurnace extends TileEntityInventory implements ITickable, { Item item = p_145952_0_.getItem(); - if (item instanceof ItemBlock && item.getBlock() != null) // Blocks.air) + if (item.getBlock() != null) // Blocks.air) { Block block = item.getBlock(); @@ -351,10 +350,15 @@ public class TileEntityFurnace extends TileEntityInventory implements ITickable, return block instanceof BlockSlab ? 150 : 300; } - if (block == Blocks.coal_block) + else if (block == Blocks.coal_block) { return 16000; } + + else if (block instanceof BlockSapling) + { + return 100; + } } return item instanceof ItemTool && ((ItemTool)item).getToolMaterial() == ToolType.WOOD.material ? 200 : @@ -365,8 +369,7 @@ public class TileEntityFurnace extends TileEntityInventory implements ITickable, (item == Items.charcoal ? 1200 : (item instanceof ItemBucket && ((ItemBucket)item).getLiquid() != null && ((ItemBucket)item).getLiquid().getMaterial() == Material.LAVA ? 20000 : - (item.getBlock() instanceof BlockSapling ? 100 : - (item == Items.demon_rod ? 2400 : 0)))))))); + (item == Items.demon_rod ? 2400 : 0))))))); } } diff --git a/server/src/main/java/server/clipboard/ReorderRegistry.java b/server/src/main/java/server/clipboard/ReorderRegistry.java index d9da2e2e..d4748093 100755 --- a/server/src/main/java/server/clipboard/ReorderRegistry.java +++ b/server/src/main/java/server/clipboard/ReorderRegistry.java @@ -64,7 +64,7 @@ public abstract class ReorderRegistry { PLACE_LAST.add(Blocks.soul_fire); PLACE_LAST.add(Blocks.black_fire); // PLACE_LAST.add(Blocks.wire); - PLACE_LAST.add(Blocks.wheat); + PLACE_LAST.add(Blocks.wheats); PLACE_LAST.add(Blocks.ladder); PLACE_LAST.add(Blocks.rail); PLACE_LAST.add(Blocks.lever); @@ -78,7 +78,7 @@ public abstract class ReorderRegistry { PLACE_LAST.add(Blocks.trapdoor); PLACE_LAST.add(Blocks.vine); PLACE_LAST.add(Blocks.waterlily); - PLACE_LAST.add(Blocks.soul_wart); + PLACE_LAST.add(Blocks.soul_warts); PLACE_LAST.add(Blocks.piston); PLACE_LAST.add(Blocks.sticky_piston); PLACE_LAST.add(Blocks.tripwire_hook); @@ -86,8 +86,8 @@ public abstract class ReorderRegistry { for(BlockFlowerPot block : BlockFlowerPot.POTS) { PLACE_LAST.add(block); } - PLACE_LAST.add(Blocks.carrot); - PLACE_LAST.add(Blocks.potato); + PLACE_LAST.add(Blocks.carrots); + PLACE_LAST.add(Blocks.potatoes); PLACE_LAST.add(Blocks.wooden_button); for(BlockAnvil block : BlockAnvil.ANVILS) { PLACE_LAST.add(block); // becomes relevant with asynchronous placement diff --git a/server/src/main/java/server/world/Converter.java b/server/src/main/java/server/world/Converter.java index 8e1c5ae9..f3683177 100644 --- a/server/src/main/java/server/world/Converter.java +++ b/server/src/main/java/server/world/Converter.java @@ -47,7 +47,6 @@ import common.block.foliage.BlockLeaves; import common.block.foliage.BlockLilyPad; import common.block.foliage.BlockLog; import common.block.foliage.BlockPotato; -import common.block.foliage.BlockPumpkin; import common.block.foliage.BlockReed; import common.block.foliage.BlockStem; import common.block.foliage.BlockVine; @@ -664,14 +663,14 @@ public abstract class Converter { mapBlock(Blocks.diamond_ore, 56); mapBlock(Blocks.diamond_block, 57); mapBlock(Blocks.workbench, 58); - mapBlock(Blocks.wheat.getState().withProperty(BlockCrops.AGE, 0), 59); - mapBlock(Blocks.wheat.getState().withProperty(BlockCrops.AGE, 1), 59, 1); - mapBlock(Blocks.wheat.getState().withProperty(BlockCrops.AGE, 2), 59, 2); - mapBlock(Blocks.wheat.getState().withProperty(BlockCrops.AGE, 3), 59, 3); - mapBlock(Blocks.wheat.getState().withProperty(BlockCrops.AGE, 4), 59, 4); - mapBlock(Blocks.wheat.getState().withProperty(BlockCrops.AGE, 5), 59, 5); - mapBlock(Blocks.wheat.getState().withProperty(BlockCrops.AGE, 6), 59, 6); - mapBlock(Blocks.wheat.getState().withProperty(BlockCrops.AGE, 7), 59, 7); + mapBlock(Blocks.wheats.getState().withProperty(BlockCrops.AGE, 0), 59); + mapBlock(Blocks.wheats.getState().withProperty(BlockCrops.AGE, 1), 59, 1); + mapBlock(Blocks.wheats.getState().withProperty(BlockCrops.AGE, 2), 59, 2); + mapBlock(Blocks.wheats.getState().withProperty(BlockCrops.AGE, 3), 59, 3); + mapBlock(Blocks.wheats.getState().withProperty(BlockCrops.AGE, 4), 59, 4); + mapBlock(Blocks.wheats.getState().withProperty(BlockCrops.AGE, 5), 59, 5); + mapBlock(Blocks.wheats.getState().withProperty(BlockCrops.AGE, 6), 59, 6); + mapBlock(Blocks.wheats.getState().withProperty(BlockCrops.AGE, 7), 59, 7); mapBlock(Blocks.farmland.getState().withProperty(BlockFarmland.MOISTURE, 0), 60, 0, 8); mapBlock(Blocks.farmland.getState().withProperty(BlockFarmland.MOISTURE, 1), 60, 1, 9); mapBlock(Blocks.farmland.getState().withProperty(BlockFarmland.MOISTURE, 2), 60, 2, 10); @@ -810,18 +809,12 @@ public abstract class Converter { mapBlock(Blocks.reeds.getState().withProperty(BlockReed.AGE, 15), 83, 15); mapBlock(Blocks.spruce_planks, 84); mapBlock(Blocks.oak_fence, 85); - mapBlock(Blocks.pumpkin.getState().withProperty(BlockPumpkin.FACING, Facing.SOUTH), 86, 0, 4, 8, 12); - mapBlock(Blocks.pumpkin.getState().withProperty(BlockPumpkin.FACING, Facing.WEST), 86, 1, 5, 9, 13); - mapBlock(Blocks.pumpkin.getState().withProperty(BlockPumpkin.FACING, Facing.NORTH), 86, 2, 6, 10, 14); - mapBlock(Blocks.pumpkin.getState().withProperty(BlockPumpkin.FACING, Facing.EAST), 86, 3, 7, 11, 15); + mapBlock(Blocks.pumpkin, 86); mapBlock(Blocks.hellrock, 87); mapBlock(Blocks.soul_sand, 88); mapBlock(Blocks.glowstone, 89); mapBlock(Blocks.purple_glass_pane, 90); - mapBlock(Blocks.lit_pumpkin.getState().withProperty(BlockPumpkin.FACING, Facing.SOUTH), 91, 0, 4, 8, 12); - mapBlock(Blocks.lit_pumpkin.getState().withProperty(BlockPumpkin.FACING, Facing.WEST), 91, 1, 5, 9, 13); - mapBlock(Blocks.lit_pumpkin.getState().withProperty(BlockPumpkin.FACING, Facing.NORTH), 91, 2, 6, 10, 14); - mapBlock(Blocks.lit_pumpkin.getState().withProperty(BlockPumpkin.FACING, Facing.EAST), 91, 3, 7, 11, 15); + mapBlock(Blocks.lit_lamp, 91); mapBlock(Blocks.cake.getState().withProperty(BlockCake.BITES, 0), 92); mapBlock(Blocks.cake.getState().withProperty(BlockCake.BITES, 1), 92, 1); mapBlock(Blocks.cake.getState().withProperty(BlockCake.BITES, 2), 92, 2); @@ -965,10 +958,10 @@ public abstract class Converter { mapBlock(Blocks.blood_brick_stairs.getState().withProperty(BlockStairs.FACING, Facing.WEST).withProperty(BlockStairs.HALF, EnumHalf.TOP), 114, 5, 13); mapBlock(Blocks.blood_brick_stairs.getState().withProperty(BlockStairs.FACING, Facing.SOUTH).withProperty(BlockStairs.HALF, EnumHalf.TOP), 114, 6, 14); mapBlock(Blocks.blood_brick_stairs.getState().withProperty(BlockStairs.FACING, Facing.NORTH).withProperty(BlockStairs.HALF, EnumHalf.TOP), 114, 7, 15); - mapBlock(Blocks.soul_wart.getState().withProperty(BlockWart.AGE, 0), 115); - mapBlock(Blocks.soul_wart.getState().withProperty(BlockWart.AGE, 1), 115, 1); - mapBlock(Blocks.soul_wart.getState().withProperty(BlockWart.AGE, 2), 115, 2); - mapBlock(Blocks.soul_wart.getState().withProperty(BlockWart.AGE, 3), 115, 3); + mapBlock(Blocks.soul_warts.getState().withProperty(BlockWart.AGE, 0), 115); + mapBlock(Blocks.soul_warts.getState().withProperty(BlockWart.AGE, 1), 115, 1); + mapBlock(Blocks.soul_warts.getState().withProperty(BlockWart.AGE, 2), 115, 2); + mapBlock(Blocks.soul_warts.getState().withProperty(BlockWart.AGE, 3), 115, 3); mapBlock(Blocks.enchanting_table, 116); mapBlock(Blocks.brewing_stand.getState().withProperty(BlockBrewingStand.HAS_BOTTLE_0, false).withProperty(BlockBrewingStand.HAS_BOTTLE_1, false).withProperty(BlockBrewingStand.HAS_BOTTLE_2, false), 117, 0, 8); mapBlock(Blocks.brewing_stand.getState().withProperty(BlockBrewingStand.HAS_BOTTLE_0, true).withProperty(BlockBrewingStand.HAS_BOTTLE_1, false).withProperty(BlockBrewingStand.HAS_BOTTLE_2, false), 117, 1, 9); @@ -1099,22 +1092,22 @@ public abstract class Converter { mapBlock(Blocks.cobblestone_wall, 139); mapBlock(Blocks.mossy_cobblestone_wall, 139, 1); mapBlock(Blocks.flowerpot, 140); - mapBlock(Blocks.carrot.getState().withProperty(BlockCarrot.AGE, 0), 141); - mapBlock(Blocks.carrot.getState().withProperty(BlockCarrot.AGE, 1), 141, 1); - mapBlock(Blocks.carrot.getState().withProperty(BlockCarrot.AGE, 2), 141, 2); - mapBlock(Blocks.carrot.getState().withProperty(BlockCarrot.AGE, 3), 141, 3); - mapBlock(Blocks.carrot.getState().withProperty(BlockCarrot.AGE, 4), 141, 4); - mapBlock(Blocks.carrot.getState().withProperty(BlockCarrot.AGE, 5), 141, 5); - mapBlock(Blocks.carrot.getState().withProperty(BlockCarrot.AGE, 6), 141, 6); - mapBlock(Blocks.carrot.getState().withProperty(BlockCarrot.AGE, 7), 141, 7); - mapBlock(Blocks.potato.getState().withProperty(BlockPotato.AGE, 0), 142); - mapBlock(Blocks.potato.getState().withProperty(BlockPotato.AGE, 1), 142, 1); - mapBlock(Blocks.potato.getState().withProperty(BlockPotato.AGE, 2), 142, 2); - mapBlock(Blocks.potato.getState().withProperty(BlockPotato.AGE, 3), 142, 3); - mapBlock(Blocks.potato.getState().withProperty(BlockPotato.AGE, 4), 142, 4); - mapBlock(Blocks.potato.getState().withProperty(BlockPotato.AGE, 5), 142, 5); - mapBlock(Blocks.potato.getState().withProperty(BlockPotato.AGE, 6), 142, 6); - mapBlock(Blocks.potato.getState().withProperty(BlockPotato.AGE, 7), 142, 7); + mapBlock(Blocks.carrots.getState().withProperty(BlockCarrot.AGE, 0), 141); + mapBlock(Blocks.carrots.getState().withProperty(BlockCarrot.AGE, 1), 141, 1); + mapBlock(Blocks.carrots.getState().withProperty(BlockCarrot.AGE, 2), 141, 2); + mapBlock(Blocks.carrots.getState().withProperty(BlockCarrot.AGE, 3), 141, 3); + mapBlock(Blocks.carrots.getState().withProperty(BlockCarrot.AGE, 4), 141, 4); + mapBlock(Blocks.carrots.getState().withProperty(BlockCarrot.AGE, 5), 141, 5); + mapBlock(Blocks.carrots.getState().withProperty(BlockCarrot.AGE, 6), 141, 6); + mapBlock(Blocks.carrots.getState().withProperty(BlockCarrot.AGE, 7), 141, 7); + mapBlock(Blocks.potatoes.getState().withProperty(BlockPotato.AGE, 0), 142); + mapBlock(Blocks.potatoes.getState().withProperty(BlockPotato.AGE, 1), 142, 1); + mapBlock(Blocks.potatoes.getState().withProperty(BlockPotato.AGE, 2), 142, 2); + mapBlock(Blocks.potatoes.getState().withProperty(BlockPotato.AGE, 3), 142, 3); + mapBlock(Blocks.potatoes.getState().withProperty(BlockPotato.AGE, 4), 142, 4); + mapBlock(Blocks.potatoes.getState().withProperty(BlockPotato.AGE, 5), 142, 5); + mapBlock(Blocks.potatoes.getState().withProperty(BlockPotato.AGE, 6), 142, 6); + mapBlock(Blocks.potatoes.getState().withProperty(BlockPotato.AGE, 7), 142, 7); mapBlock(Blocks.wooden_button.getState().withProperty(BlockButton.FACING, Facing.DOWN).withProperty(BlockButton.POWERED, false), 143, 0); mapBlock(Blocks.wooden_button.getState().withProperty(BlockButton.FACING, Facing.EAST).withProperty(BlockButton.POWERED, false), 143, 1); mapBlock(Blocks.wooden_button.getState().withProperty(BlockButton.FACING, Facing.WEST).withProperty(BlockButton.POWERED, false), 143, 2); @@ -1434,14 +1427,14 @@ public abstract class Converter { mapBlock(Blocks.quartz_slab.getState().withProperty(BlockSlab.FACING, Facing.UP), 205, 8); mapBlock(Blocks.stonebrick, 206); - mapBlock(Blocks.potato.getState().withProperty(BlockPotato.AGE, 0), 207); - mapBlock(Blocks.potato.getState().withProperty(BlockPotato.AGE, 1), 207, 1); - mapBlock(Blocks.potato.getState().withProperty(BlockPotato.AGE, 2), 207, 2); - mapBlock(Blocks.potato.getState().withProperty(BlockPotato.AGE, 3), 207, 3); - mapBlock(Blocks.potato.getState().withProperty(BlockPotato.AGE, 4), 207, 4); - mapBlock(Blocks.potato.getState().withProperty(BlockPotato.AGE, 5), 207, 5); - mapBlock(Blocks.potato.getState().withProperty(BlockPotato.AGE, 6), 207, 6); - mapBlock(Blocks.potato.getState().withProperty(BlockPotato.AGE, 7), 207, 7); + mapBlock(Blocks.potatoes.getState().withProperty(BlockPotato.AGE, 0), 207); + mapBlock(Blocks.potatoes.getState().withProperty(BlockPotato.AGE, 1), 207, 1); + mapBlock(Blocks.potatoes.getState().withProperty(BlockPotato.AGE, 2), 207, 2); + mapBlock(Blocks.potatoes.getState().withProperty(BlockPotato.AGE, 3), 207, 3); + mapBlock(Blocks.potatoes.getState().withProperty(BlockPotato.AGE, 4), 207, 4); + mapBlock(Blocks.potatoes.getState().withProperty(BlockPotato.AGE, 5), 207, 5); + mapBlock(Blocks.potatoes.getState().withProperty(BlockPotato.AGE, 6), 207, 6); + mapBlock(Blocks.potatoes.getState().withProperty(BlockPotato.AGE, 7), 207, 7); mapBlock(Blocks.farmland, 208); mapBlock(Blocks.black_glass, 209); mapBlock(Blocks.obsidian, 210); diff --git a/server/src/main/java/server/world/WorldServer.java b/server/src/main/java/server/world/WorldServer.java index 6bd70050..25d55e54 100755 --- a/server/src/main/java/server/world/WorldServer.java +++ b/server/src/main/java/server/world/WorldServer.java @@ -37,7 +37,6 @@ import common.entity.types.EntityLiving; import common.init.Blocks; import common.init.SoundEvent; import common.init.UniverseRegistry; -import common.item.block.ItemDoor; import common.log.Log; import common.network.IPlayer; import common.network.Packet; @@ -2033,7 +2032,7 @@ public final class WorldServer extends AWorldServer { State newState = block.getState(); if(newState.getBlock() instanceof BlockDoor) { if(newState.getValue(BlockDoor.HALF) == BlockDoor.EnumDoorHalf.LOWER) { - ItemDoor.placeDoor(this, pos, newState.getValue(BlockDoor.FACING)/* .rotateYCCW() */, newState.getBlock(), false); + BlockDoor.placeDoor(this, pos, newState.getValue(BlockDoor.FACING)/* .rotateYCCW() */, newState.getBlock(), false); } return true; } diff --git a/server/src/main/java/server/worldgen/LootConstants.java b/server/src/main/java/server/worldgen/LootConstants.java index 566c9858..bd4c2c12 100755 --- a/server/src/main/java/server/worldgen/LootConstants.java +++ b/server/src/main/java/server/worldgen/LootConstants.java @@ -40,8 +40,8 @@ public abstract class LootConstants { new RngLoot(Items.gold_ingot, 1, 3, 5), new RngLoot(Items.charged_powder, 4, 9, 5), new RngLoot(Items.lapis_lazuli, 4, 9, 5), new RngLoot(Items.diamond, 1, 2, 3), new RngLoot(Items.coal, 3, 8, 10), new RngLoot(Items.bread, 1, 3, 15), new RngLoot(Items.iron_pickaxe, 1, 1, 1), - new RngLoot(Items.rail, 4, 8, 1), new RngLoot(Items.melon_stem, 2, 4, 10), - new RngLoot(Items.pumpkin_stem, 2, 4, 10), new RngLoot(Items.saddle, 1, 1, 3), new RngLoot(Items.iron_horse_armor, 1, 1, 1)); + new RngLoot(Items.rail, 4, 8, 1), new RngLoot(Items.melon_seed, 2, 4, 10), + new RngLoot(Items.pumpkin_seed, 2, 4, 10), new RngLoot(Items.saddle, 1, 1, 3), new RngLoot(Items.iron_horse_armor, 1, 1, 1)); public static final WeightedList HELL_FORTRESS = new WeightedList(new RngLoot(Items.diamond, 1, 3, 5), new RngLoot(Items.iron_ingot, 1, 5, 5), new RngLoot(Items.gold_ingot, 1, 3, 15), new RngLoot(Items.gold_sword, 1, 1, 5), new RngLoot(Items.gold_chestplate, 1, 1, 5), new RngLoot(Items.lighter, 1, 1, 5), @@ -49,7 +49,7 @@ public abstract class LootConstants { new RngLoot(Items.iron_horse_armor, 1, 1, 5), new RngLoot(Items.diamond_horse_armor, 1, 1, 3), new RngLoot(Items.obsidian, 2, 4, 2)); public static final WeightedList DUNGEON_CHEST = new WeightedList(new RngLoot(Items.saddle, 1, 1, 11), - new RngLoot(Items.iron_ingot, 1, 4, 11), new RngLoot(Items.bread, 1, 1, 11), new RngLoot(Items.wheats, 1, 4, 11), + new RngLoot(Items.iron_ingot, 1, 4, 11), new RngLoot(Items.bread, 1, 1, 11), new RngLoot(Items.wheat, 1, 4, 11), new RngLoot(Items.gunpowder, 1, 4, 11), new RngLoot(Items.string, 1, 4, 11), new RngLoot(Items.bucket, 1, 1, 11), new RngLoot(Items.golden_apple, 1, 1, 1), new RngLoot(Items.charged_powder, 1, 4, 11), new RngLoot(Items.aluminium_ingot, 1, 1, 5), new RngLoot(Items.copper_ingot, 1, 1, 5), new RngLoot(Items.name_tag, 1, 1, 11), new RngLoot(Items.gold_horse_armor, 1, 1, 3), diff --git a/server/src/main/java/server/worldgen/foliage/WorldGenPumpkin.java b/server/src/main/java/server/worldgen/foliage/WorldGenPumpkin.java index 1aa47b34..ff4d791a 100755 --- a/server/src/main/java/server/worldgen/foliage/WorldGenPumpkin.java +++ b/server/src/main/java/server/worldgen/foliage/WorldGenPumpkin.java @@ -1,10 +1,8 @@ package server.worldgen.foliage; -import common.block.foliage.BlockPumpkin; import common.init.Blocks; import common.rng.Random; import common.util.BlockPos; -import common.util.Facing; import server.world.WorldServer; import server.worldgen.FeatureGenerator; @@ -18,7 +16,7 @@ public class WorldGenPumpkin extends FeatureGenerator if (worldIn.isAirBlock(blockpos) && worldIn.getState(blockpos.down()).getBlock() == Blocks.grass && Blocks.pumpkin.canPlaceBlockAt(worldIn, blockpos)) { - worldIn.setState(blockpos, Blocks.pumpkin.getState().withProperty(BlockPumpkin.FACING, Facing.Plane.HORIZONTAL.random(rand)), 2); + worldIn.setState(blockpos, Blocks.pumpkin.getState(), 2); } } diff --git a/server/src/main/java/server/worldgen/structure/StructureBridge.java b/server/src/main/java/server/worldgen/structure/StructureBridge.java index 55476c0a..b893de5d 100755 --- a/server/src/main/java/server/worldgen/structure/StructureBridge.java +++ b/server/src/main/java/server/worldgen/structure/StructureBridge.java @@ -912,8 +912,8 @@ public class StructureBridge this.setBlockState(worldIn, i2, 8, 5, 10, structureBoundingBoxIn); this.fillWithBlocks(worldIn, structureBoundingBoxIn, 3, 4, 4, 4, 4, 8, Blocks.soul_sand.getState(), Blocks.soul_sand.getState(), false); this.fillWithBlocks(worldIn, structureBoundingBoxIn, 8, 4, 4, 9, 4, 8, Blocks.soul_sand.getState(), Blocks.soul_sand.getState(), false); - this.fillWithBlocks(worldIn, structureBoundingBoxIn, 3, 5, 4, 4, 5, 8, Blocks.soul_wart.getState(), Blocks.soul_wart.getState(), false); - this.fillWithBlocks(worldIn, structureBoundingBoxIn, 8, 5, 4, 9, 5, 8, Blocks.soul_wart.getState(), Blocks.soul_wart.getState(), false); + this.fillWithBlocks(worldIn, structureBoundingBoxIn, 3, 5, 4, 4, 5, 8, Blocks.soul_warts.getState(), Blocks.soul_warts.getState(), false); + this.fillWithBlocks(worldIn, structureBoundingBoxIn, 8, 5, 4, 9, 5, 8, Blocks.soul_warts.getState(), Blocks.soul_warts.getState(), false); this.fillWithBlocks(worldIn, structureBoundingBoxIn, 4, 2, 0, 8, 2, 12, Blocks.blood_brick.getState(), Blocks.blood_brick.getState(), false); this.fillWithBlocks(worldIn, structureBoundingBoxIn, 0, 2, 4, 12, 2, 8, Blocks.blood_brick.getState(), Blocks.blood_brick.getState(), false); this.fillWithBlocks(worldIn, structureBoundingBoxIn, 4, 0, 0, 8, 1, 3, Blocks.blood_brick.getState(), Blocks.blood_brick.getState(), false); diff --git a/server/src/main/java/server/worldgen/structure/StructureComponent.java b/server/src/main/java/server/worldgen/structure/StructureComponent.java index cddc3647..9a60e7e6 100755 --- a/server/src/main/java/server/worldgen/structure/StructureComponent.java +++ b/server/src/main/java/server/worldgen/structure/StructureComponent.java @@ -13,7 +13,6 @@ import common.block.tech.BlockPistonBase; import common.block.tech.BlockRail; import common.init.Blocks; import common.item.RngLoot; -import common.item.block.ItemDoor; import common.rng.Random; import common.rng.WeightedList; import common.tags.TagObject; @@ -748,7 +747,7 @@ public abstract class StructureComponent if (boundingBoxIn.isVecInside(blockpos)) { - ItemDoor.placeDoor(worldIn, blockpos, state.getValue(BlockDoor.FACING).rotateYCCW(), Blocks.oak_door, true); + BlockDoor.placeDoor(worldIn, blockpos, state.getValue(BlockDoor.FACING).rotateYCCW(), Blocks.oak_door, true); } } diff --git a/server/src/main/java/server/worldgen/structure/StructureVillage.java b/server/src/main/java/server/worldgen/structure/StructureVillage.java index a9c6f81f..a3d53c88 100755 --- a/server/src/main/java/server/worldgen/structure/StructureVillage.java +++ b/server/src/main/java/server/worldgen/structure/StructureVillage.java @@ -415,10 +415,10 @@ public class StructureVillage protected void readTags(TagObject tagCompound) { super.readTags(tagCompound); - this.cropTypeA = BlockRegistry.byName(tagCompound.getString("CA")) instanceof BlockCrops crops ? crops : Blocks.wheat; - this.cropTypeB = BlockRegistry.byName(tagCompound.getString("CB")) instanceof BlockCrops crops ? crops : Blocks.wheat; - this.cropTypeC = BlockRegistry.byName(tagCompound.getString("CC")) instanceof BlockCrops crops ? crops : Blocks.wheat; - this.cropTypeD = BlockRegistry.byName(tagCompound.getString("CD")) instanceof BlockCrops crops ? crops : Blocks.wheat; + this.cropTypeA = BlockRegistry.byName(tagCompound.getString("CA")) instanceof BlockCrops crops ? crops : Blocks.wheats; + this.cropTypeB = BlockRegistry.byName(tagCompound.getString("CB")) instanceof BlockCrops crops ? crops : Blocks.wheats; + this.cropTypeC = BlockRegistry.byName(tagCompound.getString("CC")) instanceof BlockCrops crops ? crops : Blocks.wheats; + this.cropTypeD = BlockRegistry.byName(tagCompound.getString("CD")) instanceof BlockCrops crops ? crops : Blocks.wheats; } private BlockCrops func_151559_a(Random rand) @@ -426,13 +426,13 @@ public class StructureVillage switch (rand.zrange(5)) { case 0: - return Blocks.carrot; + return Blocks.carrots; case 1: - return Blocks.potato; + return Blocks.potatoes; default: - return Blocks.wheat; + return Blocks.wheats; } } @@ -522,8 +522,8 @@ public class StructureVillage protected void readTags(TagObject tagCompound) { super.readTags(tagCompound); - this.cropTypeA = BlockRegistry.byName(tagCompound.getString("CA")) instanceof BlockCrops crops ? crops : Blocks.wheat; - this.cropTypeB = BlockRegistry.byName(tagCompound.getString("CB")) instanceof BlockCrops crops ? crops : Blocks.wheat; + this.cropTypeA = BlockRegistry.byName(tagCompound.getString("CA")) instanceof BlockCrops crops ? crops : Blocks.wheats; + this.cropTypeB = BlockRegistry.byName(tagCompound.getString("CB")) instanceof BlockCrops crops ? crops : Blocks.wheats; } private BlockCrops func_151560_a(Random rand) @@ -531,13 +531,13 @@ public class StructureVillage switch (rand.zrange(5)) { case 0: - return Blocks.carrot; + return Blocks.carrots; case 1: - return Blocks.potato; + return Blocks.potatoes; default: - return Blocks.wheat; + return Blocks.wheats; } }