diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockAtomicReconstructor.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockAtomicReconstructor.java index 7c618c273..550d72d52 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockAtomicReconstructor.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockAtomicReconstructor.java @@ -18,11 +18,10 @@ import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.mod.util.StackUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil; -import net.minecraft.block.Block; -import net.minecraft.block.BlockPistonBase; -import net.minecraft.block.SoundType; +import net.minecraft.block.*; import net.minecraft.block.material.Material; import net.minecraft.block.properties.PropertyInteger; +import net.minecraft.block.state.BlockStateContainer; import net.minecraft.block.state.IBlockState; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.ScaledResolution; @@ -35,6 +34,8 @@ import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.EnumFacing; import net.minecraft.util.EnumHand; +import net.minecraft.util.Mirror; +import net.minecraft.util.Rotation; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.RayTraceResult; import net.minecraft.util.text.TextFormatting; @@ -48,7 +49,6 @@ public class BlockAtomicReconstructor extends BlockContainerBase implements IHud public static final int NAME_FLAVOR_AMOUNTS_1 = 12; public static final int NAME_FLAVOR_AMOUNTS_2 = 14; - private static final PropertyInteger META = PropertyInteger.create("meta", 0, 5); public BlockAtomicReconstructor(String name){ super(Material.ROCK, name); @@ -148,8 +148,28 @@ public class BlockAtomicReconstructor extends BlockContainerBase implements IHud } @Override - protected PropertyInteger getMetaProperty(){ - return META; + public IBlockState getStateFromMeta(int meta){ + return this.getDefaultState().withProperty(BlockDirectional.FACING, EnumFacing.getFront(meta)); + } + + @Override + public int getMetaFromState(IBlockState state){ + return state.getValue(BlockDirectional.FACING).getIndex(); + } + + @Override + protected BlockStateContainer createBlockState(){ + return new BlockStateContainer(this, BlockDirectional.FACING); + } + + @Override + public IBlockState withRotation(IBlockState state, Rotation rot){ + return state.withProperty(BlockDirectional.FACING, rot.rotate(state.getValue(BlockDirectional.FACING))); + } + + @Override + public IBlockState withMirror(IBlockState state, Mirror mirror){ + return this.withRotation(state, mirror.toRotation(state.getValue(BlockDirectional.FACING))); } public static class TheItemBlock extends ItemBlockBase{ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockBreaker.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockBreaker.java index b31ebff06..77d94e126 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockBreaker.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockBreaker.java @@ -16,10 +16,12 @@ import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler; import de.ellpeck.actuallyadditions.mod.tile.TileEntityBreaker; import de.ellpeck.actuallyadditions.mod.tile.TileEntityPlacer; +import net.minecraft.block.BlockDirectional; import net.minecraft.block.BlockPistonBase; import net.minecraft.block.SoundType; import net.minecraft.block.material.Material; import net.minecraft.block.properties.PropertyInteger; +import net.minecraft.block.state.BlockStateContainer; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; @@ -28,12 +30,13 @@ import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.EnumFacing; import net.minecraft.util.EnumHand; +import net.minecraft.util.Mirror; +import net.minecraft.util.Rotation; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; public class BlockBreaker extends BlockContainerBase{ - private static final PropertyInteger META = PropertyInteger.create("meta", 0, 5); private final boolean isPlacer; public BlockBreaker(boolean isPlacer, String name){ @@ -80,8 +83,28 @@ public class BlockBreaker extends BlockContainerBase{ } @Override - protected PropertyInteger getMetaProperty(){ - return META; + public IBlockState getStateFromMeta(int meta){ + return this.getDefaultState().withProperty(BlockDirectional.FACING, EnumFacing.getFront(meta)); + } + + @Override + public int getMetaFromState(IBlockState state){ + return state.getValue(BlockDirectional.FACING).getIndex(); + } + + @Override + protected BlockStateContainer createBlockState(){ + return new BlockStateContainer(this, BlockDirectional.FACING); + } + + @Override + public IBlockState withRotation(IBlockState state, Rotation rot){ + return state.withProperty(BlockDirectional.FACING, rot.rotate(state.getValue(BlockDirectional.FACING))); + } + + @Override + public IBlockState withMirror(IBlockState state, Mirror mirror){ + return this.withRotation(state, mirror.toRotation(state.getValue(BlockDirectional.FACING))); } @Override diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCoalGenerator.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCoalGenerator.java index ba3813e73..21a67d190 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCoalGenerator.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCoalGenerator.java @@ -15,18 +15,19 @@ import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler; import de.ellpeck.actuallyadditions.mod.tile.TileEntityCoalGenerator; +import net.minecraft.block.BlockDirectional; +import net.minecraft.block.BlockHorizontal; import net.minecraft.block.SoundType; import net.minecraft.block.material.Material; import net.minecraft.block.properties.PropertyInteger; +import net.minecraft.block.state.BlockStateContainer; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.EnumHand; -import net.minecraft.util.EnumParticleTypes; +import net.minecraft.util.*; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.MathHelper; import net.minecraft.world.World; @@ -37,8 +38,6 @@ import java.util.Random; public class BlockCoalGenerator extends BlockContainerBase{ - private static final PropertyInteger META = PropertyInteger.create("meta", 0, 3); - public BlockCoalGenerator(String name){ super(Material.ROCK, name); this.setHarvestLevel("pickaxe", 0); @@ -90,20 +89,7 @@ public class BlockCoalGenerator extends BlockContainerBase{ @Override public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, EntityLivingBase player, ItemStack stack){ - int rotation = MathHelper.floor_double((double)(player.rotationYaw*4.0F/360.0F)+0.5D) & 3; - - if(rotation == 0){ - world.setBlockState(pos, this.getStateFromMeta(0), 2); - } - if(rotation == 1){ - world.setBlockState(pos, this.getStateFromMeta(3), 2); - } - if(rotation == 2){ - world.setBlockState(pos, this.getStateFromMeta(1), 2); - } - if(rotation == 3){ - world.setBlockState(pos, this.getStateFromMeta(2), 2); - } + world.setBlockState(pos, state.withProperty(BlockHorizontal.FACING, player.getHorizontalFacing().getOpposite()), 2); super.onBlockPlacedBy(world, pos, state, player, stack); } @@ -120,7 +106,27 @@ public class BlockCoalGenerator extends BlockContainerBase{ } @Override - protected PropertyInteger getMetaProperty(){ - return META; + public IBlockState getStateFromMeta(int meta){ + return this.getDefaultState().withProperty(BlockHorizontal.FACING, EnumFacing.getHorizontal(meta)); + } + + @Override + public int getMetaFromState(IBlockState state){ + return state.getValue(BlockHorizontal.FACING).getHorizontalIndex(); + } + + @Override + protected BlockStateContainer createBlockState(){ + return new BlockStateContainer(this, BlockHorizontal.FACING); + } + + @Override + public IBlockState withRotation(IBlockState state, Rotation rot){ + return state.withProperty(BlockHorizontal.FACING, rot.rotate(state.getValue(BlockHorizontal.FACING))); + } + + @Override + public IBlockState withMirror(IBlockState state, Mirror mirror){ + return this.withRotation(state, mirror.toRotation(state.getValue(BlockHorizontal.FACING))); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCoffeeMachine.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCoffeeMachine.java index bf72fa8db..59ce06e6a 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCoffeeMachine.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCoffeeMachine.java @@ -14,9 +14,11 @@ import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler; import de.ellpeck.actuallyadditions.mod.tile.TileEntityCoffeeMachine; +import net.minecraft.block.BlockHorizontal; import net.minecraft.block.SoundType; import net.minecraft.block.material.Material; import net.minecraft.block.properties.PropertyInteger; +import net.minecraft.block.state.BlockStateContainer; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; @@ -25,6 +27,8 @@ import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.EnumFacing; import net.minecraft.util.EnumHand; +import net.minecraft.util.Mirror; +import net.minecraft.util.Rotation; import net.minecraft.util.math.AxisAlignedBB; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.MathHelper; @@ -35,8 +39,6 @@ public class BlockCoffeeMachine extends BlockContainerBase{ private static final AxisAlignedBB AABB = new AxisAlignedBB(0.0625, 0, 0.0625, 1-0.0625, 1-0.0625*2, 1-0.0625); - private static final PropertyInteger META = PropertyInteger.create("meta", 0, 3); - public BlockCoffeeMachine(String name){ super(Material.ROCK, name); this.setHarvestLevel("pickaxe", 0); @@ -112,7 +114,27 @@ public class BlockCoffeeMachine extends BlockContainerBase{ } @Override - protected PropertyInteger getMetaProperty(){ - return META; + public IBlockState getStateFromMeta(int meta){ + return this.getDefaultState().withProperty(BlockHorizontal.FACING, EnumFacing.getHorizontal(meta)); + } + + @Override + public int getMetaFromState(IBlockState state){ + return state.getValue(BlockHorizontal.FACING).getHorizontalIndex(); + } + + @Override + protected BlockStateContainer createBlockState(){ + return new BlockStateContainer(this, BlockHorizontal.FACING); + } + + @Override + public IBlockState withRotation(IBlockState state, Rotation rot){ + return state.withProperty(BlockHorizontal.FACING, rot.rotate(state.getValue(BlockHorizontal.FACING))); + } + + @Override + public IBlockState withMirror(IBlockState state, Mirror mirror){ + return this.withRotation(state, mirror.toRotation(state.getValue(BlockHorizontal.FACING))); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockColoredLamp.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockColoredLamp.java index 5450bd817..71a62f69b 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockColoredLamp.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockColoredLamp.java @@ -15,12 +15,15 @@ import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockBase; import de.ellpeck.actuallyadditions.mod.blocks.base.ItemBlockBase; import de.ellpeck.actuallyadditions.mod.blocks.metalists.TheColoredLampColors; +import de.ellpeck.actuallyadditions.mod.blocks.metalists.TheMiscBlocks; import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.mod.util.StackUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil; import net.minecraft.block.Block; import net.minecraft.block.material.Material; +import net.minecraft.block.properties.PropertyEnum; import net.minecraft.block.properties.PropertyInteger; +import net.minecraft.block.state.BlockStateContainer; import net.minecraft.block.state.IBlockState; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.player.EntityPlayer; @@ -43,7 +46,7 @@ import java.util.Random; public class BlockColoredLamp extends BlockBase{ public static final TheColoredLampColors[] ALL_LAMP_TYPES = TheColoredLampColors.values(); - private static final PropertyInteger META = PropertyInteger.create("meta", 0, ALL_LAMP_TYPES.length-1); + private static final PropertyEnum TYPE = PropertyEnum.create("type", TheColoredLampColors.class); public final boolean isOn; public BlockColoredLamp(boolean isOn, String name){ @@ -126,7 +129,7 @@ public class BlockColoredLamp extends BlockBase{ @Override protected void registerRendering(){ for(int i = 0; i < ALL_LAMP_TYPES.length; i++){ - ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this, 1, i), this.getRegistryName(), META.getName()+"="+i); + ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this, 1, i), this.getRegistryName(), TYPE.getName()+"="+ALL_LAMP_TYPES[i].regName); } } @@ -136,8 +139,18 @@ public class BlockColoredLamp extends BlockBase{ } @Override - protected PropertyInteger getMetaProperty(){ - return META; + public IBlockState getStateFromMeta(int meta){ + return this.getDefaultState().withProperty(TYPE, TheColoredLampColors.values()[meta]); + } + + @Override + public int getMetaFromState(IBlockState state){ + return state.getValue(TYPE).ordinal(); + } + + @Override + protected BlockStateContainer createBlockState(){ + return new BlockStateContainer(this, TYPE); } public static class TheItemBlock extends ItemBlockBase{ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCrystal.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCrystal.java index 6fd06d7bd..34f936a56 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCrystal.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCrystal.java @@ -16,14 +16,20 @@ import de.ellpeck.actuallyadditions.mod.blocks.base.ItemBlockBase; import de.ellpeck.actuallyadditions.mod.items.metalists.TheCrystals; import de.ellpeck.actuallyadditions.mod.util.StringUtil; import net.minecraft.block.Block; +import net.minecraft.block.BlockHorizontal; import net.minecraft.block.material.Material; +import net.minecraft.block.properties.PropertyEnum; import net.minecraft.block.properties.PropertyInteger; +import net.minecraft.block.state.BlockStateContainer; import net.minecraft.block.state.IBlockState; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.EnumRarity; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.Mirror; import net.minecraft.util.NonNullList; +import net.minecraft.util.Rotation; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -32,7 +38,7 @@ import java.util.List; public class BlockCrystal extends BlockBase{ public static final TheCrystals[] ALL_CRYSTALS = TheCrystals.values(); - private static final PropertyInteger META = PropertyInteger.create("meta", 0, ALL_CRYSTALS.length-1); + private static final PropertyEnum TYPE = PropertyEnum.create("type", TheCrystals.class); private final boolean isEmpowered; @@ -65,20 +71,30 @@ public class BlockCrystal extends BlockBase{ @Override protected void registerRendering(){ for(int i = 0; i < ALL_CRYSTALS.length; i++){ - ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this, 1, i), this.getRegistryName(), META.getName()+"="+i); + ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this, 1, i), this.getRegistryName(), TYPE.getName()+"="+ALL_CRYSTALS[i].name); } } + @Override + public IBlockState getStateFromMeta(int meta){ + return this.getDefaultState().withProperty(TYPE, TheCrystals.values()[meta]); + } + + @Override + public int getMetaFromState(IBlockState state){ + return state.getValue(TYPE).ordinal(); + } + + @Override + protected BlockStateContainer createBlockState(){ + return new BlockStateContainer(this, TYPE); + } + @Override public EnumRarity getRarity(ItemStack stack){ return stack.getItemDamage() >= ALL_CRYSTALS.length ? EnumRarity.COMMON : ALL_CRYSTALS[stack.getItemDamage()].rarity; } - @Override - protected PropertyInteger getMetaProperty(){ - return META; - } - public static class TheItemBlock extends ItemBlockBase{ public TheItemBlock(Block block){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockDirectionalBreaker.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockDirectionalBreaker.java index a5c752497..7b49083ad 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockDirectionalBreaker.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockDirectionalBreaker.java @@ -15,10 +15,12 @@ import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler; import de.ellpeck.actuallyadditions.mod.tile.TileEntityDirectionalBreaker; +import net.minecraft.block.BlockDirectional; import net.minecraft.block.BlockPistonBase; import net.minecraft.block.SoundType; import net.minecraft.block.material.Material; import net.minecraft.block.properties.PropertyInteger; +import net.minecraft.block.state.BlockStateContainer; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; @@ -27,13 +29,13 @@ import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.EnumFacing; import net.minecraft.util.EnumHand; +import net.minecraft.util.Mirror; +import net.minecraft.util.Rotation; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; public class BlockDirectionalBreaker extends BlockContainerBase{ - private static final PropertyInteger META = PropertyInteger.create("meta", 0, 5); - public BlockDirectionalBreaker(String name){ super(Material.ROCK, name); this.setHarvestLevel("pickaxe", 0); @@ -77,8 +79,28 @@ public class BlockDirectionalBreaker extends BlockContainerBase{ } @Override - protected PropertyInteger getMetaProperty(){ - return META; + public IBlockState getStateFromMeta(int meta){ + return this.getDefaultState().withProperty(BlockDirectional.FACING, EnumFacing.getFront(meta)); + } + + @Override + public int getMetaFromState(IBlockState state){ + return state.getValue(BlockDirectional.FACING).getIndex(); + } + + @Override + protected BlockStateContainer createBlockState(){ + return new BlockStateContainer(this, BlockDirectional.FACING); + } + + @Override + public IBlockState withRotation(IBlockState state, Rotation rot){ + return state.withProperty(BlockDirectional.FACING, rot.rotate(state.getValue(BlockDirectional.FACING))); + } + + @Override + public IBlockState withMirror(IBlockState state, Mirror mirror){ + return this.withRotation(state, mirror.toRotation(state.getValue(BlockDirectional.FACING))); } @Override diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockDropper.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockDropper.java index 834eb5809..2efc55d56 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockDropper.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockDropper.java @@ -14,10 +14,13 @@ import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler; import de.ellpeck.actuallyadditions.mod.tile.TileEntityDropper; +import net.minecraft.block.BlockDirectional; +import net.minecraft.block.BlockHorizontal; import net.minecraft.block.BlockPistonBase; import net.minecraft.block.SoundType; import net.minecraft.block.material.Material; import net.minecraft.block.properties.PropertyInteger; +import net.minecraft.block.state.BlockStateContainer; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; @@ -26,13 +29,13 @@ import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.EnumFacing; import net.minecraft.util.EnumHand; +import net.minecraft.util.Mirror; +import net.minecraft.util.Rotation; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; public class BlockDropper extends BlockContainerBase{ - private static final PropertyInteger META = PropertyInteger.create("meta", 0, 5); - public BlockDropper(String name){ super(Material.ROCK, name); this.setHarvestLevel("pickaxe", 0); @@ -76,8 +79,28 @@ public class BlockDropper extends BlockContainerBase{ } @Override - protected PropertyInteger getMetaProperty(){ - return META; + public IBlockState getStateFromMeta(int meta){ + return this.getDefaultState().withProperty(BlockDirectional.FACING, EnumFacing.getFront(meta)); + } + + @Override + public int getMetaFromState(IBlockState state){ + return state.getValue(BlockDirectional.FACING).getIndex(); + } + + @Override + protected BlockStateContainer createBlockState(){ + return new BlockStateContainer(this, BlockDirectional.FACING); + } + + @Override + public IBlockState withRotation(IBlockState state, Rotation rot){ + return state.withProperty(BlockDirectional.FACING, rot.rotate(state.getValue(BlockDirectional.FACING))); + } + + @Override + public IBlockState withMirror(IBlockState state, Mirror mirror){ + return this.withRotation(state, mirror.toRotation(state.getValue(BlockDirectional.FACING))); } @Override diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFarmer.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFarmer.java index e27dc0395..27aa87bd9 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFarmer.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFarmer.java @@ -14,9 +14,12 @@ import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler; import de.ellpeck.actuallyadditions.mod.tile.TileEntityFarmer; +import net.minecraft.block.BlockHorizontal; import net.minecraft.block.SoundType; import net.minecraft.block.material.Material; +import net.minecraft.block.properties.PropertyDirection; import net.minecraft.block.properties.PropertyInteger; +import net.minecraft.block.state.BlockStateContainer; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; @@ -25,14 +28,14 @@ import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.EnumFacing; import net.minecraft.util.EnumHand; +import net.minecraft.util.Mirror; +import net.minecraft.util.Rotation; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.MathHelper; import net.minecraft.world.World; public class BlockFarmer extends BlockContainerBase{ - private static final PropertyInteger META = PropertyInteger.create("meta", 0, 3); - public BlockFarmer(String name){ super(Material.ROCK, name); this.setHarvestLevel("pickaxe", 0); @@ -66,27 +69,34 @@ public class BlockFarmer extends BlockContainerBase{ @Override public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, EntityLivingBase player, ItemStack stack){ - int rotation = MathHelper.floor_double((double)(player.rotationYaw*4.0F/360.0F)+0.5D) & 3; - - if(rotation == 0){ - world.setBlockState(pos, this.getStateFromMeta(0), 2); - } - if(rotation == 1){ - world.setBlockState(pos, this.getStateFromMeta(3), 2); - } - if(rotation == 2){ - world.setBlockState(pos, this.getStateFromMeta(1), 2); - } - if(rotation == 3){ - world.setBlockState(pos, this.getStateFromMeta(2), 2); - } + world.setBlockState(pos, state.withProperty(BlockHorizontal.FACING, player.getHorizontalFacing().getOpposite()), 2); super.onBlockPlacedBy(world, pos, state, player, stack); } @Override - protected PropertyInteger getMetaProperty(){ - return META; + public IBlockState getStateFromMeta(int meta){ + return this.getDefaultState().withProperty(BlockHorizontal.FACING, EnumFacing.getHorizontal(meta)); + } + + @Override + public int getMetaFromState(IBlockState state){ + return state.getValue(BlockHorizontal.FACING).getHorizontalIndex(); + } + + @Override + protected BlockStateContainer createBlockState(){ + return new BlockStateContainer(this, BlockHorizontal.FACING); + } + + @Override + public IBlockState withRotation(IBlockState state, Rotation rot){ + return state.withProperty(BlockHorizontal.FACING, rot.rotate(state.getValue(BlockHorizontal.FACING))); + } + + @Override + public IBlockState withMirror(IBlockState state, Mirror mirror){ + return this.withRotation(state, mirror.toRotation(state.getValue(BlockHorizontal.FACING))); } @Override diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFluidCollector.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFluidCollector.java index ca43c8e8e..942d5dd80 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFluidCollector.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFluidCollector.java @@ -16,10 +16,12 @@ import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler; import de.ellpeck.actuallyadditions.mod.tile.TileEntityFluidCollector; import de.ellpeck.actuallyadditions.mod.tile.TileEntityFluidPlacer; +import net.minecraft.block.BlockDirectional; import net.minecraft.block.BlockPistonBase; import net.minecraft.block.SoundType; import net.minecraft.block.material.Material; import net.minecraft.block.properties.PropertyInteger; +import net.minecraft.block.state.BlockStateContainer; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; @@ -28,13 +30,13 @@ import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.EnumFacing; import net.minecraft.util.EnumHand; +import net.minecraft.util.Mirror; +import net.minecraft.util.Rotation; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; public class BlockFluidCollector extends BlockContainerBase{ - private static final PropertyInteger META = PropertyInteger.create("meta", 0, 5); - private final boolean isPlacer; public BlockFluidCollector(boolean isPlacer, String name){ @@ -84,8 +86,28 @@ public class BlockFluidCollector extends BlockContainerBase{ } @Override - protected PropertyInteger getMetaProperty(){ - return META; + public IBlockState getStateFromMeta(int meta){ + return this.getDefaultState().withProperty(BlockDirectional.FACING, EnumFacing.getFront(meta)); + } + + @Override + public int getMetaFromState(IBlockState state){ + return state.getValue(BlockDirectional.FACING).getIndex(); + } + + @Override + protected BlockStateContainer createBlockState(){ + return new BlockStateContainer(this, BlockDirectional.FACING); + } + + @Override + public IBlockState withRotation(IBlockState state, Rotation rot){ + return state.withProperty(BlockDirectional.FACING, rot.rotate(state.getValue(BlockDirectional.FACING))); + } + + @Override + public IBlockState withMirror(IBlockState state, Mirror mirror){ + return this.withRotation(state, mirror.toRotation(state.getValue(BlockDirectional.FACING))); } @Override diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFurnaceDouble.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFurnaceDouble.java index 08897889f..358719c61 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFurnaceDouble.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFurnaceDouble.java @@ -18,20 +18,18 @@ import de.ellpeck.actuallyadditions.mod.tile.TileEntityFurnaceDouble; import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil; import net.minecraft.block.Block; +import net.minecraft.block.BlockHorizontal; import net.minecraft.block.SoundType; import net.minecraft.block.material.Material; -import net.minecraft.block.properties.PropertyInteger; +import net.minecraft.block.state.BlockStateContainer; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.EnumHand; -import net.minecraft.util.EnumParticleTypes; +import net.minecraft.util.*; import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.MathHelper; import net.minecraft.util.text.TextFormatting; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; @@ -43,8 +41,6 @@ import java.util.Random; public class BlockFurnaceDouble extends BlockContainerBase{ - private static final PropertyInteger META = PropertyInteger.create("meta", 0, 7); - public BlockFurnaceDouble(String name){ super(Material.ROCK, name); this.setHarvestLevel("pickaxe", 0); @@ -63,34 +59,13 @@ public class BlockFurnaceDouble extends BlockContainerBase{ @Override @SideOnly(Side.CLIENT) public void randomDisplayTick(IBlockState state, World world, BlockPos pos, Random rand){ - int meta = this.getMetaFromState(state); - - if(meta > 3){ - float f = (float)pos.getX()+0.5F; - float f1 = (float)pos.getY()+0.0F+rand.nextFloat()*6.0F/16.0F; - float f2 = (float)pos.getZ()+0.5F; - float f3 = 0.52F; - float f4 = rand.nextFloat()*0.6F-0.3F; - - if(meta == 6){ - world.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, (double)(f-f3), (double)f1, (double)(f2+f4), 0.0D, 0.0D, 0.0D); - world.spawnParticle(EnumParticleTypes.FLAME, (double)(f-f3), (double)f1, (double)(f2+f4), 0.0D, 0.0D, 0.0D); - } - if(meta == 7){ - world.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, (double)(f+f3), (double)f1, (double)(f2+f4), 0.0D, 0.0D, 0.0D); - world.spawnParticle(EnumParticleTypes.FLAME, (double)(f+f3), (double)f1, (double)(f2+f4), 0.0D, 0.0D, 0.0D); - } - if(meta == 4){ - world.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, (double)(f+f4), (double)f1, (double)(f2-f3), 0.0D, 0.0D, 0.0D); - world.spawnParticle(EnumParticleTypes.FLAME, (double)(f+f4), (double)f1, (double)(f2-f3), 0.0D, 0.0D, 0.0D); - } - if(meta == 5){ - world.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, (double)(f+f4), (double)f1, (double)(f2+f3), 0.0D, 0.0D, 0.0D); - world.spawnParticle(EnumParticleTypes.FLAME, (double)(f+f4), (double)f1, (double)(f2+f3), 0.0D, 0.0D, 0.0D); - } - - for(int i = 0; i < 5; i++){ - world.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, (double)pos.getX()+0.5F, (double)pos.getY()+1.0F, (double)pos.getZ()+0.5F, 0.0D, 0.0D, 0.0D); + TileEntity tile = world.getTileEntity(pos); + if(tile instanceof TileEntityFurnaceDouble){ + TileEntityFurnaceDouble furnace = (TileEntityFurnaceDouble)tile; + if(furnace.firstSmeltTime > 0 || furnace.secondSmeltTime > 0){ + for(int i = 0; i < 5; i++){ + world.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, (double)pos.getX()+0.5F, (double)pos.getY()+1.0F, (double)pos.getZ()+0.5F, 0.0D, 0.0D, 0.0D); + } } } } @@ -119,27 +94,34 @@ public class BlockFurnaceDouble extends BlockContainerBase{ @Override public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, EntityLivingBase player, ItemStack stack){ - int rotation = MathHelper.floor_double((double)(player.rotationYaw*4.0F/360.0F)+0.5D) & 3; - - if(rotation == 0){ - world.setBlockState(pos, this.getStateFromMeta(0), 2); - } - if(rotation == 1){ - world.setBlockState(pos, this.getStateFromMeta(3), 2); - } - if(rotation == 2){ - world.setBlockState(pos, this.getStateFromMeta(1), 2); - } - if(rotation == 3){ - world.setBlockState(pos, this.getStateFromMeta(2), 2); - } + world.setBlockState(pos, state.withProperty(BlockHorizontal.FACING, player.getHorizontalFacing().getOpposite()), 2); super.onBlockPlacedBy(world, pos, state, player, stack); } @Override - protected PropertyInteger getMetaProperty(){ - return META; + public IBlockState getStateFromMeta(int meta){ + return this.getDefaultState().withProperty(BlockHorizontal.FACING, EnumFacing.getHorizontal(meta)); + } + + @Override + public int getMetaFromState(IBlockState state){ + return state.getValue(BlockHorizontal.FACING).getHorizontalIndex(); + } + + @Override + protected BlockStateContainer createBlockState(){ + return new BlockStateContainer(this, BlockHorizontal.FACING); + } + + @Override + public IBlockState withRotation(IBlockState state, Rotation rot){ + return state.withProperty(BlockHorizontal.FACING, rot.rotate(state.getValue(BlockHorizontal.FACING))); + } + + @Override + public IBlockState withMirror(IBlockState state, Mirror mirror){ + return this.withRotation(state, mirror.toRotation(state.getValue(BlockHorizontal.FACING))); } @Override diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockGrinder.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockGrinder.java index 54167b3a9..f316f1704 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockGrinder.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockGrinder.java @@ -17,7 +17,6 @@ import de.ellpeck.actuallyadditions.mod.tile.TileEntityGrinder; import de.ellpeck.actuallyadditions.mod.tile.TileEntityGrinderDouble; import net.minecraft.block.SoundType; import net.minecraft.block.material.Material; -import net.minecraft.block.properties.PropertyInteger; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumRarity; @@ -36,7 +35,6 @@ import java.util.Random; public class BlockGrinder extends BlockContainerBase{ - private static final PropertyInteger META = PropertyInteger.create("meta", 0, 1); private final boolean isDouble; public BlockGrinder(boolean isDouble, String name){ @@ -49,7 +47,6 @@ public class BlockGrinder extends BlockContainerBase{ this.setTickRandomly(true); } - @Override public TileEntity createNewTileEntity(World world, int par2){ return this.isDouble ? new TileEntityGrinderDouble() : new TileEntityGrinder(); @@ -58,16 +55,19 @@ public class BlockGrinder extends BlockContainerBase{ @Override @SideOnly(Side.CLIENT) public void randomDisplayTick(IBlockState state, World world, BlockPos pos, Random rand){ - int meta = this.getMetaFromState(state); - - if(meta == 1){ - for(int i = 0; i < 5; i++){ - double xRand = rand.nextDouble()/0.75D-0.5D; - double zRand = rand.nextDouble()/0.75D-0.5D; - world.spawnParticle(EnumParticleTypes.CRIT, (double)pos.getX()+0.4F, (double)pos.getY()+0.8F, (double)pos.getZ()+0.4F, xRand, 0.5D, zRand); + TileEntity tile = world.getTileEntity(pos); + if(tile instanceof TileEntityGrinder){ + TileEntityGrinder crusher = (TileEntityGrinder)tile; + if(crusher.firstCrushTime > 0 || crusher.secondCrushTime > 0){ + for(int i = 0; i < 5; i++){ + double xRand = rand.nextDouble()/0.75D-0.5D; + double zRand = rand.nextDouble()/0.75D-0.5D; + world.spawnParticle(EnumParticleTypes.CRIT, (double)pos.getX()+0.4F, (double)pos.getY()+0.8F, (double)pos.getZ()+0.4F, xRand, 0.5D, zRand); + } + world.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, (double)pos.getX()+0.5F, (double)pos.getY()+1.0F, (double)pos.getZ()+0.5F, 0.0D, 0.0D, 0.0D); } - world.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, (double)pos.getX()+0.5F, (double)pos.getY()+1.0F, (double)pos.getZ()+0.5F, 0.0D, 0.0D, 0.0D); } + } @Override @@ -88,13 +88,13 @@ public class BlockGrinder extends BlockContainerBase{ } @Override - public EnumRarity getRarity(ItemStack stack){ - return EnumRarity.EPIC; + public int damageDropped(IBlockState state){ + return 0; } @Override - protected PropertyInteger getMetaProperty(){ - return META; + public EnumRarity getRarity(ItemStack stack){ + return EnumRarity.EPIC; } @Override diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLampPowerer.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLampPowerer.java index ec6419a97..771d7fc92 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLampPowerer.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLampPowerer.java @@ -14,15 +14,19 @@ package de.ellpeck.actuallyadditions.mod.blocks; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockBase; import de.ellpeck.actuallyadditions.mod.util.WorldUtil; import net.minecraft.block.Block; +import net.minecraft.block.BlockDirectional; import net.minecraft.block.BlockPistonBase; import net.minecraft.block.SoundType; import net.minecraft.block.material.Material; import net.minecraft.block.properties.PropertyInteger; +import net.minecraft.block.state.BlockStateContainer; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.EntityLivingBase; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumFacing; +import net.minecraft.util.Mirror; +import net.minecraft.util.Rotation; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; @@ -31,8 +35,6 @@ import java.util.List; public class BlockLampPowerer extends BlockBase{ - private static final PropertyInteger META = PropertyInteger.create("meta", 0, 5); - public BlockLampPowerer(String name){ super(Material.ROCK, name); this.setHarvestLevel("pickaxe", 0); @@ -104,7 +106,27 @@ public class BlockLampPowerer extends BlockBase{ } @Override - protected PropertyInteger getMetaProperty(){ - return META; + public IBlockState getStateFromMeta(int meta){ + return this.getDefaultState().withProperty(BlockDirectional.FACING, EnumFacing.getFront(meta)); + } + + @Override + public int getMetaFromState(IBlockState state){ + return state.getValue(BlockDirectional.FACING).getIndex(); + } + + @Override + protected BlockStateContainer createBlockState(){ + return new BlockStateContainer(this, BlockDirectional.FACING); + } + + @Override + public IBlockState withRotation(IBlockState state, Rotation rot){ + return state.withProperty(BlockDirectional.FACING, rot.rotate(state.getValue(BlockDirectional.FACING))); + } + + @Override + public IBlockState withMirror(IBlockState state, Mirror mirror){ + return this.withRotation(state, mirror.toRotation(state.getValue(BlockDirectional.FACING))); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLaserRelay.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLaserRelay.java index 19d8fc2bd..9fe3c2fc7 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLaserRelay.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLaserRelay.java @@ -18,9 +18,12 @@ import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler; import de.ellpeck.actuallyadditions.mod.tile.*; import de.ellpeck.actuallyadditions.mod.util.StackUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil; +import net.minecraft.block.BlockDirectional; +import net.minecraft.block.BlockHorizontal; import net.minecraft.block.SoundType; import net.minecraft.block.material.Material; import net.minecraft.block.properties.PropertyInteger; +import net.minecraft.block.state.BlockStateContainer; import net.minecraft.block.state.IBlockState; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.ScaledResolution; @@ -32,6 +35,8 @@ import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.EnumFacing; import net.minecraft.util.EnumHand; +import net.minecraft.util.Mirror; +import net.minecraft.util.Rotation; import net.minecraft.util.math.AxisAlignedBB; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.RayTraceResult; @@ -56,7 +61,6 @@ public class BlockLaserRelay extends BlockContainerBase implements IHudDisplay{ private static final AxisAlignedBB AABB_SOUTH = new AxisAlignedBB(2*F, 2*F, 0, 1-2*F, 1-2*F, 1-6*F); private static final AxisAlignedBB AABB_WEST = new AxisAlignedBB(6*F, 2*F, 2*F, 1, 1-2*F, 1-2*F); - private static final PropertyInteger META = PropertyInteger.create("meta", 0, 5); private final Type type; public BlockLaserRelay(String name, Type type){ @@ -130,8 +134,28 @@ public class BlockLaserRelay extends BlockContainerBase implements IHudDisplay{ } @Override - protected PropertyInteger getMetaProperty(){ - return META; + public IBlockState getStateFromMeta(int meta){ + return this.getDefaultState().withProperty(BlockDirectional.FACING, EnumFacing.getFront(meta)); + } + + @Override + public int getMetaFromState(IBlockState state){ + return state.getValue(BlockDirectional.FACING).getIndex(); + } + + @Override + protected BlockStateContainer createBlockState(){ + return new BlockStateContainer(this, BlockDirectional.FACING); + } + + @Override + public IBlockState withRotation(IBlockState state, Rotation rot){ + return state.withProperty(BlockDirectional.FACING, rot.rotate(state.getValue(BlockDirectional.FACING))); + } + + @Override + public IBlockState withMirror(IBlockState state, Mirror mirror){ + return this.withRotation(state, mirror.toRotation(state.getValue(BlockDirectional.FACING))); } @Override diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockMisc.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockMisc.java index b84c9bb3b..78377db61 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockMisc.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockMisc.java @@ -14,10 +14,13 @@ import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockBase; import de.ellpeck.actuallyadditions.mod.blocks.base.ItemBlockBase; import de.ellpeck.actuallyadditions.mod.blocks.metalists.TheMiscBlocks; +import de.ellpeck.actuallyadditions.mod.blocks.metalists.TheWildPlants; import de.ellpeck.actuallyadditions.mod.util.StringUtil; import net.minecraft.block.Block; import net.minecraft.block.material.Material; +import net.minecraft.block.properties.PropertyEnum; import net.minecraft.block.properties.PropertyInteger; +import net.minecraft.block.state.BlockStateContainer; import net.minecraft.block.state.IBlockState; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.EnumRarity; @@ -32,7 +35,7 @@ import java.util.List; public class BlockMisc extends BlockBase{ public static final TheMiscBlocks[] ALL_MISC_BLOCKS = TheMiscBlocks.values(); - private static final PropertyInteger META = PropertyInteger.create("meta", 0, ALL_MISC_BLOCKS.length-1); + private static final PropertyEnum TYPE = PropertyEnum.create("type", TheMiscBlocks.class); public BlockMisc(String name){ super(Material.ROCK, name); @@ -62,7 +65,7 @@ public class BlockMisc extends BlockBase{ @Override protected void registerRendering(){ for(int i = 0; i < ALL_MISC_BLOCKS.length; i++){ - ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this, 1, i), this.getRegistryName(), META.getName()+"="+i); + ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this, 1, i), this.getRegistryName(), TYPE.getName()+"="+ALL_MISC_BLOCKS[i].name); } } @@ -72,8 +75,18 @@ public class BlockMisc extends BlockBase{ } @Override - protected PropertyInteger getMetaProperty(){ - return META; + public IBlockState getStateFromMeta(int meta){ + return this.getDefaultState().withProperty(TYPE, TheMiscBlocks.values()[meta]); + } + + @Override + public int getMetaFromState(IBlockState state){ + return state.getValue(TYPE).ordinal(); + } + + @Override + protected BlockStateContainer createBlockState(){ + return new BlockStateContainer(this, TYPE); } public static class TheItemBlock extends ItemBlockBase{ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockOilGenerator.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockOilGenerator.java index a9b9f692f..69ad45f6d 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockOilGenerator.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockOilGenerator.java @@ -15,18 +15,18 @@ import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler; import de.ellpeck.actuallyadditions.mod.tile.TileEntityOilGenerator; +import net.minecraft.block.BlockHorizontal; import net.minecraft.block.SoundType; import net.minecraft.block.material.Material; import net.minecraft.block.properties.PropertyInteger; +import net.minecraft.block.state.BlockStateContainer; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.EnumHand; -import net.minecraft.util.EnumParticleTypes; +import net.minecraft.util.*; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.MathHelper; import net.minecraft.world.World; @@ -93,20 +93,7 @@ public class BlockOilGenerator extends BlockContainerBase{ @Override public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, EntityLivingBase player, ItemStack stack){ - int rotation = MathHelper.floor_double((double)(player.rotationYaw*4.0F/360.0F)+0.5D) & 3; - - if(rotation == 0){ - world.setBlockState(pos, this.getStateFromMeta(0), 2); - } - if(rotation == 1){ - world.setBlockState(pos, this.getStateFromMeta(3), 2); - } - if(rotation == 2){ - world.setBlockState(pos, this.getStateFromMeta(1), 2); - } - if(rotation == 3){ - world.setBlockState(pos, this.getStateFromMeta(2), 2); - } + world.setBlockState(pos, state.withProperty(BlockHorizontal.FACING, player.getHorizontalFacing().getOpposite()), 2); super.onBlockPlacedBy(world, pos, state, player, stack); } @@ -123,8 +110,27 @@ public class BlockOilGenerator extends BlockContainerBase{ } @Override - protected PropertyInteger getMetaProperty(){ - return META; + public IBlockState getStateFromMeta(int meta){ + return this.getDefaultState().withProperty(BlockHorizontal.FACING, EnumFacing.getHorizontal(meta)); } + @Override + public int getMetaFromState(IBlockState state){ + return state.getValue(BlockHorizontal.FACING).getHorizontalIndex(); + } + + @Override + protected BlockStateContainer createBlockState(){ + return new BlockStateContainer(this, BlockHorizontal.FACING); + } + + @Override + public IBlockState withRotation(IBlockState state, Rotation rot){ + return state.withProperty(BlockHorizontal.FACING, rot.rotate(state.getValue(BlockHorizontal.FACING))); + } + + @Override + public IBlockState withMirror(IBlockState state, Mirror mirror){ + return this.withRotation(state, mirror.toRotation(state.getValue(BlockHorizontal.FACING))); + } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockSlabs.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockSlabs.java index 112b2eff4..9ba7b7428 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockSlabs.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockSlabs.java @@ -14,17 +14,17 @@ import de.ellpeck.actuallyadditions.mod.blocks.base.BlockBase; import de.ellpeck.actuallyadditions.mod.blocks.base.ItemBlockBase; import de.ellpeck.actuallyadditions.mod.util.StackUtil; import net.minecraft.block.Block; +import net.minecraft.block.BlockHorizontal; +import net.minecraft.block.BlockSlab; import net.minecraft.block.SoundType; import net.minecraft.block.properties.PropertyInteger; +import net.minecraft.block.state.BlockStateContainer; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; -import net.minecraft.util.EnumActionResult; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.EnumHand; -import net.minecraft.util.SoundCategory; +import net.minecraft.util.*; import net.minecraft.util.math.AxisAlignedBB; import net.minecraft.util.math.BlockPos; import net.minecraft.world.IBlockAccess; @@ -37,7 +37,6 @@ public class BlockSlabs extends BlockBase{ public static final AxisAlignedBB AABB_BOTTOM_HALF = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 0.5D, 1.0D); private static final AxisAlignedBB AABB_TOP_HALF = new AxisAlignedBB(0.0D, 0.5D, 0.0D, 1.0D, 1.0D, 1.0D); - private static final PropertyInteger META = PropertyInteger.create("meta", 0, 1); private final Block fullBlock; private final int meta; @@ -91,7 +90,7 @@ public class BlockSlabs extends BlockBase{ @Override public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos){ - return state.getValue(META) == 1 ? AABB_TOP_HALF : AABB_BOTTOM_HALF; + return state.getValue(BlockSlab.HALF) == BlockSlab.EnumBlockHalf.TOP ? AABB_TOP_HALF : AABB_BOTTOM_HALF; } @Override @@ -105,8 +104,18 @@ public class BlockSlabs extends BlockBase{ } @Override - protected PropertyInteger getMetaProperty(){ - return META; + public IBlockState getStateFromMeta(int meta){ + return this.getDefaultState().withProperty(BlockSlab.HALF, meta == 0 ? BlockSlab.EnumBlockHalf.BOTTOM : BlockSlab.EnumBlockHalf.TOP); + } + + @Override + public int getMetaFromState(IBlockState state){ + return state.getValue(BlockSlab.HALF) == BlockSlab.EnumBlockHalf.BOTTOM ? 0 : 1; + } + + @Override + protected BlockStateContainer createBlockState(){ + return new BlockStateContainer(this, BlockSlab.HALF); } public static class TheItemBlock extends ItemBlockBase{ @@ -125,7 +134,7 @@ public class BlockSlabs extends BlockBase{ if(state.getBlock() == this.block){ BlockSlabs theBlock = (BlockSlabs)this.block; - if((facing == EnumFacing.UP && state.getValue(META) == 0 || facing == EnumFacing.DOWN && state.getValue(META) == 1)){ + if((facing == EnumFacing.UP && state.getValue(BlockSlab.HALF) == BlockSlab.EnumBlockHalf.BOTTOM) || (facing == EnumFacing.DOWN && state.getValue(BlockSlab.HALF) == BlockSlab.EnumBlockHalf.TOP)){ IBlockState newState = theBlock.fullBlock.getStateFromMeta(theBlock.meta); AxisAlignedBB bound = newState.getCollisionBoundingBox(worldIn, pos); @@ -152,7 +161,7 @@ public class BlockSlabs extends BlockBase{ IBlockState state = worldIn.getBlockState(pos); if(state.getBlock() == this.block){ - if((side == EnumFacing.UP && state.getValue(META) == 0 || side == EnumFacing.DOWN && state.getValue(META) == 1)){ + if((side == EnumFacing.UP && state.getValue(BlockSlab.HALF) == BlockSlab.EnumBlockHalf.BOTTOM) || (side == EnumFacing.DOWN && state.getValue(BlockSlab.HALF) == BlockSlab.EnumBlockHalf.TOP)){ return true; } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockSmileyCloud.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockSmileyCloud.java index 3145170d6..8afa2c3f1 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockSmileyCloud.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockSmileyCloud.java @@ -16,18 +16,18 @@ import de.ellpeck.actuallyadditions.mod.achievement.TheAchievements; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler; import de.ellpeck.actuallyadditions.mod.tile.TileEntitySmileyCloud; +import net.minecraft.block.BlockHorizontal; import net.minecraft.block.SoundType; import net.minecraft.block.material.Material; import net.minecraft.block.properties.PropertyInteger; +import net.minecraft.block.state.BlockStateContainer; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.EnumHand; -import net.minecraft.util.EnumParticleTypes; +import net.minecraft.util.*; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.MathHelper; import net.minecraft.world.World; @@ -38,8 +38,6 @@ import java.util.Random; public class BlockSmileyCloud extends BlockContainerBase{ - private static final PropertyInteger META = PropertyInteger.create("meta", 0, 7); - public BlockSmileyCloud(String name){ super(Material.CLOTH, name); this.setHardness(0.5F); @@ -103,26 +101,33 @@ public class BlockSmileyCloud extends BlockContainerBase{ @Override public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, EntityLivingBase player, ItemStack stack){ - int rotation = MathHelper.floor_double((double)(player.rotationYaw*4.0F/360.0F)+0.5D) & 3; - - if(rotation == 0){ - world.setBlockState(pos, this.getStateFromMeta(0), 2); - } - if(rotation == 1){ - world.setBlockState(pos, this.getStateFromMeta(3), 2); - } - if(rotation == 2){ - world.setBlockState(pos, this.getStateFromMeta(1), 2); - } - if(rotation == 3){ - world.setBlockState(pos, this.getStateFromMeta(2), 2); - } + world.setBlockState(pos, state.withProperty(BlockHorizontal.FACING, player.getHorizontalFacing().getOpposite()), 2); super.onBlockPlacedBy(world, pos, state, player, stack); } @Override - protected PropertyInteger getMetaProperty(){ - return META; + public IBlockState getStateFromMeta(int meta){ + return this.getDefaultState().withProperty(BlockHorizontal.FACING, EnumFacing.getHorizontal(meta)); + } + + @Override + public int getMetaFromState(IBlockState state){ + return state.getValue(BlockHorizontal.FACING).getHorizontalIndex(); + } + + @Override + protected BlockStateContainer createBlockState(){ + return new BlockStateContainer(this, BlockHorizontal.FACING); + } + + @Override + public IBlockState withRotation(IBlockState state, Rotation rot){ + return state.withProperty(BlockHorizontal.FACING, rot.rotate(state.getValue(BlockHorizontal.FACING))); + } + + @Override + public IBlockState withMirror(IBlockState state, Mirror mirror){ + return this.withRotation(state, mirror.toRotation(state.getValue(BlockHorizontal.FACING))); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockTreasureChest.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockTreasureChest.java index 8a6793e27..cc1c11c92 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockTreasureChest.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockTreasureChest.java @@ -15,9 +15,11 @@ import de.ellpeck.actuallyadditions.api.recipe.TreasureChestLoot; import de.ellpeck.actuallyadditions.mod.achievement.TheAchievements; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockBase; import de.ellpeck.actuallyadditions.mod.util.StackUtil; +import net.minecraft.block.BlockHorizontal; import net.minecraft.block.SoundType; import net.minecraft.block.material.Material; import net.minecraft.block.properties.PropertyInteger; +import net.minecraft.block.state.BlockStateContainer; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.item.EntityItem; @@ -37,8 +39,6 @@ import java.util.Random; public class BlockTreasureChest extends BlockBase{ - private static final PropertyInteger META = PropertyInteger.create("meta", 0, 3); - public BlockTreasureChest(String name){ super(Material.WOOD, name); this.setHarvestLevel("axe", 0); @@ -79,20 +79,9 @@ public class BlockTreasureChest extends BlockBase{ @Override public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, EntityLivingBase player, ItemStack stack){ - int rotation = MathHelper.floor_double((double)(player.rotationYaw*4.0F/360.0F)+0.5D) & 3; + world.setBlockState(pos, state.withProperty(BlockHorizontal.FACING, player.getHorizontalFacing().getOpposite()), 2); - if(rotation == 0){ - world.setBlockState(pos, this.getStateFromMeta(0), 2); - } - if(rotation == 1){ - world.setBlockState(pos, this.getStateFromMeta(3), 2); - } - if(rotation == 2){ - world.setBlockState(pos, this.getStateFromMeta(1), 2); - } - if(rotation == 3){ - world.setBlockState(pos, this.getStateFromMeta(2), 2); - } + super.onBlockPlacedBy(world, pos, state, player, stack); } @Override @@ -124,7 +113,27 @@ public class BlockTreasureChest extends BlockBase{ } @Override - protected PropertyInteger getMetaProperty(){ - return META; + public IBlockState getStateFromMeta(int meta){ + return this.getDefaultState().withProperty(BlockHorizontal.FACING, EnumFacing.getHorizontal(meta)); + } + + @Override + public int getMetaFromState(IBlockState state){ + return state.getValue(BlockHorizontal.FACING).getHorizontalIndex(); + } + + @Override + protected BlockStateContainer createBlockState(){ + return new BlockStateContainer(this, BlockHorizontal.FACING); + } + + @Override + public IBlockState withRotation(IBlockState state, Rotation rot){ + return state.withProperty(BlockHorizontal.FACING, rot.rotate(state.getValue(BlockHorizontal.FACING))); + } + + @Override + public IBlockState withMirror(IBlockState state, Mirror mirror){ + return this.withRotation(state, mirror.toRotation(state.getValue(BlockHorizontal.FACING))); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockWildPlant.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockWildPlant.java index 9f8775cd0..c0b217f90 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockWildPlant.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockWildPlant.java @@ -16,11 +16,14 @@ import de.ellpeck.actuallyadditions.mod.blocks.base.BlockBushBase; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockPlant; import de.ellpeck.actuallyadditions.mod.blocks.base.ItemBlockBase; import de.ellpeck.actuallyadditions.mod.blocks.metalists.TheWildPlants; +import de.ellpeck.actuallyadditions.mod.items.metalists.TheCrystals; import de.ellpeck.actuallyadditions.mod.util.StringUtil; import net.minecraft.block.Block; import net.minecraft.block.SoundType; import net.minecraft.block.material.Material; +import net.minecraft.block.properties.PropertyEnum; import net.minecraft.block.properties.PropertyInteger; +import net.minecraft.block.state.BlockStateContainer; import net.minecraft.block.state.IBlockState; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.player.EntityPlayer; @@ -41,7 +44,7 @@ import java.util.List; public class BlockWildPlant extends BlockBushBase{ public static final TheWildPlants[] ALL_WILD_PLANTS = TheWildPlants.values(); - private static final PropertyInteger META = PropertyInteger.create("meta", 0, ALL_WILD_PLANTS.length-1); + private static final PropertyEnum TYPE = PropertyEnum.create("type", TheWildPlants.class); public BlockWildPlant(String name){ super(name); @@ -96,20 +99,30 @@ public class BlockWildPlant extends BlockBushBase{ @Override protected void registerRendering(){ for(int i = 0; i < ALL_WILD_PLANTS.length; i++){ - ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this, 1, i), this.getRegistryName(), META.getName()+"="+i); + ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this, 1, i), this.getRegistryName(), TYPE.getName()+"="+ALL_WILD_PLANTS[i].name); } } + @Override + public IBlockState getStateFromMeta(int meta){ + return this.getDefaultState().withProperty(TYPE, TheWildPlants.values()[meta]); + } + + @Override + public int getMetaFromState(IBlockState state){ + return state.getValue(TYPE).ordinal(); + } + + @Override + protected BlockStateContainer createBlockState(){ + return new BlockStateContainer(this, TYPE); + } + @Override public EnumRarity getRarity(ItemStack stack){ return stack.getItemDamage() >= ALL_WILD_PLANTS.length ? EnumRarity.COMMON : ALL_WILD_PLANTS[stack.getItemDamage()].rarity; } - @Override - protected PropertyInteger getMetaProperty(){ - return META; - } - public static class TheItemBlock extends ItemBlockBase{ public TheItemBlock(Block block){ @@ -121,7 +134,7 @@ public class BlockWildPlant extends BlockBushBase{ @Override public String getUnlocalizedName(ItemStack stack){ - return stack.getItemDamage() >= ALL_WILD_PLANTS.length ? StringUtil.BUGGED_ITEM_NAME : this.getUnlocalizedName()+ALL_WILD_PLANTS[stack.getItemDamage()].name; + return stack.getItemDamage() >= ALL_WILD_PLANTS.length ? StringUtil.BUGGED_ITEM_NAME : this.getUnlocalizedName()+"_"+ALL_WILD_PLANTS[stack.getItemDamage()].name; } } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockXPSolidifier.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockXPSolidifier.java index 6d09c8994..64e9e9752 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockXPSolidifier.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockXPSolidifier.java @@ -15,9 +15,11 @@ import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler; import de.ellpeck.actuallyadditions.mod.tile.TileEntityXPSolidifier; +import net.minecraft.block.BlockHorizontal; import net.minecraft.block.SoundType; import net.minecraft.block.material.Material; import net.minecraft.block.properties.PropertyInteger; +import net.minecraft.block.state.BlockStateContainer; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; @@ -26,14 +28,14 @@ import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.EnumFacing; import net.minecraft.util.EnumHand; +import net.minecraft.util.Mirror; +import net.minecraft.util.Rotation; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.MathHelper; import net.minecraft.world.World; public class BlockXPSolidifier extends BlockContainerBase{ - private static final PropertyInteger META = PropertyInteger.create("meta", 0, 3); - public BlockXPSolidifier(String name){ super(Material.ROCK, name); this.setHarvestLevel("pickaxe", 0); @@ -67,27 +69,34 @@ public class BlockXPSolidifier extends BlockContainerBase{ @Override public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, EntityLivingBase player, ItemStack stack){ - int rotation = MathHelper.floor_double((double)(player.rotationYaw*4.0F/360.0F)+0.5D) & 3; - - if(rotation == 0){ - world.setBlockState(pos, this.getStateFromMeta(0), 2); - } - if(rotation == 1){ - world.setBlockState(pos, this.getStateFromMeta(3), 2); - } - if(rotation == 2){ - world.setBlockState(pos, this.getStateFromMeta(1), 2); - } - if(rotation == 3){ - world.setBlockState(pos, this.getStateFromMeta(2), 2); - } + world.setBlockState(pos, state.withProperty(BlockHorizontal.FACING, player.getHorizontalFacing().getOpposite()), 2); super.onBlockPlacedBy(world, pos, state, player, stack); } @Override - protected PropertyInteger getMetaProperty(){ - return META; + public IBlockState getStateFromMeta(int meta){ + return this.getDefaultState().withProperty(BlockHorizontal.FACING, EnumFacing.getHorizontal(meta)); + } + + @Override + public int getMetaFromState(IBlockState state){ + return state.getValue(BlockHorizontal.FACING).getHorizontalIndex(); + } + + @Override + protected BlockStateContainer createBlockState(){ + return new BlockStateContainer(this, BlockHorizontal.FACING); + } + + @Override + public IBlockState withRotation(IBlockState state, Rotation rot){ + return state.withProperty(BlockHorizontal.FACING, rot.rotate(state.getValue(BlockHorizontal.FACING))); + } + + @Override + public IBlockState withMirror(IBlockState state, Mirror mirror){ + return this.withRotation(state, mirror.toRotation(state.getValue(BlockHorizontal.FACING))); } @Override diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockBase.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockBase.java index 36a4dbf66..1694f743e 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockBase.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockBase.java @@ -57,24 +57,4 @@ public class BlockBase extends Block implements ItemBlockBase.ICustomRarity{ public EnumRarity getRarity(ItemStack stack){ return EnumRarity.COMMON; } - - @Override - public IBlockState getStateFromMeta(int meta){ - return this.getMetaProperty() == null ? super.getStateFromMeta(meta) : this.getDefaultState().withProperty(this.getMetaProperty(), meta); - } - - @Override - public int getMetaFromState(IBlockState state){ - return this.getMetaProperty() == null ? super.getMetaFromState(state) : state.getValue(this.getMetaProperty()); - } - - - @Override - protected BlockStateContainer createBlockState(){ - return this.getMetaProperty() == null ? super.createBlockState() : new BlockStateContainer(this, this.getMetaProperty()); - } - - protected PropertyInteger getMetaProperty(){ - return null; - } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockBushBase.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockBushBase.java index 5cbbb7cac..841109173 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockBushBase.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockBushBase.java @@ -57,24 +57,4 @@ public class BlockBushBase extends BlockBush implements ItemBlockBase.ICustomRar public EnumRarity getRarity(ItemStack stack){ return EnumRarity.COMMON; } - - @Override - public IBlockState getStateFromMeta(int meta){ - return this.getMetaProperty() == null ? super.getStateFromMeta(meta) : this.getDefaultState().withProperty(this.getMetaProperty(), meta); - } - - @Override - public int getMetaFromState(IBlockState state){ - return this.getMetaProperty() == null ? super.getMetaFromState(state) : state.getValue(this.getMetaProperty()); - } - - - @Override - protected BlockStateContainer createBlockState(){ - return this.getMetaProperty() == null ? super.createBlockState() : new BlockStateContainer(this, this.getMetaProperty()); - } - - protected PropertyInteger getMetaProperty(){ - return null; - } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockContainerBase.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockContainerBase.java index 766578f6b..5fff99ef1 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockContainerBase.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockContainerBase.java @@ -132,16 +132,6 @@ public abstract class BlockContainerBase extends BlockContainer implements ItemB return false; } - @Override - public IBlockState getStateFromMeta(int meta){ - return this.getMetaProperty() == null ? super.getStateFromMeta(meta) : this.getDefaultState().withProperty(this.getMetaProperty(), meta); - } - - @Override - public int getMetaFromState(IBlockState state){ - return this.getMetaProperty() == null ? super.getMetaFromState(state) : state.getValue(this.getMetaProperty()); - } - @Override public void updateTick(World world, BlockPos pos, IBlockState state, Random random){ if(!world.isRemote){ @@ -245,13 +235,6 @@ public abstract class BlockContainerBase extends BlockContainer implements ItemB return 0; } - - @Override - protected BlockStateContainer createBlockState(){ - return this.getMetaProperty() == null ? super.createBlockState() : new BlockStateContainer(this, this.getMetaProperty()); - } - - @Override public ArrayList getDrops(IBlockAccess world, BlockPos pos, IBlockState state, int fortune){ ArrayList drops = new ArrayList(); @@ -290,11 +273,6 @@ public abstract class BlockContainerBase extends BlockContainer implements ItemB return drops; } - protected PropertyInteger getMetaProperty(){ - return null; - } - - @Override public EnumBlockRenderType getRenderType(IBlockState state){ return EnumBlockRenderType.MODEL; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/metalists/TheColoredLampColors.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/metalists/TheColoredLampColors.java index 10d0607df..f13ea16ec 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/metalists/TheColoredLampColors.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/metalists/TheColoredLampColors.java @@ -10,7 +10,9 @@ package de.ellpeck.actuallyadditions.mod.blocks.metalists; -public enum TheColoredLampColors{ +import net.minecraft.util.IStringSerializable; + +public enum TheColoredLampColors implements IStringSerializable{ WHITE("White", "white"), ORANGE("Orange", "orange"), @@ -37,6 +39,11 @@ public enum TheColoredLampColors{ this.regName = regName; } + @Override + public String getName(){ + return this.regName; + } + public static TheColoredLampColors getColorFromDyeName(String color){ if(color.substring(0, 3).equals("dye")){ String actualName = color.substring(3); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/metalists/TheMiscBlocks.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/metalists/TheMiscBlocks.java index 9001c3928..205e1d397 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/metalists/TheMiscBlocks.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/metalists/TheMiscBlocks.java @@ -11,8 +11,9 @@ package de.ellpeck.actuallyadditions.mod.blocks.metalists; import net.minecraft.item.EnumRarity; +import net.minecraft.util.IStringSerializable; -public enum TheMiscBlocks{ +public enum TheMiscBlocks implements IStringSerializable{ QUARTZ_PILLAR("black_quartz_pillar", EnumRarity.RARE), QUARTZ_CHISELED("black_quartz_chiseled", EnumRarity.RARE), @@ -32,4 +33,9 @@ public enum TheMiscBlocks{ this.name = name; this.rarity = rarity; } + + @Override + public String getName(){ + return this.name; + } } \ No newline at end of file diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/metalists/TheWildPlants.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/metalists/TheWildPlants.java index 28eaf04a7..d88b45915 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/metalists/TheWildPlants.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/metalists/TheWildPlants.java @@ -13,13 +13,14 @@ package de.ellpeck.actuallyadditions.mod.blocks.metalists; import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks; import net.minecraft.block.Block; import net.minecraft.item.EnumRarity; +import net.minecraft.util.IStringSerializable; -public enum TheWildPlants{ +public enum TheWildPlants implements IStringSerializable{ - CANOLA("Canola", EnumRarity.RARE, InitBlocks.blockCanola), - FLAX("Flax", EnumRarity.RARE, InitBlocks.blockFlax), - RICE("Rice", EnumRarity.RARE, InitBlocks.blockRice), - COFFEE("Coffee", EnumRarity.RARE, InitBlocks.blockCoffee); + CANOLA("canola", EnumRarity.RARE, InitBlocks.blockCanola), + FLAX("flax", EnumRarity.RARE, InitBlocks.blockFlax), + RICE("rice", EnumRarity.RARE, InitBlocks.blockRice), + COFFEE("coffee", EnumRarity.RARE, InitBlocks.blockCoffee); public final String name; public final EnumRarity rarity; @@ -30,4 +31,9 @@ public enum TheWildPlants{ this.rarity = rarity; this.wildVersionOf = wildVersionOf; } + + @Override + public String getName(){ + return this.name; + } } \ No newline at end of file diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderSmileyCloud.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderSmileyCloud.java index c4b2acc43..0e4532543 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderSmileyCloud.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderSmileyCloud.java @@ -32,8 +32,6 @@ public class RenderSmileyCloud extends TileEntitySpecialRenderer{ GlStateManager.rotate(180F, 0.0F, 0.0F, 1.0F); GlStateManager.translate(0.0F, -2F, 0.0F); - theCloud.setStatus(theCloud.name != null && !theCloud.name.isEmpty() && theCloud.name.equals("Pink Fluffy Unicloud")); - if(theCloud.name != null && !theCloud.name.isEmpty()){ easterEggs: for(ISmileyCloudEasterEgg cloud : SmileyCloudEasterEggs.CLOUD_STUFF){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/metalists/TheCrystals.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/metalists/TheCrystals.java index b470e735b..b159daf8f 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/metalists/TheCrystals.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/metalists/TheCrystals.java @@ -12,8 +12,9 @@ package de.ellpeck.actuallyadditions.mod.items.metalists; import de.ellpeck.actuallyadditions.mod.util.Util; import net.minecraft.item.EnumRarity; +import net.minecraft.util.IStringSerializable; -public enum TheCrystals{ +public enum TheCrystals implements IStringSerializable{ REDSTONE("red", Util.CRYSTAL_RED_RARITY, 158F/255F, 43F/255F, 39F/255F), LAPIS("blue", Util.CRYSTAL_BLUE_RARITY, 37F/255F, 49F/255F, 147F/255F), @@ -31,4 +32,9 @@ public enum TheCrystals{ this.rarity = rarity; this.conversionColorParticles = conversionColorParticles; } + + @Override + public String getName(){ + return this.name; + } } \ No newline at end of file diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFurnaceDouble.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFurnaceDouble.java index 4ebaf4c7d..9ddb77fe4 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFurnaceDouble.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFurnaceDouble.java @@ -139,21 +139,6 @@ public class TileEntityFurnaceDouble extends TileEntityInventoryBase implements this.secondSmeltTime = 0; } - if(flag != (this.firstSmeltTime > 0 || this.secondSmeltTime > 0)){ - this.markDirty(); - IBlockState state = this.worldObj.getBlockState(this.pos); - Block block = state.getBlock(); - int meta = block.getMetaFromState(state); - if(meta > 3){ - if(!this.canSmeltOn(SLOT_INPUT_1, SLOT_OUTPUT_1) && !this.canSmeltOn(SLOT_INPUT_2, SLOT_OUTPUT_2)){ - this.worldObj.setBlockState(this.pos, block.getStateFromMeta(meta-4), 2); - } - } - else{ - this.worldObj.setBlockState(this.pos, block.getStateFromMeta(meta+4), 2); - } - } - if((this.lastEnergy != this.storage.getEnergyStored() || this.lastFirstSmelt != this.firstSmeltTime || this.lastSecondSmelt != this.secondSmeltTime || this.isAutoSplit != this.lastAutoSplit) && this.sendUpdateWithInterval()){ this.lastEnergy = this.storage.getEnergyStored(); this.lastFirstSmelt = this.firstSmeltTime; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityGrinder.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityGrinder.java index 62ceb0c3c..d05bef023 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityGrinder.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityGrinder.java @@ -117,7 +117,7 @@ public class TileEntityGrinder extends TileEntityInventoryBase implements ICusto if(canCrushOnFirst){ if(this.storage.getEnergyStored() >= ENERGY_USE){ - if(this.firstCrushTime%30 == 0){ + if(this.firstCrushTime%20 == 0){ shouldPlaySound = true; } this.firstCrushTime++; @@ -135,7 +135,7 @@ public class TileEntityGrinder extends TileEntityInventoryBase implements ICusto if(this.isDouble){ if(canCrushOnSecond){ if(this.storage.getEnergyStored() >= ENERGY_USE){ - if(this.secondCrushTime%30 == 0){ + if(this.secondCrushTime%20 == 0){ shouldPlaySound = true; } this.secondCrushTime++; @@ -151,21 +151,6 @@ public class TileEntityGrinder extends TileEntityInventoryBase implements ICusto } } - if(flag != (this.firstCrushTime > 0 || this.secondCrushTime > 0)){ - this.markDirty(); - IBlockState state = this.worldObj.getBlockState(this.pos); - Block block = state.getBlock(); - int meta = block.getMetaFromState(state); - if(meta == 1){ - if(!this.canCrushOn(SLOT_INPUT_1, SLOT_OUTPUT_1_1, SLOT_OUTPUT_1_2) && (!this.isDouble || !this.canCrushOn(SLOT_INPUT_2, SLOT_OUTPUT_2_1, SLOT_OUTPUT_2_2))){ - this.worldObj.setBlockState(this.pos, block.getStateFromMeta(0), 2); - } - } - else{ - this.worldObj.setBlockState(this.pos, block.getStateFromMeta(1), 2); - } - } - if((this.lastEnergy != this.storage.getEnergyStored() || this.lastFirstCrush != this.firstCrushTime || this.lastSecondCrush != this.secondCrushTime || this.isAutoSplit != this.lastAutoSplit) && this.sendUpdateWithInterval()){ this.lastEnergy = this.storage.getEnergyStored(); this.lastFirstCrush = this.firstCrushTime; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntitySmileyCloud.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntitySmileyCloud.java index 88065560c..cf4fdd7bc 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntitySmileyCloud.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntitySmileyCloud.java @@ -57,20 +57,4 @@ public class TileEntitySmileyCloud extends TileEntityBase implements IStringReac public void onTextReceived(String text, int textID, EntityPlayer player){ this.name = text; } - - public void setStatus(boolean pinkAndFluffy){ - IBlockState state = this.worldObj.getBlockState(this.pos); - Block block = state.getBlock(); - int meta = block.getMetaFromState(state); - if(pinkAndFluffy){ - if(meta <= 3){ - this.worldObj.setBlockState(this.pos, block.getStateFromMeta(meta+4), 2); - } - } - else{ - if(meta >= 4){ - this.worldObj.setBlockState(this.pos, block.getStateFromMeta(meta-4), 2); - } - } - } } diff --git a/src/main/resources/assets/actuallyadditions/blockstates/block_atomic_reconstructor.json b/src/main/resources/assets/actuallyadditions/blockstates/block_atomic_reconstructor.json index 8afc48e4c..2d258bf5e 100644 --- a/src/main/resources/assets/actuallyadditions/blockstates/block_atomic_reconstructor.json +++ b/src/main/resources/assets/actuallyadditions/blockstates/block_atomic_reconstructor.json @@ -14,13 +14,13 @@ "variants": { "normal": [{}], "inventory": [{}], - "meta": { - "0": { "x" : 90 }, - "1": { "x" : 270 }, - "2": { "y" : 0 }, - "3": { "y" : 180 }, - "4": { "y" : 270 }, - "5": { "y" : 90 } + "facing": { + "down": { "x" : 90 }, + "up": { "x" : 270 }, + "north": { "y" : 0 }, + "south": { "y" : 180 }, + "west": { "y" : 270 }, + "east": { "y" : 90 } } } } \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/blockstates/block_breaker.json b/src/main/resources/assets/actuallyadditions/blockstates/block_breaker.json index 93db6ad97..c95feab3a 100644 --- a/src/main/resources/assets/actuallyadditions/blockstates/block_breaker.json +++ b/src/main/resources/assets/actuallyadditions/blockstates/block_breaker.json @@ -16,13 +16,13 @@ "variants": { "normal": [{}], "inventory": [{}], - "meta": { - "0": { "x" : 90 }, - "1": { "x" : 270 }, - "2": { "y" : 0 }, - "3": { "y" : 180 }, - "4": { "y" : 270 }, - "5": { "y" : 90 } + "facing": { + "down": { "x" : 90 }, + "up": { "x" : 270 }, + "north": { "y" : 0 }, + "south": { "y" : 180 }, + "west": { "y" : 270 }, + "east": { "y" : 90 } } } } \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/blockstates/block_chiseled_quartz_slab.json b/src/main/resources/assets/actuallyadditions/blockstates/block_chiseled_quartz_slab.json index 5c510cde4..2ca043ad1 100644 --- a/src/main/resources/assets/actuallyadditions/blockstates/block_chiseled_quartz_slab.json +++ b/src/main/resources/assets/actuallyadditions/blockstates/block_chiseled_quartz_slab.json @@ -12,9 +12,9 @@ "variants": { "normal": [{}], "inventory": [{}], - "meta": { - "0": {}, - "1": { "model": "minecraft:upper_slab" } + "half": { + "bottom": {}, + "top": { "model": "minecraft:upper_slab" } } } } \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/blockstates/block_coal_generator.json b/src/main/resources/assets/actuallyadditions/blockstates/block_coal_generator.json index 1958978c9..deddf9638 100644 --- a/src/main/resources/assets/actuallyadditions/blockstates/block_coal_generator.json +++ b/src/main/resources/assets/actuallyadditions/blockstates/block_coal_generator.json @@ -10,11 +10,11 @@ "variants": { "normal": [{}], "inventory": [{}], - "meta": { - "0": { "y" : 0 }, - "1": { "y" : 180 }, - "2": { "y" : 270 }, - "3": { "y" : 90 } + "facing": { + "north": { "y" : 0 }, + "south": { "y" : 180 }, + "west": { "y" : 270 }, + "east": { "y" : 90 } } } } \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/blockstates/block_coffee_machine.json b/src/main/resources/assets/actuallyadditions/blockstates/block_coffee_machine.json index fc51aa779..2064e3b8f 100644 --- a/src/main/resources/assets/actuallyadditions/blockstates/block_coffee_machine.json +++ b/src/main/resources/assets/actuallyadditions/blockstates/block_coffee_machine.json @@ -7,11 +7,11 @@ "variants": { "normal": [{}], "inventory": [{}], - "meta": { - "0": { "y" : 180 }, - "1": { "y" : 0 }, - "2": { "y" : 90 }, - "3": { "y" : 270 } + "facing": { + "south": { "y" : 180 }, + "west": { "y" : 0 }, + "north": { "y" : 90 }, + "east": { "y" : 270 } } } } \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/blockstates/block_colored_lamp.json b/src/main/resources/assets/actuallyadditions/blockstates/block_colored_lamp.json index 7850eff22..43aee0ce5 100644 --- a/src/main/resources/assets/actuallyadditions/blockstates/block_colored_lamp.json +++ b/src/main/resources/assets/actuallyadditions/blockstates/block_colored_lamp.json @@ -7,23 +7,23 @@ "variants": { "normal": [{}], "inventory": [{}], - "meta": { - "0": { "textures" : { "all" : "actuallyadditions:blocks/block_colored_lamp_white" } }, - "1": { "textures" : { "all" : "actuallyadditions:blocks/block_colored_lamp_orange" } }, - "2": { "textures" : { "all" : "actuallyadditions:blocks/block_colored_lamp_magenta" } }, - "3": { "textures" : { "all" : "actuallyadditions:blocks/block_colored_lamp_light_blue" } }, - "4": { "textures" : { "all" : "actuallyadditions:blocks/block_colored_lamp_yellow" } }, - "5": { "textures" : { "all" : "actuallyadditions:blocks/block_colored_lamp_lime" } }, - "6": { "textures" : { "all" : "actuallyadditions:blocks/block_colored_lamp_pink" } }, - "7": { "textures" : { "all" : "actuallyadditions:blocks/block_colored_lamp_gray" } }, - "8": { "textures" : { "all" : "actuallyadditions:blocks/block_colored_lamp_light_gray" } }, - "9": { "textures" : { "all" : "actuallyadditions:blocks/block_colored_lamp_cyan" } }, - "10": { "textures" : { "all" : "actuallyadditions:blocks/block_colored_lamp_purple" } }, - "11": { "textures" : { "all" : "actuallyadditions:blocks/block_colored_lamp_blue" } }, - "12": { "textures" : { "all" : "actuallyadditions:blocks/block_colored_lamp_brown" } }, - "13": { "textures" : { "all" : "actuallyadditions:blocks/block_colored_lamp_green" } }, - "14": { "textures" : { "all" : "actuallyadditions:blocks/block_colored_lamp_red" } }, - "15": { "textures" : { "all" : "actuallyadditions:blocks/block_colored_lamp_black" } } + "type": { + "white": { "textures" : { "all" : "actuallyadditions:blocks/block_colored_lamp_white" } }, + "orange": { "textures" : { "all" : "actuallyadditions:blocks/block_colored_lamp_orange" } }, + "magenta": { "textures" : { "all" : "actuallyadditions:blocks/block_colored_lamp_magenta" } }, + "light_blue": { "textures" : { "all" : "actuallyadditions:blocks/block_colored_lamp_light_blue" } }, + "yellow": { "textures" : { "all" : "actuallyadditions:blocks/block_colored_lamp_yellow" } }, + "lime": { "textures" : { "all" : "actuallyadditions:blocks/block_colored_lamp_lime" } }, + "pink": { "textures" : { "all" : "actuallyadditions:blocks/block_colored_lamp_pink" } }, + "gray": { "textures" : { "all" : "actuallyadditions:blocks/block_colored_lamp_gray" } }, + "light_gray": { "textures" : { "all" : "actuallyadditions:blocks/block_colored_lamp_light_gray" } }, + "cyan": { "textures" : { "all" : "actuallyadditions:blocks/block_colored_lamp_cyan" } }, + "purple": { "textures" : { "all" : "actuallyadditions:blocks/block_colored_lamp_purple" } }, + "blue": { "textures" : { "all" : "actuallyadditions:blocks/block_colored_lamp_blue" } }, + "brown": { "textures" : { "all" : "actuallyadditions:blocks/block_colored_lamp_brown" } }, + "green": { "textures" : { "all" : "actuallyadditions:blocks/block_colored_lamp_green" } }, + "red": { "textures" : { "all" : "actuallyadditions:blocks/block_colored_lamp_red" } }, + "black": { "textures" : { "all" : "actuallyadditions:blocks/block_colored_lamp_black" } } } } } \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/blockstates/block_colored_lamp_on.json b/src/main/resources/assets/actuallyadditions/blockstates/block_colored_lamp_on.json index 008bd2d64..1a944fd2f 100644 --- a/src/main/resources/assets/actuallyadditions/blockstates/block_colored_lamp_on.json +++ b/src/main/resources/assets/actuallyadditions/blockstates/block_colored_lamp_on.json @@ -7,23 +7,23 @@ "variants": { "normal": [{}], "inventory": [{}], - "meta": { - "0": { "textures" : { "all" : "actuallyadditions:blocks/block_colored_lamp_on_white" } }, - "1": { "textures" : { "all" : "actuallyadditions:blocks/block_colored_lamp_on_orange" } }, - "2": { "textures" : { "all" : "actuallyadditions:blocks/block_colored_lamp_on_magenta" } }, - "3": { "textures" : { "all" : "actuallyadditions:blocks/block_colored_lamp_on_light_blue" } }, - "4": { "textures" : { "all" : "actuallyadditions:blocks/block_colored_lamp_on_yellow" } }, - "5": { "textures" : { "all" : "actuallyadditions:blocks/block_colored_lamp_on_lime" } }, - "6": { "textures" : { "all" : "actuallyadditions:blocks/block_colored_lamp_on_pink" } }, - "7": { "textures" : { "all" : "actuallyadditions:blocks/block_colored_lamp_on_gray" } }, - "8": { "textures" : { "all" : "actuallyadditions:blocks/block_colored_lamp_on_light_gray" } }, - "9": { "textures" : { "all" : "actuallyadditions:blocks/block_colored_lamp_on_cyan" } }, - "10": { "textures" : { "all" : "actuallyadditions:blocks/block_colored_lamp_on_purple" } }, - "11": { "textures" : { "all" : "actuallyadditions:blocks/block_colored_lamp_on_blue" } }, - "12": { "textures" : { "all" : "actuallyadditions:blocks/block_colored_lamp_on_brown" } }, - "13": { "textures" : { "all" : "actuallyadditions:blocks/block_colored_lamp_on_green" } }, - "14": { "textures" : { "all" : "actuallyadditions:blocks/block_colored_lamp_on_red" } }, - "15": { "textures" : { "all" : "actuallyadditions:blocks/block_colored_lamp_on_black" } } + "type": { + "white": { "textures" : { "all" : "actuallyadditions:blocks/block_colored_lamp_on_white" } }, + "orange": { "textures" : { "all" : "actuallyadditions:blocks/block_colored_lamp_on_orange" } }, + "magenta": { "textures" : { "all" : "actuallyadditions:blocks/block_colored_lamp_on_magenta" } }, + "light_blue": { "textures" : { "all" : "actuallyadditions:blocks/block_colored_lamp_on_light_blue" } }, + "yellow": { "textures" : { "all" : "actuallyadditions:blocks/block_colored_lamp_on_yellow" } }, + "lime": { "textures" : { "all" : "actuallyadditions:blocks/block_colored_lamp_on_lime" } }, + "pink": { "textures" : { "all" : "actuallyadditions:blocks/block_colored_lamp_on_pink" } }, + "gray": { "textures" : { "all" : "actuallyadditions:blocks/block_colored_lamp_on_gray" } }, + "light_gray": { "textures" : { "all" : "actuallyadditions:blocks/block_colored_lamp_on_light_gray" } }, + "cyan": { "textures" : { "all" : "actuallyadditions:blocks/block_colored_lamp_on_cyan" } }, + "purple": { "textures" : { "all" : "actuallyadditions:blocks/block_colored_lamp_on_purple" } }, + "blue": { "textures" : { "all" : "actuallyadditions:blocks/block_colored_lamp_on_blue" } }, + "brown": { "textures" : { "all" : "actuallyadditions:blocks/block_colored_lamp_on_brown" } }, + "green": { "textures" : { "all" : "actuallyadditions:blocks/block_colored_lamp_on_green" } }, + "red": { "textures" : { "all" : "actuallyadditions:blocks/block_colored_lamp_on_red" } }, + "black": { "textures" : { "all" : "actuallyadditions:blocks/block_colored_lamp_on_black" } } } } } \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/blockstates/block_crystal.json b/src/main/resources/assets/actuallyadditions/blockstates/block_crystal.json index c5d1c7374..441978846 100644 --- a/src/main/resources/assets/actuallyadditions/blockstates/block_crystal.json +++ b/src/main/resources/assets/actuallyadditions/blockstates/block_crystal.json @@ -7,13 +7,13 @@ "variants": { "normal": [{}], "inventory": [{}], - "meta": { - "0": { "textures" : { "all" : "actuallyadditions:blocks/block_crystal_red" } }, - "1": { "textures" : { "all" : "actuallyadditions:blocks/block_crystal_blue" } }, - "2": { "textures" : { "all" : "actuallyadditions:blocks/block_crystal_light_blue" } }, - "3": { "textures" : { "all" : "actuallyadditions:blocks/block_crystal_black" } }, - "4": { "textures" : { "all" : "actuallyadditions:blocks/block_crystal_green" } }, - "5": { "textures" : { "all" : "actuallyadditions:blocks/block_crystal_white" } } + "type": { + "red": { "textures" : { "all" : "actuallyadditions:blocks/block_crystal_red" } }, + "blue": { "textures" : { "all" : "actuallyadditions:blocks/block_crystal_blue" } }, + "light_blue": { "textures" : { "all" : "actuallyadditions:blocks/block_crystal_light_blue" } }, + "black": { "textures" : { "all" : "actuallyadditions:blocks/block_crystal_black" } }, + "green": { "textures" : { "all" : "actuallyadditions:blocks/block_crystal_green" } }, + "white": { "textures" : { "all" : "actuallyadditions:blocks/block_crystal_white" } } } } } \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/blockstates/block_crystal_empowered.json b/src/main/resources/assets/actuallyadditions/blockstates/block_crystal_empowered.json index 971a4c3d7..c95dcf524 100644 --- a/src/main/resources/assets/actuallyadditions/blockstates/block_crystal_empowered.json +++ b/src/main/resources/assets/actuallyadditions/blockstates/block_crystal_empowered.json @@ -7,13 +7,13 @@ "variants": { "normal": [{}], "inventory": [{}], - "meta": { - "0": { "textures" : { "all" : "actuallyadditions:blocks/block_crystal_empowered_red" } }, - "1": { "textures" : { "all" : "actuallyadditions:blocks/block_crystal_empowered_blue" } }, - "2": { "textures" : { "all" : "actuallyadditions:blocks/block_crystal_empowered_light_blue" } }, - "3": { "textures" : { "all" : "actuallyadditions:blocks/block_crystal_empowered_black" } }, - "4": { "textures" : { "all" : "actuallyadditions:blocks/block_crystal_empowered_green" } }, - "5": { "textures" : { "all" : "actuallyadditions:blocks/block_crystal_empowered_white" } } + "type": { + "red": { "textures" : { "all" : "actuallyadditions:blocks/block_crystal_empowered_red" } }, + "blue": { "textures" : { "all" : "actuallyadditions:blocks/block_crystal_empowered_blue" } }, + "light_blue": { "textures" : { "all" : "actuallyadditions:blocks/block_crystal_empowered_light_blue" } }, + "black": { "textures" : { "all" : "actuallyadditions:blocks/block_crystal_empowered_black" } }, + "green": { "textures" : { "all" : "actuallyadditions:blocks/block_crystal_empowered_green" } }, + "white": { "textures" : { "all" : "actuallyadditions:blocks/block_crystal_empowered_white" } } } } } \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/blockstates/block_directional_breaker.json b/src/main/resources/assets/actuallyadditions/blockstates/block_directional_breaker.json index 726d1517d..6f087ee22 100644 --- a/src/main/resources/assets/actuallyadditions/blockstates/block_directional_breaker.json +++ b/src/main/resources/assets/actuallyadditions/blockstates/block_directional_breaker.json @@ -16,13 +16,13 @@ "variants": { "normal": [{}], "inventory": [{}], - "meta": { - "0": { "x" : 90 }, - "1": { "x" : 270 }, - "2": { "y" : 0 }, - "3": { "y" : 180 }, - "4": { "y" : 270 }, - "5": { "y" : 90 } + "facing": { + "down": { "x" : 90 }, + "up": { "x" : 270 }, + "north": { "y" : 0 }, + "south": { "y" : 180 }, + "west": { "y" : 270 }, + "east": { "y" : 90 } } } } \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/blockstates/block_dropper.json b/src/main/resources/assets/actuallyadditions/blockstates/block_dropper.json index 2311243b3..18f8e9601 100644 --- a/src/main/resources/assets/actuallyadditions/blockstates/block_dropper.json +++ b/src/main/resources/assets/actuallyadditions/blockstates/block_dropper.json @@ -16,13 +16,13 @@ "variants": { "normal": [{}], "inventory": [{}], - "meta": { - "0": { "x" : 90 }, - "1": { "x" : 270 }, - "2": { "y" : 0 }, - "3": { "y" : 180 }, - "4": { "y" : 270 }, - "5": { "y" : 90 } + "facing": { + "down": { "x" : 90 }, + "up": { "x" : 270 }, + "north": { "y" : 0 }, + "south": { "y" : 180 }, + "west": { "y" : 270 }, + "east": { "y" : 90 } } } } \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/blockstates/block_farmer.json b/src/main/resources/assets/actuallyadditions/blockstates/block_farmer.json index c96da49ae..4d6948a30 100644 --- a/src/main/resources/assets/actuallyadditions/blockstates/block_farmer.json +++ b/src/main/resources/assets/actuallyadditions/blockstates/block_farmer.json @@ -16,11 +16,11 @@ "variants": { "normal": [{}], "inventory": [{}], - "meta": { - "0": { "y" : 0 }, - "1": { "y" : 180 }, - "2": { "y" : 270 }, - "3": { "y" : 90 } + "facing": { + "north": { "y" : 0 }, + "south": { "y" : 180 }, + "west": { "y" : 270 }, + "east": { "y" : 90 } } } } \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/blockstates/block_fluid_collector.json b/src/main/resources/assets/actuallyadditions/blockstates/block_fluid_collector.json index ab8389322..84abdb38b 100644 --- a/src/main/resources/assets/actuallyadditions/blockstates/block_fluid_collector.json +++ b/src/main/resources/assets/actuallyadditions/blockstates/block_fluid_collector.json @@ -16,13 +16,13 @@ "variants": { "normal": [{}], "inventory": [{}], - "meta": { - "0": { "x" : 90 }, - "1": { "x" : 270 }, - "2": { "y" : 0 }, - "3": { "y" : 180 }, - "4": { "y" : 270 }, - "5": { "y" : 90 } + "facing": { + "down": { "x" : 90 }, + "up": { "x" : 270 }, + "north": { "y" : 0 }, + "south": { "y" : 180 }, + "west": { "y" : 270 }, + "east": { "y" : 90 } } } } \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/blockstates/block_fluid_placer.json b/src/main/resources/assets/actuallyadditions/blockstates/block_fluid_placer.json index fc285c914..6fabcabc2 100644 --- a/src/main/resources/assets/actuallyadditions/blockstates/block_fluid_placer.json +++ b/src/main/resources/assets/actuallyadditions/blockstates/block_fluid_placer.json @@ -16,13 +16,13 @@ "variants": { "normal": [{}], "inventory": [{}], - "meta": { - "0": { "x" : 90 }, - "1": { "x" : 270 }, - "2": { "y" : 0 }, - "3": { "y" : 180 }, - "4": { "y" : 270 }, - "5": { "y" : 90 } + "facing": { + "down": { "x" : 90 }, + "up": { "x" : 270 }, + "north": { "y" : 0 }, + "south": { "y" : 180 }, + "west": { "y" : 270 }, + "east": { "y" : 90 } } } } \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/blockstates/block_furnace_double.json b/src/main/resources/assets/actuallyadditions/blockstates/block_furnace_double.json index 0ca11db2e..5e002479b 100644 --- a/src/main/resources/assets/actuallyadditions/blockstates/block_furnace_double.json +++ b/src/main/resources/assets/actuallyadditions/blockstates/block_furnace_double.json @@ -16,15 +16,11 @@ "variants": { "normal": [{}], "inventory": [{}], - "meta": { - "0": { "y" : 0 }, - "1": { "y" : 180 }, - "2": { "y" : 270 }, - "3": { "y" : 90 }, - "4": { "y" : 0, "textures": { "north": "actuallyadditions:blocks/block_furnace_double_on" } }, - "5": { "y" : 180, "textures": { "north": "actuallyadditions:blocks/block_furnace_double_on" } }, - "6": { "y" : 270, "textures": { "north": "actuallyadditions:blocks/block_furnace_double_on" } }, - "7": { "y" : 90, "textures": { "north": "actuallyadditions:blocks/block_furnace_double_on" } } + "facing": { + "north": { "y" : 0 }, + "south": { "y" : 180 }, + "west": { "y" : 270 }, + "east": { "y" : 90 } } } } \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/blockstates/block_grinder.json b/src/main/resources/assets/actuallyadditions/blockstates/block_grinder.json index b9e050d32..a6fedf33b 100644 --- a/src/main/resources/assets/actuallyadditions/blockstates/block_grinder.json +++ b/src/main/resources/assets/actuallyadditions/blockstates/block_grinder.json @@ -11,10 +11,6 @@ }, "variants": { "normal": [{}], - "inventory": [{}], - "meta": { - "0": {}, - "1": { "textures": { "top": "actuallyadditions:blocks/block_grinder_on" } } - } + "inventory": [{}] } } \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/blockstates/block_lamp_powerer.json b/src/main/resources/assets/actuallyadditions/blockstates/block_lamp_powerer.json index 0213f7142..3333ffa90 100644 --- a/src/main/resources/assets/actuallyadditions/blockstates/block_lamp_powerer.json +++ b/src/main/resources/assets/actuallyadditions/blockstates/block_lamp_powerer.json @@ -16,13 +16,13 @@ "variants": { "normal": [{}], "inventory": [{}], - "meta": { - "0": { "x" : 90 }, - "1": { "x" : 270 }, - "2": { "y" : 0 }, - "3": { "y" : 180 }, - "4": { "y" : 270 }, - "5": { "y" : 90 } + "facing": { + "down": { "x" : 90 }, + "up": { "x" : 270 }, + "north": { "y" : 0 }, + "south": { "y" : 180 }, + "west": { "y" : 270 }, + "east": { "y" : 90 } } } } \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/blockstates/block_laser_relay.json b/src/main/resources/assets/actuallyadditions/blockstates/block_laser_relay.json index ef8009e5d..b3970c4c9 100644 --- a/src/main/resources/assets/actuallyadditions/blockstates/block_laser_relay.json +++ b/src/main/resources/assets/actuallyadditions/blockstates/block_laser_relay.json @@ -10,13 +10,13 @@ "variants": { "normal": [{}], "inventory": [{}], - "meta": { - "0": { "x": 180 }, - "1": {}, - "2": { "x": 90 }, - "3": { "x": 270 }, - "4": { "x": 90, "y": 270 }, - "5": { "x": 270, "y": 270 } + "facing": { + "down": { "x": 180 }, + "up": {}, + "north": { "x": 90 }, + "south": { "x": 270 }, + "west": { "x": 90, "y": 270 }, + "east": { "x": 270, "y": 270 } } } } \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/blockstates/block_laser_relay_advanced.json b/src/main/resources/assets/actuallyadditions/blockstates/block_laser_relay_advanced.json index e8266f33a..1f0764a4c 100644 --- a/src/main/resources/assets/actuallyadditions/blockstates/block_laser_relay_advanced.json +++ b/src/main/resources/assets/actuallyadditions/blockstates/block_laser_relay_advanced.json @@ -10,13 +10,13 @@ "variants": { "normal": [{}], "inventory": [{}], - "meta": { - "0": { "x": 180 }, - "1": {}, - "2": { "x": 90 }, - "3": { "x": 270 }, - "4": { "x": 90, "y": 270 }, - "5": { "x": 270, "y": 270 } + "facing": { + "down": { "x": 180 }, + "up": {}, + "north": { "x": 90 }, + "south": { "x": 270 }, + "west": { "x": 90, "y": 270 }, + "east": { "x": 270, "y": 270 } } } } \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/blockstates/block_laser_relay_extreme.json b/src/main/resources/assets/actuallyadditions/blockstates/block_laser_relay_extreme.json index 7e3ac3bc2..fcba53fc2 100644 --- a/src/main/resources/assets/actuallyadditions/blockstates/block_laser_relay_extreme.json +++ b/src/main/resources/assets/actuallyadditions/blockstates/block_laser_relay_extreme.json @@ -10,13 +10,13 @@ "variants": { "normal": [{}], "inventory": [{}], - "meta": { - "0": { "x": 180 }, - "1": {}, - "2": { "x": 90 }, - "3": { "x": 270 }, - "4": { "x": 90, "y": 270 }, - "5": { "x": 270, "y": 270 } + "facing": { + "down": { "x": 180 }, + "up": {}, + "north": { "x": 90 }, + "south": { "x": 270 }, + "west": { "x": 90, "y": 270 }, + "east": { "x": 270, "y": 270 } } } } \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/blockstates/block_laser_relay_fluids.json b/src/main/resources/assets/actuallyadditions/blockstates/block_laser_relay_fluids.json index 5f25330df..33b3f21c8 100644 --- a/src/main/resources/assets/actuallyadditions/blockstates/block_laser_relay_fluids.json +++ b/src/main/resources/assets/actuallyadditions/blockstates/block_laser_relay_fluids.json @@ -10,13 +10,13 @@ "variants": { "normal": [{}], "inventory": [{}], - "meta": { - "0": { "x": 180 }, - "1": {}, - "2": { "x": 90 }, - "3": { "x": 270 }, - "4": { "x": 90, "y": 270 }, - "5": { "x": 270, "y": 270 } + "facing": { + "down": { "x": 180 }, + "up": {}, + "north": { "x": 90 }, + "south": { "x": 270 }, + "west": { "x": 90, "y": 270 }, + "east": { "x": 270, "y": 270 } } } } \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/blockstates/block_laser_relay_item.json b/src/main/resources/assets/actuallyadditions/blockstates/block_laser_relay_item.json index 9d93b1441..fb1098db5 100644 --- a/src/main/resources/assets/actuallyadditions/blockstates/block_laser_relay_item.json +++ b/src/main/resources/assets/actuallyadditions/blockstates/block_laser_relay_item.json @@ -10,13 +10,13 @@ "variants": { "normal": [{}], "inventory": [{}], - "meta": { - "0": { "x": 180 }, - "1": {}, - "2": { "x": 90 }, - "3": { "x": 270 }, - "4": { "x": 90, "y": 270 }, - "5": { "x": 270, "y": 270 } + "facing": { + "down": { "x": 180 }, + "up": {}, + "north": { "x": 90 }, + "south": { "x": 270 }, + "west": { "x": 90, "y": 270 }, + "east": { "x": 270, "y": 270 } } } } \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/blockstates/block_laser_relay_item_whitelist.json b/src/main/resources/assets/actuallyadditions/blockstates/block_laser_relay_item_whitelist.json index fcce1e7a0..b5951738e 100644 --- a/src/main/resources/assets/actuallyadditions/blockstates/block_laser_relay_item_whitelist.json +++ b/src/main/resources/assets/actuallyadditions/blockstates/block_laser_relay_item_whitelist.json @@ -10,13 +10,13 @@ "variants": { "normal": [{}], "inventory": [{}], - "meta": { - "0": { "x": 180 }, - "1": {}, - "2": { "x": 90 }, - "3": { "x": 270 }, - "4": { "x": 90, "y": 270 }, - "5": { "x": 270, "y": 270 } + "facing": { + "down": { "x": 180 }, + "up": {}, + "north": { "x": 90 }, + "south": { "x": 270 }, + "west": { "x": 90, "y": 270 }, + "east": { "x": 270, "y": 270 } } } } \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/blockstates/block_misc.json b/src/main/resources/assets/actuallyadditions/blockstates/block_misc.json index 859459a73..0f512d050 100644 --- a/src/main/resources/assets/actuallyadditions/blockstates/block_misc.json +++ b/src/main/resources/assets/actuallyadditions/blockstates/block_misc.json @@ -7,17 +7,17 @@ "variants": { "normal": [{}], "inventory": [{}], - "meta": { - "0": { "textures" : { "all" : "actuallyadditions:blocks/block_misc_black_quartz_pillar" } }, - "1": { "textures" : { "all" : "actuallyadditions:blocks/block_misc_black_quartz_chiseled" } }, - "2": { "textures" : { "all" : "actuallyadditions:blocks/block_misc_black_quartz" } }, - "3": { "textures" : { "all" : "actuallyadditions:blocks/block_misc_ore_black_quartz" } }, - "4": { "textures" : { "all" : "actuallyadditions:blocks/block_misc_wood_casing" } }, - "5": { "textures" : { "all" : "actuallyadditions:blocks/block_misc_charcoal" } }, - "6": { "textures" : { "all" : "actuallyadditions:blocks/block_misc_enderpearl" } }, - "7": { "textures" : { "all" : "actuallyadditions:blocks/block_misc_lava_factory_case" } }, - "8": { "textures" : { "all" : "actuallyadditions:blocks/block_misc_ender_casing" } }, - "9": { "textures" : { "all" : "actuallyadditions:blocks/block_misc_iron_casing" } } + "type": { + "black_quartz_pillar": { "textures" : { "all" : "actuallyadditions:blocks/block_misc_black_quartz_pillar" } }, + "black_quartz_chiseled": { "textures" : { "all" : "actuallyadditions:blocks/block_misc_black_quartz_chiseled" } }, + "black_quartz": { "textures" : { "all" : "actuallyadditions:blocks/block_misc_black_quartz" } }, + "ore_black_quartz": { "textures" : { "all" : "actuallyadditions:blocks/block_misc_ore_black_quartz" } }, + "wood_casing": { "textures" : { "all" : "actuallyadditions:blocks/block_misc_wood_casing" } }, + "charcoal": { "textures" : { "all" : "actuallyadditions:blocks/block_misc_charcoal" } }, + "enderpearl": { "textures" : { "all" : "actuallyadditions:blocks/block_misc_enderpearl" } }, + "lava_factory_case": { "textures" : { "all" : "actuallyadditions:blocks/block_misc_lava_factory_case" } }, + "ender_casing": { "textures" : { "all" : "actuallyadditions:blocks/block_misc_ender_casing" } }, + "iron_casing": { "textures" : { "all" : "actuallyadditions:blocks/block_misc_iron_casing" } } } } } \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/blockstates/block_oil_generator.json b/src/main/resources/assets/actuallyadditions/blockstates/block_oil_generator.json index dc9315e5d..20a8873f4 100644 --- a/src/main/resources/assets/actuallyadditions/blockstates/block_oil_generator.json +++ b/src/main/resources/assets/actuallyadditions/blockstates/block_oil_generator.json @@ -10,11 +10,11 @@ "variants": { "normal": [{}], "inventory": [{}], - "meta": { - "0": { "y" : 0 }, - "1": { "y" : 180 }, - "2": { "y" : 270 }, - "3": { "y" : 90 } + "facing": { + "north": { "y" : 0 }, + "south": { "y" : 180 }, + "west": { "y" : 270 }, + "east": { "y" : 90 } } } } \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/blockstates/block_pillar_quartz_slab.json b/src/main/resources/assets/actuallyadditions/blockstates/block_pillar_quartz_slab.json index f0a87567d..786e3bf35 100644 --- a/src/main/resources/assets/actuallyadditions/blockstates/block_pillar_quartz_slab.json +++ b/src/main/resources/assets/actuallyadditions/blockstates/block_pillar_quartz_slab.json @@ -12,9 +12,9 @@ "variants": { "normal": [{}], "inventory": [{}], - "meta": { - "0": {}, - "1": { "model": "minecraft:upper_slab" } + "half": { + "bottom": {}, + "top": { "model": "minecraft:upper_slab" } } } } \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/blockstates/block_placer.json b/src/main/resources/assets/actuallyadditions/blockstates/block_placer.json index d6c622168..28003bae3 100644 --- a/src/main/resources/assets/actuallyadditions/blockstates/block_placer.json +++ b/src/main/resources/assets/actuallyadditions/blockstates/block_placer.json @@ -16,13 +16,13 @@ "variants": { "normal": [{}], "inventory": [{}], - "meta": { - "0": { "x" : 90 }, - "1": { "x" : 270 }, - "2": { "y" : 0 }, - "3": { "y" : 180 }, - "4": { "y" : 270 }, - "5": { "y" : 90 } + "facing": { + "down": { "x" : 90 }, + "up": { "x" : 270 }, + "north": { "y" : 0 }, + "south": { "y" : 180 }, + "west": { "y" : 270 }, + "east": { "y" : 90 } } } } \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/blockstates/block_quartz_slab.json b/src/main/resources/assets/actuallyadditions/blockstates/block_quartz_slab.json index c518666d7..d8eb900cf 100644 --- a/src/main/resources/assets/actuallyadditions/blockstates/block_quartz_slab.json +++ b/src/main/resources/assets/actuallyadditions/blockstates/block_quartz_slab.json @@ -12,9 +12,9 @@ "variants": { "normal": [{}], "inventory": [{}], - "meta": { - "0": {}, - "1": { "model": "minecraft:upper_slab" } + "half": { + "bottom": {}, + "top": { "model": "minecraft:upper_slab" } } } } \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/blockstates/block_smiley_cloud.json b/src/main/resources/assets/actuallyadditions/blockstates/block_smiley_cloud.json index e7317d908..f81f9abd7 100644 --- a/src/main/resources/assets/actuallyadditions/blockstates/block_smiley_cloud.json +++ b/src/main/resources/assets/actuallyadditions/blockstates/block_smiley_cloud.json @@ -7,15 +7,11 @@ "variants": { "normal": [{}], "inventory": [{}], - "meta": { - "0": { "y" : 0}, - "1": { "y" : 180 }, - "2": { "y" : 270 }, - "3": { "y" : 90 }, - "4": { "y" : 0, "model": "actuallyadditions:block_smiley_cloud_fluffy" }, - "5": { "y" : 180, "model": "actuallyadditions:block_smiley_cloud_fluffy" }, - "6": { "y" : 270, "model": "actuallyadditions:block_smiley_cloud_fluffy" }, - "7": { "y" : 90, "model": "actuallyadditions:block_smiley_cloud_fluffy" } + "facing": { + "north": { "y" : 0 }, + "south": { "y" : 180 }, + "west": { "y" : 270 }, + "east": { "y" : 90 } } } } \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/blockstates/block_testifi_bucks_green_slab.json b/src/main/resources/assets/actuallyadditions/blockstates/block_testifi_bucks_green_slab.json index 90bdf2bc6..d144cee59 100644 --- a/src/main/resources/assets/actuallyadditions/blockstates/block_testifi_bucks_green_slab.json +++ b/src/main/resources/assets/actuallyadditions/blockstates/block_testifi_bucks_green_slab.json @@ -12,9 +12,9 @@ "variants": { "normal": [{}], "inventory": [{}], - "meta": { - "0": {}, - "1": { "model": "minecraft:upper_slab" } + "half": { + "bottom": {}, + "top": { "model": "minecraft:upper_slab" } } } } \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/blockstates/block_testifi_bucks_white_slab.json b/src/main/resources/assets/actuallyadditions/blockstates/block_testifi_bucks_white_slab.json index d238d6af1..20f8d54d7 100644 --- a/src/main/resources/assets/actuallyadditions/blockstates/block_testifi_bucks_white_slab.json +++ b/src/main/resources/assets/actuallyadditions/blockstates/block_testifi_bucks_white_slab.json @@ -12,9 +12,9 @@ "variants": { "normal": [{}], "inventory": [{}], - "meta": { - "0": {}, - "1": { "model": "minecraft:upper_slab" } + "half": { + "bottom": {}, + "top": { "model": "minecraft:upper_slab" } } } } \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/blockstates/block_treasure_chest.json b/src/main/resources/assets/actuallyadditions/blockstates/block_treasure_chest.json index 2353d6696..fe06451f6 100644 --- a/src/main/resources/assets/actuallyadditions/blockstates/block_treasure_chest.json +++ b/src/main/resources/assets/actuallyadditions/blockstates/block_treasure_chest.json @@ -16,11 +16,11 @@ "variants": { "normal": [{}], "inventory": [{}], - "meta": { - "0": { "y" : 0 }, - "1": { "y" : 180 }, - "2": { "y" : 270 }, - "3": { "y" : 90 } + "facing": { + "north": { "y" : 0 }, + "south": { "y" : 180 }, + "west": { "y" : 270 }, + "east": { "y" : 90 } } } } \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/blockstates/block_wild.json b/src/main/resources/assets/actuallyadditions/blockstates/block_wild.json index 1a48e64b1..96dcdea6e 100644 --- a/src/main/resources/assets/actuallyadditions/blockstates/block_wild.json +++ b/src/main/resources/assets/actuallyadditions/blockstates/block_wild.json @@ -7,11 +7,11 @@ "variants": { "normal": [{}], "inventory": [{}], - "meta": { - "0": { "textures" : { "cross" : "actuallyadditions:blocks/block_canola_stage_4" } }, - "1": { "textures" : { "cross" : "actuallyadditions:blocks/block_flax_stage_6" } }, - "2": { "textures" : { "cross" : "actuallyadditions:blocks/block_rice_stage_6" } }, - "3": { "textures" : { "cross" : "actuallyadditions:blocks/block_coffee_stage_6" } } + "type": { + "canola": { "textures" : { "cross" : "actuallyadditions:blocks/block_canola_stage_4" } }, + "flax": { "textures" : { "cross" : "actuallyadditions:blocks/block_flax_stage_6" } }, + "rice": { "textures" : { "cross" : "actuallyadditions:blocks/block_rice_stage_6" } }, + "coffee": { "textures" : { "cross" : "actuallyadditions:blocks/block_coffee_stage_6" } } } } } \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/blockstates/block_xp_solidifier.json b/src/main/resources/assets/actuallyadditions/blockstates/block_xp_solidifier.json index e5665b4fc..c06f54b02 100644 --- a/src/main/resources/assets/actuallyadditions/blockstates/block_xp_solidifier.json +++ b/src/main/resources/assets/actuallyadditions/blockstates/block_xp_solidifier.json @@ -16,11 +16,11 @@ "variants": { "normal": [{}], "inventory": [{}], - "meta": { - "0": { "y" : 0 }, - "1": { "y" : 180 }, - "2": { "y" : 270 }, - "3": { "y" : 90 } + "facing": { + "north": { "y" : 0 }, + "south": { "y" : 180 }, + "west": { "y" : 270 }, + "east": { "y" : 90 } } } } \ No newline at end of file