diff --git a/client/src/main/java/client/Client.java b/client/src/main/java/client/Client.java index 9ba6c2ad..4258efb7 100755 --- a/client/src/main/java/client/Client.java +++ b/client/src/main/java/client/Client.java @@ -62,7 +62,6 @@ import client.renderer.EntityRenderer; import client.renderer.GlState; import client.renderer.ItemRenderer; import client.renderer.RenderGlobal; -import client.renderer.blockmodel.ModelBlock; import client.renderer.blockmodel.ModelManager; import client.renderer.chunk.RenderChunk; import client.renderer.entity.RenderItem; @@ -626,7 +625,6 @@ public class Client implements IThreadListener { if(Util.DEVMODE) Log.SYSTEM.warn("Entwicklungsmodus aktiv - Debugging-Features sind verfügbar"); Window.init(); - ModelBlock.setAsProvider(); Registry.register(); Log.setSync(CLIENT); CLIENT.run(time); diff --git a/client/src/main/java/client/renderer/blockmodel/ModelBakery.java b/client/src/main/java/client/renderer/blockmodel/ModelBakery.java index cea5608c..9d326241 100755 --- a/client/src/main/java/client/renderer/blockmodel/ModelBakery.java +++ b/client/src/main/java/client/renderer/blockmodel/ModelBakery.java @@ -19,9 +19,10 @@ import common.collect.Sets; import common.init.BlockRegistry; import common.init.ItemRegistry; import common.item.Item; -import common.model.ModelProvider; +import common.model.Model.ModelProvider; import common.model.ModelRotation; import common.model.GuiPosition; +import common.model.Model; import common.util.Facing; import common.util.Pair; import common.world.State; @@ -50,6 +51,11 @@ public abstract class ModelBakery public static Map setupModelRegistry(TextureMap textureMap, Map map) { + final ModelProvider provider = new ModelProvider() { + public Model getModel(String primary) { + return new ModelBlock(primary); + } + }; final Map sprites = Maps.newHashMap(); Map models = Maps.newLinkedHashMap(); List variants = Lists.newArrayList(); @@ -59,7 +65,7 @@ public abstract class ModelBakery models.put(MISSING, (ModelBlock)new ModelBlock(null).add().all()); variants.add(MISSING); for(Entry entry : map.entrySet()) { - ModelBlock model = (ModelBlock)entry.getKey().getBlock().getModel(ModelBlock.PROVIDER, BlockRegistry.getName(entry.getKey().getBlock()) + ModelBlock model = (ModelBlock)entry.getKey().getBlock().getModel(provider, BlockRegistry.getName(entry.getKey().getBlock()) .toString(), entry.getKey()); models.put(entry.getValue(), model); variants.add(entry.getValue()); @@ -67,7 +73,7 @@ public abstract class ModelBakery for (Item item : ItemRegistry.items()) { String loc = "item/" + ItemRegistry.getName(item); - models.put(loc, getModel(item, ModelBlock.PROVIDER, ItemRegistry.getName(item))); + models.put(loc, getModel(item, provider, ItemRegistry.getName(item))); itemLocations.add(loc); String[] extra = item.getSprites(); if(extra != null) { diff --git a/client/src/main/java/client/renderer/blockmodel/ModelBlock.java b/client/src/main/java/client/renderer/blockmodel/ModelBlock.java index f819e291..e4bc904c 100755 --- a/client/src/main/java/client/renderer/blockmodel/ModelBlock.java +++ b/client/src/main/java/client/renderer/blockmodel/ModelBlock.java @@ -6,19 +6,12 @@ import client.renderer.texture.TextureMap; import common.collect.Lists; import common.collect.Maps; import common.model.Model; -import common.model.ModelProvider; import common.model.ModelRotation; import common.model.GuiPosition; import common.util.Facing; import common.util.Vector3f; public class ModelBlock extends Model { - static final ModelProvider PROVIDER = new ModelProvider() { - public Model getModel(String primary) { - return new ModelBlock(primary); - } - }; - private final List elements; private final boolean gui3d; private final String primary; @@ -32,10 +25,6 @@ public class ModelBlock extends Model { private BlockPart lastPart; private BlockPartFace[] last; - public static void setAsProvider() { - ModelProvider.setProvider(PROVIDER); - } - public ModelBlock uvLock() { this.uvLock = true; return this; diff --git a/common/src/main/java/common/block/Block.java b/common/src/main/java/common/block/Block.java index 8fb68e92..8a391093 100755 --- a/common/src/main/java/common/block/Block.java +++ b/common/src/main/java/common/block/Block.java @@ -38,7 +38,7 @@ import common.item.Item; import common.item.ItemStack; import common.item.StackSize; import common.model.Model; -import common.model.ModelProvider; +import common.model.Model.ModelProvider; import common.model.GuiPosition; import common.properties.Property; import common.rng.Random; diff --git a/common/src/main/java/common/block/BlockRotatedPillar.java b/common/src/main/java/common/block/BlockRotatedPillar.java index 5071e8ac..304718f2 100755 --- a/common/src/main/java/common/block/BlockRotatedPillar.java +++ b/common/src/main/java/common/block/BlockRotatedPillar.java @@ -1,7 +1,7 @@ package common.block; import common.model.Model; -import common.model.ModelProvider; +import common.model.Model.ModelProvider; import common.model.ModelRotation; import common.properties.PropertyEnum; import common.util.Facing; diff --git a/common/src/main/java/common/block/artificial/BlockBed.java b/common/src/main/java/common/block/artificial/BlockBed.java index 3e82565a..7e950731 100755 --- a/common/src/main/java/common/block/artificial/BlockBed.java +++ b/common/src/main/java/common/block/artificial/BlockBed.java @@ -11,7 +11,7 @@ import common.item.Item; import common.item.ItemStack; import common.item.StackSize; import common.model.Model; -import common.model.ModelProvider; +import common.model.Model.ModelProvider; import common.model.ModelRotation; import common.properties.Property; import common.properties.PropertyEnum; diff --git a/common/src/main/java/common/block/artificial/BlockBookshelf.java b/common/src/main/java/common/block/artificial/BlockBookshelf.java index 08335cb0..3e5196f9 100755 --- a/common/src/main/java/common/block/artificial/BlockBookshelf.java +++ b/common/src/main/java/common/block/artificial/BlockBookshelf.java @@ -6,7 +6,7 @@ import common.init.Items; import common.item.CheatTab; import common.item.Item; import common.model.Model; -import common.model.ModelProvider; +import common.model.Model.ModelProvider; import common.rng.Random; import common.world.State; diff --git a/common/src/main/java/common/block/artificial/BlockCake.java b/common/src/main/java/common/block/artificial/BlockCake.java index eec931f8..b19f86c1 100755 --- a/common/src/main/java/common/block/artificial/BlockCake.java +++ b/common/src/main/java/common/block/artificial/BlockCake.java @@ -3,117 +3,24 @@ package common.block.artificial; import common.block.Block; import common.block.Material; import common.entity.npc.EntityNPC; -import common.item.Item; +import common.init.SoundEvent; import common.model.Model; -import common.model.ModelProvider; -import common.properties.Property; -import common.properties.PropertyInteger; -import common.rng.Random; +import common.model.Model.ModelProvider; import common.util.BlockPos; -import common.util.BoundingBox; import common.util.Clientside; import common.util.Facing; import common.world.AWorldServer; -import common.world.IWorldAccess; import common.world.State; import common.world.World; public class BlockCake extends Block { - private static final Model cake_slice3 = ModelProvider.getModelProvider().getModel("cake_side") - .add(7, 0, 1, 15, 8, 15) - .d("cake_bottom").uv(7, 1, 15, 15) - .u("cake_top").uv(7, 1, 15, 15).noCull() - .n().uv(1, 8, 9, 16).noCull() - .s().uv(1, 8, 9, 16).noCull() - .w("cake_inner").uv(1, 8, 15, 16).noCull() - .e().uv(1, 8, 15, 16).noCull() - ; - private static final Model cake_slice1 = ModelProvider.getModelProvider().getModel("cake_side") - .add(3, 0, 1, 15, 8, 15) - .d("cake_bottom").uv(3, 1, 15, 15) - .u("cake_top").uv(3, 1, 15, 15).noCull() - .n().uv(1, 8, 13, 16).noCull() - .s().uv(1, 8, 13, 16).noCull() - .w("cake_inner").uv(1, 8, 15, 16).noCull() - .e().uv(1, 8, 15, 16).noCull() - ; - private static final Model cake_slice2 = ModelProvider.getModelProvider().getModel("cake_side") - .add(5, 0, 1, 15, 8, 15) - .d("cake_bottom").uv(5, 1, 15, 15) - .u("cake_top").uv(5, 1, 15, 15).noCull() - .n().uv(1, 8, 11, 16).noCull() - .s().uv(1, 8, 11, 16).noCull() - .w("cake_inner").uv(1, 8, 15, 16).noCull() - .e().uv(1, 8, 15, 16).noCull() - ; - private static final Model cake_slice5 = ModelProvider.getModelProvider().getModel("cake_side") - .add(11, 0, 1, 15, 8, 15) - .d("cake_bottom").uv(11, 1, 15, 15) - .u("cake_top").uv(11, 1, 15, 15).noCull() - .n().uv(1, 8, 5, 16).noCull() - .s().uv(1, 8, 5, 16).noCull() - .w("cake_inner").uv(1, 8, 15, 16).noCull() - .e().uv(1, 8, 15, 16).noCull() - ; - private static final Model cake_slice4 = ModelProvider.getModelProvider().getModel("cake_side") - .add(9, 0, 1, 15, 8, 15) - .d("cake_bottom").uv(9, 1, 15, 15) - .u("cake_top").uv(9, 1, 15, 15).noCull() - .n().uv(1, 8, 7, 16).noCull() - .s().uv(1, 8, 7, 16).noCull() - .w("cake_inner").uv(1, 8, 15, 16).noCull() - .e().uv(1, 8, 15, 16).noCull() - ; - private static final Model cake_uneaten = ModelProvider.getModelProvider().getModel("cake_side") - .add(1, 0, 1, 15, 8, 15) - .d("cake_bottom").uv(1, 1, 15, 15) - .u("cake_top").uv(1, 1, 15, 15).noCull() - .n().uv(1, 8, 15, 16).noCull() - .s().uv(1, 8, 15, 16).noCull() - .w().uv(1, 8, 15, 16).noCull() - .e().uv(1, 8, 15, 16).noCull() - ; - private static final Model cake_slice6 = ModelProvider.getModelProvider().getModel("cake_side") - .add(13, 0, 1, 15, 8, 15) - .d("cake_bottom").uv(13, 1, 15, 15) - .u("cake_top").uv(13, 1, 15, 15).noCull() - .n().uv(1, 8, 3, 16).noCull() - .s().uv(1, 8, 3, 16).noCull() - .w("cake_inner").uv(1, 8, 15, 16).noCull() - .e().uv(1, 8, 15, 16).noCull() - ; - private static final Model[] cake_slices = - new Model[] {cake_uneaten, cake_slice1, cake_slice2, cake_slice3, cake_slice4, cake_slice5, cake_slice6}; - - public static final PropertyInteger BITES = PropertyInteger.create("bites", 0, 6); - public BlockCake() { super(Material.SOFT); - this.setDefaultState(this.getBaseState().withProperty(BITES, Integer.valueOf(0))); -// this.setTickRandomly(true); - } - - public void setBlockBounds(IWorldAccess worldIn, BlockPos pos) - { float f = 0.0625F; - float f1 = (float)(1 + ((Integer)worldIn.getState(pos).getValue(BITES)).intValue() * 2) / 16.0F; float f2 = 0.5F; - this.setBlockBounds(f1, 0.0F, f, 1.0F - f, f2, 1.0F - f); - } - - public BoundingBox getCollisionBox(World worldIn, BlockPos pos, State state) - { - float f = 0.0625F; - float f1 = (float)(1 + ((Integer)state.getValue(BITES)).intValue() * 2) / 16.0F; - float f2 = 0.5F; - return new BoundingBox((double)((float)pos.getX() + f1), (double)pos.getY(), (double)((float)pos.getZ() + f), (double)((float)(pos.getX() + 1) - f), (double)((float)pos.getY() + f2), (double)((float)(pos.getZ() + 1) - f)); - } - - public BoundingBox getSelectionBox(World worldIn, BlockPos pos) - { - return this.getCollisionBox(worldIn, pos, worldIn.getState(pos)); + this.setBlockBounds(f, 0.0F, f, 1.0F - f, f2, 1.0F - f); } public boolean isFullCube() @@ -121,9 +28,6 @@ public class BlockCake extends Block return false; } - /** - * Used to determine ambient occlusion and culling when rebuilding chunks for render - */ public boolean isOpaqueCube() { return false; @@ -142,32 +46,21 @@ public class BlockCake extends Block private void eatCake(World worldIn, BlockPos pos, State state, EntityNPC player) { -// player.triggerAchievement(StatRegistry.cakeEatenStat); - int i = ((Integer)state.getValue(BITES)).intValue(); - - if (i < 6) - { - worldIn.setState(pos, state.withProperty(BITES, Integer.valueOf(i + 1)), 3); - } - else - { - worldIn.setBlockToAir(pos); - } + worldIn.setBlockToAir(pos); + worldIn.playSoundAtEntity(player, SoundEvent.EAT, 0.5F); + player.heal((int)((float)6 * 0.5f * (1.0f + worldIn.rand.floatv()))); } public boolean canPlace(World worldIn, BlockPos pos) { - return super.canPlace(worldIn, pos) ? this.canBlockStay(worldIn, pos) : false; + return super.canPlace(worldIn, pos) && this.canBlockStay(worldIn, pos); } - /** - * Called when a neighboring block changes. - */ public void onUpdate(AWorldServer worldIn, BlockPos pos, State state, Block neighborBlock) { if (!this.canBlockStay(worldIn, pos)) { - worldIn.setBlockToAir(pos); + worldIn.destroyBlock(pos, true); } } @@ -176,33 +69,19 @@ public class BlockCake extends Block return worldIn.getState(pos.down()).getBlock().getMaterial().isSolid(); } - /** - * Returns the quantity of items to drop on block destruction. - */ - protected int getDropAmount(Random random) - { - return 0; - } - - /** - * Get the Item that this Block should drop when harvested. - */ - public Item getDrop(State state, Random rand, int fortune) - { - return null; - } - @Clientside public boolean hasTransparency() { return true; } - protected Property[] getProperties() - { - return new Property[] {BITES}; - } - public Model getModel(ModelProvider provider, String name, State state) { - return cake_slices[state.getValue(BITES)]; + return provider.getModel("cake_side") + .add(1, 0, 1, 15, 8, 15) + .d("cake_bottom").uv(1, 1, 15, 15) + .u("cake_top").uv(1, 1, 15, 15).noCull() + .n().uv(1, 8, 15, 16).noCull() + .s().uv(1, 8, 15, 16).noCull() + .w().uv(1, 8, 15, 16).noCull() + .e().uv(1, 8, 15, 16).noCull(); } } diff --git a/common/src/main/java/common/block/artificial/BlockCarpet.java b/common/src/main/java/common/block/artificial/BlockCarpet.java index ce984cbc..8635d1c9 100755 --- a/common/src/main/java/common/block/artificial/BlockCarpet.java +++ b/common/src/main/java/common/block/artificial/BlockCarpet.java @@ -5,7 +5,7 @@ import common.block.Material; import common.color.DyeColor; import common.item.CheatTab; import common.model.Model; -import common.model.ModelProvider; +import common.model.Model.ModelProvider; import common.util.BlockPos; import common.util.Facing; import common.world.AWorldServer; diff --git a/common/src/main/java/common/block/artificial/BlockDoor.java b/common/src/main/java/common/block/artificial/BlockDoor.java index 83e95fb9..43de686e 100755 --- a/common/src/main/java/common/block/artificial/BlockDoor.java +++ b/common/src/main/java/common/block/artificial/BlockDoor.java @@ -14,7 +14,7 @@ import common.item.ItemStack; import common.item.StackSize; import common.item.tool.ItemKey; import common.model.Model; -import common.model.ModelProvider; +import common.model.Model.ModelProvider; import common.model.ModelRotation; import common.model.GuiPosition; import common.properties.Property; diff --git a/common/src/main/java/common/block/artificial/BlockDragonEgg.java b/common/src/main/java/common/block/artificial/BlockDragonEgg.java index 6f9af33c..d0f07b0a 100755 --- a/common/src/main/java/common/block/artificial/BlockDragonEgg.java +++ b/common/src/main/java/common/block/artificial/BlockDragonEgg.java @@ -7,7 +7,7 @@ import common.entity.item.EntityFalling; import common.entity.npc.EntityNPC; import common.init.Blocks; import common.model.Model; -import common.model.ModelProvider; +import common.model.Model.ModelProvider; import common.rng.Random; import common.util.BlockPos; import common.util.Facing; @@ -20,65 +20,6 @@ import common.world.AWorldServer; public class BlockDragonEgg extends Block { - private static final Model dragon_egg = ModelProvider.getModelProvider().getModel("dragon_egg") - .add(6, 15, 6, 10, 16, 10) - .d().uv(6, 6, 10, 10).noCull() - .u().uv(6, 6, 10, 10).noCull() - .n().uv(6, 15, 10, 16).noCull() - .s().uv(6, 15, 10, 16).noCull() - .w().uv(6, 15, 10, 16).noCull() - .e().uv(6, 15, 10, 16).noCull() - .add(5, 14, 5, 11, 15, 11) - .d().uv(5, 5, 11, 11).noCull() - .u().uv(5, 5, 11, 11).noCull() - .n().uv(5, 14, 11, 15).noCull() - .s().uv(5, 14, 11, 15).noCull() - .w().uv(5, 14, 11, 15).noCull() - .e().uv(5, 14, 11, 15).noCull() - .add(5, 13, 5, 11, 14, 11) - .d().uv(4, 4, 12, 12).noCull() - .u().uv(4, 4, 12, 12).noCull() - .n().uv(4, 13, 12, 14).noCull() - .s().uv(4, 13, 12, 14).noCull() - .w().uv(4, 13, 12, 14).noCull() - .e().uv(4, 13, 12, 14).noCull() - .add(3, 11, 3, 13, 13, 13) - .d().uv(3, 3, 13, 13).noCull() - .u().uv(3, 3, 13, 13).noCull() - .n().uv(3, 11, 13, 13).noCull() - .s().uv(3, 11, 13, 13).noCull() - .w().uv(3, 11, 13, 13).noCull() - .e().uv(3, 11, 13, 13).noCull() - .add(2, 8, 2, 14, 11, 14) - .d().uv(2, 2, 14, 14).noCull() - .u().uv(2, 2, 14, 14).noCull() - .n().uv(2, 8, 14, 11).noCull() - .s().uv(2, 8, 14, 11).noCull() - .w().uv(2, 8, 14, 11).noCull() - .e().uv(2, 8, 14, 11).noCull() - .add(1, 3, 1, 15, 8, 15) - .d().uv(1, 1, 15, 15).noCull() - .u().uv(1, 1, 15, 15).noCull() - .n().uv(1, 3, 15, 8).noCull() - .s().uv(1, 3, 15, 8).noCull() - .w().uv(1, 3, 15, 8).noCull() - .e().uv(1, 3, 15, 8).noCull() - .add(2, 1, 2, 14, 3, 14) - .d().uv(2, 2, 14, 14).noCull() - .u().uv(2, 2, 14, 14).noCull() - .n().uv(2, 1, 14, 3).noCull() - .s().uv(2, 1, 14, 3).noCull() - .w().uv(2, 1, 14, 3).noCull() - .e().uv(2, 1, 14, 3).noCull() - .add(3, 0, 3, 13, 1, 13) - .d().uv(3, 3, 13, 13).noCull() - .u().uv(3, 3, 13, 13).noCull() - .n().uv(3, 0, 13, 1).noCull() - .s().uv(3, 0, 13, 1).noCull() - .w().uv(3, 0, 13, 1).noCull() - .e().uv(3, 0, 13, 1).noCull() - ; - public BlockDragonEgg() { super(Material.SOFT); @@ -213,6 +154,62 @@ public class BlockDragonEgg extends Block // } public Model getModel(ModelProvider provider, String name, State state) { - return dragon_egg; + return provider.getModel("dragon_egg") + .add(6, 15, 6, 10, 16, 10) + .d().uv(6, 6, 10, 10).noCull() + .u().uv(6, 6, 10, 10).noCull() + .n().uv(6, 15, 10, 16).noCull() + .s().uv(6, 15, 10, 16).noCull() + .w().uv(6, 15, 10, 16).noCull() + .e().uv(6, 15, 10, 16).noCull() + .add(5, 14, 5, 11, 15, 11) + .d().uv(5, 5, 11, 11).noCull() + .u().uv(5, 5, 11, 11).noCull() + .n().uv(5, 14, 11, 15).noCull() + .s().uv(5, 14, 11, 15).noCull() + .w().uv(5, 14, 11, 15).noCull() + .e().uv(5, 14, 11, 15).noCull() + .add(5, 13, 5, 11, 14, 11) + .d().uv(4, 4, 12, 12).noCull() + .u().uv(4, 4, 12, 12).noCull() + .n().uv(4, 13, 12, 14).noCull() + .s().uv(4, 13, 12, 14).noCull() + .w().uv(4, 13, 12, 14).noCull() + .e().uv(4, 13, 12, 14).noCull() + .add(3, 11, 3, 13, 13, 13) + .d().uv(3, 3, 13, 13).noCull() + .u().uv(3, 3, 13, 13).noCull() + .n().uv(3, 11, 13, 13).noCull() + .s().uv(3, 11, 13, 13).noCull() + .w().uv(3, 11, 13, 13).noCull() + .e().uv(3, 11, 13, 13).noCull() + .add(2, 8, 2, 14, 11, 14) + .d().uv(2, 2, 14, 14).noCull() + .u().uv(2, 2, 14, 14).noCull() + .n().uv(2, 8, 14, 11).noCull() + .s().uv(2, 8, 14, 11).noCull() + .w().uv(2, 8, 14, 11).noCull() + .e().uv(2, 8, 14, 11).noCull() + .add(1, 3, 1, 15, 8, 15) + .d().uv(1, 1, 15, 15).noCull() + .u().uv(1, 1, 15, 15).noCull() + .n().uv(1, 3, 15, 8).noCull() + .s().uv(1, 3, 15, 8).noCull() + .w().uv(1, 3, 15, 8).noCull() + .e().uv(1, 3, 15, 8).noCull() + .add(2, 1, 2, 14, 3, 14) + .d().uv(2, 2, 14, 14).noCull() + .u().uv(2, 2, 14, 14).noCull() + .n().uv(2, 1, 14, 3).noCull() + .s().uv(2, 1, 14, 3).noCull() + .w().uv(2, 1, 14, 3).noCull() + .e().uv(2, 1, 14, 3).noCull() + .add(3, 0, 3, 13, 1, 13) + .d().uv(3, 3, 13, 13).noCull() + .u().uv(3, 3, 13, 13).noCull() + .n().uv(3, 0, 13, 1).noCull() + .s().uv(3, 0, 13, 1).noCull() + .w().uv(3, 0, 13, 1).noCull() + .e().uv(3, 0, 13, 1).noCull(); } } diff --git a/common/src/main/java/common/block/artificial/BlockFence.java b/common/src/main/java/common/block/artificial/BlockFence.java index d2f6c653..eb14ec33 100755 --- a/common/src/main/java/common/block/artificial/BlockFence.java +++ b/common/src/main/java/common/block/artificial/BlockFence.java @@ -10,7 +10,7 @@ import common.entity.npc.EntityNPC; import common.item.CheatTab; import common.item.tool.ItemLead; import common.model.Model; -import common.model.ModelProvider; +import common.model.Model.ModelProvider; import common.model.ModelRotation; import common.model.GuiPosition; import common.properties.Property; diff --git a/common/src/main/java/common/block/artificial/BlockFenceGate.java b/common/src/main/java/common/block/artificial/BlockFenceGate.java index 1c05df53..71d761e0 100755 --- a/common/src/main/java/common/block/artificial/BlockFenceGate.java +++ b/common/src/main/java/common/block/artificial/BlockFenceGate.java @@ -9,7 +9,7 @@ import common.init.Blocks; import common.init.WoodType; import common.item.CheatTab; import common.model.Model; -import common.model.ModelProvider; +import common.model.Model.ModelProvider; import common.model.ModelRotation; import common.properties.Property; import common.properties.PropertyBool; diff --git a/common/src/main/java/common/block/artificial/BlockFloorPortal.java b/common/src/main/java/common/block/artificial/BlockFloorPortal.java index 1de6a3e6..789aaed2 100755 --- a/common/src/main/java/common/block/artificial/BlockFloorPortal.java +++ b/common/src/main/java/common/block/artificial/BlockFloorPortal.java @@ -9,7 +9,7 @@ import common.block.Material; import common.collect.Sets; import common.entity.Entity; import common.model.Model; -import common.model.ModelProvider; +import common.model.Model.ModelProvider; import common.rng.Random; import common.util.BlockPos; import common.util.BoundingBox; @@ -22,9 +22,6 @@ import common.world.World; public class BlockFloorPortal extends Block { - private static final Model floor_portal = ModelProvider.getModelProvider().getModel("floor_portal") - .add(0, 11, 0, 16, 12, 16).du().uv(0, 0, 16, 16).noCull().nswe().uv(0, 0, 16, 1); - public BlockFloorPortal(Material materialIn) { super(materialIn); @@ -139,7 +136,8 @@ public class BlockFloorPortal extends Block } public Model getModel(ModelProvider provider, String name, State state) { - return floor_portal; + return provider.getModel("floor_portal") + .add(0, 11, 0, 16, 12, 16).du().uv(0, 0, 16, 16).noCull().nswe().uv(0, 0, 16, 1); } public void getAnimatedTextures(Map map) { diff --git a/common/src/main/java/common/block/artificial/BlockFlowerPot.java b/common/src/main/java/common/block/artificial/BlockFlowerPot.java index 7d992188..8db92c57 100755 --- a/common/src/main/java/common/block/artificial/BlockFlowerPot.java +++ b/common/src/main/java/common/block/artificial/BlockFlowerPot.java @@ -13,7 +13,7 @@ import common.init.Items; import common.item.Item; import common.item.ItemStack; import common.model.Model; -import common.model.ModelProvider; +import common.model.Model.ModelProvider; import common.model.GuiPosition; import common.rng.Random; import common.util.BlockPos; @@ -25,81 +25,6 @@ import common.world.AWorldServer; public class BlockFlowerPot extends Block { - private static final Model flower_pot_cactus = ModelProvider.getModelProvider().getModel("flower_pot") - .add(5, 0, 5, 6, 6, 11) - .d().uv(5, 5, 6, 11) - .u().uv(5, 5, 6, 11).noCull() - .n().uv(10, 10, 11, 16).noCull() - .s().uv(5, 10, 6, 16).noCull() - .w().uv(5, 10, 11, 16).noCull() - .e().uv(5, 10, 11, 16).noCull() - .add(10, 0, 5, 11, 6, 11) - .d().uv(10, 5, 11, 11) - .u().uv(10, 5, 11, 11).noCull() - .n().uv(5, 10, 6, 16).noCull() - .s().uv(10, 10, 11, 16).noCull() - .w().uv(5, 10, 11, 16).noCull() - .e().uv(5, 10, 11, 16).noCull() - .add(6, 0, 5, 10, 6, 6) - .d().uv(6, 10, 10, 11) - .u().uv(6, 5, 10, 6).noCull() - .n().uv(6, 10, 10, 16).noCull() - .s().uv(6, 10, 10, 16).noCull() - .add(6, 0, 10, 10, 6, 11) - .d().uv(6, 5, 10, 6) - .u().uv(6, 10, 10, 11).noCull() - .n().uv(6, 10, 10, 16).noCull() - .s().uv(6, 10, 10, 16).noCull() - .add(6, 0, 6, 10, 4, 10) - .d().uv(6, 6, 10, 10) - .u("dirt").uv(6, 6, 10, 10).noCull() - .add(6, 4, 6, 10, 8, 10) - .n("cactus_side").uv(6, 8, 10, 12).noCull() - .s("cactus_side").uv(6, 8, 10, 12).noCull() - .w("cactus_side").uv(6, 8, 10, 12).noCull() - .e("cactus_side").uv(6, 8, 10, 12).noCull() - .add(6, 8, 6, 10, 12, 10) - .n("cactus_side").uv(6, 4, 10, 8).noCull() - .s("cactus_side").uv(6, 4, 10, 8).noCull() - .w("cactus_side").uv(6, 4, 10, 8).noCull() - .e("cactus_side").uv(6, 4, 10, 8).noCull() - .add(6, 12, 6, 10, 16, 10) - .u("cactus_side").uv(6, 6, 10, 10).noCull() - .n("cactus_side").uv(6, 0, 10, 4).noCull() - .s("cactus_side").uv(6, 0, 10, 4).noCull() - .w("cactus_side").uv(6, 0, 10, 4).noCull() - .e("cactus_side").uv(6, 0, 10, 4).noCull() - ; - private static final Model flower_pot = ModelProvider.getModelProvider().getModel("flower_pot") - .add(5, 0, 5, 6, 6, 11) - .d().uv(5, 5, 6, 11) - .u().uv(5, 5, 6, 11).noCull() - .n().uv(10, 10, 11, 16).noCull() - .s().uv(5, 10, 6, 16).noCull() - .w().uv(5, 10, 11, 16).noCull() - .e().uv(5, 10, 11, 16).noCull() - .add(10, 0, 5, 11, 6, 11) - .d().uv(10, 5, 11, 11) - .u().uv(10, 5, 11, 11).noCull() - .n().uv(5, 10, 6, 16).noCull() - .s().uv(10, 10, 11, 16).noCull() - .w().uv(5, 10, 11, 16).noCull() - .e().uv(5, 10, 11, 16).noCull() - .add(6, 0, 5, 10, 6, 6) - .d().uv(6, 10, 10, 11) - .u().uv(6, 5, 10, 6).noCull() - .n().uv(6, 10, 10, 16).noCull() - .s().uv(6, 10, 10, 16).noCull() - .add(6, 0, 10, 10, 6, 11) - .d().uv(6, 5, 10, 6) - .u().uv(6, 10, 10, 11).noCull() - .n().uv(6, 10, 10, 16).noCull() - .s().uv(6, 10, 10, 16).noCull() - .add(6, 0, 6, 10, 4, 10) - .d().uv(6, 6, 10, 10) - .u("dirt").uv(6, 6, 10, 10).noCull() - ; - public static final List POTS = Lists.newArrayList(); private final Block content; @@ -207,9 +132,79 @@ public class BlockFlowerPot extends Block public Model getModel(ModelProvider provider, String name, State state) { if(this.content == null) - return flower_pot; + return provider.getModel("flower_pot") + .add(5, 0, 5, 6, 6, 11) + .d().uv(5, 5, 6, 11) + .u().uv(5, 5, 6, 11).noCull() + .n().uv(10, 10, 11, 16).noCull() + .s().uv(5, 10, 6, 16).noCull() + .w().uv(5, 10, 11, 16).noCull() + .e().uv(5, 10, 11, 16).noCull() + .add(10, 0, 5, 11, 6, 11) + .d().uv(10, 5, 11, 11) + .u().uv(10, 5, 11, 11).noCull() + .n().uv(5, 10, 6, 16).noCull() + .s().uv(10, 10, 11, 16).noCull() + .w().uv(5, 10, 11, 16).noCull() + .e().uv(5, 10, 11, 16).noCull() + .add(6, 0, 5, 10, 6, 6) + .d().uv(6, 10, 10, 11) + .u().uv(6, 5, 10, 6).noCull() + .n().uv(6, 10, 10, 16).noCull() + .s().uv(6, 10, 10, 16).noCull() + .add(6, 0, 10, 10, 6, 11) + .d().uv(6, 5, 10, 6) + .u().uv(6, 10, 10, 11).noCull() + .n().uv(6, 10, 10, 16).noCull() + .s().uv(6, 10, 10, 16).noCull() + .add(6, 0, 6, 10, 4, 10) + .d().uv(6, 6, 10, 10) + .u("dirt").uv(6, 6, 10, 10).noCull(); else if(this.content == Blocks.cactus) - return flower_pot_cactus; + return provider.getModel("flower_pot") + .add(5, 0, 5, 6, 6, 11) + .d().uv(5, 5, 6, 11) + .u().uv(5, 5, 6, 11).noCull() + .n().uv(10, 10, 11, 16).noCull() + .s().uv(5, 10, 6, 16).noCull() + .w().uv(5, 10, 11, 16).noCull() + .e().uv(5, 10, 11, 16).noCull() + .add(10, 0, 5, 11, 6, 11) + .d().uv(10, 5, 11, 11) + .u().uv(10, 5, 11, 11).noCull() + .n().uv(5, 10, 6, 16).noCull() + .s().uv(10, 10, 11, 16).noCull() + .w().uv(5, 10, 11, 16).noCull() + .e().uv(5, 10, 11, 16).noCull() + .add(6, 0, 5, 10, 6, 6) + .d().uv(6, 10, 10, 11) + .u().uv(6, 5, 10, 6).noCull() + .n().uv(6, 10, 10, 16).noCull() + .s().uv(6, 10, 10, 16).noCull() + .add(6, 0, 10, 10, 6, 11) + .d().uv(6, 5, 10, 6) + .u().uv(6, 10, 10, 11).noCull() + .n().uv(6, 10, 10, 16).noCull() + .s().uv(6, 10, 10, 16).noCull() + .add(6, 0, 6, 10, 4, 10) + .d().uv(6, 6, 10, 10) + .u("dirt").uv(6, 6, 10, 10).noCull() + .add(6, 4, 6, 10, 8, 10) + .n("cactus_side").uv(6, 8, 10, 12).noCull() + .s("cactus_side").uv(6, 8, 10, 12).noCull() + .w("cactus_side").uv(6, 8, 10, 12).noCull() + .e("cactus_side").uv(6, 8, 10, 12).noCull() + .add(6, 8, 6, 10, 12, 10) + .n("cactus_side").uv(6, 4, 10, 8).noCull() + .s("cactus_side").uv(6, 4, 10, 8).noCull() + .w("cactus_side").uv(6, 4, 10, 8).noCull() + .e("cactus_side").uv(6, 4, 10, 8).noCull() + .add(6, 12, 6, 10, 16, 10) + .u("cactus_side").uv(6, 6, 10, 10).noCull() + .n("cactus_side").uv(6, 0, 10, 4).noCull() + .s("cactus_side").uv(6, 0, 10, 4).noCull() + .w("cactus_side").uv(6, 0, 10, 4).noCull() + .e("cactus_side").uv(6, 0, 10, 4).noCull(); else { String plant = BlockRegistry.getName(this.content); return provider.getModel("flower_pot") diff --git a/common/src/main/java/common/block/artificial/BlockLadder.java b/common/src/main/java/common/block/artificial/BlockLadder.java index c849c179..25dfd9f9 100755 --- a/common/src/main/java/common/block/artificial/BlockLadder.java +++ b/common/src/main/java/common/block/artificial/BlockLadder.java @@ -6,7 +6,7 @@ import common.block.Material; import common.entity.types.EntityLiving; import common.item.CheatTab; import common.model.Model; -import common.model.ModelProvider; +import common.model.Model.ModelProvider; import common.model.ModelRotation; import common.model.GuiPosition; import common.properties.Property; diff --git a/common/src/main/java/common/block/artificial/BlockPane.java b/common/src/main/java/common/block/artificial/BlockPane.java index 8446aed3..26aecdd0 100755 --- a/common/src/main/java/common/block/artificial/BlockPane.java +++ b/common/src/main/java/common/block/artificial/BlockPane.java @@ -9,7 +9,7 @@ import common.init.Blocks; import common.item.CheatTab; import common.item.Item; import common.model.Model; -import common.model.ModelProvider; +import common.model.Model.ModelProvider; import common.model.ModelRotation; import common.model.GuiPosition; import common.properties.Property; diff --git a/common/src/main/java/common/block/artificial/BlockPortal.java b/common/src/main/java/common/block/artificial/BlockPortal.java index aeecda1d..c0c073bb 100755 --- a/common/src/main/java/common/block/artificial/BlockPortal.java +++ b/common/src/main/java/common/block/artificial/BlockPortal.java @@ -8,7 +8,7 @@ import common.block.natural.BlockFire; import common.entity.Entity; import common.init.Blocks; import common.model.Model; -import common.model.ModelProvider; +import common.model.Model.ModelProvider; import common.properties.Property; import common.properties.PropertyEnum; import common.rng.Random; diff --git a/common/src/main/java/common/block/artificial/BlockPortalFrame.java b/common/src/main/java/common/block/artificial/BlockPortalFrame.java index 10f1b42b..39ce5925 100755 --- a/common/src/main/java/common/block/artificial/BlockPortalFrame.java +++ b/common/src/main/java/common/block/artificial/BlockPortalFrame.java @@ -13,7 +13,7 @@ import common.init.Items; import common.item.Item; import common.item.ItemStack; import common.model.Model; -import common.model.ModelProvider; +import common.model.Model.ModelProvider; import common.model.ModelRotation; import common.properties.Property; import common.properties.PropertyBool; diff --git a/common/src/main/java/common/block/artificial/BlockQuartz.java b/common/src/main/java/common/block/artificial/BlockQuartz.java index 85201d24..8c23ac75 100755 --- a/common/src/main/java/common/block/artificial/BlockQuartz.java +++ b/common/src/main/java/common/block/artificial/BlockQuartz.java @@ -4,7 +4,7 @@ import common.block.Block; import common.block.Material; import common.item.CheatTab; import common.model.Model; -import common.model.ModelProvider; +import common.model.Model.ModelProvider; import common.world.State; public class BlockQuartz extends Block { diff --git a/common/src/main/java/common/block/artificial/BlockQuartzPillar.java b/common/src/main/java/common/block/artificial/BlockQuartzPillar.java index 3b73740f..cba22d3e 100644 --- a/common/src/main/java/common/block/artificial/BlockQuartzPillar.java +++ b/common/src/main/java/common/block/artificial/BlockQuartzPillar.java @@ -5,7 +5,7 @@ import common.block.Material; import common.entity.types.EntityLiving; import common.item.CheatTab; import common.model.Model; -import common.model.ModelProvider; +import common.model.Model.ModelProvider; import common.model.ModelRotation; import common.properties.Property; import common.util.BlockPos; diff --git a/common/src/main/java/common/block/artificial/BlockSkull.java b/common/src/main/java/common/block/artificial/BlockSkull.java index a1bc4d14..0fff3d87 100755 --- a/common/src/main/java/common/block/artificial/BlockSkull.java +++ b/common/src/main/java/common/block/artificial/BlockSkull.java @@ -6,7 +6,7 @@ import common.block.Material; import common.entity.Entity; import common.entity.types.EntityLiving; import common.model.Model; -import common.model.ModelProvider; +import common.model.Model.ModelProvider; import common.model.ModelRotation; import common.model.GuiPosition; import common.properties.Property; diff --git a/common/src/main/java/common/block/artificial/BlockSlab.java b/common/src/main/java/common/block/artificial/BlockSlab.java index 2d2bc4d5..a69a2b44 100755 --- a/common/src/main/java/common/block/artificial/BlockSlab.java +++ b/common/src/main/java/common/block/artificial/BlockSlab.java @@ -13,7 +13,7 @@ import common.init.BlockRegistry; import common.item.CheatTab; import common.item.ItemStack; import common.model.Model; -import common.model.ModelProvider; +import common.model.Model.ModelProvider; import common.properties.Property; import common.util.BlockPos; import common.util.BoundingBox; diff --git a/common/src/main/java/common/block/artificial/BlockStairs.java b/common/src/main/java/common/block/artificial/BlockStairs.java index 86d1f75c..de286e2a 100755 --- a/common/src/main/java/common/block/artificial/BlockStairs.java +++ b/common/src/main/java/common/block/artificial/BlockStairs.java @@ -11,7 +11,7 @@ import common.entity.types.EntityLiving; import common.init.BlockRegistry; import common.item.CheatTab; import common.model.Model; -import common.model.ModelProvider; +import common.model.Model.ModelProvider; import common.model.GuiPosition; import common.properties.Property; import common.properties.PropertyEnum; diff --git a/common/src/main/java/common/block/artificial/BlockTrapDoor.java b/common/src/main/java/common/block/artificial/BlockTrapDoor.java index 3c0b14aa..9a2f578c 100755 --- a/common/src/main/java/common/block/artificial/BlockTrapDoor.java +++ b/common/src/main/java/common/block/artificial/BlockTrapDoor.java @@ -8,7 +8,7 @@ import common.entity.types.EntityLiving; import common.item.CheatTab; import common.item.tool.ItemKey; import common.model.Model; -import common.model.ModelProvider; +import common.model.Model.ModelProvider; import common.model.ModelRotation; import common.properties.Property; import common.properties.PropertyBool; diff --git a/common/src/main/java/common/block/artificial/BlockWall.java b/common/src/main/java/common/block/artificial/BlockWall.java index 5a63a7c9..359d9dac 100755 --- a/common/src/main/java/common/block/artificial/BlockWall.java +++ b/common/src/main/java/common/block/artificial/BlockWall.java @@ -8,7 +8,7 @@ import common.collect.Lists; import common.init.Blocks; import common.item.CheatTab; import common.model.Model; -import common.model.ModelProvider; +import common.model.Model.ModelProvider; import common.model.ModelRotation; import common.properties.Property; import common.properties.PropertyBool; diff --git a/common/src/main/java/common/block/artificial/BlockWool.java b/common/src/main/java/common/block/artificial/BlockWool.java index 6c987827..e15a3241 100755 --- a/common/src/main/java/common/block/artificial/BlockWool.java +++ b/common/src/main/java/common/block/artificial/BlockWool.java @@ -5,7 +5,7 @@ import common.block.Material; import common.color.DyeColor; import common.item.CheatTab; import common.model.Model; -import common.model.ModelProvider; +import common.model.Model.ModelProvider; import common.world.State; public class BlockWool extends Block { diff --git a/common/src/main/java/common/block/foliage/BlockBlackenedSoil.java b/common/src/main/java/common/block/foliage/BlockBlackenedSoil.java index 75859faa..91b91c95 100644 --- a/common/src/main/java/common/block/foliage/BlockBlackenedSoil.java +++ b/common/src/main/java/common/block/foliage/BlockBlackenedSoil.java @@ -6,7 +6,7 @@ import common.init.Blocks; import common.item.CheatTab; import common.item.Item; import common.model.Model; -import common.model.ModelProvider; +import common.model.Model.ModelProvider; import common.rng.Random; import common.util.BlockPos; import common.vars.Vars; diff --git a/common/src/main/java/common/block/foliage/BlockBlueShroom.java b/common/src/main/java/common/block/foliage/BlockBlueShroom.java index bdf46aea..363731bd 100755 --- a/common/src/main/java/common/block/foliage/BlockBlueShroom.java +++ b/common/src/main/java/common/block/foliage/BlockBlueShroom.java @@ -3,7 +3,7 @@ package common.block.foliage; import common.block.Block; import common.init.Blocks; import common.model.Model; -import common.model.ModelProvider; +import common.model.Model.ModelProvider; import common.model.GuiPosition; import common.rng.Random; import common.util.BlockPos; diff --git a/common/src/main/java/common/block/foliage/BlockCactus.java b/common/src/main/java/common/block/foliage/BlockCactus.java index 97b4162a..708ecf67 100755 --- a/common/src/main/java/common/block/foliage/BlockCactus.java +++ b/common/src/main/java/common/block/foliage/BlockCactus.java @@ -7,7 +7,7 @@ import common.entity.Entity; import common.init.Blocks; import common.item.CheatTab; import common.model.Model; -import common.model.ModelProvider; +import common.model.Model.ModelProvider; import common.properties.Property; import common.properties.PropertyInteger; import common.rng.Random; @@ -22,18 +22,6 @@ import common.world.AWorldServer; public class BlockCactus extends Block { - private static final Model cactus = ModelProvider.getModelProvider().getModel("cactus_side") - .add(0, 0, 0, 16, 16, 16) - .d("cactus_bottom").uv(0, 0, 16, 16) - .u("cactus_top").uv(0, 0, 16, 16) - .add(0, 0, 1, 16, 16, 15) - .n().uv(0, 0, 16, 16).noCull() - .s().uv(0, 0, 16, 16).noCull() - .add(1, 0, 0, 15, 16, 16) - .w().uv(0, 0, 16, 16).noCull() - .e().uv(0, 0, 16, 16).noCull() - ; - public static final PropertyInteger AGE = PropertyInteger.create("age", 0, 15); public BlockCactus() @@ -151,7 +139,16 @@ public class BlockCactus extends Block } public Model getModel(ModelProvider provider, String name, State state) { - return cactus; + return provider.getModel("cactus_side") + .add(0, 0, 0, 16, 16, 16) + .d("cactus_bottom").uv(0, 0, 16, 16) + .u("cactus_top").uv(0, 0, 16, 16) + .add(0, 0, 1, 16, 16, 15) + .n().uv(0, 0, 16, 16).noCull() + .s().uv(0, 0, 16, 16).noCull() + .add(1, 0, 0, 15, 16, 16) + .w().uv(0, 0, 16, 16).noCull() + .e().uv(0, 0, 16, 16).noCull(); } public Property[] getIgnoredProperties() { diff --git a/common/src/main/java/common/block/foliage/BlockCarrot.java b/common/src/main/java/common/block/foliage/BlockCarrot.java index 08f1bc02..d3e22b3c 100755 --- a/common/src/main/java/common/block/foliage/BlockCarrot.java +++ b/common/src/main/java/common/block/foliage/BlockCarrot.java @@ -3,7 +3,7 @@ package common.block.foliage; import common.init.Items; import common.item.Item; import common.model.Model; -import common.model.ModelProvider; +import common.model.Model.ModelProvider; import common.world.State; public class BlockCarrot extends BlockCrops diff --git a/common/src/main/java/common/block/foliage/BlockCrops.java b/common/src/main/java/common/block/foliage/BlockCrops.java index 7fc5903f..727bc855 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.model.Model; -import common.model.ModelProvider; +import common.model.Model.ModelProvider; import common.properties.Property; import common.properties.PropertyInteger; import common.rng.Random; diff --git a/common/src/main/java/common/block/foliage/BlockDeadBush.java b/common/src/main/java/common/block/foliage/BlockDeadBush.java index 640b3b40..1dbd9d0a 100755 --- a/common/src/main/java/common/block/foliage/BlockDeadBush.java +++ b/common/src/main/java/common/block/foliage/BlockDeadBush.java @@ -10,7 +10,7 @@ import common.item.Item; import common.item.ItemStack; import common.item.tool.ItemShears; import common.model.Model; -import common.model.ModelProvider; +import common.model.Model.ModelProvider; import common.model.GuiPosition; import common.rng.Random; import common.tileentity.TileEntity; diff --git a/common/src/main/java/common/block/foliage/BlockDoublePlant.java b/common/src/main/java/common/block/foliage/BlockDoublePlant.java index e6585fbd..9ab0a0ba 100755 --- a/common/src/main/java/common/block/foliage/BlockDoublePlant.java +++ b/common/src/main/java/common/block/foliage/BlockDoublePlant.java @@ -12,7 +12,7 @@ import common.item.ItemStack; import common.item.StackSize; import common.item.tool.ItemShears; import common.model.Model; -import common.model.ModelProvider; +import common.model.Model.ModelProvider; import common.model.GuiPosition; import common.properties.Property; import common.properties.PropertyEnum; diff --git a/common/src/main/java/common/block/foliage/BlockFarmland.java b/common/src/main/java/common/block/foliage/BlockFarmland.java index a30ab2f0..301e3b13 100755 --- a/common/src/main/java/common/block/foliage/BlockFarmland.java +++ b/common/src/main/java/common/block/foliage/BlockFarmland.java @@ -7,7 +7,7 @@ import common.entity.types.EntityLiving; import common.init.Blocks; import common.item.Item; import common.model.Model; -import common.model.ModelProvider; +import common.model.Model.ModelProvider; import common.properties.Property; import common.properties.PropertyInteger; import common.rng.Random; diff --git a/common/src/main/java/common/block/foliage/BlockFlower.java b/common/src/main/java/common/block/foliage/BlockFlower.java index c218e609..d14ffdce 100755 --- a/common/src/main/java/common/block/foliage/BlockFlower.java +++ b/common/src/main/java/common/block/foliage/BlockFlower.java @@ -3,7 +3,7 @@ package common.block.foliage; import common.block.Block; import common.init.Blocks; import common.model.Model; -import common.model.ModelProvider; +import common.model.Model.ModelProvider; import common.model.GuiPosition; import common.rng.Random; import common.util.BlockPos; diff --git a/common/src/main/java/common/block/foliage/BlockGrass.java b/common/src/main/java/common/block/foliage/BlockGrass.java index 0c84b749..7d0293cf 100755 --- a/common/src/main/java/common/block/foliage/BlockGrass.java +++ b/common/src/main/java/common/block/foliage/BlockGrass.java @@ -6,7 +6,7 @@ import common.init.Blocks; import common.item.CheatTab; import common.item.Item; import common.model.Model; -import common.model.ModelProvider; +import common.model.Model.ModelProvider; import common.properties.Property; import common.properties.PropertyBool; import common.rng.Random; diff --git a/common/src/main/java/common/block/foliage/BlockHugeMushroom.java b/common/src/main/java/common/block/foliage/BlockHugeMushroom.java index ef908761..09eba3cb 100755 --- a/common/src/main/java/common/block/foliage/BlockHugeMushroom.java +++ b/common/src/main/java/common/block/foliage/BlockHugeMushroom.java @@ -4,7 +4,7 @@ import common.block.Block; import common.block.Material; import common.item.Item; import common.model.Model; -import common.model.ModelProvider; +import common.model.Model.ModelProvider; import common.properties.Property; import common.properties.PropertyEnum; import common.rng.Random; diff --git a/common/src/main/java/common/block/foliage/BlockLilyPad.java b/common/src/main/java/common/block/foliage/BlockLilyPad.java index 454e1f66..a0dab4c7 100755 --- a/common/src/main/java/common/block/foliage/BlockLilyPad.java +++ b/common/src/main/java/common/block/foliage/BlockLilyPad.java @@ -15,7 +15,7 @@ import common.item.CheatTab; import common.item.Item; import common.item.ItemStack; import common.model.Model; -import common.model.ModelProvider; +import common.model.Model.ModelProvider; import common.model.ModelRotation; import common.model.GuiPosition; import common.properties.Property; diff --git a/common/src/main/java/common/block/foliage/BlockLog.java b/common/src/main/java/common/block/foliage/BlockLog.java index b210dec0..e4c840c6 100755 --- a/common/src/main/java/common/block/foliage/BlockLog.java +++ b/common/src/main/java/common/block/foliage/BlockLog.java @@ -6,7 +6,7 @@ import common.block.SoundType; import common.entity.types.EntityLiving; import common.item.CheatTab; import common.model.Model; -import common.model.ModelProvider; +import common.model.Model.ModelProvider; import common.model.ModelRotation; import common.properties.Property; import common.util.BlockPos; diff --git a/common/src/main/java/common/block/foliage/BlockMelon.java b/common/src/main/java/common/block/foliage/BlockMelon.java index 473f6cb2..d8ff6551 100755 --- a/common/src/main/java/common/block/foliage/BlockMelon.java +++ b/common/src/main/java/common/block/foliage/BlockMelon.java @@ -6,7 +6,7 @@ import common.init.Items; import common.item.CheatTab; import common.item.Item; import common.model.Model; -import common.model.ModelProvider; +import common.model.Model.ModelProvider; import common.rng.Random; import common.world.State; diff --git a/common/src/main/java/common/block/foliage/BlockMushroom.java b/common/src/main/java/common/block/foliage/BlockMushroom.java index 87e4f250..31190a9c 100755 --- a/common/src/main/java/common/block/foliage/BlockMushroom.java +++ b/common/src/main/java/common/block/foliage/BlockMushroom.java @@ -3,7 +3,7 @@ package common.block.foliage; import common.block.Block; import common.init.Blocks; import common.model.Model; -import common.model.ModelProvider; +import common.model.Model.ModelProvider; import common.model.GuiPosition; import common.rng.Random; import common.util.BlockPos; diff --git a/common/src/main/java/common/block/foliage/BlockMycelium.java b/common/src/main/java/common/block/foliage/BlockMycelium.java index f63ba52c..858ffada 100755 --- a/common/src/main/java/common/block/foliage/BlockMycelium.java +++ b/common/src/main/java/common/block/foliage/BlockMycelium.java @@ -6,7 +6,7 @@ import common.init.Blocks; import common.item.CheatTab; import common.item.Item; import common.model.Model; -import common.model.ModelProvider; +import common.model.Model.ModelProvider; import common.properties.Property; import common.properties.PropertyBool; import common.rng.Random; diff --git a/common/src/main/java/common/block/foliage/BlockPotato.java b/common/src/main/java/common/block/foliage/BlockPotato.java index b4ea2b2a..1a71a608 100755 --- a/common/src/main/java/common/block/foliage/BlockPotato.java +++ b/common/src/main/java/common/block/foliage/BlockPotato.java @@ -4,7 +4,7 @@ import common.init.Items; import common.item.Item; import common.item.ItemStack; import common.model.Model; -import common.model.ModelProvider; +import common.model.Model.ModelProvider; import common.util.BlockPos; import common.world.State; import common.world.World; diff --git a/common/src/main/java/common/block/foliage/BlockPumpkin.java b/common/src/main/java/common/block/foliage/BlockPumpkin.java index 06f7b1af..5508e4b9 100755 --- a/common/src/main/java/common/block/foliage/BlockPumpkin.java +++ b/common/src/main/java/common/block/foliage/BlockPumpkin.java @@ -4,7 +4,7 @@ import common.block.Block; import common.block.Material; import common.item.CheatTab; import common.model.Model; -import common.model.ModelProvider; +import common.model.Model.ModelProvider; import common.util.BlockPos; import common.world.State; import common.world.World; diff --git a/common/src/main/java/common/block/foliage/BlockReed.java b/common/src/main/java/common/block/foliage/BlockReed.java index c4b80d9c..4a68d58c 100755 --- a/common/src/main/java/common/block/foliage/BlockReed.java +++ b/common/src/main/java/common/block/foliage/BlockReed.java @@ -5,7 +5,7 @@ import common.block.Material; import common.init.Blocks; import common.item.StackSize; import common.model.Model; -import common.model.ModelProvider; +import common.model.Model.ModelProvider; import common.model.GuiPosition; import common.properties.Property; import common.properties.PropertyInteger; diff --git a/common/src/main/java/common/block/foliage/BlockSapling.java b/common/src/main/java/common/block/foliage/BlockSapling.java index 6ff24706..8ed53482 100755 --- a/common/src/main/java/common/block/foliage/BlockSapling.java +++ b/common/src/main/java/common/block/foliage/BlockSapling.java @@ -8,7 +8,7 @@ import common.init.Blocks; import common.init.WoodType; import common.item.CheatTab; import common.model.Model; -import common.model.ModelProvider; +import common.model.Model.ModelProvider; import common.model.GuiPosition; import common.properties.Property; import common.properties.PropertyInteger; diff --git a/common/src/main/java/common/block/foliage/BlockStem.java b/common/src/main/java/common/block/foliage/BlockStem.java index 648c7b4d..c353f1c3 100755 --- a/common/src/main/java/common/block/foliage/BlockStem.java +++ b/common/src/main/java/common/block/foliage/BlockStem.java @@ -6,7 +6,7 @@ import common.init.Items; import common.item.CheatTab; import common.item.ItemStack; import common.model.Model; -import common.model.ModelProvider; +import common.model.Model.ModelProvider; import common.properties.Property; import common.properties.PropertyInteger; import common.rng.Random; diff --git a/common/src/main/java/common/block/foliage/BlockSwamp.java b/common/src/main/java/common/block/foliage/BlockSwamp.java index 3b353ca3..593bcf4f 100644 --- a/common/src/main/java/common/block/foliage/BlockSwamp.java +++ b/common/src/main/java/common/block/foliage/BlockSwamp.java @@ -7,7 +7,7 @@ import common.init.Blocks; import common.item.CheatTab; import common.item.Item; import common.model.Model; -import common.model.ModelProvider; +import common.model.Model.ModelProvider; import common.properties.Property; import common.properties.PropertyBool; import common.rng.Random; diff --git a/common/src/main/java/common/block/foliage/BlockTallGrass.java b/common/src/main/java/common/block/foliage/BlockTallGrass.java index 3164e8f0..9aac1611 100755 --- a/common/src/main/java/common/block/foliage/BlockTallGrass.java +++ b/common/src/main/java/common/block/foliage/BlockTallGrass.java @@ -9,7 +9,7 @@ import common.item.Item; import common.item.ItemStack; import common.item.tool.ItemShears; import common.model.Model; -import common.model.ModelProvider; +import common.model.Model.ModelProvider; import common.model.GuiPosition; import common.rng.Random; import common.tileentity.TileEntity; diff --git a/common/src/main/java/common/block/foliage/BlockTianSoil.java b/common/src/main/java/common/block/foliage/BlockTianSoil.java index 7314cae9..11e528fe 100755 --- a/common/src/main/java/common/block/foliage/BlockTianSoil.java +++ b/common/src/main/java/common/block/foliage/BlockTianSoil.java @@ -6,7 +6,7 @@ import common.init.Blocks; import common.item.CheatTab; import common.item.Item; import common.model.Model; -import common.model.ModelProvider; +import common.model.Model.ModelProvider; import common.properties.Property; import common.properties.PropertyBool; import common.rng.Random; diff --git a/common/src/main/java/common/block/foliage/BlockVine.java b/common/src/main/java/common/block/foliage/BlockVine.java index 73090ace..b2c459a8 100755 --- a/common/src/main/java/common/block/foliage/BlockVine.java +++ b/common/src/main/java/common/block/foliage/BlockVine.java @@ -10,7 +10,7 @@ import common.item.Item; import common.item.ItemStack; import common.item.tool.ItemShears; import common.model.Model; -import common.model.ModelProvider; +import common.model.Model.ModelProvider; import common.model.ModelRotation; import common.model.GuiPosition; import common.properties.Property; diff --git a/common/src/main/java/common/block/foliage/BlockWart.java b/common/src/main/java/common/block/foliage/BlockWart.java index c4807d59..69881bc4 100755 --- a/common/src/main/java/common/block/foliage/BlockWart.java +++ b/common/src/main/java/common/block/foliage/BlockWart.java @@ -7,7 +7,7 @@ import common.init.Items; import common.item.CheatTab; import common.item.ItemStack; import common.model.Model; -import common.model.ModelProvider; +import common.model.Model.ModelProvider; import common.properties.Property; import common.properties.PropertyInteger; import common.rng.Random; diff --git a/common/src/main/java/common/block/natural/BlockColoredClay.java b/common/src/main/java/common/block/natural/BlockColoredClay.java index 22a787e1..eea53315 100644 --- a/common/src/main/java/common/block/natural/BlockColoredClay.java +++ b/common/src/main/java/common/block/natural/BlockColoredClay.java @@ -5,7 +5,7 @@ import common.block.Material; import common.color.DyeColor; import common.item.CheatTab; import common.model.Model; -import common.model.ModelProvider; +import common.model.Model.ModelProvider; import common.world.State; public class BlockColoredClay extends Block { diff --git a/common/src/main/java/common/block/natural/BlockFire.java b/common/src/main/java/common/block/natural/BlockFire.java index b23d709e..be4fa03e 100755 --- a/common/src/main/java/common/block/natural/BlockFire.java +++ b/common/src/main/java/common/block/natural/BlockFire.java @@ -7,7 +7,7 @@ import common.block.Material; import common.block.artificial.BlockPortal; import common.init.SoundEvent; import common.model.Model; -import common.model.ModelProvider; +import common.model.Model.ModelProvider; import common.model.ModelRotation; import common.model.TextureAnimation; import common.properties.Property; @@ -437,8 +437,8 @@ public class BlockFire extends Block return new Property[] {AGE, NORTH, EAST, SOUTH, WEST, UPPER, FLIP, ALT}; } - private static Model fire_nsu2_flip(String fire) { - return ModelProvider.getModelProvider().getModel(fire) + private static Model fire_nsu2_flip(Model fire) { + return fire .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() .s().uv(16, 0, 0, 16).noCull() .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() @@ -452,8 +452,8 @@ public class BlockFire extends Block .add(0, 16, 0, 16, 16, 16).noShade().rotate(8, 16, 0, Facing.Axis.X, 22.5f, true) .d().uv(0, 0, 16, 16).noCull(); } - private static Model fire_nu1(String fire) { - return ModelProvider.getModelProvider().getModel(fire) + private static Model fire_nu1(Model fire) { + return fire .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() .s().uv(0, 0, 16, 16).noCull() .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() @@ -463,8 +463,8 @@ public class BlockFire extends Block .add(0, 16, 0, 16, 16, 16).noShade().rotate(0, 16, 8, Facing.Axis.Z, -22.5f, true) .d().uv(0, 0, 16, 16).rot(90).noCull(); } - private static Model fire_nseu2_flip(String fire) { - return ModelProvider.getModelProvider().getModel(fire) + private static Model fire_nseu2_flip(Model fire) { + return fire .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() .s().uv(16, 0, 0, 16).noCull() .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() @@ -482,8 +482,8 @@ public class BlockFire extends Block .add(0, 16, 0, 16, 16, 16).noShade().rotate(8, 16, 0, Facing.Axis.X, 22.5f, true) .d().uv(0, 0, 16, 16).noCull(); } - private static Model fire_neu1_flip(String fire) { - return ModelProvider.getModelProvider().getModel(fire) + private static Model fire_neu1_flip(Model fire) { + return fire .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() .s().uv(16, 0, 0, 16).noCull() .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() @@ -497,8 +497,8 @@ public class BlockFire extends Block .add(0, 16, 0, 16, 16, 16).noShade().rotate(0, 16, 8, Facing.Axis.Z, -22.5f, true) .d().uv(0, 0, 16, 16).rot(90).noCull(); } - private static Model fire_nsu2(String fire) { - return ModelProvider.getModelProvider().getModel(fire) + private static Model fire_nsu2(Model fire) { + return fire .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() .s().uv(0, 0, 16, 16).noCull() .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() @@ -512,8 +512,8 @@ public class BlockFire extends Block .add(0, 16, 0, 16, 16, 16).noShade().rotate(8, 16, 0, Facing.Axis.X, 22.5f, true) .d().uv(0, 0, 16, 16).noCull(); } - private static Model fire_nu2_flip(String fire) { - return ModelProvider.getModelProvider().getModel(fire) + private static Model fire_nu2_flip(Model fire) { + return fire .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() .s().uv(16, 0, 0, 16).noCull() .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() @@ -523,8 +523,8 @@ public class BlockFire extends Block .add(0, 16, 0, 16, 16, 16).noShade().rotate(8, 16, 0, Facing.Axis.X, 22.5f, true) .d().uv(0, 0, 16, 16).noCull(); } - private static Model fire_neu2_flip(String fire) { - return ModelProvider.getModelProvider().getModel(fire) + private static Model fire_neu2_flip(Model fire) { + return fire .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() .s().uv(16, 0, 0, 16).noCull() .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() @@ -538,8 +538,8 @@ public class BlockFire extends Block .add(0, 16, 0, 16, 16, 16).noShade().rotate(8, 16, 0, Facing.Axis.X, 22.5f, true) .d().uv(0, 0, 16, 16).noCull(); } - private static Model fire_nsewu2_flip(String fire) { - return ModelProvider.getModelProvider().getModel(fire) + private static Model fire_nsewu2_flip(Model fire) { + return fire .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() .s().uv(16, 0, 0, 16).noCull() .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() @@ -561,8 +561,8 @@ public class BlockFire extends Block .add(0, 16, 0, 16, 16, 16).noShade().rotate(8, 16, 0, Facing.Axis.X, 22.5f, true) .d().uv(0, 0, 16, 16).noCull(); } - private static Model fire_nsewu2(String fire) { - return ModelProvider.getModelProvider().getModel(fire) + private static Model fire_nsewu2(Model fire) { + return fire .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() .s().uv(0, 0, 16, 16).noCull() .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() @@ -584,8 +584,8 @@ public class BlockFire extends Block .add(0, 16, 0, 16, 16, 16).noShade().rotate(8, 16, 0, Facing.Axis.X, 22.5f, true) .d().uv(0, 0, 16, 16).noCull(); } - private static Model fire_nsew(String fire) { - return ModelProvider.getModelProvider().getModel(fire) + private static Model fire_nsew(Model fire) { + return fire .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() .s().uv(0, 0, 16, 16).noCull() .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() @@ -603,8 +603,8 @@ public class BlockFire extends Block .add(15.99f, 1, 0, 0.01f, 23.4f, 16).noShade() .w().uv(0, 0, 16, 16).noCull(); } - private static Model fire_floor(String fire) { - return ModelProvider.getModelProvider().getModel(fire) + private static Model fire_floor(Model fire) { + return fire .add(0, 0, 8.8f, 16, 22.4f, 8.8f).noShade().rotate(8, 8, 8, Facing.Axis.X, -22.5f, true) .s().uv(0, 0, 16, 16).noCull() .add(0, 0, 7.2f, 16, 22.4f, 7.2f).noShade().rotate(8, 8, 8, Facing.Axis.X, 22.5f, true) @@ -622,22 +622,22 @@ public class BlockFire extends Block .add(15.99f, 0, 0, 15.99f, 22.4f, 16).noShade() .e().uv(0, 0, 16, 16).noCull(); } - private static Model fire_u1(String fire) { - return ModelProvider.getModelProvider().getModel(fire) + private static Model fire_u1(Model fire) { + return fire .add(0, 16, 0, 16, 16, 16).noShade().rotate(16, 16, 8, Facing.Axis.Z, 22.5f, true) .d().uv(0, 0, 16, 16).rot(270).noCull() .add(0, 16, 0, 16, 16, 16).noShade().rotate(0, 16, 8, Facing.Axis.Z, -22.5f, true) .d().uv(0, 0, 16, 16).rot(90).noCull(); } - private static Model fire_n_flip(String fire) { - return ModelProvider.getModelProvider().getModel(fire) + private static Model fire_n_flip(Model fire) { + return fire .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() .s().uv(16, 0, 0, 16).noCull() .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() .n().uv(16, 0, 0, 16).noCull(); } - private static Model fire_ne(String fire) { - return ModelProvider.getModelProvider().getModel(fire) + private static Model fire_ne(Model fire) { + return fire .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() .s().uv(0, 0, 16, 16).noCull() .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() @@ -647,8 +647,8 @@ public class BlockFire extends Block .add(15.99f, 1, 0, 15.99f, 23.4f, 16).noShade() .w().uv(0, 0, 16, 16).noCull(); } - private static Model fire_nsew_flip(String fire) { - return ModelProvider.getModelProvider().getModel(fire) + private static Model fire_nsew_flip(Model fire) { + return fire .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() .s().uv(16, 0, 0, 16).noCull() .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() @@ -666,8 +666,8 @@ public class BlockFire extends Block .add(15.99f, 1, 0, 0.01f, 23.4f, 16).noShade() .w().uv(16, 0, 0, 16).noCull(); } - private static Model fire_nse(String fire) { - return ModelProvider.getModelProvider().getModel(fire) + private static Model fire_nse(Model fire) { + return fire .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() .s().uv(0, 0, 16, 16).noCull() .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() @@ -681,8 +681,8 @@ public class BlockFire extends Block .add(15.99f, 1, 0, 15.99f, 23.4f, 16).noShade() .w().uv(0, 0, 16, 16).noCull(); } - private static Model fire_nse_flip(String fire) { - return ModelProvider.getModelProvider().getModel(fire) + private static Model fire_nse_flip(Model fire) { + return fire .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() .s().uv(16, 0, 0, 16).noCull() .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() @@ -696,8 +696,8 @@ public class BlockFire extends Block .add(15.99f, 1, 0, 15.99f, 23.4f, 16).noShade() .w().uv(16, 0, 0, 16).noCull(); } - private static Model fire_nsu1_flip(String fire) { - return ModelProvider.getModelProvider().getModel(fire) + private static Model fire_nsu1_flip(Model fire) { + return fire .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() .s().uv(16, 0, 0, 16).noCull() .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() @@ -711,15 +711,15 @@ public class BlockFire extends Block .add(0, 16, 0, 16, 16, 16).noShade().rotate(0, 16, 8, Facing.Axis.Z, -22.5f, true) .d().uv(0, 0, 16, 16).rot(90).noCull(); } - private static Model fire_n(String fire) { - return ModelProvider.getModelProvider().getModel(fire) + private static Model fire_n(Model fire) { + return fire .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() .s().uv(0, 0, 16, 16).noCull() .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() .n().uv(0, 0, 16, 16).noCull(); } - private static Model fire_ns(String fire) { - return ModelProvider.getModelProvider().getModel(fire) + private static Model fire_ns(Model fire) { + return fire .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() .s().uv(0, 0, 16, 16).noCull() .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() @@ -729,8 +729,8 @@ public class BlockFire extends Block .add(0, 1, 15.99f, 16, 23.4f, 15.99f).noShade() .n().uv(0, 0, 16, 16).noCull(); } - private static Model fire_neu1(String fire) { - return ModelProvider.getModelProvider().getModel(fire) + private static Model fire_neu1(Model fire) { + return fire .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() .s().uv(0, 0, 16, 16).noCull() .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() @@ -744,15 +744,15 @@ public class BlockFire extends Block .add(0, 16, 0, 16, 16, 16).noShade().rotate(0, 16, 8, Facing.Axis.Z, -22.5f, true) .d().uv(0, 0, 16, 16).rot(90).noCull(); } - private static Model fire_u2(String fire) { - return ModelProvider.getModelProvider().getModel(fire) + private static Model fire_u2(Model fire) { + return fire .add(0, 16, 0, 16, 16, 16).noShade().rotate(8, 16, 16, Facing.Axis.X, -22.5f, true) .d().uv(0, 0, 16, 16).rot(180).noCull() .add(0, 16, 0, 16, 16, 16).noShade().rotate(8, 16, 0, Facing.Axis.X, 22.5f, true) .d().uv(0, 0, 16, 16).noCull(); } - private static Model fire_nseu2(String fire) { - return ModelProvider.getModelProvider().getModel(fire) + private static Model fire_nseu2(Model fire) { + return fire .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() .s().uv(0, 0, 16, 16).noCull() .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() @@ -770,8 +770,8 @@ public class BlockFire extends Block .add(0, 16, 0, 16, 16, 16).noShade().rotate(8, 16, 0, Facing.Axis.X, 22.5f, true) .d().uv(0, 0, 16, 16).noCull(); } - private static Model fire_neu2(String fire) { - return ModelProvider.getModelProvider().getModel(fire) + private static Model fire_neu2(Model fire) { + return fire .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() .s().uv(0, 0, 16, 16).noCull() .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() @@ -785,8 +785,8 @@ public class BlockFire extends Block .add(0, 16, 0, 16, 16, 16).noShade().rotate(8, 16, 0, Facing.Axis.X, 22.5f, true) .d().uv(0, 0, 16, 16).noCull(); } - private static Model fire_nu2(String fire) { - return ModelProvider.getModelProvider().getModel(fire) + private static Model fire_nu2(Model fire) { + return fire .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() .s().uv(0, 0, 16, 16).noCull() .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() @@ -796,8 +796,8 @@ public class BlockFire extends Block .add(0, 16, 0, 16, 16, 16).noShade().rotate(8, 16, 0, Facing.Axis.X, 22.5f, true) .d().uv(0, 0, 16, 16).noCull(); } - private static Model fire_nseu1(String fire) { - return ModelProvider.getModelProvider().getModel(fire) + private static Model fire_nseu1(Model fire) { + return fire .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() .s().uv(0, 0, 16, 16).noCull() .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() @@ -815,8 +815,8 @@ public class BlockFire extends Block .add(0, 16, 0, 16, 16, 16).noShade().rotate(0, 16, 8, Facing.Axis.Z, -22.5f, true) .d().uv(0, 0, 16, 16).rot(90).noCull(); } - private static Model fire_ns_flip(String fire) { - return ModelProvider.getModelProvider().getModel(fire) + private static Model fire_ns_flip(Model fire) { + return fire .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() .s().uv(16, 0, 0, 16).noCull() .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() @@ -826,8 +826,8 @@ public class BlockFire extends Block .add(0, 1, 15.99f, 16, 23.4f, 15.99f).noShade() .n().uv(16, 0, 0, 16).noCull(); } - private static Model fire_nsewu1(String fire) { - return ModelProvider.getModelProvider().getModel(fire) + private static Model fire_nsewu1(Model fire) { + return fire .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() .s().uv(0, 0, 16, 16).noCull() .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() @@ -849,8 +849,8 @@ public class BlockFire extends Block .add(0, 16, 0, 16, 16, 16).noShade().rotate(0, 16, 8, Facing.Axis.Z, -22.5f, true) .d().uv(0, 0, 16, 16).rot(90).noCull(); } - private static Model fire_nsu1(String fire) { - return ModelProvider.getModelProvider().getModel(fire) + private static Model fire_nsu1(Model fire) { + return fire .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() .s().uv(0, 0, 16, 16).noCull() .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() @@ -864,8 +864,8 @@ public class BlockFire extends Block .add(0, 16, 0, 16, 16, 16).noShade().rotate(0, 16, 8, Facing.Axis.Z, -22.5f, true) .d().uv(0, 0, 16, 16).rot(90).noCull(); } - private static Model fire_nsewu1_flip(String fire) { - return ModelProvider.getModelProvider().getModel(fire) + private static Model fire_nsewu1_flip(Model fire) { + return fire .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() .s().uv(16, 0, 0, 16).noCull() .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() @@ -887,8 +887,8 @@ public class BlockFire extends Block .add(0, 16, 0, 16, 16, 16).noShade().rotate(0, 16, 8, Facing.Axis.Z, -22.5f, true) .d().uv(0, 0, 16, 16).rot(90).noCull(); } - private static Model fire_ne_flip(String fire) { - return ModelProvider.getModelProvider().getModel(fire) + private static Model fire_ne_flip(Model fire) { + return fire .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() .s().uv(16, 0, 0, 16).noCull() .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() @@ -898,8 +898,8 @@ public class BlockFire extends Block .add(15.99f, 1, 0, 15.99f, 23.4f, 16).noShade() .w().uv(16, 0, 0, 16).noCull(); } - private static Model fire_nseu1_flip(String fire) { - return ModelProvider.getModelProvider().getModel(fire) + private static Model fire_nseu1_flip(Model fire) { + return fire .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() .s().uv(16, 0, 0, 16).noCull() .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() @@ -917,205 +917,205 @@ public class BlockFire extends Block .add(0, 16, 0, 16, 16, 16).noShade().rotate(0, 16, 8, Facing.Axis.Z, -22.5f, true) .d().uv(0, 0, 16, 16).rot(90).noCull(); } - protected static Model getFireModel(String tex, boolean flip, int upper, boolean n, boolean s, boolean w, boolean e) { + protected static Model getFireModel(Model model, boolean flip, int upper, boolean n, boolean s, boolean w, boolean e) { if(!e && !flip && !n && !s && upper == 0 && !w) - return fire_floor(tex); + return fire_floor(model); else if(!e && !flip && !n && s && upper == 0 && !w) - return fire_n(tex).rotate(ModelRotation.X0_Y180); + return fire_n(model).rotate(ModelRotation.X0_Y180); else if(!e && !flip && !n && !s && upper == 0 && w) - return fire_n(tex).rotate(ModelRotation.X0_Y270); + return fire_n(model).rotate(ModelRotation.X0_Y270); else if(!e && !flip && n && !s && upper == 0 && !w) - return fire_n(tex); + return fire_n(model); else if(e && !flip && !n && !s && upper == 0 && !w) - return fire_n(tex).rotate(ModelRotation.X0_Y90); + return fire_n(model).rotate(ModelRotation.X0_Y90); else if(e && !flip && n && !s && upper == 0 && !w) - return fire_ne(tex); + return fire_ne(model); else if(e && !flip && !n && s && upper == 0 && !w) - return fire_ne(tex).rotate(ModelRotation.X0_Y90); + return fire_ne(model).rotate(ModelRotation.X0_Y90); else if(!e && !flip && !n && s && upper == 0 && w) - return fire_ne(tex).rotate(ModelRotation.X0_Y180); + return fire_ne(model).rotate(ModelRotation.X0_Y180); else if(!e && !flip && n && !s && upper == 0 && w) - return fire_ne(tex).rotate(ModelRotation.X0_Y270); + return fire_ne(model).rotate(ModelRotation.X0_Y270); else if(!e && !flip && n && s && upper == 0 && !w) - return fire_ns(tex); + return fire_ns(model); else if(e && !flip && !n && !s && upper == 0 && w) - return fire_ns(tex).rotate(ModelRotation.X0_Y90); + return fire_ns(model).rotate(ModelRotation.X0_Y90); else if(e && !flip && n && s && upper == 0 && !w) - return fire_nse(tex); + return fire_nse(model); else if(e && !flip && !n && s && upper == 0 && w) - return fire_nse(tex).rotate(ModelRotation.X0_Y90); + return fire_nse(model).rotate(ModelRotation.X0_Y90); else if(!e && !flip && n && s && upper == 0 && w) - return fire_nse(tex).rotate(ModelRotation.X0_Y180); + return fire_nse(model).rotate(ModelRotation.X0_Y180); else if(e && !flip && n && !s && upper == 0 && w) - return fire_nse(tex).rotate(ModelRotation.X0_Y270); + return fire_nse(model).rotate(ModelRotation.X0_Y270); else if(e && !flip && n && s && upper == 0 && w) - return fire_nsew(tex); + return fire_nsew(model); else if(!e && !flip && !n && !s && upper == 1 && !w) - return fire_u1(tex); + return fire_u1(model); else if(!e && !flip && !n && s && upper == 1 && !w) - return fire_nu1(tex).rotate(ModelRotation.X0_Y180); + return fire_nu1(model).rotate(ModelRotation.X0_Y180); else if(!e && !flip && !n && !s && upper == 1 && w) - return fire_nu1(tex).rotate(ModelRotation.X0_Y270); + return fire_nu1(model).rotate(ModelRotation.X0_Y270); else if(!e && !flip && n && !s && upper == 1 && !w) - return fire_nu1(tex); + return fire_nu1(model); else if(e && !flip && !n && !s && upper == 1 && !w) - return fire_nu1(tex).rotate(ModelRotation.X0_Y90); + return fire_nu1(model).rotate(ModelRotation.X0_Y90); else if(e && !flip && n && !s && upper == 1 && !w) - return fire_neu1(tex); + return fire_neu1(model); else if(e && !flip && !n && s && upper == 1 && !w) - return fire_neu1(tex).rotate(ModelRotation.X0_Y90); + return fire_neu1(model).rotate(ModelRotation.X0_Y90); else if(!e && !flip && !n && s && upper == 1 && w) - return fire_neu1(tex).rotate(ModelRotation.X0_Y180); + return fire_neu1(model).rotate(ModelRotation.X0_Y180); else if(!e && !flip && n && !s && upper == 1 && w) - return fire_neu1(tex).rotate(ModelRotation.X0_Y270); + return fire_neu1(model).rotate(ModelRotation.X0_Y270); else if(!e && !flip && n && s && upper == 1 && !w) - return fire_nsu1(tex); + return fire_nsu1(model); else if(e && !flip && !n && !s && upper == 1 && w) - return fire_nsu1(tex).rotate(ModelRotation.X0_Y90); + return fire_nsu1(model).rotate(ModelRotation.X0_Y90); else if(e && !flip && n && s && upper == 1 && !w) - return fire_nseu1(tex); + return fire_nseu1(model); else if(e && !flip && !n && s && upper == 1 && w) - return fire_nseu1(tex).rotate(ModelRotation.X0_Y90); + return fire_nseu1(model).rotate(ModelRotation.X0_Y90); else if(!e && !flip && n && s && upper == 1 && w) - return fire_nseu1(tex).rotate(ModelRotation.X0_Y180); + return fire_nseu1(model).rotate(ModelRotation.X0_Y180); else if(e && !flip && n && !s && upper == 1 && w) - return fire_nseu1(tex).rotate(ModelRotation.X0_Y270); + return fire_nseu1(model).rotate(ModelRotation.X0_Y270); else if(e && !flip && n && s && upper == 1 && w) - return fire_nsewu1(tex); + return fire_nsewu1(model); else if(!e && !flip && !n && !s && upper == 2 && !w) - return fire_u2(tex); + return fire_u2(model); else if(!e && !flip && !n && s && upper == 2 && !w) - return fire_nu2(tex).rotate(ModelRotation.X0_Y180); + return fire_nu2(model).rotate(ModelRotation.X0_Y180); else if(!e && !flip && !n && !s && upper == 2 && w) - return fire_nu2(tex).rotate(ModelRotation.X0_Y270); + return fire_nu2(model).rotate(ModelRotation.X0_Y270); else if(!e && !flip && n && !s && upper == 2 && !w) - return fire_nu2(tex); + return fire_nu2(model); else if(e && !flip && !n && !s && upper == 2 && !w) - return fire_nu2(tex).rotate(ModelRotation.X0_Y90); + return fire_nu2(model).rotate(ModelRotation.X0_Y90); else if(e && !flip && n && !s && upper == 2 && !w) - return fire_neu2(tex); + return fire_neu2(model); else if(e && !flip && !n && s && upper == 2 && !w) - return fire_neu2(tex).rotate(ModelRotation.X0_Y90); + return fire_neu2(model).rotate(ModelRotation.X0_Y90); else if(!e && !flip && !n && s && upper == 2 && w) - return fire_neu2(tex).rotate(ModelRotation.X0_Y180); + return fire_neu2(model).rotate(ModelRotation.X0_Y180); else if(!e && !flip && n && !s && upper == 2 && w) - return fire_neu2(tex).rotate(ModelRotation.X0_Y270); + return fire_neu2(model).rotate(ModelRotation.X0_Y270); else if(!e && !flip && n && s && upper == 2 && !w) - return fire_nsu2(tex); + return fire_nsu2(model); else if(e && !flip && !n && !s && upper == 2 && w) - return fire_nsu2(tex).rotate(ModelRotation.X0_Y90); + return fire_nsu2(model).rotate(ModelRotation.X0_Y90); else if(e && !flip && n && s && upper == 2 && !w) - return fire_nseu2(tex); + return fire_nseu2(model); else if(e && !flip && !n && s && upper == 2 && w) - return fire_nseu2(tex).rotate(ModelRotation.X0_Y90); + return fire_nseu2(model).rotate(ModelRotation.X0_Y90); else if(!e && !flip && n && s && upper == 2 && w) - return fire_nseu2(tex).rotate(ModelRotation.X0_Y180); + return fire_nseu2(model).rotate(ModelRotation.X0_Y180); else if(e && !flip && n && !s && upper == 2 && w) - return fire_nseu2(tex).rotate(ModelRotation.X0_Y270); + return fire_nseu2(model).rotate(ModelRotation.X0_Y270); else if(e && !flip && n && s && upper == 2 && w) - return fire_nsewu2(tex); + return fire_nsewu2(model); else if(!e && flip && !n && !s && upper == 0 && !w) - return fire_floor(tex); + return fire_floor(model); else if(!e && flip && !n && s && upper == 0 && !w) - return fire_n_flip(tex).rotate(ModelRotation.X0_Y180); + return fire_n_flip(model).rotate(ModelRotation.X0_Y180); else if(!e && flip && !n && !s && upper == 0 && w) - return fire_n_flip(tex).rotate(ModelRotation.X0_Y270); + return fire_n_flip(model).rotate(ModelRotation.X0_Y270); else if(!e && flip && n && !s && upper == 0 && !w) - return fire_n_flip(tex); + return fire_n_flip(model); else if(e && flip && !n && !s && upper == 0 && !w) - return fire_n_flip(tex).rotate(ModelRotation.X0_Y90); + return fire_n_flip(model).rotate(ModelRotation.X0_Y90); else if(e && flip && n && !s && upper == 0 && !w) - return fire_ne_flip(tex); + return fire_ne_flip(model); else if(e && flip && !n && s && upper == 0 && !w) - return fire_ne_flip(tex).rotate(ModelRotation.X0_Y90); + return fire_ne_flip(model).rotate(ModelRotation.X0_Y90); else if(!e && flip && !n && s && upper == 0 && w) - return fire_ne_flip(tex).rotate(ModelRotation.X0_Y180); + return fire_ne_flip(model).rotate(ModelRotation.X0_Y180); else if(!e && flip && n && !s && upper == 0 && w) - return fire_ne_flip(tex).rotate(ModelRotation.X0_Y270); + return fire_ne_flip(model).rotate(ModelRotation.X0_Y270); else if(!e && flip && n && s && upper == 0 && !w) - return fire_ns_flip(tex); + return fire_ns_flip(model); else if(e && flip && !n && !s && upper == 0 && w) - return fire_ns_flip(tex).rotate(ModelRotation.X0_Y90); + return fire_ns_flip(model).rotate(ModelRotation.X0_Y90); else if(e && flip && n && s && upper == 0 && !w) - return fire_nse_flip(tex); + return fire_nse_flip(model); else if(e && flip && !n && s && upper == 0 && w) - return fire_nse_flip(tex).rotate(ModelRotation.X0_Y90); + return fire_nse_flip(model).rotate(ModelRotation.X0_Y90); else if(!e && flip && n && s && upper == 0 && w) - return fire_nse_flip(tex).rotate(ModelRotation.X0_Y180); + return fire_nse_flip(model).rotate(ModelRotation.X0_Y180); else if(e && flip && n && !s && upper == 0 && w) - return fire_nse_flip(tex).rotate(ModelRotation.X0_Y270); + return fire_nse_flip(model).rotate(ModelRotation.X0_Y270); else if(e && flip && n && s && upper == 0 && w) - return fire_nsew_flip(tex); + return fire_nsew_flip(model); else if(!e && flip && !n && !s && upper == 1 && !w) - return fire_u1(tex); + return fire_u1(model); else if(!e && flip && !n && s && upper == 1 && !w) - return fire_u2(tex).rotate(ModelRotation.X0_Y180); // fire_nu1_flip + return fire_u2(model).rotate(ModelRotation.X0_Y180); // fire_nu1_flip else if(!e && flip && !n && !s && upper == 1 && w) - return fire_u2(tex).rotate(ModelRotation.X0_Y270); // fire_nu1_flip + return fire_u2(model).rotate(ModelRotation.X0_Y270); // fire_nu1_flip else if(!e && flip && n && !s && upper == 1 && !w) - return fire_u2(tex); // fire_nu1_flip + return fire_u2(model); // fire_nu1_flip else if(e && flip && !n && !s && upper == 1 && !w) - return fire_u2(tex).rotate(ModelRotation.X0_Y90); // fire_nu1_flip + return fire_u2(model).rotate(ModelRotation.X0_Y90); // fire_nu1_flip else if(e && flip && n && !s && upper == 1 && !w) - return fire_neu1_flip(tex); + return fire_neu1_flip(model); else if(e && flip && !n && s && upper == 1 && !w) - return fire_neu1_flip(tex).rotate(ModelRotation.X0_Y90); + return fire_neu1_flip(model).rotate(ModelRotation.X0_Y90); else if(!e && flip && !n && s && upper == 1 && w) - return fire_neu1_flip(tex).rotate(ModelRotation.X0_Y180); + return fire_neu1_flip(model).rotate(ModelRotation.X0_Y180); else if(!e && flip && n && !s && upper == 1 && w) - return fire_neu1_flip(tex).rotate(ModelRotation.X0_Y270); + return fire_neu1_flip(model).rotate(ModelRotation.X0_Y270); else if(!e && flip && n && s && upper == 1 && !w) - return fire_nsu1_flip(tex); + return fire_nsu1_flip(model); else if(e && flip && !n && !s && upper == 1 && w) - return fire_nsu1_flip(tex).rotate(ModelRotation.X0_Y90); + return fire_nsu1_flip(model).rotate(ModelRotation.X0_Y90); else if(e && flip && n && s && upper == 1 && !w) - return fire_nseu1_flip(tex); + return fire_nseu1_flip(model); else if(e && flip && !n && s && upper == 1 && w) - return fire_nseu1_flip(tex).rotate(ModelRotation.X0_Y90); + return fire_nseu1_flip(model).rotate(ModelRotation.X0_Y90); else if(!e && flip && n && s && upper == 1 && w) - return fire_nseu1_flip(tex).rotate(ModelRotation.X0_Y180); + return fire_nseu1_flip(model).rotate(ModelRotation.X0_Y180); else if(e && flip && n && !s && upper == 1 && w) - return fire_nseu1_flip(tex).rotate(ModelRotation.X0_Y270); + return fire_nseu1_flip(model).rotate(ModelRotation.X0_Y270); else if(e && flip && n && s && upper == 1 && w) - return fire_nsewu1_flip(tex); + return fire_nsewu1_flip(model); else if(!e && flip && !n && !s && upper == 2 && !w) - return fire_u2(tex); + return fire_u2(model); else if(!e && flip && !n && s && upper == 2 && !w) - return fire_nu2_flip(tex).rotate(ModelRotation.X0_Y180); + return fire_nu2_flip(model).rotate(ModelRotation.X0_Y180); else if(!e && flip && !n && !s && upper == 2 && w) - return fire_nu2_flip(tex).rotate(ModelRotation.X0_Y270); + return fire_nu2_flip(model).rotate(ModelRotation.X0_Y270); else if(!e && flip && n && !s && upper == 2 && !w) - return fire_nu2_flip(tex); + return fire_nu2_flip(model); else if(e && flip && !n && !s && upper == 2 && !w) - return fire_nu2_flip(tex).rotate(ModelRotation.X0_Y90); + return fire_nu2_flip(model).rotate(ModelRotation.X0_Y90); else if(e && flip && n && !s && upper == 2 && !w) - return fire_neu2_flip(tex); + return fire_neu2_flip(model); else if(e && flip && !n && s && upper == 2 && !w) - return fire_neu2_flip(tex).rotate(ModelRotation.X0_Y90); + return fire_neu2_flip(model).rotate(ModelRotation.X0_Y90); else if(!e && flip && !n && s && upper == 2 && w) - return fire_neu2_flip(tex).rotate(ModelRotation.X0_Y180); + return fire_neu2_flip(model).rotate(ModelRotation.X0_Y180); else if(!e && flip && n && !s && upper == 2 && w) - return fire_neu2_flip(tex).rotate(ModelRotation.X0_Y270); + return fire_neu2_flip(model).rotate(ModelRotation.X0_Y270); else if(!e && flip && n && s && upper == 2 && !w) - return fire_nsu2_flip(tex); + return fire_nsu2_flip(model); else if(e && flip && !n && !s && upper == 2 && w) - return fire_nsu2_flip(tex).rotate(ModelRotation.X0_Y90); + return fire_nsu2_flip(model).rotate(ModelRotation.X0_Y90); else if(e && flip && n && s && upper == 2 && !w) - return fire_nseu2_flip(tex); + return fire_nseu2_flip(model); else if(e && flip && !n && s && upper == 2 && w) - return fire_nseu2_flip(tex).rotate(ModelRotation.X0_Y90); + return fire_nseu2_flip(model).rotate(ModelRotation.X0_Y90); else if(!e && flip && n && s && upper == 2 && w) - return fire_nseu2_flip(tex).rotate(ModelRotation.X0_Y180); + return fire_nseu2_flip(model).rotate(ModelRotation.X0_Y180); else if(e && flip && n && !s && upper == 2 && w) - return fire_nseu2_flip(tex).rotate(ModelRotation.X0_Y270); + return fire_nseu2_flip(model).rotate(ModelRotation.X0_Y270); else if(e && flip && n && s && upper == 2 && w) - return fire_nsewu2_flip(tex); + return fire_nsewu2_flip(model); else - return fire_floor(tex); + return fire_floor(model); } public Model getModel(ModelProvider provider, String name, State state) { - return getFireModel(state.getValue(ALT) ? name + "_layer_1" : name + "_layer_0", state.getValue(FLIP), state.getValue(UPPER), + return getFireModel(provider.getModel(state.getValue(ALT) ? name + "_layer_1" : name + "_layer_0"), state.getValue(FLIP), state.getValue(UPPER), state.getValue(NORTH), state.getValue(SOUTH), state.getValue(WEST), state.getValue(EAST)); } diff --git a/common/src/main/java/common/block/natural/BlockPodzol.java b/common/src/main/java/common/block/natural/BlockPodzol.java index e54dbe45..f569f8ae 100644 --- a/common/src/main/java/common/block/natural/BlockPodzol.java +++ b/common/src/main/java/common/block/natural/BlockPodzol.java @@ -7,7 +7,7 @@ import common.init.Items; import common.item.CheatTab; import common.item.Item; import common.model.Model; -import common.model.ModelProvider; +import common.model.Model.ModelProvider; import common.properties.Property; import common.properties.PropertyBool; import common.rng.Random; diff --git a/common/src/main/java/common/block/natural/BlockSandStone.java b/common/src/main/java/common/block/natural/BlockSandStone.java index 317d020a..c2fd0d88 100755 --- a/common/src/main/java/common/block/natural/BlockSandStone.java +++ b/common/src/main/java/common/block/natural/BlockSandStone.java @@ -4,7 +4,7 @@ import common.block.Block; import common.block.Material; import common.item.CheatTab; import common.model.Model; -import common.model.ModelProvider; +import common.model.Model.ModelProvider; import common.world.State; public class BlockSandStone extends Block { diff --git a/common/src/main/java/common/block/natural/BlockSnow.java b/common/src/main/java/common/block/natural/BlockSnow.java index 652b449e..b284e6a9 100755 --- a/common/src/main/java/common/block/natural/BlockSnow.java +++ b/common/src/main/java/common/block/natural/BlockSnow.java @@ -9,7 +9,7 @@ import common.item.CheatTab; import common.item.Item; import common.item.ItemStack; import common.model.Model; -import common.model.ModelProvider; +import common.model.Model.ModelProvider; import common.properties.Property; import common.properties.PropertyInteger; import common.rng.Random; diff --git a/common/src/main/java/common/block/natural/BlockWeb.java b/common/src/main/java/common/block/natural/BlockWeb.java index 576c734f..978d1268 100755 --- a/common/src/main/java/common/block/natural/BlockWeb.java +++ b/common/src/main/java/common/block/natural/BlockWeb.java @@ -7,7 +7,7 @@ import common.init.Items; import common.item.CheatTab; import common.item.Item; import common.model.Model; -import common.model.ModelProvider; +import common.model.Model.ModelProvider; import common.model.GuiPosition; import common.rng.Random; import common.util.BlockPos; diff --git a/common/src/main/java/common/block/tech/BlockAnvil.java b/common/src/main/java/common/block/tech/BlockAnvil.java index 83c1e13d..8904383a 100755 --- a/common/src/main/java/common/block/tech/BlockAnvil.java +++ b/common/src/main/java/common/block/tech/BlockAnvil.java @@ -12,7 +12,7 @@ import common.inventory.ContainerRepair; import common.inventory.InventoryPlayer; import common.item.CheatTab; import common.model.Model; -import common.model.ModelProvider; +import common.model.Model.ModelProvider; import common.model.ModelRotation; import common.properties.Property; import common.util.BlockPos; diff --git a/common/src/main/java/common/block/tech/BlockBasePressurePlate.java b/common/src/main/java/common/block/tech/BlockBasePressurePlate.java index 18821790..aef7f166 100755 --- a/common/src/main/java/common/block/tech/BlockBasePressurePlate.java +++ b/common/src/main/java/common/block/tech/BlockBasePressurePlate.java @@ -7,7 +7,7 @@ import common.entity.Entity; import common.init.SoundEvent; import common.item.CheatTab; import common.model.Model; -import common.model.ModelProvider; +import common.model.Model.ModelProvider; import common.model.GuiPosition; import common.rng.Random; import common.util.BlockPos; diff --git a/common/src/main/java/common/block/tech/BlockBrewingStand.java b/common/src/main/java/common/block/tech/BlockBrewingStand.java index 62601901..0527d351 100755 --- a/common/src/main/java/common/block/tech/BlockBrewingStand.java +++ b/common/src/main/java/common/block/tech/BlockBrewingStand.java @@ -8,9 +8,7 @@ import common.block.Material; import common.entity.Entity; import common.entity.npc.EntityNPC; import common.model.Model; -import common.model.ModelProvider; -import common.properties.Property; -import common.properties.PropertyBool; +import common.model.Model.ModelProvider; import common.rng.Random; import common.tileentity.TileEntity; import common.tileentity.TileEntityBrewingStand; @@ -25,342 +23,11 @@ import common.world.AWorldServer; public class BlockBrewingStand extends Block implements ITileEntityProvider { - private static final Model brewing_stand_bottles_2 = ModelProvider.getModelProvider().getModel("brewing_stand") - .add(7, 0, 7, 9, 14, 9) - .d().uv(7, 7, 9, 9).noCull() - .u().uv(7, 7, 9, 9).noCull() - .n().uv(7, 2, 9, 16).noCull() - .s().uv(7, 2, 9, 16).noCull() - .w().uv(7, 2, 9, 16).noCull() - .e().uv(7, 2, 9, 16).noCull() - .add(9, 0, 5, 15, 2, 11) - .d("brewing_stand_base").uv(9, 5, 15, 11).noCull() - .u("brewing_stand_base").uv(9, 5, 15, 11).noCull() - .n("brewing_stand_base").uv(9, 14, 15, 16).noCull() - .s("brewing_stand_base").uv(9, 14, 15, 16).noCull() - .w("brewing_stand_base").uv(5, 14, 11, 16).noCull() - .e("brewing_stand_base").uv(5, 14, 11, 16).noCull() - .add(2, 0, 1, 8, 2, 7) - .d("brewing_stand_base").uv(2, 1, 8, 7).noCull() - .u("brewing_stand_base").uv(2, 1, 8, 7).noCull() - .n("brewing_stand_base").uv(2, 14, 8, 16).noCull() - .s("brewing_stand_base").uv(2, 14, 8, 16).noCull() - .w("brewing_stand_base").uv(1, 14, 7, 16).noCull() - .e("brewing_stand_base").uv(1, 14, 7, 16).noCull() - .add(2, 0, 9, 8, 2, 15) - .d("brewing_stand_base").uv(2, 9, 8, 15).noCull() - .u("brewing_stand_base").uv(2, 9, 8, 15).noCull() - .n("brewing_stand_base").uv(2, 14, 8, 16).noCull() - .s("brewing_stand_base").uv(2, 14, 8, 16).noCull() - .w("brewing_stand_base").uv(9, 14, 15, 16).noCull() - .e("brewing_stand_base").uv(9, 14, 15, 16).noCull() - .add(8, 0, 8, 16, 16, 8) - .n().uv(16, 0, 8, 16).noCull() - .s().uv(8, 0, 16, 16).noCull() - .add(0, 0, 8, 8, 16, 8).rotate(8, 8, 8, Facing.Axis.Y, 45, true) - .n().uv(8, 0, 16, 16).noCull() - .s().uv(16, 0, 8, 16).noCull() - .add(0, 0, 8, 8, 16, 8).rotate(8, 8, 8, Facing.Axis.Y, -45, true) - .n().uv(8, 0, 0, 16).noCull() - .s().uv(0, 0, 8, 16).noCull() - ; - private static final Model brewing_stand_bottles_123 = ModelProvider.getModelProvider().getModel("brewing_stand") - .add(7, 0, 7, 9, 14, 9) - .d().uv(7, 7, 9, 9).noCull() - .u().uv(7, 7, 9, 9).noCull() - .n().uv(7, 2, 9, 16).noCull() - .s().uv(7, 2, 9, 16).noCull() - .w().uv(7, 2, 9, 16).noCull() - .e().uv(7, 2, 9, 16).noCull() - .add(9, 0, 5, 15, 2, 11) - .d("brewing_stand_base").uv(9, 5, 15, 11).noCull() - .u("brewing_stand_base").uv(9, 5, 15, 11).noCull() - .n("brewing_stand_base").uv(9, 14, 15, 16).noCull() - .s("brewing_stand_base").uv(9, 14, 15, 16).noCull() - .w("brewing_stand_base").uv(5, 14, 11, 16).noCull() - .e("brewing_stand_base").uv(5, 14, 11, 16).noCull() - .add(2, 0, 1, 8, 2, 7) - .d("brewing_stand_base").uv(2, 1, 8, 7).noCull() - .u("brewing_stand_base").uv(2, 1, 8, 7).noCull() - .n("brewing_stand_base").uv(2, 14, 8, 16).noCull() - .s("brewing_stand_base").uv(2, 14, 8, 16).noCull() - .w("brewing_stand_base").uv(1, 14, 7, 16).noCull() - .e("brewing_stand_base").uv(1, 14, 7, 16).noCull() - .add(2, 0, 9, 8, 2, 15) - .d("brewing_stand_base").uv(2, 9, 8, 15).noCull() - .u("brewing_stand_base").uv(2, 9, 8, 15).noCull() - .n("brewing_stand_base").uv(2, 14, 8, 16).noCull() - .s("brewing_stand_base").uv(2, 14, 8, 16).noCull() - .w("brewing_stand_base").uv(9, 14, 15, 16).noCull() - .e("brewing_stand_base").uv(9, 14, 15, 16).noCull() - .add(8, 0, 8, 16, 16, 8) - .n().uv(0, 0, 8, 16).noCull() - .s().uv(8, 0, 0, 16).noCull() - .add(0, 0, 8, 8, 16, 8).rotate(8, 8, 8, Facing.Axis.Y, 45, true) - .n().uv(8, 0, 0, 16).noCull() - .s().uv(0, 0, 8, 16).noCull() - .add(0, 0, 8, 8, 16, 8).rotate(8, 8, 8, Facing.Axis.Y, -45, true) - .n().uv(8, 0, 0, 16).noCull() - .s().uv(0, 0, 8, 16).noCull() - ; - private static final Model brewing_stand_empty = ModelProvider.getModelProvider().getModel("brewing_stand") - .add(7, 0, 7, 9, 14, 9) - .d().uv(7, 7, 9, 9).noCull() - .u().uv(7, 7, 9, 9).noCull() - .n().uv(7, 2, 9, 16).noCull() - .s().uv(7, 2, 9, 16).noCull() - .w().uv(7, 2, 9, 16).noCull() - .e().uv(7, 2, 9, 16).noCull() - .add(9, 0, 5, 15, 2, 11) - .d("brewing_stand_base").uv(9, 5, 15, 11).noCull() - .u("brewing_stand_base").uv(9, 5, 15, 11).noCull() - .n("brewing_stand_base").uv(9, 14, 15, 16).noCull() - .s("brewing_stand_base").uv(9, 14, 15, 16).noCull() - .w("brewing_stand_base").uv(5, 14, 11, 16).noCull() - .e("brewing_stand_base").uv(5, 14, 11, 16).noCull() - .add(2, 0, 1, 8, 2, 7) - .d("brewing_stand_base").uv(2, 1, 8, 7).noCull() - .u("brewing_stand_base").uv(2, 1, 8, 7).noCull() - .n("brewing_stand_base").uv(2, 14, 8, 16).noCull() - .s("brewing_stand_base").uv(2, 14, 8, 16).noCull() - .w("brewing_stand_base").uv(1, 14, 7, 16).noCull() - .e("brewing_stand_base").uv(1, 14, 7, 16).noCull() - .add(2, 0, 9, 8, 2, 15) - .d("brewing_stand_base").uv(2, 9, 8, 15).noCull() - .u("brewing_stand_base").uv(2, 9, 8, 15).noCull() - .n("brewing_stand_base").uv(2, 14, 8, 16).noCull() - .s("brewing_stand_base").uv(2, 14, 8, 16).noCull() - .w("brewing_stand_base").uv(9, 14, 15, 16).noCull() - .e("brewing_stand_base").uv(9, 14, 15, 16).noCull() - .add(8, 0, 8, 16, 16, 8) - .n().uv(16, 0, 8, 16).noCull() - .s().uv(8, 0, 16, 16).noCull() - .add(0, 0, 8, 8, 16, 8).rotate(8, 8, 8, Facing.Axis.Y, 45, true) - .n().uv(8, 0, 16, 16).noCull() - .s().uv(16, 0, 8, 16).noCull() - .add(0, 0, 8, 8, 16, 8).rotate(8, 8, 8, Facing.Axis.Y, -45, true) - .n().uv(8, 0, 16, 16).noCull() - .s().uv(16, 0, 8, 16).noCull() - ; - private static final Model brewing_stand_bottles_3 = ModelProvider.getModelProvider().getModel("brewing_stand") - .add(7, 0, 7, 9, 14, 9) - .d().uv(7, 7, 9, 9).noCull() - .u().uv(7, 7, 9, 9).noCull() - .n().uv(7, 2, 9, 16).noCull() - .s().uv(7, 2, 9, 16).noCull() - .w().uv(7, 2, 9, 16).noCull() - .e().uv(7, 2, 9, 16).noCull() - .add(9, 0, 5, 15, 2, 11) - .d("brewing_stand_base").uv(9, 5, 15, 11).noCull() - .u("brewing_stand_base").uv(9, 5, 15, 11).noCull() - .n("brewing_stand_base").uv(9, 14, 15, 16).noCull() - .s("brewing_stand_base").uv(9, 14, 15, 16).noCull() - .w("brewing_stand_base").uv(5, 14, 11, 16).noCull() - .e("brewing_stand_base").uv(5, 14, 11, 16).noCull() - .add(2, 0, 1, 8, 2, 7) - .d("brewing_stand_base").uv(2, 1, 8, 7).noCull() - .u("brewing_stand_base").uv(2, 1, 8, 7).noCull() - .n("brewing_stand_base").uv(2, 14, 8, 16).noCull() - .s("brewing_stand_base").uv(2, 14, 8, 16).noCull() - .w("brewing_stand_base").uv(1, 14, 7, 16).noCull() - .e("brewing_stand_base").uv(1, 14, 7, 16).noCull() - .add(2, 0, 9, 8, 2, 15) - .d("brewing_stand_base").uv(2, 9, 8, 15).noCull() - .u("brewing_stand_base").uv(2, 9, 8, 15).noCull() - .n("brewing_stand_base").uv(2, 14, 8, 16).noCull() - .s("brewing_stand_base").uv(2, 14, 8, 16).noCull() - .w("brewing_stand_base").uv(9, 14, 15, 16).noCull() - .e("brewing_stand_base").uv(9, 14, 15, 16).noCull() - .add(8, 0, 8, 16, 16, 8) - .n().uv(16, 0, 8, 16).noCull() - .s().uv(8, 0, 16, 16).noCull() - .add(0, 0, 8, 8, 16, 8).rotate(8, 8, 8, Facing.Axis.Y, 45, true) - .n().uv(8, 0, 0, 16).noCull() - .s().uv(0, 0, 8, 16).noCull() - .add(0, 0, 8, 8, 16, 8).rotate(8, 8, 8, Facing.Axis.Y, -45, true) - .n().uv(8, 0, 16, 16).noCull() - .s().uv(16, 0, 8, 16).noCull() - ; - private static final Model brewing_stand_bottles_13 = ModelProvider.getModelProvider().getModel("brewing_stand") - .add(7, 0, 7, 9, 14, 9) - .d().uv(7, 7, 9, 9).noCull() - .u().uv(7, 7, 9, 9).noCull() - .n().uv(7, 2, 9, 16).noCull() - .s().uv(7, 2, 9, 16).noCull() - .w().uv(7, 2, 9, 16).noCull() - .e().uv(7, 2, 9, 16).noCull() - .add(9, 0, 5, 15, 2, 11) - .d("brewing_stand_base").uv(9, 5, 15, 11).noCull() - .u("brewing_stand_base").uv(9, 5, 15, 11).noCull() - .n("brewing_stand_base").uv(9, 14, 15, 16).noCull() - .s("brewing_stand_base").uv(9, 14, 15, 16).noCull() - .w("brewing_stand_base").uv(5, 14, 11, 16).noCull() - .e("brewing_stand_base").uv(5, 14, 11, 16).noCull() - .add(2, 0, 1, 8, 2, 7) - .d("brewing_stand_base").uv(2, 1, 8, 7).noCull() - .u("brewing_stand_base").uv(2, 1, 8, 7).noCull() - .n("brewing_stand_base").uv(2, 14, 8, 16).noCull() - .s("brewing_stand_base").uv(2, 14, 8, 16).noCull() - .w("brewing_stand_base").uv(1, 14, 7, 16).noCull() - .e("brewing_stand_base").uv(1, 14, 7, 16).noCull() - .add(2, 0, 9, 8, 2, 15) - .d("brewing_stand_base").uv(2, 9, 8, 15).noCull() - .u("brewing_stand_base").uv(2, 9, 8, 15).noCull() - .n("brewing_stand_base").uv(2, 14, 8, 16).noCull() - .s("brewing_stand_base").uv(2, 14, 8, 16).noCull() - .w("brewing_stand_base").uv(9, 14, 15, 16).noCull() - .e("brewing_stand_base").uv(9, 14, 15, 16).noCull() - .add(8, 0, 8, 16, 16, 8) - .n().uv(0, 0, 8, 16).noCull() - .s().uv(8, 0, 0, 16).noCull() - .add(0, 0, 8, 8, 16, 8).rotate(8, 8, 8, Facing.Axis.Y, 45, true) - .n().uv(8, 0, 0, 16).noCull() - .s().uv(0, 0, 8, 16).noCull() - .add(0, 0, 8, 8, 16, 8).rotate(8, 8, 8, Facing.Axis.Y, -45, true) - .n().uv(8, 0, 16, 16).noCull() - .s().uv(16, 0, 8, 16).noCull() - ; - private static final Model brewing_stand_bottles_12 = ModelProvider.getModelProvider().getModel("brewing_stand") - .add(7, 0, 7, 9, 14, 9) - .d().uv(7, 7, 9, 9).noCull() - .u().uv(7, 7, 9, 9).noCull() - .n().uv(7, 2, 9, 16).noCull() - .s().uv(7, 2, 9, 16).noCull() - .w().uv(7, 2, 9, 16).noCull() - .e().uv(7, 2, 9, 16).noCull() - .add(9, 0, 5, 15, 2, 11) - .d("brewing_stand_base").uv(9, 5, 15, 11).noCull() - .u("brewing_stand_base").uv(9, 5, 15, 11).noCull() - .n("brewing_stand_base").uv(9, 14, 15, 16).noCull() - .s("brewing_stand_base").uv(9, 14, 15, 16).noCull() - .w("brewing_stand_base").uv(5, 14, 11, 16).noCull() - .e("brewing_stand_base").uv(5, 14, 11, 16).noCull() - .add(2, 0, 1, 8, 2, 7) - .d("brewing_stand_base").uv(2, 1, 8, 7).noCull() - .u("brewing_stand_base").uv(2, 1, 8, 7).noCull() - .n("brewing_stand_base").uv(2, 14, 8, 16).noCull() - .s("brewing_stand_base").uv(2, 14, 8, 16).noCull() - .w("brewing_stand_base").uv(1, 14, 7, 16).noCull() - .e("brewing_stand_base").uv(1, 14, 7, 16).noCull() - .add(2, 0, 9, 8, 2, 15) - .d("brewing_stand_base").uv(2, 9, 8, 15).noCull() - .u("brewing_stand_base").uv(2, 9, 8, 15).noCull() - .n("brewing_stand_base").uv(2, 14, 8, 16).noCull() - .s("brewing_stand_base").uv(2, 14, 8, 16).noCull() - .w("brewing_stand_base").uv(9, 14, 15, 16).noCull() - .e("brewing_stand_base").uv(9, 14, 15, 16).noCull() - .add(8, 0, 8, 16, 16, 8) - .n().uv(0, 0, 8, 16).noCull() - .s().uv(8, 0, 0, 16).noCull() - .add(0, 0, 8, 8, 16, 8).rotate(8, 8, 8, Facing.Axis.Y, 45, true) - .n().uv(8, 0, 16, 16).noCull() - .s().uv(16, 0, 8, 16).noCull() - .add(0, 0, 8, 8, 16, 8).rotate(8, 8, 8, Facing.Axis.Y, -45, true) - .n().uv(8, 0, 0, 16).noCull() - .s().uv(0, 0, 8, 16).noCull() - ; - private static final Model brewing_stand_bottles_23 = ModelProvider.getModelProvider().getModel("brewing_stand") - .add(7, 0, 7, 9, 14, 9) - .d().uv(7, 7, 9, 9).noCull() - .u().uv(7, 7, 9, 9).noCull() - .n().uv(7, 2, 9, 16).noCull() - .s().uv(7, 2, 9, 16).noCull() - .w().uv(7, 2, 9, 16).noCull() - .e().uv(7, 2, 9, 16).noCull() - .add(9, 0, 5, 15, 2, 11) - .d("brewing_stand_base").uv(9, 5, 15, 11).noCull() - .u("brewing_stand_base").uv(9, 5, 15, 11).noCull() - .n("brewing_stand_base").uv(9, 14, 15, 16).noCull() - .s("brewing_stand_base").uv(9, 14, 15, 16).noCull() - .w("brewing_stand_base").uv(5, 14, 11, 16).noCull() - .e("brewing_stand_base").uv(5, 14, 11, 16).noCull() - .add(2, 0, 1, 8, 2, 7) - .d("brewing_stand_base").uv(2, 1, 8, 7).noCull() - .u("brewing_stand_base").uv(2, 1, 8, 7).noCull() - .n("brewing_stand_base").uv(2, 14, 8, 16).noCull() - .s("brewing_stand_base").uv(2, 14, 8, 16).noCull() - .w("brewing_stand_base").uv(1, 14, 7, 16).noCull() - .e("brewing_stand_base").uv(1, 14, 7, 16).noCull() - .add(2, 0, 9, 8, 2, 15) - .d("brewing_stand_base").uv(2, 9, 8, 15).noCull() - .u("brewing_stand_base").uv(2, 9, 8, 15).noCull() - .n("brewing_stand_base").uv(2, 14, 8, 16).noCull() - .s("brewing_stand_base").uv(2, 14, 8, 16).noCull() - .w("brewing_stand_base").uv(9, 14, 15, 16).noCull() - .e("brewing_stand_base").uv(9, 14, 15, 16).noCull() - .add(8, 0, 8, 16, 16, 8) - .n().uv(16, 0, 8, 16).noCull() - .s().uv(8, 0, 16, 16).noCull() - .add(0, 0, 8, 8, 16, 8).rotate(8, 8, 8, Facing.Axis.Y, 45, true) - .n().uv(8, 0, 0, 16).noCull() - .s().uv(0, 0, 8, 16).noCull() - .add(0, 0, 8, 8, 16, 8).rotate(8, 8, 8, Facing.Axis.Y, -45, true) - .n().uv(8, 0, 0, 16).noCull() - .s().uv(0, 0, 8, 16).noCull() - ; - private static final Model brewing_stand_bottles_1 = ModelProvider.getModelProvider().getModel("brewing_stand") - .add(7, 0, 7, 9, 14, 9) - .d().uv(7, 7, 9, 9).noCull() - .u().uv(7, 7, 9, 9).noCull() - .n().uv(7, 2, 9, 16).noCull() - .s().uv(7, 2, 9, 16).noCull() - .w().uv(7, 2, 9, 16).noCull() - .e().uv(7, 2, 9, 16).noCull() - .add(9, 0, 5, 15, 2, 11) - .d("brewing_stand_base").uv(9, 5, 15, 11).noCull() - .u("brewing_stand_base").uv(9, 5, 15, 11).noCull() - .n("brewing_stand_base").uv(9, 14, 15, 16).noCull() - .s("brewing_stand_base").uv(9, 14, 15, 16).noCull() - .w("brewing_stand_base").uv(5, 14, 11, 16).noCull() - .e("brewing_stand_base").uv(5, 14, 11, 16).noCull() - .add(2, 0, 1, 8, 2, 7) - .d("brewing_stand_base").uv(2, 1, 8, 7).noCull() - .u("brewing_stand_base").uv(2, 1, 8, 7).noCull() - .n("brewing_stand_base").uv(2, 14, 8, 16).noCull() - .s("brewing_stand_base").uv(2, 14, 8, 16).noCull() - .w("brewing_stand_base").uv(1, 14, 7, 16).noCull() - .e("brewing_stand_base").uv(1, 14, 7, 16).noCull() - .add(2, 0, 9, 8, 2, 15) - .d("brewing_stand_base").uv(2, 9, 8, 15).noCull() - .u("brewing_stand_base").uv(2, 9, 8, 15).noCull() - .n("brewing_stand_base").uv(2, 14, 8, 16).noCull() - .s("brewing_stand_base").uv(2, 14, 8, 16).noCull() - .w("brewing_stand_base").uv(9, 14, 15, 16).noCull() - .e("brewing_stand_base").uv(9, 14, 15, 16).noCull() - .add(8, 0, 8, 16, 16, 8) - .n().uv(0, 0, 8, 16).noCull() - .s().uv(8, 0, 0, 16).noCull() - .add(0, 0, 8, 8, 16, 8).rotate(8, 8, 8, Facing.Axis.Y, 45, true) - .n().uv(8, 0, 16, 16).noCull() - .s().uv(16, 0, 8, 16).noCull() - .add(0, 0, 8, 8, 16, 8).rotate(8, 8, 8, Facing.Axis.Y, -45, true) - .n().uv(8, 0, 16, 16).noCull() - .s().uv(16, 0, 8, 16).noCull() - ; - private static final Model[] brewing_stand_bottles = new Model[] { - brewing_stand_empty, brewing_stand_bottles_1, brewing_stand_bottles_2, brewing_stand_bottles_12, - brewing_stand_bottles_3, brewing_stand_bottles_13, brewing_stand_bottles_23, brewing_stand_bottles_123 - }; - - public static final PropertyBool HAS_BOTTLE_0 = PropertyBool.create("has_bottle_0"); - public static final PropertyBool HAS_BOTTLE_1 = PropertyBool.create("has_bottle_1"); - public static final PropertyBool HAS_BOTTLE_2 = PropertyBool.create("has_bottle_2"); - public static final PropertyBool[] HAS_BOTTLE = new PropertyBool[] {HAS_BOTTLE_0, HAS_BOTTLE_1, HAS_BOTTLE_2}; - public BlockBrewingStand() { super(Material.SOLID); - this.setDefaultState(this.getBaseState().withProperty(HAS_BOTTLE[0], Boolean.valueOf(false)).withProperty(HAS_BOTTLE[1], Boolean.valueOf(false)).withProperty(HAS_BOTTLE[2], Boolean.valueOf(false))); } -// /** -// * Gets the localized name of this block. Used for the statistics page. -// */ -// public String getLocalizedName() -// { -// return "Braustand"; -// } - /** * Used to determine ambient occlusion and culling when rebuilding chunks for render */ @@ -437,18 +104,49 @@ public class BlockBrewingStand extends Block implements ITileEntityProvider public boolean hasTransparency() { return true; } - - protected Property[] getProperties() - { - return new Property[] {HAS_BOTTLE[0], HAS_BOTTLE[1], HAS_BOTTLE[2]}; - } public boolean isMagnetic() { return true; } public Model getModel(ModelProvider provider, String name, State state) { - return brewing_stand_bottles[(state.getValue(HAS_BOTTLE[0]) ? 1 : 0) | (state.getValue(HAS_BOTTLE[1]) ? 2 : 0) - | (state.getValue(HAS_BOTTLE[2]) ? 4 : 0)]; + return provider.getModel("brewing_stand") + .add(7, 0, 7, 9, 14, 9) + .d().uv(7, 7, 9, 9).noCull() + .u().uv(7, 7, 9, 9).noCull() + .n().uv(7, 2, 9, 16).noCull() + .s().uv(7, 2, 9, 16).noCull() + .w().uv(7, 2, 9, 16).noCull() + .e().uv(7, 2, 9, 16).noCull() + .add(9, 0, 5, 15, 2, 11) + .d("brewing_stand_base").uv(9, 5, 15, 11).noCull() + .u("brewing_stand_base").uv(9, 5, 15, 11).noCull() + .n("brewing_stand_base").uv(9, 14, 15, 16).noCull() + .s("brewing_stand_base").uv(9, 14, 15, 16).noCull() + .w("brewing_stand_base").uv(5, 14, 11, 16).noCull() + .e("brewing_stand_base").uv(5, 14, 11, 16).noCull() + .add(2, 0, 1, 8, 2, 7) + .d("brewing_stand_base").uv(2, 1, 8, 7).noCull() + .u("brewing_stand_base").uv(2, 1, 8, 7).noCull() + .n("brewing_stand_base").uv(2, 14, 8, 16).noCull() + .s("brewing_stand_base").uv(2, 14, 8, 16).noCull() + .w("brewing_stand_base").uv(1, 14, 7, 16).noCull() + .e("brewing_stand_base").uv(1, 14, 7, 16).noCull() + .add(2, 0, 9, 8, 2, 15) + .d("brewing_stand_base").uv(2, 9, 8, 15).noCull() + .u("brewing_stand_base").uv(2, 9, 8, 15).noCull() + .n("brewing_stand_base").uv(2, 14, 8, 16).noCull() + .s("brewing_stand_base").uv(2, 14, 8, 16).noCull() + .w("brewing_stand_base").uv(9, 14, 15, 16).noCull() + .e("brewing_stand_base").uv(9, 14, 15, 16).noCull() + .add(8, 0, 8, 16, 16, 8) + .n().uv(16, 0, 8, 16).noCull() + .s().uv(8, 0, 16, 16).noCull() + .add(0, 0, 8, 8, 16, 8).rotate(8, 8, 8, Facing.Axis.Y, 45, true) + .n().uv(8, 0, 16, 16).noCull() + .s().uv(16, 0, 8, 16).noCull() + .add(0, 0, 8, 8, 16, 8).rotate(8, 8, 8, Facing.Axis.Y, -45, true) + .n().uv(8, 0, 16, 16).noCull() + .s().uv(16, 0, 8, 16).noCull(); } } diff --git a/common/src/main/java/common/block/tech/BlockButton.java b/common/src/main/java/common/block/tech/BlockButton.java index ea13163e..90d7150b 100755 --- a/common/src/main/java/common/block/tech/BlockButton.java +++ b/common/src/main/java/common/block/tech/BlockButton.java @@ -13,7 +13,7 @@ import common.entity.types.EntityLiving; import common.init.SoundEvent; import common.item.CheatTab; import common.model.Model; -import common.model.ModelProvider; +import common.model.Model.ModelProvider; import common.model.ModelRotation; import common.model.GuiPosition; import common.properties.Property; diff --git a/common/src/main/java/common/block/tech/BlockCauldron.java b/common/src/main/java/common/block/tech/BlockCauldron.java index 0e1f8a7f..9e29fe80 100755 --- a/common/src/main/java/common/block/tech/BlockCauldron.java +++ b/common/src/main/java/common/block/tech/BlockCauldron.java @@ -11,7 +11,7 @@ import common.init.Items; import common.item.Item; import common.item.ItemStack; import common.model.Model; -import common.model.ModelProvider; +import common.model.Model.ModelProvider; import common.properties.Property; import common.properties.PropertyInteger; import common.util.BlockPos; @@ -25,387 +25,6 @@ import common.world.World; public class BlockCauldron extends Block { - private static final Model cauldron_empty = ModelProvider.getModelProvider().getModel("cauldron_side") - .add(0, 3, 0, 2, 16, 16) - .d("cauldron_inner").uv(0, 0, 2, 16) - .u("cauldron_top").uv(0, 0, 2, 16) - .n().uv(2, 0, 0, 13) - .s().uv(0, 0, 2, 13) - .w().uv(0, 0, 16, 13) - .e().uv(0, 0, 16, 13).noCull() - .add(2, 3, 2, 14, 4, 14) - .d("cauldron_inner").uv(2, 2, 14, 14) - .u("cauldron_inner").uv(2, 2, 14, 14) - .n().uv(2, 0, 0, 13) - .s().uv(0, 0, 2, 13) - .w().uv(0, 0, 16, 13) - .e().uv(0, 0, 16, 13) - .add(14, 3, 0, 16, 16, 16) - .d("cauldron_inner").uv(14, 0, 16, 16) - .u("cauldron_top").uv(14, 0, 16, 16) - .n().uv(16, 0, 14, 13) - .s().uv(14, 0, 16, 13) - .w().uv(0, 0, 16, 13).noCull() - .e().uv(0, 0, 16, 13) - .add(2, 3, 0, 14, 16, 2) - .d("cauldron_inner").uv(2, 0, 14, 2) - .u("cauldron_top").uv(2, 0, 14, 2) - .n().uv(2, 0, 14, 13) - .s().uv(2, 0, 14, 13).noCull() - .w().uv(0, 0, 2, 13) - .e().uv(0, 0, 2, 13) - .add(2, 3, 14, 14, 16, 16) - .d("cauldron_inner").uv(2, 14, 14, 16) - .u("cauldron_top").uv(2, 14, 14, 16) - .n().uv(2, 0, 14, 13).noCull() - .s().uv(2, 0, 14, 13) - .w().uv(14, 0, 16, 13) - .e().uv(14, 0, 16, 13) - .add(0, 0, 0, 4, 3, 2) - .d("cauldron_bottom").uv(0, 0, 4, 2) - .u("cauldron_top").uv(0, 0, 2, 16) - .n().uv(4, 13, 0, 16) - .s().uv(0, 13, 4, 16) - .w().uv(0, 13, 2, 16) - .e().uv(0, 13, 2, 16) - .add(0, 0, 2, 2, 3, 4) - .d("cauldron_bottom").uv(0, 2, 2, 4) - .u("cauldron_top").uv(0, 0, 2, 16) - .n().uv(2, 13, 0, 16) - .s().uv(0, 13, 2, 16) - .w().uv(2, 13, 4, 16) - .e().uv(2, 13, 4, 16) - .add(12, 0, 0, 16, 3, 2) - .d("cauldron_bottom").uv(12, 0, 16, 2) - .u("cauldron_top").uv(0, 0, 2, 16) - .n().uv(16, 13, 12, 16) - .s().uv(12, 13, 16, 16) - .w().uv(0, 13, 2, 16) - .e().uv(0, 13, 2, 16) - .add(14, 0, 2, 16, 3, 4) - .d("cauldron_bottom").uv(14, 2, 16, 4).noCull() - .u("cauldron_top").uv(0, 0, 2, 16).noCull() - .n().uv(16, 13, 14, 16).noCull() - .s().uv(14, 13, 16, 16).noCull() - .w().uv(4, 13, 2, 16).noCull() - .e().uv(4, 13, 2, 16).noCull() - .add(0, 0, 14, 4, 3, 16) - .d("cauldron_bottom").uv(14, 0, 16, 4).noCull() - .u("cauldron_top").uv(14, 0, 16, 16).noCull() - .n().uv(4, 13, 0, 16).noCull() - .s().uv(0, 13, 4, 16).noCull() - .w().uv(14, 13, 16, 16).noCull() - .e().uv(14, 13, 16, 16).noCull() - .add(0, 0, 12, 2, 3, 14) - .d("cauldron_bottom").uv(12, 0, 14, 4).noCull() - .u("cauldron_top").uv(14, 0, 16, 16).noCull() - .n().uv(2, 13, 0, 16).noCull() - .s().uv(0, 13, 2, 16).noCull() - .w().uv(12, 13, 14, 16).noCull() - .e().uv(12, 13, 14, 16).noCull() - .add(12, 0, 14, 16, 3, 16) - .d("cauldron_bottom").uv(14, 12, 16, 16).noCull() - .u("cauldron_top").uv(14, 0, 16, 16).noCull() - .n().uv(16, 13, 12, 16).noCull() - .s().uv(12, 13, 16, 16).noCull() - .w().uv(14, 13, 16, 16).noCull() - .e().uv(14, 13, 16, 16).noCull() - .add(14, 0, 12, 16, 3, 14) - .d("cauldron_bottom").uv(14, 12, 16, 14).noCull() - .u("cauldron_top").uv(14, 0, 16, 16).noCull() - .n().uv(16, 13, 14, 16).noCull() - .s().uv(14, 13, 16, 16).noCull() - .w().uv(14, 13, 12, 16).noCull() - .e().uv(14, 13, 12, 16).noCull() - ; - private static final Model cauldron_level1 = ModelProvider.getModelProvider().getModel("cauldron_side") - .add(0, 3, 0, 2, 16, 16) - .d("cauldron_inner").uv(0, 0, 2, 16) - .u("cauldron_top").uv(0, 0, 2, 16) - .n().uv(2, 0, 0, 13) - .s().uv(0, 0, 2, 13) - .w().uv(0, 0, 16, 13) - .e().uv(0, 0, 16, 13).noCull() - .add(2, 3, 2, 14, 4, 14) - .d("cauldron_inner").uv(2, 2, 14, 14) - .u("cauldron_inner").uv(2, 2, 14, 14) - .n().uv(2, 0, 0, 13) - .s().uv(0, 0, 2, 13) - .w().uv(0, 0, 16, 13) - .e().uv(0, 0, 16, 13) - .add(14, 3, 0, 16, 16, 16) - .d("cauldron_inner").uv(14, 0, 16, 16) - .u("cauldron_top").uv(14, 0, 16, 16) - .n().uv(16, 0, 14, 13) - .s().uv(14, 0, 16, 13) - .w().uv(0, 0, 16, 13).noCull() - .e().uv(0, 0, 16, 13) - .add(2, 3, 0, 14, 16, 2) - .d("cauldron_inner").uv(2, 0, 14, 2) - .u("cauldron_top").uv(2, 0, 14, 2) - .n().uv(2, 0, 14, 13) - .s().uv(2, 0, 14, 13).noCull() - .w().uv(0, 0, 2, 13) - .e().uv(0, 0, 2, 13) - .add(2, 3, 14, 14, 16, 16) - .d("cauldron_inner").uv(2, 14, 14, 16) - .u("cauldron_top").uv(2, 14, 14, 16) - .n().uv(2, 0, 14, 13).noCull() - .s().uv(2, 0, 14, 13) - .w().uv(14, 0, 16, 13) - .e().uv(14, 0, 16, 13) - .add(0, 0, 0, 4, 3, 2) - .d("cauldron_bottom").uv(0, 0, 4, 2) - .u("cauldron_top").uv(0, 0, 2, 16) - .n().uv(4, 13, 0, 16) - .s().uv(0, 13, 4, 16) - .w().uv(0, 13, 2, 16) - .e().uv(0, 13, 2, 16) - .add(0, 0, 2, 2, 3, 4) - .d("cauldron_bottom").uv(0, 2, 2, 4) - .u("cauldron_top").uv(0, 0, 2, 16) - .n().uv(2, 13, 0, 16) - .s().uv(0, 13, 2, 16) - .w().uv(2, 13, 4, 16) - .e().uv(2, 13, 4, 16) - .add(12, 0, 0, 16, 3, 2) - .d("cauldron_bottom").uv(12, 0, 16, 2) - .u("cauldron_top").uv(0, 0, 2, 16) - .n().uv(16, 13, 12, 16) - .s().uv(12, 13, 16, 16) - .w().uv(0, 13, 2, 16) - .e().uv(0, 13, 2, 16) - .add(14, 0, 2, 16, 3, 4) - .d("cauldron_bottom").uv(14, 2, 16, 4).noCull() - .u("cauldron_top").uv(0, 0, 2, 16).noCull() - .n().uv(16, 13, 14, 16).noCull() - .s().uv(14, 13, 16, 16).noCull() - .w().uv(4, 13, 2, 16).noCull() - .e().uv(4, 13, 2, 16).noCull() - .add(0, 0, 14, 4, 3, 16) - .d("cauldron_bottom").uv(14, 0, 16, 4).noCull() - .u("cauldron_top").uv(14, 0, 16, 16).noCull() - .n().uv(4, 13, 0, 16).noCull() - .s().uv(0, 13, 4, 16).noCull() - .w().uv(14, 13, 16, 16).noCull() - .e().uv(14, 13, 16, 16).noCull() - .add(0, 0, 12, 2, 3, 14) - .d("cauldron_bottom").uv(12, 0, 14, 4).noCull() - .u("cauldron_top").uv(14, 0, 16, 16).noCull() - .n().uv(2, 13, 0, 16).noCull() - .s().uv(0, 13, 2, 16).noCull() - .w().uv(12, 13, 14, 16).noCull() - .e().uv(12, 13, 14, 16).noCull() - .add(12, 0, 14, 16, 3, 16) - .d("cauldron_bottom").uv(14, 12, 16, 16).noCull() - .u("cauldron_top").uv(14, 0, 16, 16).noCull() - .n().uv(16, 13, 12, 16).noCull() - .s().uv(12, 13, 16, 16).noCull() - .w().uv(14, 13, 16, 16).noCull() - .e().uv(14, 13, 16, 16).noCull() - .add(14, 0, 12, 16, 3, 14) - .d("cauldron_bottom").uv(14, 12, 16, 14).noCull() - .u("cauldron_top").uv(14, 0, 16, 16).noCull() - .n().uv(16, 13, 14, 16).noCull() - .s().uv(14, 13, 16, 16).noCull() - .w().uv(14, 13, 12, 16).noCull() - .e().uv(14, 13, 12, 16).noCull() - .add(2, 9, 2, 14, 9, 14) - .u("water_still").uv(2, 2, 14, 14).noCull() - ; - private static final Model cauldron_level2 = ModelProvider.getModelProvider().getModel("cauldron_side") - .add(0, 3, 0, 2, 16, 16) - .d("cauldron_inner").uv(0, 0, 2, 16) - .u("cauldron_top").uv(0, 0, 2, 16) - .n().uv(2, 0, 0, 13) - .s().uv(0, 0, 2, 13) - .w().uv(0, 0, 16, 13) - .e().uv(0, 0, 16, 13).noCull() - .add(2, 3, 2, 14, 4, 14) - .d("cauldron_inner").uv(2, 2, 14, 14) - .u("cauldron_inner").uv(2, 2, 14, 14) - .n().uv(2, 0, 0, 13) - .s().uv(0, 0, 2, 13) - .w().uv(0, 0, 16, 13) - .e().uv(0, 0, 16, 13) - .add(14, 3, 0, 16, 16, 16) - .d("cauldron_inner").uv(14, 0, 16, 16) - .u("cauldron_top").uv(14, 0, 16, 16) - .n().uv(16, 0, 14, 13) - .s().uv(14, 0, 16, 13) - .w().uv(0, 0, 16, 13).noCull() - .e().uv(0, 0, 16, 13) - .add(2, 3, 0, 14, 16, 2) - .d("cauldron_inner").uv(2, 0, 14, 2) - .u("cauldron_top").uv(2, 0, 14, 2) - .n().uv(2, 0, 14, 13) - .s().uv(2, 0, 14, 13).noCull() - .w().uv(0, 0, 2, 13) - .e().uv(0, 0, 2, 13) - .add(2, 3, 14, 14, 16, 16) - .d("cauldron_inner").uv(2, 14, 14, 16) - .u("cauldron_top").uv(2, 14, 14, 16) - .n().uv(2, 0, 14, 13).noCull() - .s().uv(2, 0, 14, 13) - .w().uv(14, 0, 16, 13) - .e().uv(14, 0, 16, 13) - .add(0, 0, 0, 4, 3, 2) - .d("cauldron_bottom").uv(0, 0, 4, 2) - .u("cauldron_top").uv(0, 0, 2, 16) - .n().uv(4, 13, 0, 16) - .s().uv(0, 13, 4, 16) - .w().uv(0, 13, 2, 16) - .e().uv(0, 13, 2, 16) - .add(0, 0, 2, 2, 3, 4) - .d("cauldron_bottom").uv(0, 2, 2, 4) - .u("cauldron_top").uv(0, 0, 2, 16) - .n().uv(2, 13, 0, 16) - .s().uv(0, 13, 2, 16) - .w().uv(2, 13, 4, 16) - .e().uv(2, 13, 4, 16) - .add(12, 0, 0, 16, 3, 2) - .d("cauldron_bottom").uv(12, 0, 16, 2) - .u("cauldron_top").uv(0, 0, 2, 16) - .n().uv(16, 13, 12, 16) - .s().uv(12, 13, 16, 16) - .w().uv(0, 13, 2, 16) - .e().uv(0, 13, 2, 16) - .add(14, 0, 2, 16, 3, 4) - .d("cauldron_bottom").uv(14, 2, 16, 4).noCull() - .u("cauldron_top").uv(0, 0, 2, 16).noCull() - .n().uv(16, 13, 14, 16).noCull() - .s().uv(14, 13, 16, 16).noCull() - .w().uv(4, 13, 2, 16).noCull() - .e().uv(4, 13, 2, 16).noCull() - .add(0, 0, 14, 4, 3, 16) - .d("cauldron_bottom").uv(14, 0, 16, 4).noCull() - .u("cauldron_top").uv(14, 0, 16, 16).noCull() - .n().uv(4, 13, 0, 16).noCull() - .s().uv(0, 13, 4, 16).noCull() - .w().uv(14, 13, 16, 16).noCull() - .e().uv(14, 13, 16, 16).noCull() - .add(0, 0, 12, 2, 3, 14) - .d("cauldron_bottom").uv(12, 0, 14, 4).noCull() - .u("cauldron_top").uv(14, 0, 16, 16).noCull() - .n().uv(2, 13, 0, 16).noCull() - .s().uv(0, 13, 2, 16).noCull() - .w().uv(12, 13, 14, 16).noCull() - .e().uv(12, 13, 14, 16).noCull() - .add(12, 0, 14, 16, 3, 16) - .d("cauldron_bottom").uv(14, 12, 16, 16).noCull() - .u("cauldron_top").uv(14, 0, 16, 16).noCull() - .n().uv(16, 13, 12, 16).noCull() - .s().uv(12, 13, 16, 16).noCull() - .w().uv(14, 13, 16, 16).noCull() - .e().uv(14, 13, 16, 16).noCull() - .add(14, 0, 12, 16, 3, 14) - .d("cauldron_bottom").uv(14, 12, 16, 14).noCull() - .u("cauldron_top").uv(14, 0, 16, 16).noCull() - .n().uv(16, 13, 14, 16).noCull() - .s().uv(14, 13, 16, 16).noCull() - .w().uv(14, 13, 12, 16).noCull() - .e().uv(14, 13, 12, 16).noCull() - .add(2, 12, 2, 14, 12, 14) - .u("water_still").uv(2, 2, 14, 14).noCull() - ; - private static final Model cauldron_level3 = ModelProvider.getModelProvider().getModel("cauldron_side") - .add(0, 3, 0, 2, 16, 16) - .d("cauldron_inner").uv(0, 0, 2, 16) - .u("cauldron_top").uv(0, 0, 2, 16) - .n().uv(2, 0, 0, 13) - .s().uv(0, 0, 2, 13) - .w().uv(0, 0, 16, 13) - .e().uv(0, 0, 16, 13).noCull() - .add(2, 3, 2, 14, 4, 14) - .d("cauldron_inner").uv(2, 2, 14, 14) - .u("cauldron_inner").uv(2, 2, 14, 14) - .n().uv(2, 0, 0, 13) - .s().uv(0, 0, 2, 13) - .w().uv(0, 0, 16, 13) - .e().uv(0, 0, 16, 13) - .add(14, 3, 0, 16, 16, 16) - .d("cauldron_inner").uv(14, 0, 16, 16) - .u("cauldron_top").uv(14, 0, 16, 16) - .n().uv(16, 0, 14, 13) - .s().uv(14, 0, 16, 13) - .w().uv(0, 0, 16, 13).noCull() - .e().uv(0, 0, 16, 13) - .add(2, 3, 0, 14, 16, 2) - .d("cauldron_inner").uv(2, 0, 14, 2) - .u("cauldron_top").uv(2, 0, 14, 2) - .n().uv(2, 0, 14, 13) - .s().uv(2, 0, 14, 13).noCull() - .w().uv(0, 0, 2, 13) - .e().uv(0, 0, 2, 13) - .add(2, 3, 14, 14, 16, 16) - .d("cauldron_inner").uv(2, 14, 14, 16) - .u("cauldron_top").uv(2, 14, 14, 16) - .n().uv(2, 0, 14, 13).noCull() - .s().uv(2, 0, 14, 13) - .w().uv(14, 0, 16, 13) - .e().uv(14, 0, 16, 13) - .add(0, 0, 0, 4, 3, 2) - .d("cauldron_bottom").uv(0, 0, 4, 2) - .u("cauldron_top").uv(0, 0, 2, 16) - .n().uv(4, 13, 0, 16) - .s().uv(0, 13, 4, 16) - .w().uv(0, 13, 2, 16) - .e().uv(0, 13, 2, 16) - .add(0, 0, 2, 2, 3, 4) - .d("cauldron_bottom").uv(0, 2, 2, 4) - .u("cauldron_top").uv(0, 0, 2, 16) - .n().uv(2, 13, 0, 16) - .s().uv(0, 13, 2, 16) - .w().uv(2, 13, 4, 16) - .e().uv(2, 13, 4, 16) - .add(12, 0, 0, 16, 3, 2) - .d("cauldron_bottom").uv(12, 0, 16, 2) - .u("cauldron_top").uv(0, 0, 2, 16) - .n().uv(16, 13, 12, 16) - .s().uv(12, 13, 16, 16) - .w().uv(0, 13, 2, 16) - .e().uv(0, 13, 2, 16) - .add(14, 0, 2, 16, 3, 4) - .d("cauldron_bottom").uv(14, 2, 16, 4).noCull() - .u("cauldron_top").uv(0, 0, 2, 16).noCull() - .n().uv(16, 13, 14, 16).noCull() - .s().uv(14, 13, 16, 16).noCull() - .w().uv(4, 13, 2, 16).noCull() - .e().uv(4, 13, 2, 16).noCull() - .add(0, 0, 14, 4, 3, 16) - .d("cauldron_bottom").uv(14, 0, 16, 4).noCull() - .u("cauldron_top").uv(14, 0, 16, 16).noCull() - .n().uv(4, 13, 0, 16).noCull() - .s().uv(0, 13, 4, 16).noCull() - .w().uv(14, 13, 16, 16).noCull() - .e().uv(14, 13, 16, 16).noCull() - .add(0, 0, 12, 2, 3, 14) - .d("cauldron_bottom").uv(12, 0, 14, 4).noCull() - .u("cauldron_top").uv(14, 0, 16, 16).noCull() - .n().uv(2, 13, 0, 16).noCull() - .s().uv(0, 13, 2, 16).noCull() - .w().uv(12, 13, 14, 16).noCull() - .e().uv(12, 13, 14, 16).noCull() - .add(12, 0, 14, 16, 3, 16) - .d("cauldron_bottom").uv(14, 12, 16, 16).noCull() - .u("cauldron_top").uv(14, 0, 16, 16).noCull() - .n().uv(16, 13, 12, 16).noCull() - .s().uv(12, 13, 16, 16).noCull() - .w().uv(14, 13, 16, 16).noCull() - .e().uv(14, 13, 16, 16).noCull() - .add(14, 0, 12, 16, 3, 14) - .d("cauldron_bottom").uv(14, 12, 16, 14).noCull() - .u("cauldron_top").uv(14, 0, 16, 16).noCull() - .n().uv(16, 13, 14, 16).noCull() - .s().uv(14, 13, 16, 16).noCull() - .w().uv(14, 13, 12, 16).noCull() - .e().uv(14, 13, 12, 16).noCull() - .add(2, 15, 2, 14, 15, 14) - .u("water_still").uv(2, 2, 14, 14).noCull() - ; - private static final Model[] cauldron_levels = - new Model[] {cauldron_empty, cauldron_level1, cauldron_level2, cauldron_level3}; - public static final PropertyInteger LEVEL = PropertyInteger.create("level", 0, 3); public BlockCauldron() @@ -570,6 +189,386 @@ public class BlockCauldron extends Block } public Model getModel(ModelProvider provider, String name, State state) { - return cauldron_levels[state.getValue(LEVEL)]; + switch(state.getValue(LEVEL)) { + case 0: + default: + return provider.getModel("cauldron_side") + .add(0, 3, 0, 2, 16, 16) + .d("cauldron_inner").uv(0, 0, 2, 16) + .u("cauldron_top").uv(0, 0, 2, 16) + .n().uv(2, 0, 0, 13) + .s().uv(0, 0, 2, 13) + .w().uv(0, 0, 16, 13) + .e().uv(0, 0, 16, 13).noCull() + .add(2, 3, 2, 14, 4, 14) + .d("cauldron_inner").uv(2, 2, 14, 14) + .u("cauldron_inner").uv(2, 2, 14, 14) + .n().uv(2, 0, 0, 13) + .s().uv(0, 0, 2, 13) + .w().uv(0, 0, 16, 13) + .e().uv(0, 0, 16, 13) + .add(14, 3, 0, 16, 16, 16) + .d("cauldron_inner").uv(14, 0, 16, 16) + .u("cauldron_top").uv(14, 0, 16, 16) + .n().uv(16, 0, 14, 13) + .s().uv(14, 0, 16, 13) + .w().uv(0, 0, 16, 13).noCull() + .e().uv(0, 0, 16, 13) + .add(2, 3, 0, 14, 16, 2) + .d("cauldron_inner").uv(2, 0, 14, 2) + .u("cauldron_top").uv(2, 0, 14, 2) + .n().uv(2, 0, 14, 13) + .s().uv(2, 0, 14, 13).noCull() + .w().uv(0, 0, 2, 13) + .e().uv(0, 0, 2, 13) + .add(2, 3, 14, 14, 16, 16) + .d("cauldron_inner").uv(2, 14, 14, 16) + .u("cauldron_top").uv(2, 14, 14, 16) + .n().uv(2, 0, 14, 13).noCull() + .s().uv(2, 0, 14, 13) + .w().uv(14, 0, 16, 13) + .e().uv(14, 0, 16, 13) + .add(0, 0, 0, 4, 3, 2) + .d("cauldron_bottom").uv(0, 0, 4, 2) + .u("cauldron_top").uv(0, 0, 2, 16) + .n().uv(4, 13, 0, 16) + .s().uv(0, 13, 4, 16) + .w().uv(0, 13, 2, 16) + .e().uv(0, 13, 2, 16) + .add(0, 0, 2, 2, 3, 4) + .d("cauldron_bottom").uv(0, 2, 2, 4) + .u("cauldron_top").uv(0, 0, 2, 16) + .n().uv(2, 13, 0, 16) + .s().uv(0, 13, 2, 16) + .w().uv(2, 13, 4, 16) + .e().uv(2, 13, 4, 16) + .add(12, 0, 0, 16, 3, 2) + .d("cauldron_bottom").uv(12, 0, 16, 2) + .u("cauldron_top").uv(0, 0, 2, 16) + .n().uv(16, 13, 12, 16) + .s().uv(12, 13, 16, 16) + .w().uv(0, 13, 2, 16) + .e().uv(0, 13, 2, 16) + .add(14, 0, 2, 16, 3, 4) + .d("cauldron_bottom").uv(14, 2, 16, 4).noCull() + .u("cauldron_top").uv(0, 0, 2, 16).noCull() + .n().uv(16, 13, 14, 16).noCull() + .s().uv(14, 13, 16, 16).noCull() + .w().uv(4, 13, 2, 16).noCull() + .e().uv(4, 13, 2, 16).noCull() + .add(0, 0, 14, 4, 3, 16) + .d("cauldron_bottom").uv(14, 0, 16, 4).noCull() + .u("cauldron_top").uv(14, 0, 16, 16).noCull() + .n().uv(4, 13, 0, 16).noCull() + .s().uv(0, 13, 4, 16).noCull() + .w().uv(14, 13, 16, 16).noCull() + .e().uv(14, 13, 16, 16).noCull() + .add(0, 0, 12, 2, 3, 14) + .d("cauldron_bottom").uv(12, 0, 14, 4).noCull() + .u("cauldron_top").uv(14, 0, 16, 16).noCull() + .n().uv(2, 13, 0, 16).noCull() + .s().uv(0, 13, 2, 16).noCull() + .w().uv(12, 13, 14, 16).noCull() + .e().uv(12, 13, 14, 16).noCull() + .add(12, 0, 14, 16, 3, 16) + .d("cauldron_bottom").uv(14, 12, 16, 16).noCull() + .u("cauldron_top").uv(14, 0, 16, 16).noCull() + .n().uv(16, 13, 12, 16).noCull() + .s().uv(12, 13, 16, 16).noCull() + .w().uv(14, 13, 16, 16).noCull() + .e().uv(14, 13, 16, 16).noCull() + .add(14, 0, 12, 16, 3, 14) + .d("cauldron_bottom").uv(14, 12, 16, 14).noCull() + .u("cauldron_top").uv(14, 0, 16, 16).noCull() + .n().uv(16, 13, 14, 16).noCull() + .s().uv(14, 13, 16, 16).noCull() + .w().uv(14, 13, 12, 16).noCull() + .e().uv(14, 13, 12, 16).noCull(); + case 1: + return provider.getModel("cauldron_side") + .add(0, 3, 0, 2, 16, 16) + .d("cauldron_inner").uv(0, 0, 2, 16) + .u("cauldron_top").uv(0, 0, 2, 16) + .n().uv(2, 0, 0, 13) + .s().uv(0, 0, 2, 13) + .w().uv(0, 0, 16, 13) + .e().uv(0, 0, 16, 13).noCull() + .add(2, 3, 2, 14, 4, 14) + .d("cauldron_inner").uv(2, 2, 14, 14) + .u("cauldron_inner").uv(2, 2, 14, 14) + .n().uv(2, 0, 0, 13) + .s().uv(0, 0, 2, 13) + .w().uv(0, 0, 16, 13) + .e().uv(0, 0, 16, 13) + .add(14, 3, 0, 16, 16, 16) + .d("cauldron_inner").uv(14, 0, 16, 16) + .u("cauldron_top").uv(14, 0, 16, 16) + .n().uv(16, 0, 14, 13) + .s().uv(14, 0, 16, 13) + .w().uv(0, 0, 16, 13).noCull() + .e().uv(0, 0, 16, 13) + .add(2, 3, 0, 14, 16, 2) + .d("cauldron_inner").uv(2, 0, 14, 2) + .u("cauldron_top").uv(2, 0, 14, 2) + .n().uv(2, 0, 14, 13) + .s().uv(2, 0, 14, 13).noCull() + .w().uv(0, 0, 2, 13) + .e().uv(0, 0, 2, 13) + .add(2, 3, 14, 14, 16, 16) + .d("cauldron_inner").uv(2, 14, 14, 16) + .u("cauldron_top").uv(2, 14, 14, 16) + .n().uv(2, 0, 14, 13).noCull() + .s().uv(2, 0, 14, 13) + .w().uv(14, 0, 16, 13) + .e().uv(14, 0, 16, 13) + .add(0, 0, 0, 4, 3, 2) + .d("cauldron_bottom").uv(0, 0, 4, 2) + .u("cauldron_top").uv(0, 0, 2, 16) + .n().uv(4, 13, 0, 16) + .s().uv(0, 13, 4, 16) + .w().uv(0, 13, 2, 16) + .e().uv(0, 13, 2, 16) + .add(0, 0, 2, 2, 3, 4) + .d("cauldron_bottom").uv(0, 2, 2, 4) + .u("cauldron_top").uv(0, 0, 2, 16) + .n().uv(2, 13, 0, 16) + .s().uv(0, 13, 2, 16) + .w().uv(2, 13, 4, 16) + .e().uv(2, 13, 4, 16) + .add(12, 0, 0, 16, 3, 2) + .d("cauldron_bottom").uv(12, 0, 16, 2) + .u("cauldron_top").uv(0, 0, 2, 16) + .n().uv(16, 13, 12, 16) + .s().uv(12, 13, 16, 16) + .w().uv(0, 13, 2, 16) + .e().uv(0, 13, 2, 16) + .add(14, 0, 2, 16, 3, 4) + .d("cauldron_bottom").uv(14, 2, 16, 4).noCull() + .u("cauldron_top").uv(0, 0, 2, 16).noCull() + .n().uv(16, 13, 14, 16).noCull() + .s().uv(14, 13, 16, 16).noCull() + .w().uv(4, 13, 2, 16).noCull() + .e().uv(4, 13, 2, 16).noCull() + .add(0, 0, 14, 4, 3, 16) + .d("cauldron_bottom").uv(14, 0, 16, 4).noCull() + .u("cauldron_top").uv(14, 0, 16, 16).noCull() + .n().uv(4, 13, 0, 16).noCull() + .s().uv(0, 13, 4, 16).noCull() + .w().uv(14, 13, 16, 16).noCull() + .e().uv(14, 13, 16, 16).noCull() + .add(0, 0, 12, 2, 3, 14) + .d("cauldron_bottom").uv(12, 0, 14, 4).noCull() + .u("cauldron_top").uv(14, 0, 16, 16).noCull() + .n().uv(2, 13, 0, 16).noCull() + .s().uv(0, 13, 2, 16).noCull() + .w().uv(12, 13, 14, 16).noCull() + .e().uv(12, 13, 14, 16).noCull() + .add(12, 0, 14, 16, 3, 16) + .d("cauldron_bottom").uv(14, 12, 16, 16).noCull() + .u("cauldron_top").uv(14, 0, 16, 16).noCull() + .n().uv(16, 13, 12, 16).noCull() + .s().uv(12, 13, 16, 16).noCull() + .w().uv(14, 13, 16, 16).noCull() + .e().uv(14, 13, 16, 16).noCull() + .add(14, 0, 12, 16, 3, 14) + .d("cauldron_bottom").uv(14, 12, 16, 14).noCull() + .u("cauldron_top").uv(14, 0, 16, 16).noCull() + .n().uv(16, 13, 14, 16).noCull() + .s().uv(14, 13, 16, 16).noCull() + .w().uv(14, 13, 12, 16).noCull() + .e().uv(14, 13, 12, 16).noCull() + .add(2, 9, 2, 14, 9, 14) + .u("water_still").uv(2, 2, 14, 14).noCull(); + case 2: + return provider.getModel("cauldron_side") + .add(0, 3, 0, 2, 16, 16) + .d("cauldron_inner").uv(0, 0, 2, 16) + .u("cauldron_top").uv(0, 0, 2, 16) + .n().uv(2, 0, 0, 13) + .s().uv(0, 0, 2, 13) + .w().uv(0, 0, 16, 13) + .e().uv(0, 0, 16, 13).noCull() + .add(2, 3, 2, 14, 4, 14) + .d("cauldron_inner").uv(2, 2, 14, 14) + .u("cauldron_inner").uv(2, 2, 14, 14) + .n().uv(2, 0, 0, 13) + .s().uv(0, 0, 2, 13) + .w().uv(0, 0, 16, 13) + .e().uv(0, 0, 16, 13) + .add(14, 3, 0, 16, 16, 16) + .d("cauldron_inner").uv(14, 0, 16, 16) + .u("cauldron_top").uv(14, 0, 16, 16) + .n().uv(16, 0, 14, 13) + .s().uv(14, 0, 16, 13) + .w().uv(0, 0, 16, 13).noCull() + .e().uv(0, 0, 16, 13) + .add(2, 3, 0, 14, 16, 2) + .d("cauldron_inner").uv(2, 0, 14, 2) + .u("cauldron_top").uv(2, 0, 14, 2) + .n().uv(2, 0, 14, 13) + .s().uv(2, 0, 14, 13).noCull() + .w().uv(0, 0, 2, 13) + .e().uv(0, 0, 2, 13) + .add(2, 3, 14, 14, 16, 16) + .d("cauldron_inner").uv(2, 14, 14, 16) + .u("cauldron_top").uv(2, 14, 14, 16) + .n().uv(2, 0, 14, 13).noCull() + .s().uv(2, 0, 14, 13) + .w().uv(14, 0, 16, 13) + .e().uv(14, 0, 16, 13) + .add(0, 0, 0, 4, 3, 2) + .d("cauldron_bottom").uv(0, 0, 4, 2) + .u("cauldron_top").uv(0, 0, 2, 16) + .n().uv(4, 13, 0, 16) + .s().uv(0, 13, 4, 16) + .w().uv(0, 13, 2, 16) + .e().uv(0, 13, 2, 16) + .add(0, 0, 2, 2, 3, 4) + .d("cauldron_bottom").uv(0, 2, 2, 4) + .u("cauldron_top").uv(0, 0, 2, 16) + .n().uv(2, 13, 0, 16) + .s().uv(0, 13, 2, 16) + .w().uv(2, 13, 4, 16) + .e().uv(2, 13, 4, 16) + .add(12, 0, 0, 16, 3, 2) + .d("cauldron_bottom").uv(12, 0, 16, 2) + .u("cauldron_top").uv(0, 0, 2, 16) + .n().uv(16, 13, 12, 16) + .s().uv(12, 13, 16, 16) + .w().uv(0, 13, 2, 16) + .e().uv(0, 13, 2, 16) + .add(14, 0, 2, 16, 3, 4) + .d("cauldron_bottom").uv(14, 2, 16, 4).noCull() + .u("cauldron_top").uv(0, 0, 2, 16).noCull() + .n().uv(16, 13, 14, 16).noCull() + .s().uv(14, 13, 16, 16).noCull() + .w().uv(4, 13, 2, 16).noCull() + .e().uv(4, 13, 2, 16).noCull() + .add(0, 0, 14, 4, 3, 16) + .d("cauldron_bottom").uv(14, 0, 16, 4).noCull() + .u("cauldron_top").uv(14, 0, 16, 16).noCull() + .n().uv(4, 13, 0, 16).noCull() + .s().uv(0, 13, 4, 16).noCull() + .w().uv(14, 13, 16, 16).noCull() + .e().uv(14, 13, 16, 16).noCull() + .add(0, 0, 12, 2, 3, 14) + .d("cauldron_bottom").uv(12, 0, 14, 4).noCull() + .u("cauldron_top").uv(14, 0, 16, 16).noCull() + .n().uv(2, 13, 0, 16).noCull() + .s().uv(0, 13, 2, 16).noCull() + .w().uv(12, 13, 14, 16).noCull() + .e().uv(12, 13, 14, 16).noCull() + .add(12, 0, 14, 16, 3, 16) + .d("cauldron_bottom").uv(14, 12, 16, 16).noCull() + .u("cauldron_top").uv(14, 0, 16, 16).noCull() + .n().uv(16, 13, 12, 16).noCull() + .s().uv(12, 13, 16, 16).noCull() + .w().uv(14, 13, 16, 16).noCull() + .e().uv(14, 13, 16, 16).noCull() + .add(14, 0, 12, 16, 3, 14) + .d("cauldron_bottom").uv(14, 12, 16, 14).noCull() + .u("cauldron_top").uv(14, 0, 16, 16).noCull() + .n().uv(16, 13, 14, 16).noCull() + .s().uv(14, 13, 16, 16).noCull() + .w().uv(14, 13, 12, 16).noCull() + .e().uv(14, 13, 12, 16).noCull() + .add(2, 12, 2, 14, 12, 14) + .u("water_still").uv(2, 2, 14, 14).noCull(); + case 3: + return provider.getModel("cauldron_side") + .add(0, 3, 0, 2, 16, 16) + .d("cauldron_inner").uv(0, 0, 2, 16) + .u("cauldron_top").uv(0, 0, 2, 16) + .n().uv(2, 0, 0, 13) + .s().uv(0, 0, 2, 13) + .w().uv(0, 0, 16, 13) + .e().uv(0, 0, 16, 13).noCull() + .add(2, 3, 2, 14, 4, 14) + .d("cauldron_inner").uv(2, 2, 14, 14) + .u("cauldron_inner").uv(2, 2, 14, 14) + .n().uv(2, 0, 0, 13) + .s().uv(0, 0, 2, 13) + .w().uv(0, 0, 16, 13) + .e().uv(0, 0, 16, 13) + .add(14, 3, 0, 16, 16, 16) + .d("cauldron_inner").uv(14, 0, 16, 16) + .u("cauldron_top").uv(14, 0, 16, 16) + .n().uv(16, 0, 14, 13) + .s().uv(14, 0, 16, 13) + .w().uv(0, 0, 16, 13).noCull() + .e().uv(0, 0, 16, 13) + .add(2, 3, 0, 14, 16, 2) + .d("cauldron_inner").uv(2, 0, 14, 2) + .u("cauldron_top").uv(2, 0, 14, 2) + .n().uv(2, 0, 14, 13) + .s().uv(2, 0, 14, 13).noCull() + .w().uv(0, 0, 2, 13) + .e().uv(0, 0, 2, 13) + .add(2, 3, 14, 14, 16, 16) + .d("cauldron_inner").uv(2, 14, 14, 16) + .u("cauldron_top").uv(2, 14, 14, 16) + .n().uv(2, 0, 14, 13).noCull() + .s().uv(2, 0, 14, 13) + .w().uv(14, 0, 16, 13) + .e().uv(14, 0, 16, 13) + .add(0, 0, 0, 4, 3, 2) + .d("cauldron_bottom").uv(0, 0, 4, 2) + .u("cauldron_top").uv(0, 0, 2, 16) + .n().uv(4, 13, 0, 16) + .s().uv(0, 13, 4, 16) + .w().uv(0, 13, 2, 16) + .e().uv(0, 13, 2, 16) + .add(0, 0, 2, 2, 3, 4) + .d("cauldron_bottom").uv(0, 2, 2, 4) + .u("cauldron_top").uv(0, 0, 2, 16) + .n().uv(2, 13, 0, 16) + .s().uv(0, 13, 2, 16) + .w().uv(2, 13, 4, 16) + .e().uv(2, 13, 4, 16) + .add(12, 0, 0, 16, 3, 2) + .d("cauldron_bottom").uv(12, 0, 16, 2) + .u("cauldron_top").uv(0, 0, 2, 16) + .n().uv(16, 13, 12, 16) + .s().uv(12, 13, 16, 16) + .w().uv(0, 13, 2, 16) + .e().uv(0, 13, 2, 16) + .add(14, 0, 2, 16, 3, 4) + .d("cauldron_bottom").uv(14, 2, 16, 4).noCull() + .u("cauldron_top").uv(0, 0, 2, 16).noCull() + .n().uv(16, 13, 14, 16).noCull() + .s().uv(14, 13, 16, 16).noCull() + .w().uv(4, 13, 2, 16).noCull() + .e().uv(4, 13, 2, 16).noCull() + .add(0, 0, 14, 4, 3, 16) + .d("cauldron_bottom").uv(14, 0, 16, 4).noCull() + .u("cauldron_top").uv(14, 0, 16, 16).noCull() + .n().uv(4, 13, 0, 16).noCull() + .s().uv(0, 13, 4, 16).noCull() + .w().uv(14, 13, 16, 16).noCull() + .e().uv(14, 13, 16, 16).noCull() + .add(0, 0, 12, 2, 3, 14) + .d("cauldron_bottom").uv(12, 0, 14, 4).noCull() + .u("cauldron_top").uv(14, 0, 16, 16).noCull() + .n().uv(2, 13, 0, 16).noCull() + .s().uv(0, 13, 2, 16).noCull() + .w().uv(12, 13, 14, 16).noCull() + .e().uv(12, 13, 14, 16).noCull() + .add(12, 0, 14, 16, 3, 16) + .d("cauldron_bottom").uv(14, 12, 16, 16).noCull() + .u("cauldron_top").uv(14, 0, 16, 16).noCull() + .n().uv(16, 13, 12, 16).noCull() + .s().uv(12, 13, 16, 16).noCull() + .w().uv(14, 13, 16, 16).noCull() + .e().uv(14, 13, 16, 16).noCull() + .add(14, 0, 12, 16, 3, 14) + .d("cauldron_bottom").uv(14, 12, 16, 14).noCull() + .u("cauldron_top").uv(14, 0, 16, 16).noCull() + .n().uv(16, 13, 14, 16).noCull() + .s().uv(14, 13, 16, 16).noCull() + .w().uv(14, 13, 12, 16).noCull() + .e().uv(14, 13, 12, 16).noCull() + .add(2, 15, 2, 14, 15, 14) + .u("water_still").uv(2, 2, 14, 14).noCull(); + } } } diff --git a/common/src/main/java/common/block/tech/BlockChest.java b/common/src/main/java/common/block/tech/BlockChest.java index 6dc62b96..7b599738 100755 --- a/common/src/main/java/common/block/tech/BlockChest.java +++ b/common/src/main/java/common/block/tech/BlockChest.java @@ -20,7 +20,7 @@ import common.item.CheatTab; import common.item.ItemStack; import common.item.tool.ItemKey; import common.model.Model; -import common.model.ModelProvider; +import common.model.Model.ModelProvider; import common.model.ModelRotation; import common.packet.SPacketSoundEffect; import common.properties.Property; diff --git a/common/src/main/java/common/block/tech/BlockDispenser.java b/common/src/main/java/common/block/tech/BlockDispenser.java index 0672dfdd..73ce8078 100755 --- a/common/src/main/java/common/block/tech/BlockDispenser.java +++ b/common/src/main/java/common/block/tech/BlockDispenser.java @@ -10,7 +10,7 @@ import common.entity.types.EntityLiving; import common.item.CheatTab; import common.item.ItemStack; import common.model.Model; -import common.model.ModelProvider; +import common.model.Model.ModelProvider; import common.model.ModelRotation; import common.properties.Property; import common.rng.Random; diff --git a/common/src/main/java/common/block/tech/BlockDisplay.java b/common/src/main/java/common/block/tech/BlockDisplay.java index f3548c79..f9b95217 100644 --- a/common/src/main/java/common/block/tech/BlockDisplay.java +++ b/common/src/main/java/common/block/tech/BlockDisplay.java @@ -11,7 +11,7 @@ import common.block.Rotatable; import common.entity.types.EntityLiving; import common.item.CheatTab; import common.model.Model; -import common.model.ModelProvider; +import common.model.Model.ModelProvider; import common.model.ModelRotation; import common.model.GuiPosition; import common.properties.Property; diff --git a/common/src/main/java/common/block/tech/BlockEffectGenerator.java b/common/src/main/java/common/block/tech/BlockEffectGenerator.java index 904e09ad..b7841134 100755 --- a/common/src/main/java/common/block/tech/BlockEffectGenerator.java +++ b/common/src/main/java/common/block/tech/BlockEffectGenerator.java @@ -3,37 +3,13 @@ package common.block.tech; import common.block.Material; import common.item.CheatTab; import common.model.Model; -import common.model.ModelProvider; +import common.model.Model.ModelProvider; import common.tileentity.TileEntity; import common.util.Clientside; import common.tileentity.DeviceEffectGenerator; import common.world.State; public class BlockEffectGenerator extends BlockMachine { - private static final Model MODEL = ModelProvider.getModelProvider().getModel("glass") - .add(0, 0, 0, 16, 16, 16) - .d().uv(0, 0, 16, 16).noCull() - .u().uv(0, 0, 16, 16).noCull() - .n().uv(0, 0, 16, 16).noCull() - .s().uv(0, 0, 16, 16).noCull() - .w().uv(0, 0, 16, 16).noCull() - .e().uv(0, 0, 16, 16).noCull() - .add(2, 0.1f, 2, 14, 3, 14) - .d("obsidian").uv(2, 2, 14, 14).noCull() - .u("obsidian").uv(2, 2, 14, 14).noCull() - .n("obsidian").uv(2, 13, 14, 16).noCull() - .s("obsidian").uv(2, 13, 14, 16).noCull() - .w("obsidian").uv(2, 13, 14, 16).noCull() - .e("obsidian").uv(2, 13, 14, 16).noCull() - .add(3, 3, 3, 13, 14, 13) - .d("effect_generator").uv(3, 3, 13, 13).noCull() - .u("effect_generator").uv(3, 3, 13, 13).noCull() - .n("effect_generator").uv(3, 2, 13, 13).noCull() - .s("effect_generator").uv(3, 2, 13, 13).noCull() - .w("effect_generator").uv(3, 2, 13, 13).noCull() - .e("effect_generator").uv(3, 2, 13, 13).noCull() - ; - public BlockEffectGenerator() { super(Material.TRANSLUCENT); this.setHardness(3.0F); @@ -58,6 +34,27 @@ public class BlockEffectGenerator extends BlockMachine { } public Model getModel(ModelProvider provider, String name, State state) { - return MODEL; + return provider.getModel("glass") + .add(0, 0, 0, 16, 16, 16) + .d().uv(0, 0, 16, 16).noCull() + .u().uv(0, 0, 16, 16).noCull() + .n().uv(0, 0, 16, 16).noCull() + .s().uv(0, 0, 16, 16).noCull() + .w().uv(0, 0, 16, 16).noCull() + .e().uv(0, 0, 16, 16).noCull() + .add(2, 0.1f, 2, 14, 3, 14) + .d("obsidian").uv(2, 2, 14, 14).noCull() + .u("obsidian").uv(2, 2, 14, 14).noCull() + .n("obsidian").uv(2, 13, 14, 16).noCull() + .s("obsidian").uv(2, 13, 14, 16).noCull() + .w("obsidian").uv(2, 13, 14, 16).noCull() + .e("obsidian").uv(2, 13, 14, 16).noCull() + .add(3, 3, 3, 13, 14, 13) + .d("effect_generator").uv(3, 3, 13, 13).noCull() + .u("effect_generator").uv(3, 3, 13, 13).noCull() + .n("effect_generator").uv(3, 2, 13, 13).noCull() + .s("effect_generator").uv(3, 2, 13, 13).noCull() + .w("effect_generator").uv(3, 2, 13, 13).noCull() + .e("effect_generator").uv(3, 2, 13, 13).noCull(); } } diff --git a/common/src/main/java/common/block/tech/BlockEnchantmentTable.java b/common/src/main/java/common/block/tech/BlockEnchantmentTable.java index 9ad5ffe8..ab75d628 100755 --- a/common/src/main/java/common/block/tech/BlockEnchantmentTable.java +++ b/common/src/main/java/common/block/tech/BlockEnchantmentTable.java @@ -8,7 +8,7 @@ import common.inventory.ContainerEnchantment; import common.inventory.InventoryPlayer; import common.item.CheatTab; import common.model.Model; -import common.model.ModelProvider; +import common.model.Model.ModelProvider; import common.util.BlockPos; import common.util.Facing; import common.world.State; @@ -16,16 +16,6 @@ import common.world.World; public class BlockEnchantmentTable extends Block { - private static final Model MODEL = ModelProvider.getModelProvider().getModel("enchanting_table_bottom") - .add(0, 0, 0, 16, 12, 16) - .d().uv(0, 0, 16, 16) - .u("enchanting_table_top").uv(0, 0, 16, 16).noCull() - .n("enchanting_table_side").uv(0, 4, 16, 16) - .s("enchanting_table_side").uv(0, 4, 16, 16) - .w("enchanting_table_side").uv(0, 4, 16, 16) - .e("enchanting_table_side").uv(0, 4, 16, 16) - ; - public BlockEnchantmentTable() { super(Material.SOLID); @@ -58,7 +48,14 @@ public class BlockEnchantmentTable extends Block } public Model getModel(ModelProvider provider, String name, State state) { - return MODEL; + return provider.getModel("enchanting_table_bottom") + .add(0, 0, 0, 16, 12, 16) + .d().uv(0, 0, 16, 16) + .u("enchanting_table_top").uv(0, 0, 16, 16).noCull() + .n("enchanting_table_side").uv(0, 4, 16, 16) + .s("enchanting_table_side").uv(0, 4, 16, 16) + .w("enchanting_table_side").uv(0, 4, 16, 16) + .e("enchanting_table_side").uv(0, 4, 16, 16); } public class Enchanter implements InteractionObject diff --git a/common/src/main/java/common/block/tech/BlockFurnace.java b/common/src/main/java/common/block/tech/BlockFurnace.java index fab2667e..0541d855 100755 --- a/common/src/main/java/common/block/tech/BlockFurnace.java +++ b/common/src/main/java/common/block/tech/BlockFurnace.java @@ -10,7 +10,7 @@ import common.init.Blocks; import common.init.Items; import common.item.Item; import common.model.Model; -import common.model.ModelProvider; +import common.model.Model.ModelProvider; import common.model.ModelRotation; import common.properties.Property; import common.rng.Random; diff --git a/common/src/main/java/common/block/tech/BlockHopper.java b/common/src/main/java/common/block/tech/BlockHopper.java index 2c62bf87..47fa009f 100755 --- a/common/src/main/java/common/block/tech/BlockHopper.java +++ b/common/src/main/java/common/block/tech/BlockHopper.java @@ -11,7 +11,7 @@ import common.entity.npc.EntityNPC; import common.entity.types.EntityLiving; import common.item.CheatTab; import common.model.Model; -import common.model.ModelProvider; +import common.model.Model.ModelProvider; import common.model.ModelRotation; import common.properties.Property; import common.tileentity.TileEntity; @@ -27,59 +27,6 @@ import common.world.AWorldServer; public class BlockHopper extends Block implements ITileEntityProvider, Directional { - private static Model getHopperModel(boolean up) { - return ModelProvider.getModelProvider().getModel("hopper_outside") - .add(0, 10, 0, 16, 11, 16) - .d().uv(0, 0, 16, 16).noCull() - .u("hopper_inside").uv(0, 0, 16, 16).noCull() - .n().uv(0, 5, 16, 6).noCull() - .s().uv(0, 5, 16, 6).noCull() - .w().uv(0, 5, 16, 6).noCull() - .e().uv(0, 5, 16, 6).noCull() - .add(0, 11, 0, 2, 16, 16) - .d().uv(0, 0, 2, 16).noCull() - .u("hopper_top").uv(0, 0, 2, 16).noCull() - .n().uv(0, 0, 2, 5).noCull() - .s().uv(0, 0, 2, 5).noCull() - .w().uv(0, 0, 16, 5).noCull() - .e().uv(0, 0, 16, 5).noCull() - .add(14, 11, 0, 16, 16, 16) - .d().uv(14, 0, 16, 16).noCull() - .u("hopper_top").uv(14, 0, 16, 16).noCull() - .n().uv(14, 0, 16, 5).noCull() - .s().uv(14, 0, 16, 5).noCull() - .w().uv(0, 0, 16, 5).noCull() - .e().uv(0, 0, 16, 5).noCull() - .add(2, 11, 0, 14, 16, 2) - .d().uv(2, 0, 14, 2).noCull() - .u("hopper_top").uv(2, 0, 14, 2).noCull() - .n().uv(2, 0, 14, 5).noCull() - .s().uv(2, 0, 14, 5).noCull() - .w().uv(0, 0, 2, 5).noCull() - .e().uv(0, 0, 2, 5).noCull() - .add(2, 11, 14, 14, 16, 16) - .d().uv(2, 14, 14, 16).noCull() - .u("hopper_top").uv(2, 14, 14, 16).noCull() - .n().uv(2, 0, 14, 5).noCull() - .s().uv(2, 0, 14, 5).noCull() - .w().uv(14, 0, 16, 5).noCull() - .e().uv(14, 0, 16, 5).noCull() - .add(4, 4, 4, 12, 10, 12) - .d().uv(4, 4, 12, 12).noCull() - .u().uv(4, 4, 12, 12).noCull() - .n().uv(4, 6, 12, 12).noCull() - .s().uv(4, 6, 12, 12).noCull() - .w().uv(4, 6, 12, 12).noCull() - .e().uv(4, 6, 12, 12).noCull() - .add(6, 0, 6, 10, 4, 10) - .d().uv(6, 6, 10, 10).noCull() - .u().uv(6, 6, 10, 10).noCull() - .n().uv(6, 12, 10, 16).noCull() - .s().uv(6, 12, 10, 16).noCull() - .w().uv(6, 12, 10, 16).noCull() - .e().uv(6, 12, 10, 16).noCull().rotate(up ? ModelRotation.X180_Y0 : ModelRotation.X0_Y0); - } - public BlockHopper() { super(Material.SOLID); @@ -194,7 +141,59 @@ public class BlockHopper extends Block implements ITileEntityProvider, Direction } public Model getModel(ModelProvider provider, String name, State state) { - return state.getValue(FACING).getAxis().isVertical() ? getHopperModel(state.getValue(FACING) == Facing.UP) : provider.getModel("hopper_outside") + if(state.getValue(FACING).getAxis().isVertical()) + return provider.getModel("hopper_outside") + .add(0, 10, 0, 16, 11, 16) + .d().uv(0, 0, 16, 16).noCull() + .u("hopper_inside").uv(0, 0, 16, 16).noCull() + .n().uv(0, 5, 16, 6).noCull() + .s().uv(0, 5, 16, 6).noCull() + .w().uv(0, 5, 16, 6).noCull() + .e().uv(0, 5, 16, 6).noCull() + .add(0, 11, 0, 2, 16, 16) + .d().uv(0, 0, 2, 16).noCull() + .u("hopper_top").uv(0, 0, 2, 16).noCull() + .n().uv(0, 0, 2, 5).noCull() + .s().uv(0, 0, 2, 5).noCull() + .w().uv(0, 0, 16, 5).noCull() + .e().uv(0, 0, 16, 5).noCull() + .add(14, 11, 0, 16, 16, 16) + .d().uv(14, 0, 16, 16).noCull() + .u("hopper_top").uv(14, 0, 16, 16).noCull() + .n().uv(14, 0, 16, 5).noCull() + .s().uv(14, 0, 16, 5).noCull() + .w().uv(0, 0, 16, 5).noCull() + .e().uv(0, 0, 16, 5).noCull() + .add(2, 11, 0, 14, 16, 2) + .d().uv(2, 0, 14, 2).noCull() + .u("hopper_top").uv(2, 0, 14, 2).noCull() + .n().uv(2, 0, 14, 5).noCull() + .s().uv(2, 0, 14, 5).noCull() + .w().uv(0, 0, 2, 5).noCull() + .e().uv(0, 0, 2, 5).noCull() + .add(2, 11, 14, 14, 16, 16) + .d().uv(2, 14, 14, 16).noCull() + .u("hopper_top").uv(2, 14, 14, 16).noCull() + .n().uv(2, 0, 14, 5).noCull() + .s().uv(2, 0, 14, 5).noCull() + .w().uv(14, 0, 16, 5).noCull() + .e().uv(14, 0, 16, 5).noCull() + .add(4, 4, 4, 12, 10, 12) + .d().uv(4, 4, 12, 12).noCull() + .u().uv(4, 4, 12, 12).noCull() + .n().uv(4, 6, 12, 12).noCull() + .s().uv(4, 6, 12, 12).noCull() + .w().uv(4, 6, 12, 12).noCull() + .e().uv(4, 6, 12, 12).noCull() + .add(6, 0, 6, 10, 4, 10) + .d().uv(6, 6, 10, 10).noCull() + .u().uv(6, 6, 10, 10).noCull() + .n().uv(6, 12, 10, 16).noCull() + .s().uv(6, 12, 10, 16).noCull() + .w().uv(6, 12, 10, 16).noCull() + .e().uv(6, 12, 10, 16).noCull().rotate(state.getValue(FACING) == Facing.UP ? ModelRotation.X180_Y0 : ModelRotation.X0_Y0); + else + return provider.getModel("hopper_outside") .add(0, 10, 0, 16, 11, 16) .d().uv(0, 0, 16, 16).noCull() .u("hopper_inside").uv(0, 0, 16, 16).noCull() diff --git a/common/src/main/java/common/block/tech/BlockLever.java b/common/src/main/java/common/block/tech/BlockLever.java index ef0d2f92..50eb57af 100755 --- a/common/src/main/java/common/block/tech/BlockLever.java +++ b/common/src/main/java/common/block/tech/BlockLever.java @@ -7,7 +7,7 @@ import common.entity.types.EntityLiving; import common.init.SoundEvent; import common.item.CheatTab; import common.model.Model; -import common.model.ModelProvider; +import common.model.Model.ModelProvider; import common.model.ModelRotation; import common.model.GuiPosition; import common.properties.Property; diff --git a/common/src/main/java/common/block/tech/BlockNuke.java b/common/src/main/java/common/block/tech/BlockNuke.java index 4af468fd..f3547493 100755 --- a/common/src/main/java/common/block/tech/BlockNuke.java +++ b/common/src/main/java/common/block/tech/BlockNuke.java @@ -8,7 +8,7 @@ import common.init.Blocks; import common.init.SoundEvent; import common.item.CheatTab; import common.model.Model; -import common.model.ModelProvider; +import common.model.Model.ModelProvider; import common.util.BlockPos; import common.world.Explosion; import common.world.State; diff --git a/common/src/main/java/common/block/tech/BlockPistonBase.java b/common/src/main/java/common/block/tech/BlockPistonBase.java index 5ceab5b1..ae98ff2d 100755 --- a/common/src/main/java/common/block/tech/BlockPistonBase.java +++ b/common/src/main/java/common/block/tech/BlockPistonBase.java @@ -14,7 +14,7 @@ import common.init.Blocks; import common.init.SoundEvent; import common.item.CheatTab; import common.model.Model; -import common.model.ModelProvider; +import common.model.Model.ModelProvider; import common.model.ModelRotation; import common.properties.Property; import common.properties.PropertyBool; diff --git a/common/src/main/java/common/block/tech/BlockPistonHead.java b/common/src/main/java/common/block/tech/BlockPistonHead.java index 43df8228..ce2bcf8f 100755 --- a/common/src/main/java/common/block/tech/BlockPistonHead.java +++ b/common/src/main/java/common/block/tech/BlockPistonHead.java @@ -11,7 +11,7 @@ import common.init.Blocks; import common.init.Items; import common.item.Item; import common.model.Model; -import common.model.ModelProvider; +import common.model.Model.ModelProvider; import common.model.ModelRotation; import common.properties.Property; import common.rng.Random; diff --git a/common/src/main/java/common/block/tech/BlockRail.java b/common/src/main/java/common/block/tech/BlockRail.java index 92265b27..7eabe037 100755 --- a/common/src/main/java/common/block/tech/BlockRail.java +++ b/common/src/main/java/common/block/tech/BlockRail.java @@ -8,7 +8,7 @@ import common.collect.Lists; import common.init.Blocks; import common.item.CheatTab; import common.model.Model; -import common.model.ModelProvider; +import common.model.Model.ModelProvider; import common.model.ModelRotation; import common.model.GuiPosition; import common.properties.Property; diff --git a/common/src/main/java/common/block/tech/BlockStandingSign.java b/common/src/main/java/common/block/tech/BlockStandingSign.java index 5d1185d6..8772219a 100755 --- a/common/src/main/java/common/block/tech/BlockStandingSign.java +++ b/common/src/main/java/common/block/tech/BlockStandingSign.java @@ -6,7 +6,7 @@ import common.entity.npc.EntityNPC; import common.init.Blocks; import common.item.ItemStack; import common.model.Model; -import common.model.ModelProvider; +import common.model.Model.ModelProvider; import common.model.ModelRotation; import common.tileentity.TileEntity; import common.tileentity.TileEntitySign; diff --git a/common/src/main/java/common/block/tech/BlockTNT.java b/common/src/main/java/common/block/tech/BlockTNT.java index d563073e..87464fcc 100755 --- a/common/src/main/java/common/block/tech/BlockTNT.java +++ b/common/src/main/java/common/block/tech/BlockTNT.java @@ -14,7 +14,7 @@ import common.item.CheatTab; import common.item.Item; import common.item.ItemStack; import common.model.Model; -import common.model.ModelProvider; +import common.model.Model.ModelProvider; import common.properties.Property; import common.properties.PropertyBool; import common.tileentity.TileEntity; diff --git a/common/src/main/java/common/block/tech/BlockTianReactor.java b/common/src/main/java/common/block/tech/BlockTianReactor.java index c2631acb..e4f0fffe 100755 --- a/common/src/main/java/common/block/tech/BlockTianReactor.java +++ b/common/src/main/java/common/block/tech/BlockTianReactor.java @@ -3,7 +3,7 @@ package common.block.tech; import java.util.Map; import common.model.Model; -import common.model.ModelProvider; +import common.model.Model.ModelProvider; import common.model.ModelRotation; import common.tileentity.TileEntity; import common.tileentity.DeviceTianReactor; diff --git a/common/src/main/java/common/block/tech/BlockTorch.java b/common/src/main/java/common/block/tech/BlockTorch.java index 01f0ce97..594c20eb 100755 --- a/common/src/main/java/common/block/tech/BlockTorch.java +++ b/common/src/main/java/common/block/tech/BlockTorch.java @@ -10,7 +10,7 @@ import common.entity.types.EntityLiving; import common.init.Blocks; import common.item.CheatTab; import common.model.Model; -import common.model.ModelProvider; +import common.model.Model.ModelProvider; import common.model.ModelRotation; import common.model.GuiPosition; import common.properties.Property; diff --git a/common/src/main/java/common/block/tech/BlockTripWire.java b/common/src/main/java/common/block/tech/BlockTripWire.java index 8b747fe4..14c6d4bd 100755 --- a/common/src/main/java/common/block/tech/BlockTripWire.java +++ b/common/src/main/java/common/block/tech/BlockTripWire.java @@ -10,7 +10,7 @@ import common.init.Blocks; import common.item.StackSize; import common.item.tool.ItemShears; import common.model.Model; -import common.model.ModelProvider; +import common.model.Model.ModelProvider; import common.model.ModelRotation; import common.model.GuiPosition; import common.properties.Property; @@ -246,9 +246,9 @@ public class BlockTripWire extends Block return new Property[] {POWERED, SUSPENDED, ATTACHED, DISARMED, NORTH, EAST, WEST, SOUTH}; } - private static Model getModelDetached(boolean n, boolean s, boolean w, boolean e, int sides) { + private static Model getModelDetached(Model model, boolean n, boolean s, boolean w, boolean e, int sides) { if(sides == 1) - return ModelProvider.getModelProvider().getModel("trip_wire") + return model .add(7.75f, 1.5f, 0, 8.25f, 1.5f, 4).noShade() .d().uv(0, 2, 16, 0).rot(90).noCull() .u().uv(0, 0, 16, 2).rot(90).noCull() @@ -260,7 +260,7 @@ public class BlockTripWire extends Block .u().uv(0, 0, 16, 2).rot(90).noCull() .rotate(n ? ModelRotation.X0_Y0 : (s ? ModelRotation.X0_Y180 : (w ? ModelRotation.X0_Y270 : ModelRotation.X0_Y90))); else if(sides == 2 && ((e != w) || (n != s))) - return ModelProvider.getModelProvider().getModel("trip_wire") + return model .add(7.75f, 1.5f, 0, 8.25f, 1.5f, 4).noShade() .d().uv(0, 2, 16, 0).rot(90).noCull() .u().uv(0, 0, 16, 2).rot(90).noCull() @@ -276,7 +276,7 @@ public class BlockTripWire extends Block .rotate(n && e ? ModelRotation.X0_Y0 : (s && w ? ModelRotation.X0_Y180 : (n && w ? ModelRotation.X0_Y270 : ModelRotation.X0_Y90))); else if(sides == 2) - return ModelProvider.getModelProvider().getModel("trip_wire") + return model .add(7.75f, 1.5f, 0, 8.25f, 1.5f, 4).noShade() .d().uv(0, 2, 16, 0).rot(90).noCull() .u().uv(0, 0, 16, 2).rot(90).noCull() @@ -291,7 +291,7 @@ public class BlockTripWire extends Block .u().uv(0, 0, 16, 2).rot(90).noCull() .rotate(n ? ModelRotation.X0_Y0 : ModelRotation.X0_Y90); else if(sides == 3) - return ModelProvider.getModelProvider().getModel("trip_wire") + return model .add(7.75f, 1.5f, 0, 8.25f, 1.5f, 4).noShade() .d().uv(0, 2, 16, 0).rot(90).noCull() .u().uv(0, 0, 16, 2).rot(90).noCull() @@ -312,7 +312,7 @@ public class BlockTripWire extends Block .u().uv(0, 0, 16, 2).noCull() .rotate(!w ? ModelRotation.X0_Y0 : (!e ? ModelRotation.X0_Y180 : (!s ? ModelRotation.X0_Y270 : ModelRotation.X0_Y90))); else - return ModelProvider.getModelProvider().getModel("trip_wire") + return model .add(7.75f, 1.5f, 0, 8.25f, 1.5f, 4).noShade() .d().uv(0, 2, 16, 0).rot(90).noCull() .u().uv(0, 0, 16, 2).rot(90).noCull() @@ -339,9 +339,9 @@ public class BlockTripWire extends Block .u().uv(0, 0, 16, 2).noCull(); } - private static Model getModelAttached(boolean n, boolean s, boolean w, boolean e, int sides) { + private static Model getModelAttached(Model model, boolean n, boolean s, boolean w, boolean e, int sides) { if(sides == 1) - return ModelProvider.getModelProvider().getModel("trip_wire") + return model .add(7.75f, 1.5f, 0, 8.25f, 1.5f, 4).noShade() .d().uv(0, 4, 16, 2).rot(90).noCull() .u().uv(0, 2, 16, 4).rot(90).noCull() @@ -353,7 +353,7 @@ public class BlockTripWire extends Block .u().uv(0, 2, 16, 4).rot(90).noCull() .rotate(n ? ModelRotation.X0_Y0 : (s ? ModelRotation.X0_Y180 : (w ? ModelRotation.X0_Y270 : ModelRotation.X0_Y90))); else if(sides == 2 && ((e != w) || (n != s))) - return ModelProvider.getModelProvider().getModel("trip_wire") + return model .add(7.75f, 1.5f, 0, 8.25f, 1.5f, 4).noShade() .d().uv(0, 4, 16, 2).rot(90).noCull() .u().uv(0, 2, 16, 4).rot(90).noCull() @@ -369,7 +369,7 @@ public class BlockTripWire extends Block .rotate(n && e ? ModelRotation.X0_Y0 : (s && w ? ModelRotation.X0_Y180 : (n && w ? ModelRotation.X0_Y270 : ModelRotation.X0_Y90))); else if(sides == 2) - return ModelProvider.getModelProvider().getModel("trip_wire") + return model .add(7.75f, 1.5f, 0, 8.25f, 1.5f, 4).noShade() .d().uv(0, 4, 16, 2).rot(90).noCull() .u().uv(0, 2, 16, 4).rot(90).noCull() @@ -384,7 +384,7 @@ public class BlockTripWire extends Block .u().uv(0, 2, 16, 4).rot(90).noCull() .rotate(n ? ModelRotation.X0_Y0 : ModelRotation.X0_Y90); else if(sides == 3) - return ModelProvider.getModelProvider().getModel("trip_wire") + return model .add(7.75f, 1.5f, 0, 8.25f, 1.5f, 4).noShade() .d().uv(0, 4, 16, 2).rot(90).noCull() .u().uv(0, 2, 16, 4).rot(90).noCull() @@ -405,7 +405,7 @@ public class BlockTripWire extends Block .u().uv(0, 2, 16, 4).noCull() .rotate(!w ? ModelRotation.X0_Y0 : (!e ? ModelRotation.X0_Y180 : (!s ? ModelRotation.X0_Y270 : ModelRotation.X0_Y90))); else - return ModelProvider.getModelProvider().getModel("trip_wire") + return model .add(7.75f, 1.5f, 0, 8.25f, 1.5f, 4).noShade() .d().uv(0, 4, 16, 2).rot(90).noCull() .u().uv(0, 2, 16, 4).rot(90).noCull() @@ -432,9 +432,9 @@ public class BlockTripWire extends Block .u().uv(0, 2, 16, 4).noCull(); } - private static Model getModelDetSuspend(boolean n, boolean s, boolean w, boolean e, int sides) { + private static Model getModelDetSuspend(Model model, boolean n, boolean s, boolean w, boolean e, int sides) { if(sides == 1) - return ModelProvider.getModelProvider().getModel("trip_wire") + return model .add(7.75f, 3.5f, 0, 8.25f, 3.5f, 4).noShade() .d().uv(0, 2, 16, 0).rot(90).noCull() .u().uv(0, 0, 16, 2).rot(90).noCull() @@ -446,7 +446,7 @@ public class BlockTripWire extends Block .u().uv(0, 0, 16, 2).rot(90).noCull() .rotate(n ? ModelRotation.X0_Y0 : (s ? ModelRotation.X0_Y180 : (w ? ModelRotation.X0_Y270 : ModelRotation.X0_Y90))); else if(sides == 2 && ((e != w) || (n != s))) - return ModelProvider.getModelProvider().getModel("trip_wire") + return model .add(7.75f, 3.5f, 0, 8.25f, 3.5f, 4).noShade() .d().uv(0, 2, 16, 0).rot(90).noCull() .u().uv(0, 0, 16, 2).rot(90).noCull() @@ -462,7 +462,7 @@ public class BlockTripWire extends Block .rotate(n && e ? ModelRotation.X0_Y0 : (s && w ? ModelRotation.X0_Y180 : (n && w ? ModelRotation.X0_Y270 : ModelRotation.X0_Y90))); else if(sides == 2) - return ModelProvider.getModelProvider().getModel("trip_wire") + return model .add(7.75f, 3.5f, 0, 8.25f, 3.5f, 4).noShade() .d().uv(0, 2, 16, 0).rot(90).noCull() .u().uv(0, 0, 16, 2).rot(90).noCull() @@ -477,7 +477,7 @@ public class BlockTripWire extends Block .u().uv(0, 0, 16, 2).rot(90).noCull() .rotate(n ? ModelRotation.X0_Y0 : ModelRotation.X0_Y90); else if(sides == 3) - return ModelProvider.getModelProvider().getModel("trip_wire") + return model .add(7.75f, 3.5f, 0, 8.25f, 3.5f, 4).noShade() .d().uv(0, 2, 16, 0).rot(90).noCull() .u().uv(0, 0, 16, 2).rot(90).noCull() @@ -498,7 +498,7 @@ public class BlockTripWire extends Block .u().uv(0, 0, 16, 2).noCull() .rotate(!w ? ModelRotation.X0_Y0 : (!e ? ModelRotation.X0_Y180 : (!s ? ModelRotation.X0_Y270 : ModelRotation.X0_Y90))); else - return ModelProvider.getModelProvider().getModel("trip_wire") + return model .add(7.75f, 3.5f, 0, 8.25f, 3.5f, 4).noShade() .d().uv(0, 2, 16, 0).rot(90).noCull() .u().uv(0, 0, 16, 2).rot(90).noCull() @@ -525,9 +525,9 @@ public class BlockTripWire extends Block .u().uv(0, 0, 16, 2).noCull(); } - private static Model getModelAttSuspend(boolean n, boolean s, boolean w, boolean e, int sides) { + private static Model getModelAttSuspend(Model model, boolean n, boolean s, boolean w, boolean e, int sides) { if(sides == 1) - return ModelProvider.getModelProvider().getModel("trip_wire") + return model .add(7.75f, 3.5f, 0, 8.25f, 3.5f, 4).noShade() .d().uv(0, 4, 16, 2).rot(90).noCull() .u().uv(0, 2, 16, 4).rot(90).noCull() @@ -539,7 +539,7 @@ public class BlockTripWire extends Block .u().uv(0, 2, 16, 4).rot(90).noCull() .rotate(n ? ModelRotation.X0_Y0 : (s ? ModelRotation.X0_Y180 : (w ? ModelRotation.X0_Y270 : ModelRotation.X0_Y90))); else if(sides == 2 && ((e != w) || (n != s))) - return ModelProvider.getModelProvider().getModel("trip_wire") + return model .add(7.75f, 3.5f, 0, 8.25f, 3.5f, 4).noShade() .d().uv(0, 4, 16, 2).rot(90).noCull() .u().uv(0, 2, 16, 4).rot(90).noCull() @@ -555,7 +555,7 @@ public class BlockTripWire extends Block .rotate(n && e ? ModelRotation.X0_Y0 : (s && w ? ModelRotation.X0_Y180 : (n && w ? ModelRotation.X0_Y270 : ModelRotation.X0_Y90))); else if(sides == 2) - return ModelProvider.getModelProvider().getModel("trip_wire") + return model .add(7.75f, 3.5f, 0, 8.25f, 3.5f, 4).noShade() .d().uv(0, 4, 16, 2).rot(90).noCull() .u().uv(0, 2, 16, 4).rot(90).noCull() @@ -570,7 +570,7 @@ public class BlockTripWire extends Block .u().uv(0, 2, 16, 4).rot(90).noCull() .rotate(n ? ModelRotation.X0_Y0 : ModelRotation.X0_Y90); else if(sides == 3) - return ModelProvider.getModelProvider().getModel("trip_wire") + return model .add(7.75f, 3.5f, 0, 8.25f, 3.5f, 4).noShade() .d().uv(0, 4, 16, 2).rot(90).noCull() .u().uv(0, 2, 16, 4).rot(90).noCull() @@ -591,7 +591,7 @@ public class BlockTripWire extends Block .u().uv(0, 2, 16, 4).noCull() .rotate(!w ? ModelRotation.X0_Y0 : (!e ? ModelRotation.X0_Y180 : (!s ? ModelRotation.X0_Y270 : ModelRotation.X0_Y90))); else - return ModelProvider.getModelProvider().getModel("trip_wire") + return model .add(7.75f, 3.5f, 0, 8.25f, 3.5f, 4).noShade() .d().uv(0, 4, 16, 2).rot(90).noCull() .u().uv(0, 2, 16, 4).rot(90).noCull() @@ -629,9 +629,10 @@ public class BlockTripWire extends Block s = true; sides = 2; } - return (state.getValue(SUSPENDED) ? ((state.getValue(ATTACHED) ? getModelAttSuspend(n, s, w, e, sides) : - getModelDetSuspend(n, s, w, e, sides))) : (state.getValue(ATTACHED) ? getModelAttached(n, s, w, e, sides) : - getModelDetached(n, s, w, e, sides))); + Model model = provider.getModel("trip_wire"); + return (state.getValue(SUSPENDED) ? ((state.getValue(ATTACHED) ? getModelAttSuspend(model, n, s, w, e, sides) : + getModelDetSuspend(model, n, s, w, e, sides))) : (state.getValue(ATTACHED) ? getModelAttached(model, n, s, w, e, sides) : + getModelDetached(model, n, s, w, e, sides))); } public Property[] getIgnoredProperties() { diff --git a/common/src/main/java/common/block/tech/BlockTripWireHook.java b/common/src/main/java/common/block/tech/BlockTripWireHook.java index a170ccf3..d39be26b 100755 --- a/common/src/main/java/common/block/tech/BlockTripWireHook.java +++ b/common/src/main/java/common/block/tech/BlockTripWireHook.java @@ -8,7 +8,7 @@ import common.init.Blocks; import common.init.SoundEvent; import common.item.CheatTab; import common.model.Model; -import common.model.ModelProvider; +import common.model.Model.ModelProvider; import common.model.ModelRotation; import common.model.GuiPosition; import common.properties.Property; diff --git a/common/src/main/java/common/block/tech/BlockWallSign.java b/common/src/main/java/common/block/tech/BlockWallSign.java index a10b7721..34591581 100755 --- a/common/src/main/java/common/block/tech/BlockWallSign.java +++ b/common/src/main/java/common/block/tech/BlockWallSign.java @@ -3,7 +3,7 @@ package common.block.tech; import common.block.Block; import common.block.Rotatable; import common.model.Model; -import common.model.ModelProvider; +import common.model.Model.ModelProvider; import common.model.ModelRotation; import common.util.BlockPos; import common.util.Facing; diff --git a/common/src/main/java/common/block/tech/BlockWarpChest.java b/common/src/main/java/common/block/tech/BlockWarpChest.java index 52827f4e..dd575238 100755 --- a/common/src/main/java/common/block/tech/BlockWarpChest.java +++ b/common/src/main/java/common/block/tech/BlockWarpChest.java @@ -12,7 +12,7 @@ import common.inventory.InventoryPlayer; import common.item.CheatTab; import common.item.Item; import common.model.Model; -import common.model.ModelProvider; +import common.model.Model.ModelProvider; import common.model.ModelRotation; import common.properties.Property; import common.rng.Random; diff --git a/common/src/main/java/common/block/tech/BlockWire.java b/common/src/main/java/common/block/tech/BlockWire.java index 1f8ba9f5..6e55b99a 100755 --- a/common/src/main/java/common/block/tech/BlockWire.java +++ b/common/src/main/java/common/block/tech/BlockWire.java @@ -9,7 +9,7 @@ import common.block.Material; import common.collect.Sets; import common.item.StackSize; import common.model.Model; -import common.model.ModelProvider; +import common.model.Model.ModelProvider; import common.model.ModelRotation; import common.model.GuiPosition; import common.properties.Property; @@ -28,215 +28,6 @@ import common.world.AWorldServer; public class BlockWire extends Block { - private static final Model wire_none = ModelProvider.getModelProvider().getModel("wire_cross") - .add(2, 0.25f, 2, 14, 0.25f, 14).noShade() - .u("wire_line").uv(2, 2, 14, 14).noCull() - ; - private static final Model wire_nsew = ModelProvider.getModelProvider().getModel("wire_cross").uvLock() - .add(0, 0.25f, 0, 16, 0.25f, 16).noShade() - .u().uv(0, 0, 16, 16).noCull() - ; - private static final Model wire_unusueuw = ModelProvider.getModelProvider().getModel("wire_cross").uvLock() - .add(0, 0.25f, 0, 16, 0.25f, 16).noShade() - .u().uv(0, 0, 16, 16).noCull() - .add(0, 0, 0.25f, 16, 16, 0.25f).noShade() - .s("wire_line").uv(0, 0, 16, 16).rot(90).noCull() - .add(0, 0, 15.75f, 16, 16, 15.75f).noShade() - .n("wire_line").uv(0, 0, 16, 16).rot(90).noCull() - .add(15.75f, 0, 0, 15.75f, 16, 16).noShade() - .w("wire_line").uv(0, 0, 16, 16).rot(90).noCull() - .add(0.25f, 0, 0, 0.25f, 16, 16).noShade() - .e("wire_line").uv(0, 0, 16, 16).rot(90).noCull() - ; - private static final Model wire_unus = ModelProvider.getModelProvider().getModel("wire_cross") - .add(0, 0.25f, 0, 16, 0.25f, 16).noShade() - .u("wire_line").uv(0, 0, 16, 16).rot(90).noCull() - .add(0, 0.25f, 0, 16, 0.25f, 16).noShade() - .s("wire_line").uv(0, 0, 16, 16).rot(90).noCull() - .add(0, 0, 0.25f, 16, 16, 0.25f).noShade() - .n("wire_line").uv(0, 0, 16, 16).rot(90).noCull() - ; - private static final Model wire_ueuw = ModelProvider.getModelProvider().getModel("wire_cross") - .add(0, 0.25f, 0, 16, 0.25f, 16).noShade() - .u("wire_line").uv(0, 0, 16, 16).noCull() - .add(0.25f, 0, 0, 0.25f, 16, 16).noShade() - .e("wire_line").uv(0, 0, 16, 16).rot(90).noCull() - .add(15.75f, 0, 0, 15.75f, 16, 16).noShade() - .w("wire_line").uv(0, 0, 16, 16).rot(90).noCull() - ; - - private static Model wire_n(boolean rot) { - return ModelProvider.getModelProvider().getModel("wire_cross") - .add(0, 0.25f, 0, 16, 0.25f, 16).noShade() - .u("wire_line").uv(0, 0, 16, 16).rot(90).noCull() - .rotate(rot ? ModelRotation.X0_Y90 : ModelRotation.X0_Y0); - } - - private static Model wire_ne(ModelRotation rot) { - return ModelProvider.getModelProvider().getModel("wire_cross").uvLock() - .add(7, 0.25f, 0, 16, 0.25f, 9).noShade() - .u().uv(7, 0, 16, 9).noCull() - .rotate(rot); - } - - private static Model wire_uew(boolean rot) { - Model model = ModelProvider.getModelProvider().getModel("wire_cross") - .add(0, 0.25f, 0, 16, 0.25f, 16).noShade() - .u("wire_line").uv(0, 0, 16, 16).noCull() - .add(15.75f, 0, 0, 15.75f, 16, 16).noShade() - .w("wire_line").uv(0, 0, 16, 16).rot(90).noCull(); - return rot ? model.uvLock().rotate(ModelRotation.X0_Y180) : model; - } - private static Model wire_nue(ModelRotation rot) { - return ModelProvider.getModelProvider().getModel("wire_cross").uvLock() - .add(7, 0.25f, 0, 16, 0.25f, 9).noShade() - .u().uv(7, 0, 16, 9).noCull() - .add(15.75f, 0, 0, 15.75f, 16, 16).noShade() - .w("wire_line").uv(0, 0, 16, 16).rot(270).noCull() - .rotate(rot); - } - private static Model wire_une(ModelRotation rot) { - return ModelProvider.getModelProvider().getModel("wire_cross").uvLock() - .add(7, 0.25f, 0, 16, 0.25f, 9).noShade() - .u().uv(7, 0, 16, 9).noCull() - .add(0, 0, 0.25f, 16, 16, 0.25f).noShade() - .s("wire_line").uv(0, 0, 16, 16).rot(90).noCull() - .rotate(rot); - } - private static Model wire_nse(ModelRotation rot) { - return ModelProvider.getModelProvider().getModel("wire_cross").uvLock() - .add(7, 0.25f, 0, 16, 0.25f, 16).noShade() - .u().uv(7, 0, 16, 16).noCull() - .rotate(rot); - } - private static Model wire_uns(boolean lock, ModelRotation rot) { - Model model = ModelProvider.getModelProvider().getModel("wire_cross") - .add(0, 0.25f, 0, 16, 0.25f, 16).noShade() - .u("wire_line").uv(0, 0, 16, 16).rot(90).noCull() - .add(0, 0, 0.25f, 16, 16, 0.25f).noShade() - .s("wire_line").uv(0, 0, 16, 16).rot(90).noCull() - .rotate(rot); - return lock ? model.uvLock() : model; - } - - private static Model wire_nsue(ModelRotation rot) { - return ModelProvider.getModelProvider().getModel("wire_cross").uvLock() - .add(7, 0.25f, 0, 16, 0.25f, 16).noShade() - .u().uv(7, 0, 16, 16).noCull() - .add(15.75f, 0, 0, 15.75f, 16, 16).noShade() - .w("wire_line").uv(0, 0, 16, 16).rot(270).noCull() - .rotate(rot); - } - private static Model wire_unse(ModelRotation rot) { - return ModelProvider.getModelProvider().getModel("wire_cross").uvLock() - .add(7, 0.25f, 0, 16, 0.25f, 16).noShade() - .u().uv(7, 0, 16, 16).noCull() - .add(0, 0, 0.25f, 16, 16, 0.25f).noShade() - .s("wire_line").uv(0, 0, 16, 16).rot(90).noCull() - .rotate(rot); - } - private static Model wire_nuse(ModelRotation rot) { - return ModelProvider.getModelProvider().getModel("wire_cross").uvLock() - .add(7, 0.25f, 0, 16, 0.25f, 16).noShade() - .u().uv(7, 0, 16, 16).noCull() - .add(0, 0, 15.75f, 16, 16, 15.75f).noShade() - .n("wire_line").uv(0, 0, 16, 16).rot(90).noCull() - .rotate(rot); - } - private static Model wire_unue(ModelRotation rot) { - return ModelProvider.getModelProvider().getModel("wire_cross").uvLock() - .add(7, 0.25f, 0, 16, 0.25f, 9).noShade() - .u().uv(7, 0, 16, 9).noCull() - .add(0, 0, 0.25f, 16, 16, 0.25f).noShade() - .s("wire_line").uv(0, 0, 16, 16).rot(90).noCull() - .add(15.75f, 0, 0, 15.75f, 16, 16).noShade() - .w("wire_line").uv(0, 0, 16, 16).rot(90).noCull() - .rotate(rot); - } - - private static Model wire_unusue(ModelRotation rot) { - return ModelProvider.getModelProvider().getModel("wire_cross").uvLock() - .add(7, 0.25f, 0, 16, 0.25f, 16).noShade() - .u().uv(7, 0, 16, 16).noCull() - .add(0, 0, 0.25f, 16, 16, 0.25f).noShade() - .s("wire_line").uv(0, 0, 16, 16).rot(90).noCull() - .add(0, 0, 15.75f, 16, 16, 15.75f).noShade() - .n("wire_line").uv(0, 0, 16, 16).rot(90).noCull() - .add(15.75f, 0, 0, 15.75f, 16, 16).noShade() - .w("wire_line").uv(0, 0, 16, 16).rot(90).noCull() - .rotate(rot); - } - private static Model wire_unusew(boolean rot) { - return ModelProvider.getModelProvider().getModel("wire_cross").uvLock() - .add(0, 0.25f, 0, 16, 0.25f, 16).noShade() - .u().uv(0, 0, 16, 16).noCull() - .add(0, 0, 0.25f, 16, 16, 0.25f).noShade() - .s("wire_line").uv(0, 0, 16, 16).rot(90).noCull() - .add(0, 0, 15.75f, 16, 16, 15.75f).noShade() - .n("wire_line").uv(0, 0, 16, 16).rot(90).noCull() - .rotate(rot ? ModelRotation.X0_Y90 : ModelRotation.X0_Y0); - } - private static Model wire_unusuew(ModelRotation rot) { - return ModelProvider.getModelProvider().getModel("wire_cross").uvLock() - .add(0, 0.25f, 0, 16, 0.25f, 16).noShade() - .u().uv(0, 0, 16, 16).noCull() - .add(0, 0, 0.25f, 16, 16, 0.25f).noShade() - .s("wire_line").uv(0, 0, 16, 16).rot(90).noCull() - .add(0, 0, 15.75f, 16, 16, 15.75f).noShade() - .n("wire_line").uv(0, 0, 16, 16).rot(90).noCull() - .add(15.75f, 0, 0, 15.75f, 16, 16).noShade() - .w("wire_line").uv(0, 0, 16, 16).rot(90).noCull() - .rotate(rot); - } - private static Model wire_unuse(ModelRotation rot) { - return ModelProvider.getModelProvider().getModel("wire_cross").uvLock() - .add(7, 0.25f, 0, 16, 0.25f, 16).noShade() - .u().uv(7, 0, 16, 16).noCull() - .add(0, 0, 0.25f, 16, 16, 0.25f).noShade() - .s("wire_line").uv(0, 0, 16, 16).rot(90).noCull() - .add(0, 0, 15.75f, 16, 16, 15.75f).noShade() - .n("wire_line").uv(0, 0, 16, 16).rot(90).noCull() - .rotate(rot); - } - private static Model wire_nusue(ModelRotation rot) { - return ModelProvider.getModelProvider().getModel("wire_cross").uvLock() - .add(7, 0.25f, 0, 16, 0.25f, 16).noShade() - .u().uv(7, 0, 16, 16).noCull() - .add(0, 0, 15.75f, 16, 16, 15.75f).noShade() - .n("wire_line").uv(0, 0, 16, 16).rot(90).noCull() - .add(15.75f, 0, 0, 15.75f, 16, 16).noShade() - .w("wire_line").uv(0, 0, 16, 16).rot(90).noCull() - .rotate(rot); - } - private static Model wire_unsew(ModelRotation rot) { - return ModelProvider.getModelProvider().getModel("wire_cross").uvLock() - .add(0, 0.25f, 0, 16, 0.25f, 16).noShade() - .u().uv(0, 0, 16, 16).noCull() - .add(0, 0, 0.25f, 16, 16, 0.25f).noShade() - .s("wire_line").uv(0, 0, 16, 16).rot(90).noCull() - .rotate(rot); - } - private static Model wire_unsuew(ModelRotation rot) { - return ModelProvider.getModelProvider().getModel("wire_cross").uvLock() - .add(0, 0.25f, 0, 16, 0.25f, 16).noShade() - .u().uv(0, 0, 16, 16).noCull() - .add(0, 0, 0.25f, 16, 16, 0.25f).noShade() - .s("wire_line").uv(0, 0, 16, 16).rot(90).noCull() - .add(15.75f, 0, 0, 15.75f, 16, 16).noShade() - .w("wire_line").uv(0, 0, 16, 16).rot(90).noCull() - .rotate(rot); - } - private static Model wire_unsue(ModelRotation rot) { - return ModelProvider.getModelProvider().getModel("wire_cross").uvLock() - .add(7, 0.25f, 0, 16, 0.25f, 16).noShade() - .u().uv(7, 0, 16, 16).noCull() - .add(0, 0, 0.25f, 16, 16, 0.25f).noShade() - .s("wire_line").uv(0, 0, 16, 16).rot(90).noCull() - .add(15.75f, 0, 0, 15.75f, 16, 16).noShade() - .w("wire_line").uv(0, 0, 16, 16).rot(90).noCull() - .rotate(rot); - } - public static final PropertyBool DOWN = PropertyBool.create("down"); public static final PropertyBool UP = PropertyBool.create("up"); public static final PropertyBool NORTH = PropertyBool.create("north"); @@ -339,6 +130,178 @@ public class BlockWire extends Block public boolean isMagnetic() { return true; } + + private static Model wire_n(Model model, boolean rot) { + return model + .add(0, 0.25f, 0, 16, 0.25f, 16).noShade() + .u("wire_line").uv(0, 0, 16, 16).rot(90).noCull() + .rotate(rot ? ModelRotation.X0_Y90 : ModelRotation.X0_Y0); + } + + private static Model wire_ne(Model model, ModelRotation rot) { + return model.uvLock() + .add(7, 0.25f, 0, 16, 0.25f, 9).noShade() + .u().uv(7, 0, 16, 9).noCull() + .rotate(rot); + } + + private static Model wire_uew(Model model, boolean rot) { + model = model + .add(0, 0.25f, 0, 16, 0.25f, 16).noShade() + .u("wire_line").uv(0, 0, 16, 16).noCull() + .add(15.75f, 0, 0, 15.75f, 16, 16).noShade() + .w("wire_line").uv(0, 0, 16, 16).rot(90).noCull(); + return rot ? model.uvLock().rotate(ModelRotation.X0_Y180) : model; + } + private static Model wire_nue(Model model, ModelRotation rot) { + return model.uvLock() + .add(7, 0.25f, 0, 16, 0.25f, 9).noShade() + .u().uv(7, 0, 16, 9).noCull() + .add(15.75f, 0, 0, 15.75f, 16, 16).noShade() + .w("wire_line").uv(0, 0, 16, 16).rot(270).noCull() + .rotate(rot); + } + private static Model wire_une(Model model, ModelRotation rot) { + return model.uvLock() + .add(7, 0.25f, 0, 16, 0.25f, 9).noShade() + .u().uv(7, 0, 16, 9).noCull() + .add(0, 0, 0.25f, 16, 16, 0.25f).noShade() + .s("wire_line").uv(0, 0, 16, 16).rot(90).noCull() + .rotate(rot); + } + private static Model wire_nse(Model model, ModelRotation rot) { + return model.uvLock() + .add(7, 0.25f, 0, 16, 0.25f, 16).noShade() + .u().uv(7, 0, 16, 16).noCull() + .rotate(rot); + } + private static Model wire_uns(Model model, boolean lock, ModelRotation rot) { + model = model + .add(0, 0.25f, 0, 16, 0.25f, 16).noShade() + .u("wire_line").uv(0, 0, 16, 16).rot(90).noCull() + .add(0, 0, 0.25f, 16, 16, 0.25f).noShade() + .s("wire_line").uv(0, 0, 16, 16).rot(90).noCull() + .rotate(rot); + return lock ? model.uvLock() : model; + } + + private static Model wire_nsue(Model model, ModelRotation rot) { + return model.uvLock() + .add(7, 0.25f, 0, 16, 0.25f, 16).noShade() + .u().uv(7, 0, 16, 16).noCull() + .add(15.75f, 0, 0, 15.75f, 16, 16).noShade() + .w("wire_line").uv(0, 0, 16, 16).rot(270).noCull() + .rotate(rot); + } + private static Model wire_unse(Model model, ModelRotation rot) { + return model.uvLock() + .add(7, 0.25f, 0, 16, 0.25f, 16).noShade() + .u().uv(7, 0, 16, 16).noCull() + .add(0, 0, 0.25f, 16, 16, 0.25f).noShade() + .s("wire_line").uv(0, 0, 16, 16).rot(90).noCull() + .rotate(rot); + } + private static Model wire_nuse(Model model, ModelRotation rot) { + return model.uvLock() + .add(7, 0.25f, 0, 16, 0.25f, 16).noShade() + .u().uv(7, 0, 16, 16).noCull() + .add(0, 0, 15.75f, 16, 16, 15.75f).noShade() + .n("wire_line").uv(0, 0, 16, 16).rot(90).noCull() + .rotate(rot); + } + private static Model wire_unue(Model model, ModelRotation rot) { + return model.uvLock() + .add(7, 0.25f, 0, 16, 0.25f, 9).noShade() + .u().uv(7, 0, 16, 9).noCull() + .add(0, 0, 0.25f, 16, 16, 0.25f).noShade() + .s("wire_line").uv(0, 0, 16, 16).rot(90).noCull() + .add(15.75f, 0, 0, 15.75f, 16, 16).noShade() + .w("wire_line").uv(0, 0, 16, 16).rot(90).noCull() + .rotate(rot); + } + + private static Model wire_unusue(Model model, ModelRotation rot) { + return model.uvLock() + .add(7, 0.25f, 0, 16, 0.25f, 16).noShade() + .u().uv(7, 0, 16, 16).noCull() + .add(0, 0, 0.25f, 16, 16, 0.25f).noShade() + .s("wire_line").uv(0, 0, 16, 16).rot(90).noCull() + .add(0, 0, 15.75f, 16, 16, 15.75f).noShade() + .n("wire_line").uv(0, 0, 16, 16).rot(90).noCull() + .add(15.75f, 0, 0, 15.75f, 16, 16).noShade() + .w("wire_line").uv(0, 0, 16, 16).rot(90).noCull() + .rotate(rot); + } + private static Model wire_unusew(Model model, boolean rot) { + return model.uvLock() + .add(0, 0.25f, 0, 16, 0.25f, 16).noShade() + .u().uv(0, 0, 16, 16).noCull() + .add(0, 0, 0.25f, 16, 16, 0.25f).noShade() + .s("wire_line").uv(0, 0, 16, 16).rot(90).noCull() + .add(0, 0, 15.75f, 16, 16, 15.75f).noShade() + .n("wire_line").uv(0, 0, 16, 16).rot(90).noCull() + .rotate(rot ? ModelRotation.X0_Y90 : ModelRotation.X0_Y0); + } + private static Model wire_unusuew(Model model, ModelRotation rot) { + return model.uvLock() + .add(0, 0.25f, 0, 16, 0.25f, 16).noShade() + .u().uv(0, 0, 16, 16).noCull() + .add(0, 0, 0.25f, 16, 16, 0.25f).noShade() + .s("wire_line").uv(0, 0, 16, 16).rot(90).noCull() + .add(0, 0, 15.75f, 16, 16, 15.75f).noShade() + .n("wire_line").uv(0, 0, 16, 16).rot(90).noCull() + .add(15.75f, 0, 0, 15.75f, 16, 16).noShade() + .w("wire_line").uv(0, 0, 16, 16).rot(90).noCull() + .rotate(rot); + } + private static Model wire_unuse(Model model, ModelRotation rot) { + return model.uvLock() + .add(7, 0.25f, 0, 16, 0.25f, 16).noShade() + .u().uv(7, 0, 16, 16).noCull() + .add(0, 0, 0.25f, 16, 16, 0.25f).noShade() + .s("wire_line").uv(0, 0, 16, 16).rot(90).noCull() + .add(0, 0, 15.75f, 16, 16, 15.75f).noShade() + .n("wire_line").uv(0, 0, 16, 16).rot(90).noCull() + .rotate(rot); + } + private static Model wire_nusue(Model model, ModelRotation rot) { + return model.uvLock() + .add(7, 0.25f, 0, 16, 0.25f, 16).noShade() + .u().uv(7, 0, 16, 16).noCull() + .add(0, 0, 15.75f, 16, 16, 15.75f).noShade() + .n("wire_line").uv(0, 0, 16, 16).rot(90).noCull() + .add(15.75f, 0, 0, 15.75f, 16, 16).noShade() + .w("wire_line").uv(0, 0, 16, 16).rot(90).noCull() + .rotate(rot); + } + private static Model wire_unsew(Model model, ModelRotation rot) { + return model.uvLock() + .add(0, 0.25f, 0, 16, 0.25f, 16).noShade() + .u().uv(0, 0, 16, 16).noCull() + .add(0, 0, 0.25f, 16, 16, 0.25f).noShade() + .s("wire_line").uv(0, 0, 16, 16).rot(90).noCull() + .rotate(rot); + } + private static Model wire_unsuew(Model model, ModelRotation rot) { + return model.uvLock() + .add(0, 0.25f, 0, 16, 0.25f, 16).noShade() + .u().uv(0, 0, 16, 16).noCull() + .add(0, 0, 0.25f, 16, 16, 0.25f).noShade() + .s("wire_line").uv(0, 0, 16, 16).rot(90).noCull() + .add(15.75f, 0, 0, 15.75f, 16, 16).noShade() + .w("wire_line").uv(0, 0, 16, 16).rot(90).noCull() + .rotate(rot); + } + private static Model wire_unsue(Model model, ModelRotation rot) { + return model.uvLock() + .add(7, 0.25f, 0, 16, 0.25f, 16).noShade() + .u().uv(7, 0, 16, 16).noCull() + .add(0, 0, 0.25f, 16, 16, 0.25f).noShade() + .s("wire_line").uv(0, 0, 16, 16).rot(90).noCull() + .add(15.75f, 0, 0, 15.75f, 16, 16).noShade() + .w("wire_line").uv(0, 0, 16, 16).rot(90).noCull() + .rotate(rot); + } public Model getModel(ModelProvider provider, String name, State state) { //TODO: fix model boolean nr = state.getValue(NORTH); @@ -355,187 +318,217 @@ public class BlockWire extends Block boolean wu = wr && ud; boolean eu = er && ud; + Model model = provider.getModel("wire_cross"); + if(ea && na && sa && wa) - return wire_none; + return model + .add(2, 0.25f, 2, 14, 0.25f, 14).noShade() + .u("wire_line").uv(2, 2, 14, 14).noCull(); else if(eu && nu && su && wu) - return wire_unusueuw; + return model.uvLock() + .add(0, 0.25f, 0, 16, 0.25f, 16).noShade() + .u().uv(0, 0, 16, 16).noCull() + .add(0, 0, 0.25f, 16, 16, 0.25f).noShade() + .s("wire_line").uv(0, 0, 16, 16).rot(90).noCull() + .add(0, 0, 15.75f, 16, 16, 15.75f).noShade() + .n("wire_line").uv(0, 0, 16, 16).rot(90).noCull() + .add(15.75f, 0, 0, 15.75f, 16, 16).noShade() + .w("wire_line").uv(0, 0, 16, 16).rot(90).noCull() + .add(0.25f, 0, 0, 0.25f, 16, 16).noShade() + .e("wire_line").uv(0, 0, 16, 16).rot(90).noCull(); else if(er && nr && sr && wr) - return wire_nsew; + return model.uvLock() + .add(0, 0.25f, 0, 16, 0.25f, 16).noShade() + .u().uv(0, 0, 16, 16).noCull(); else if(ea && nu && su && wa) - return wire_unus; + return model + .add(0, 0.25f, 0, 16, 0.25f, 16).noShade() + .u("wire_line").uv(0, 0, 16, 16).rot(90).noCull() + .add(0, 0.25f, 0, 16, 0.25f, 16).noShade() + .s("wire_line").uv(0, 0, 16, 16).rot(90).noCull() + .add(0, 0, 0.25f, 16, 16, 0.25f).noShade() + .n("wire_line").uv(0, 0, 16, 16).rot(90).noCull(); else if(eu && na && sa && wu) - return wire_ueuw; + return model + .add(0, 0.25f, 0, 16, 0.25f, 16).noShade() + .u("wire_line").uv(0, 0, 16, 16).noCull() + .add(0.25f, 0, 0, 0.25f, 16, 16).noShade() + .e("wire_line").uv(0, 0, 16, 16).rot(90).noCull() + .add(15.75f, 0, 0, 15.75f, 16, 16).noShade() + .w("wire_line").uv(0, 0, 16, 16).rot(90).noCull(); else if(ea && nr && sa && wa) - return wire_n(false); + return wire_n(model, false); else if(ea && na && sr && wa) - return wire_n(false); + return wire_n(model, false); else if(er && na && sa && wa) - return wire_n(true); + return wire_n(model, true); else if(ea && na && sa && wr) - return wire_n(true); + return wire_n(model, true); else if(ea && nu && sa && wa) - return wire_uns(false, ModelRotation.X0_Y0); + return wire_uns(model, false, ModelRotation.X0_Y0); else if(ea && na && su && wa) - return wire_uns(true, ModelRotation.X0_Y180); + return wire_uns(model, true, ModelRotation.X0_Y180); else if(eu && na && sa && wa) - return wire_uew(false); + return wire_uew(model, false); else if(ea && na && sa && wu) - return wire_uew(true); + return wire_uew(model, true); else if(er && nr && sa && wa) - return wire_ne(ModelRotation.X0_Y0); + return wire_ne(model, ModelRotation.X0_Y0); else if(er && nu && sa && wa) - return wire_une(ModelRotation.X0_Y0); + return wire_une(model, ModelRotation.X0_Y0); else if(eu && nr && sa && wa) - return wire_nue(ModelRotation.X0_Y0); + return wire_nue(model, ModelRotation.X0_Y0); else if(eu && nu && sa && wa) - return wire_unue(ModelRotation.X0_Y0); + return wire_unue(model, ModelRotation.X0_Y0); else if(er && na && sr && wa) - return wire_ne(ModelRotation.X0_Y90); + return wire_ne(model, ModelRotation.X0_Y90); else if(eu && na && sr && wa) - return wire_une(ModelRotation.X0_Y90); + return wire_une(model, ModelRotation.X0_Y90); else if(er && na && su && wa) - return wire_nue(ModelRotation.X0_Y90); + return wire_nue(model, ModelRotation.X0_Y90); else if(eu && na && su && wa) - return wire_unue(ModelRotation.X0_Y90); + return wire_unue(model, ModelRotation.X0_Y90); else if(ea && na && sr && wr) - return wire_ne(ModelRotation.X0_Y180); + return wire_ne(model, ModelRotation.X0_Y180); else if(ea && na && su && wr) - return wire_une(ModelRotation.X0_Y180); + return wire_une(model, ModelRotation.X0_Y180); else if(ea && na && sr && wu) - return wire_nue(ModelRotation.X0_Y180); + return wire_nue(model, ModelRotation.X0_Y180); else if(ea && na && su && wu) - return wire_unue(ModelRotation.X0_Y180); + return wire_unue(model, ModelRotation.X0_Y180); else if(ea && nr && sa && wr) - return wire_ne(ModelRotation.X0_Y270); + return wire_ne(model, ModelRotation.X0_Y270); else if(ea && nr && sa && wu) - return wire_une(ModelRotation.X0_Y270); + return wire_une(model, ModelRotation.X0_Y270); else if(ea && nu && sa && wr) - return wire_nue(ModelRotation.X0_Y270); + return wire_nue(model, ModelRotation.X0_Y270); else if(ea && nu && sa && wu) - return wire_unue(ModelRotation.X0_Y270); + return wire_unue(model, ModelRotation.X0_Y270); else if(ea && nr && sr && wa) - return wire_n(false); + return wire_n(model, false); else if(ea && nu && sr && wa) - return wire_uns(false, ModelRotation.X0_Y0); + return wire_uns(model, false, ModelRotation.X0_Y0); else if(ea && nr && su && wa) - return wire_uns(false, ModelRotation.X0_Y180); + return wire_uns(model, false, ModelRotation.X0_Y180); else if(er && na && sa && wr) - return wire_n(true); + return wire_n(model, true); else if(eu && na && sa && wr) - return wire_uns(false, ModelRotation.X0_Y90); + return wire_uns(model, false, ModelRotation.X0_Y90); else if(er && na && sa && wu) - return wire_uns(false, ModelRotation.X0_Y270); + return wire_uns(model, false, ModelRotation.X0_Y270); else if(er && nr && sr && wa) - return wire_nse(ModelRotation.X0_Y0); + return wire_nse(model, ModelRotation.X0_Y0); else if(er && nu && sr && wa) - return wire_unse(ModelRotation.X0_Y0); + return wire_unse(model, ModelRotation.X0_Y0); else if(er && nr && su && wa) - return wire_nuse(ModelRotation.X0_Y0); + return wire_nuse(model, ModelRotation.X0_Y0); else if(eu && nr && sr && wa) - return wire_nsue(ModelRotation.X0_Y0); + return wire_nsue(model, ModelRotation.X0_Y0); else if(eu && nr && su && wa) - return wire_nusue(ModelRotation.X0_Y0); + return wire_nusue(model, ModelRotation.X0_Y0); else if(er && nu && su && wa) - return wire_unuse(ModelRotation.X0_Y0); + return wire_unuse(model, ModelRotation.X0_Y0); else if(eu && nu && sr && wa) - return wire_unsue(ModelRotation.X0_Y0); + return wire_unsue(model, ModelRotation.X0_Y0); else if(eu && nu && su && wa) - return wire_unusue(ModelRotation.X0_Y0); + return wire_unusue(model, ModelRotation.X0_Y0); else if(er && na && sr && wr) - return wire_nse(ModelRotation.X0_Y90); + return wire_nse(model, ModelRotation.X0_Y90); else if(eu && na && sr && wr) - return wire_unse(ModelRotation.X0_Y90); + return wire_unse(model, ModelRotation.X0_Y90); else if(er && na && sr && wu) - return wire_nuse(ModelRotation.X0_Y90); + return wire_nuse(model, ModelRotation.X0_Y90); else if(er && na && su && wr) - return wire_nsue(ModelRotation.X0_Y90); + return wire_nsue(model, ModelRotation.X0_Y90); else if(er && na && su && wu) - return wire_nusue(ModelRotation.X0_Y90); + return wire_nusue(model, ModelRotation.X0_Y90); else if(eu && na && sr && wu) - return wire_unuse(ModelRotation.X0_Y90); + return wire_unuse(model, ModelRotation.X0_Y90); else if(eu && na && su && wr) - return wire_unsue(ModelRotation.X0_Y90); + return wire_unsue(model, ModelRotation.X0_Y90); else if(eu && na && su && wu) - return wire_unusue(ModelRotation.X0_Y90); + return wire_unusue(model, ModelRotation.X0_Y90); else if(ea && nr && sr && wr) - return wire_nse(ModelRotation.X0_Y180); + return wire_nse(model, ModelRotation.X0_Y180); else if(ea && nr && su && wr) - return wire_unse(ModelRotation.X0_Y180); + return wire_unse(model, ModelRotation.X0_Y180); else if(ea && nu && sr && wr) - return wire_nuse(ModelRotation.X0_Y180); + return wire_nuse(model, ModelRotation.X0_Y180); else if(ea && nr && sr && wu) - return wire_nsue(ModelRotation.X0_Y180); + return wire_nsue(model, ModelRotation.X0_Y180); else if(ea && nu && sr && wu) - return wire_nusue(ModelRotation.X0_Y180); + return wire_nusue(model, ModelRotation.X0_Y180); else if(ea && nu && su && wr) - return wire_unuse(ModelRotation.X0_Y180); + return wire_unuse(model, ModelRotation.X0_Y180); else if(ea && nr && su && wu) - return wire_unsue(ModelRotation.X0_Y180); + return wire_unsue(model, ModelRotation.X0_Y180); else if(ea && nu && su && wu) - return wire_unusue(ModelRotation.X0_Y180); + return wire_unusue(model, ModelRotation.X0_Y180); else if(er && nr && sa && wr) - return wire_nse(ModelRotation.X0_Y270); + return wire_nse(model, ModelRotation.X0_Y270); else if(er && nr && sa && wu) - return wire_unse(ModelRotation.X0_Y270); + return wire_unse(model, ModelRotation.X0_Y270); else if(eu && nr && sa && wr) - return wire_nuse(ModelRotation.X0_Y270); + return wire_nuse(model, ModelRotation.X0_Y270); else if(er && nu && sa && wr) - return wire_nsue(ModelRotation.X0_Y270); + return wire_nsue(model, ModelRotation.X0_Y270); else if(eu && nu && sa && wr) - return wire_nusue(ModelRotation.X0_Y270); + return wire_nusue(model, ModelRotation.X0_Y270); else if(eu && nr && sa && wu) - return wire_unuse(ModelRotation.X0_Y270); + return wire_unuse(model, ModelRotation.X0_Y270); else if(er && nu && sa && wu) - return wire_unsue(ModelRotation.X0_Y270); + return wire_unsue(model, ModelRotation.X0_Y270); else if(eu && nu && sa && wu) - return wire_unusue(ModelRotation.X0_Y270); + return wire_unusue(model, ModelRotation.X0_Y270); else if(er && nu && sr && wr) - return wire_unsew(ModelRotation.X0_Y0); + return wire_unsew(model, ModelRotation.X0_Y0); else if(er && nr && su && wr) - return wire_unsew(ModelRotation.X0_Y180); + return wire_unsew(model, ModelRotation.X0_Y180); else if(eu && nr && sr && wr) - return wire_unsew(ModelRotation.X0_Y90); + return wire_unsew(model, ModelRotation.X0_Y90); else if(er && nr && sr && wu) - return wire_unsew(ModelRotation.X0_Y270); + return wire_unsew(model, ModelRotation.X0_Y270); else if(er && nu && su && wr) - return wire_unusew(false); + return wire_unusew(model, false); else if(eu && nr && sr && wu) - return wire_unusew(true); + return wire_unusew(model, true); else if(eu && nu && sr && wr) - return wire_unsuew(ModelRotation.X0_Y0); + return wire_unsuew(model, ModelRotation.X0_Y0); else if(eu && nr && su && wr) - return wire_unsuew(ModelRotation.X0_Y90); + return wire_unsuew(model, ModelRotation.X0_Y90); else if(er && nr && su && wu) - return wire_unsuew(ModelRotation.X0_Y180); + return wire_unsuew(model, ModelRotation.X0_Y180); else if(er && nu && sr && wu) - return wire_unsuew(ModelRotation.X0_Y270); + return wire_unsuew(model, ModelRotation.X0_Y270); else if(eu && nu && su && wr) - return wire_unusuew(ModelRotation.X0_Y0); + return wire_unusuew(model, ModelRotation.X0_Y0); else if(eu && nr && su && wu) - return wire_unusuew(ModelRotation.X0_Y90); + return wire_unusuew(model, ModelRotation.X0_Y90); else if(er && nu && su && wu) - return wire_unusuew(ModelRotation.X0_Y180); + return wire_unusuew(model, ModelRotation.X0_Y180); else if(eu && nu && sr && wu) - return wire_unusuew(ModelRotation.X0_Y270); + return wire_unusuew(model, ModelRotation.X0_Y270); else - return wire_none; + return model + .add(2, 0.25f, 2, 14, 0.25f, 14).noShade() + .u("wire_line").uv(2, 2, 14, 14).noCull(); } public StackSize getMaxAmount() { diff --git a/common/src/main/java/common/block/tech/BlockWorkbench.java b/common/src/main/java/common/block/tech/BlockWorkbench.java index b2d58ff5..49eb7a8a 100755 --- a/common/src/main/java/common/block/tech/BlockWorkbench.java +++ b/common/src/main/java/common/block/tech/BlockWorkbench.java @@ -8,7 +8,7 @@ import common.inventory.ContainerWorkbench; import common.inventory.InventoryPlayer; import common.item.CheatTab; import common.model.Model; -import common.model.ModelProvider; +import common.model.Model.ModelProvider; import common.util.BlockPos; import common.util.Facing; import common.world.State; diff --git a/common/src/main/java/common/item/Item.java b/common/src/main/java/common/item/Item.java index d503666d..01c83437 100755 --- a/common/src/main/java/common/item/Item.java +++ b/common/src/main/java/common/item/Item.java @@ -12,7 +12,7 @@ import common.entity.npc.EntityNPC; import common.entity.types.EntityLiving; import common.entity.types.IProjectile; import common.model.Model; -import common.model.ModelProvider; +import common.model.Model.ModelProvider; import common.model.GuiPosition; import common.tileentity.TileEntity; import common.util.BlockPos; diff --git a/common/src/main/java/common/item/projectile/ItemDie.java b/common/src/main/java/common/item/projectile/ItemDie.java index f42db0f9..b42280db 100755 --- a/common/src/main/java/common/item/projectile/ItemDie.java +++ b/common/src/main/java/common/item/projectile/ItemDie.java @@ -12,7 +12,7 @@ import common.item.CheatTab; import common.item.Item; import common.item.ItemStack; import common.model.Model; -import common.model.ModelProvider; +import common.model.Model.ModelProvider; import common.model.GuiPosition; import common.tileentity.TileEntity; import common.util.BlockPos; diff --git a/common/src/main/java/common/model/Model.java b/common/src/main/java/common/model/Model.java index 27ca079f..45db3dba 100644 --- a/common/src/main/java/common/model/Model.java +++ b/common/src/main/java/common/model/Model.java @@ -3,6 +3,10 @@ package common.model; import common.util.Facing; public abstract class Model { + public static interface ModelProvider { + Model getModel(String primary); + } + public abstract Model uvLock(); public abstract Model rotate(ModelRotation rot); public abstract Model add(float x1, float y1, float z1, float x2, float y2, float z2); diff --git a/common/src/main/java/common/model/ModelProvider.java b/common/src/main/java/common/model/ModelProvider.java deleted file mode 100644 index 22f71b88..00000000 --- a/common/src/main/java/common/model/ModelProvider.java +++ /dev/null @@ -1,67 +0,0 @@ -package common.model; - -import common.util.Facing; -import common.util.Facing.Axis; - -public interface ModelProvider { - Model getModel(String primary); - - public static class DummyModel extends Model { - public Model uvLock() { - return this; - } - - public Model rotate(ModelRotation rot) { - return this; - } - - public Model add(float x1, float y1, float z1, float x2, float y2, float z2) { - return this; - } - - public Model noShade() { - return this; - } - - public Model rotate(float x, float y, float z, Axis axisIn, float angleIn, boolean rescaleIn) { - return this; - } - - public Model face(String texture, Facing... faces) { - return this; - } - - public Model cull(Facing cull) { - return this; - } - - public Model rot(int rot) { - return this; - } - - public Model uv(float x1, float y1, float x2, float y2) { - return this; - } - - public String getPrimary() { - return ""; - } - - } - - public static class BlockModelProvider { - private static ModelProvider provider = new ModelProvider() { - public Model getModel(String primary) { - return new DummyModel(); - } - }; - } - - public static void setProvider(ModelProvider provider) { - BlockModelProvider.provider = provider; - } - - public static ModelProvider getModelProvider() { - return BlockModelProvider.provider; - } -} diff --git a/common/src/main/java/common/tileentity/TileEntityBrewingStand.java b/common/src/main/java/common/tileentity/TileEntityBrewingStand.java index ddf06db7..5149f76c 100755 --- a/common/src/main/java/common/tileentity/TileEntityBrewingStand.java +++ b/common/src/main/java/common/tileentity/TileEntityBrewingStand.java @@ -1,9 +1,7 @@ package common.tileentity; -import java.util.Arrays; import java.util.List; -import common.block.tech.BlockBrewingStand; import common.collect.Lists; import common.effect.StatusEffect; import common.entity.npc.EntityNPC; @@ -18,7 +16,6 @@ import common.item.ItemStack; import common.item.consumable.ItemPotion; import common.tags.TagObject; import common.util.Facing; -import common.world.State; public class TileEntityBrewingStand extends TileEntityInventory implements ITickable, ISidedInventory { @@ -32,11 +29,6 @@ public class TileEntityBrewingStand extends TileEntityInventory implements ITick private ItemStack[] brewingItemStacks = new ItemStack[4]; private int brewTime; - /** - * an integer with each bit specifying whether that slot of the stand contains a potion - */ - private boolean[] filledSlots; - /** * used to check if the current ingredient has been removed from the brewing stand during brewing */ @@ -80,29 +72,6 @@ public class TileEntityBrewingStand extends TileEntityInventory implements ITick this.brewTime = 400; this.ingredientID = this.brewingItemStacks[3].getItem(); } - - if (!this.worldObj.client) - { - boolean[] aboolean = this.func_174902_m(); - - if (!Arrays.equals(aboolean, this.filledSlots)) - { - this.filledSlots = aboolean; - State iblockstate = this.worldObj.getState(this.getPos()); - - if (!(iblockstate.getBlock() instanceof BlockBrewingStand)) - { - return; - } - - for (int i = 0; i < BlockBrewingStand.HAS_BOTTLE.length; ++i) - { - iblockstate = iblockstate.withProperty(BlockBrewingStand.HAS_BOTTLE[i], Boolean.valueOf(aboolean[i])); - } - - this.worldObj.setState(this.pos, iblockstate, 2); - } - } } private boolean canBrew() @@ -313,21 +282,6 @@ public class TileEntityBrewingStand extends TileEntityInventory implements ITick return index == 3 ? BrewingRegistry.isIngredient(stack) : stack.getItem() instanceof ItemPotion || stack.getItem() == Items.bottle; } - public boolean[] func_174902_m() - { - boolean[] aboolean = new boolean[3]; - - for (int i = 0; i < 3; ++i) - { - if (this.brewingItemStacks[i] != null) - { - aboolean[i] = true; - } - } - - return aboolean; - } - public int[] getSlotsForFace(Facing side) { return side == Facing.UP ? inputSlots : outputSlots; diff --git a/server/src/main/java/server/world/Converter.java b/server/src/main/java/server/world/Converter.java index f488ca01..1ed4008a 100644 --- a/server/src/main/java/server/world/Converter.java +++ b/server/src/main/java/server/world/Converter.java @@ -20,7 +20,6 @@ import java.util.zip.InflaterInputStream; import common.block.Block; import common.block.artificial.BlockBed; import common.block.artificial.BlockBed.EnumPartType; -import common.block.artificial.BlockCake; import common.block.artificial.BlockCarpet; import common.block.artificial.BlockDoor; import common.block.artificial.BlockFenceGate; @@ -56,7 +55,6 @@ import common.block.natural.BlockColoredClay; import common.block.natural.BlockFire; import common.block.natural.BlockSnow; import common.block.tech.BlockAnvil; -import common.block.tech.BlockBrewingStand; import common.block.tech.BlockButton; import common.block.tech.BlockCauldron; import common.block.tech.BlockChest; @@ -803,13 +801,7 @@ public abstract class Converter { mapBlock(Blocks.glowstone, 89); mapBlock(Blocks.purple_glass_pane, 90); 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); - mapBlock(Blocks.cake.getState().withProperty(BlockCake.BITES, 3), 92, 3); - mapBlock(Blocks.cake.getState().withProperty(BlockCake.BITES, 4), 92, 4); - mapBlock(Blocks.cake.getState().withProperty(BlockCake.BITES, 5), 92, 5); - mapBlock(Blocks.cake.getState().withProperty(BlockCake.BITES, 6), 92, 6); + mapBlock(Blocks.cake, 92); mapBlock(new BlockFunction() { public State getState(int id, int data) { return BlockStainedGlass.getByColor(COLOR_LOOKUP[data]).getState(); @@ -951,14 +943,7 @@ public abstract class Converter { 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); - mapBlock(Blocks.brewing_stand.getState().withProperty(BlockBrewingStand.HAS_BOTTLE_0, false).withProperty(BlockBrewingStand.HAS_BOTTLE_1, true).withProperty(BlockBrewingStand.HAS_BOTTLE_2, false), 117, 2, 10); - mapBlock(Blocks.brewing_stand.getState().withProperty(BlockBrewingStand.HAS_BOTTLE_0, true).withProperty(BlockBrewingStand.HAS_BOTTLE_1, true).withProperty(BlockBrewingStand.HAS_BOTTLE_2, false), 117, 3, 11); - mapBlock(Blocks.brewing_stand.getState().withProperty(BlockBrewingStand.HAS_BOTTLE_0, false).withProperty(BlockBrewingStand.HAS_BOTTLE_1, false).withProperty(BlockBrewingStand.HAS_BOTTLE_2, true), 117, 4, 12); - mapBlock(Blocks.brewing_stand.getState().withProperty(BlockBrewingStand.HAS_BOTTLE_0, true).withProperty(BlockBrewingStand.HAS_BOTTLE_1, false).withProperty(BlockBrewingStand.HAS_BOTTLE_2, true), 117, 5, 13); - mapBlock(Blocks.brewing_stand.getState().withProperty(BlockBrewingStand.HAS_BOTTLE_0, false).withProperty(BlockBrewingStand.HAS_BOTTLE_1, true).withProperty(BlockBrewingStand.HAS_BOTTLE_2, true), 117, 6, 14); - mapBlock(Blocks.brewing_stand.getState().withProperty(BlockBrewingStand.HAS_BOTTLE_0, true).withProperty(BlockBrewingStand.HAS_BOTTLE_1, true).withProperty(BlockBrewingStand.HAS_BOTTLE_2, true), 117, 7, 15); + mapBlock(Blocks.brewing_stand, 117); mapBlock(Blocks.cauldron.getState().withProperty(BlockCauldron.LEVEL, 0), 118); mapBlock(Blocks.cauldron.getState().withProperty(BlockCauldron.LEVEL, 1), 118, 1); mapBlock(Blocks.cauldron.getState().withProperty(BlockCauldron.LEVEL, 2), 118, 2);