diff --git a/src/main/java/techreborn/blocks/BlockAlarm.java b/src/main/java/techreborn/blocks/BlockAlarm.java index 50d18dbf4..beaa852bd 100644 --- a/src/main/java/techreborn/blocks/BlockAlarm.java +++ b/src/main/java/techreborn/blocks/BlockAlarm.java @@ -24,6 +24,8 @@ package techreborn.blocks; +import net.minecraft.block.Block; +import net.minecraft.block.SoundType; import net.minecraft.block.material.Material; import net.minecraft.state.BooleanProperty; import net.minecraft.state.DirectionProperty; @@ -63,7 +65,7 @@ public class BlockAlarm extends BaseTileBlock { private AxisAlignedBB[] bbs; public BlockAlarm() { - super(Material.ROCK); + super(Block.Properties.create(Material.ROCK)); this.setDefaultState(this.blockState.getBaseState().with(FACING, EnumFacing.NORTH).with(ACTIVE, false)); this.bbs = GenBoundingBoxes(0.19, 0.81); RebornModelRegistry.registerModel(new ModelCompound(TechReborn.MOD_ID, this, "machines/lighting")); diff --git a/src/main/java/techreborn/blocks/BlockMachineCasing.java b/src/main/java/techreborn/blocks/BlockMachineCasing.java index c56740458..53c89861c 100644 --- a/src/main/java/techreborn/blocks/BlockMachineCasing.java +++ b/src/main/java/techreborn/blocks/BlockMachineCasing.java @@ -25,11 +25,11 @@ package techreborn.blocks; import net.minecraft.block.Block; +import net.minecraft.block.SoundType; import net.minecraft.block.material.Material; import net.minecraft.block.state.IBlockState; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.IBlockReader; -import net.minecraft.world.World; import reborncore.common.multiblock.BlockMultiblockBase; import techreborn.tiles.TileMachineCasing; @@ -38,9 +38,8 @@ public class BlockMachineCasing extends BlockMultiblockBase { public final int heatCapacity; public BlockMachineCasing(int heatCapacity) { - super(Material.IRON); + super(Block.Properties.create(Material.IRON).hardnessAndResistance(2f).sound(SoundType.METAL)); this.heatCapacity = heatCapacity; - setHardness(2F); } public static int getHeatFromState(IBlockState state) { diff --git a/src/main/java/techreborn/blocks/BlockMachineFrame.java b/src/main/java/techreborn/blocks/BlockMachineFrame.java index 6bafa9cb9..caa15dd3c 100644 --- a/src/main/java/techreborn/blocks/BlockMachineFrame.java +++ b/src/main/java/techreborn/blocks/BlockMachineFrame.java @@ -24,13 +24,14 @@ package techreborn.blocks; +import net.minecraft.block.Block; +import net.minecraft.block.SoundType; import net.minecraft.block.material.Material; import reborncore.common.BaseBlock; public class BlockMachineFrame extends BaseBlock { public BlockMachineFrame() { - super(Material.IRON); - setHardness(1f); + super(Block.Properties.create(Material.IRON).hardnessAndResistance(1f).sound(SoundType.METAL)); } } diff --git a/src/main/java/techreborn/blocks/BlockOre.java b/src/main/java/techreborn/blocks/BlockOre.java index e5fed6202..13820bf4c 100644 --- a/src/main/java/techreborn/blocks/BlockOre.java +++ b/src/main/java/techreborn/blocks/BlockOre.java @@ -25,6 +25,7 @@ package techreborn.blocks; import net.minecraft.block.Block; +import net.minecraft.block.SoundType; import net.minecraft.block.material.Material; import net.minecraft.block.state.IBlockState; import net.minecraft.item.ItemStack; @@ -67,10 +68,7 @@ public class BlockOre extends Block { public static int sphaleriteMaxQuantity = 2; public BlockOre() { - super(Block.Builder - .create(Material.ROCK) - .hardnessAndResistance(2F) - ); + super(Block.Properties.create(Material.ROCK).hardnessAndResistance(2f)); } @Override diff --git a/src/main/java/techreborn/blocks/BlockReinforcedGlass.java b/src/main/java/techreborn/blocks/BlockReinforcedGlass.java index c7b91598c..e4b05c779 100644 --- a/src/main/java/techreborn/blocks/BlockReinforcedGlass.java +++ b/src/main/java/techreborn/blocks/BlockReinforcedGlass.java @@ -24,13 +24,11 @@ package techreborn.blocks; +import net.minecraft.block.Block; import net.minecraft.block.BlockGlass; import net.minecraft.block.SoundType; import net.minecraft.block.material.Material; import net.minecraft.block.state.IBlockState; -import net.minecraft.util.BlockRenderLayer; -import net.minecraftforge.api.distmarker.Dist; -import net.minecraftforge.api.distmarker.OnlyIn; import reborncore.client.models.ModelCompound; import reborncore.client.models.RebornModelRegistry; import techreborn.TechReborn; @@ -39,30 +37,12 @@ import java.util.Random; public class BlockReinforcedGlass extends BlockGlass { public BlockReinforcedGlass() { - super(Material.GLASS, false); - setSoundType(SoundType.STONE); - setHardness(4.0F); - setResistance(60F); + super(Block.Properties.create(Material.GLASS).hardnessAndResistance(4f, 60f).sound(SoundType.STONE)); RebornModelRegistry.registerModel(new ModelCompound(TechReborn.MOD_ID, this)); } @Override - public int quantityDropped(Random random) { + public int quantityDropped(IBlockState state, Random random) { return 1; } - - @Override - public boolean isOpaqueCube(IBlockState state) { - return false; - } - - @Override - @OnlyIn(Dist.CLIENT) - public BlockRenderLayer getRenderLayer() { - return BlockRenderLayer.CUTOUT; - } - - public boolean isFullCube() { - return false; - } } diff --git a/src/main/java/techreborn/blocks/BlockRubberPlank.java b/src/main/java/techreborn/blocks/BlockRubberPlank.java index 3f5c99275..010812c8f 100644 --- a/src/main/java/techreborn/blocks/BlockRubberPlank.java +++ b/src/main/java/techreborn/blocks/BlockRubberPlank.java @@ -25,6 +25,7 @@ package techreborn.blocks; import net.minecraft.block.Block; +import net.minecraft.block.BlockFire; import net.minecraft.block.SoundType; import net.minecraft.block.material.Material; import net.minecraft.init.Blocks; @@ -38,10 +39,8 @@ import techreborn.TechReborn; public class BlockRubberPlank extends Block { public BlockRubberPlank() { - super(Material.WOOD); - this.setHardness(2.0F); - this.setSoundType(SoundType.WOOD); - Blocks.FIRE.setFireInfo(this, 5, 20); + super(Block.Properties.create(Material.WOOD).hardnessAndResistance(2f).sound(SoundType.WOOD)); + ((BlockFire) Blocks.FIRE).setFireInfo(this, 5, 20); RebornModelRegistry.registerModel(new ModelCompound(TechReborn.MOD_ID, this)); } } diff --git a/src/main/java/techreborn/blocks/BlockStorage.java b/src/main/java/techreborn/blocks/BlockStorage.java index 67da8d716..de44a1d16 100644 --- a/src/main/java/techreborn/blocks/BlockStorage.java +++ b/src/main/java/techreborn/blocks/BlockStorage.java @@ -24,6 +24,7 @@ package techreborn.blocks; +import net.minecraft.block.Block; import net.minecraft.block.SoundType; import net.minecraft.block.material.Material; import reborncore.common.BaseBlock; @@ -31,9 +32,7 @@ import reborncore.common.BaseBlock; public class BlockStorage extends BaseBlock { public BlockStorage() { - super(Material.IRON); - setHardness(2f); - setSoundType(SoundType.METAL); + super(Block.Properties.create(Material.IRON).hardnessAndResistance(2f).sound(SoundType.METAL)); } // public static ItemStack getStorageBlockByName(String name, int count) { diff --git a/src/main/java/techreborn/blocks/cable/BlockCable.java b/src/main/java/techreborn/blocks/cable/BlockCable.java index 70c68205a..99275d5c6 100644 --- a/src/main/java/techreborn/blocks/cable/BlockCable.java +++ b/src/main/java/techreborn/blocks/cable/BlockCable.java @@ -24,6 +24,7 @@ package techreborn.blocks.cable; +import net.minecraft.block.Block; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; import net.minecraft.block.properties.IProperty; @@ -82,10 +83,8 @@ public class BlockCable extends BlockContainer { public final TRContent.Cables type; public BlockCable(TRContent.Cables type) { - super(Material.ROCK); + super(Block.Properties.create(Material.ROCK).hardnessAndResistance(1f, 8f)); this.type = type; - setHardness(1F); - setResistance(8F); setDefaultState(getDefaultState().with(EAST, false).with(WEST, false).with(NORTH, false).with(SOUTH, false).with(UP, false).with(DOWN, false)); BlockWrenchEventHandler.wrenableBlocks.add(this); } diff --git a/src/main/java/techreborn/blocks/generator/BlockFusionCoil.java b/src/main/java/techreborn/blocks/generator/BlockFusionCoil.java index 5c14c5d44..5eb785523 100644 --- a/src/main/java/techreborn/blocks/generator/BlockFusionCoil.java +++ b/src/main/java/techreborn/blocks/generator/BlockFusionCoil.java @@ -53,9 +53,7 @@ import java.util.List; public class BlockFusionCoil extends Block { public BlockFusionCoil() { - super(Material.IRON); - setHardness(2f); - setSoundType(SoundType.METAL); + super(Block.Properties.create(Material.IRON).hardnessAndResistance(2f).sound(SoundType.METAL)); RebornModelRegistry.registerModel(new ModelCompound(TechReborn.MOD_ID, this, "machines/generators")); } diff --git a/src/main/java/techreborn/blocks/storage/BlockEnergyStorage.java b/src/main/java/techreborn/blocks/storage/BlockEnergyStorage.java index 02b4020ac..5200d8699 100644 --- a/src/main/java/techreborn/blocks/storage/BlockEnergyStorage.java +++ b/src/main/java/techreborn/blocks/storage/BlockEnergyStorage.java @@ -27,6 +27,7 @@ package techreborn.blocks.storage; import com.google.common.base.Predicate; import com.google.common.collect.Iterators; import net.minecraft.block.Block; +import net.minecraft.block.SoundType; import net.minecraft.block.material.Material; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.EntityLivingBase; @@ -57,8 +58,7 @@ public abstract class BlockEnergyStorage extends BaseTileBlock { public int guiID; public BlockEnergyStorage(String name, int guiID) { - super(Material.IRON); - setHardness(2f); + super(Block.Properties.create(Material.IRON).hardnessAndResistance(2f)); this.setDefaultState(this.blockState.getBaseState().with(FACING, EnumFacing.NORTH)); this.name = name; this.guiID = guiID; diff --git a/src/main/java/techreborn/blocks/tier1/BlockPlayerDetector.java b/src/main/java/techreborn/blocks/tier1/BlockPlayerDetector.java index a978792d8..1a10dbf87 100644 --- a/src/main/java/techreborn/blocks/tier1/BlockPlayerDetector.java +++ b/src/main/java/techreborn/blocks/tier1/BlockPlayerDetector.java @@ -70,7 +70,7 @@ public class BlockPlayerDetector extends BlockMachineBase { public PropertyString TYPE; public BlockPlayerDetector() { - super(true); + super(); this.setDefaultState(this.getStateFromMeta(0)); for (int i = 0; i < types.length; i++) { RebornModelRegistry.registerModel(new ModelCompound(TechReborn.MOD_ID, this, i, "machines/tier1_machines").setInvVariant("type=" + types[i])); diff --git a/src/main/java/techreborn/blocks/transformers/BlockTransformer.java b/src/main/java/techreborn/blocks/transformers/BlockTransformer.java index 3a6a73e49..a4c91b936 100644 --- a/src/main/java/techreborn/blocks/transformers/BlockTransformer.java +++ b/src/main/java/techreborn/blocks/transformers/BlockTransformer.java @@ -27,6 +27,7 @@ package techreborn.blocks.transformers; import com.google.common.base.Predicate; import com.google.common.collect.Iterators; import net.minecraft.block.Block; +import net.minecraft.block.SoundType; import net.minecraft.block.material.Material; import net.minecraft.state.DirectionProperty; import net.minecraft.block.state.BlockStateContainer; @@ -57,8 +58,7 @@ public abstract class BlockTransformer extends BaseTileBlock { public String name; public BlockTransformer(String name) { - super(Material.IRON); - setHardness(2f); + super(Block.Properties.create(Material.IRON).hardnessAndResistance(2f)); this.setDefaultState(this.blockState.getBaseState().with(FACING, EnumFacing.NORTH)); this.name = name; RebornModelRegistry.registerModel(new ModelCompound(TechReborn.MOD_ID, this, "machines/energy")); diff --git a/src/main/java/techreborn/init/recipes/ExtractorRecipes.java b/src/main/java/techreborn/init/recipes/ExtractorRecipes.java index 307ac675f..bea681068 100644 --- a/src/main/java/techreborn/init/recipes/ExtractorRecipes.java +++ b/src/main/java/techreborn/init/recipes/ExtractorRecipes.java @@ -47,29 +47,20 @@ public class ExtractorRecipes extends RecipeMethods { register(getStack(Blocks.RED_TULIP), getStack(Items.ROSE_RED, 2), false); register(getStack(Blocks.POPPY), getStack(Items.ROSE_RED, 2), false); register(getStack(Blocks.ROSE_BUSH), getStack(Items.ROSE_RED, 4), false); - - - register(getStack(Blocks.RED_FLOWER), getStack(Items.DYE, 2, 1), false); - register(getStack(Blocks.YELLOW_FLOWER), getStack(Items.DYE, 2, 11), false); - register(getStack(Blocks.RED_FLOWER, 1, 1), getStack(Items.DYE, 2, 12), false); - register(getStack(Blocks.RED_FLOWER, 1, 2), getStack(Items.DYE, 2, 13), false); - register(getStack(Blocks.RED_FLOWER, 1, 3), getStack(Items.DYE, 2, 7), false); - register(getStack(Blocks.RED_FLOWER, 1, 4), getStack(Items.DYE, 2, 1), false); - register(getStack(Blocks.RED_FLOWER, 1, 5), getStack(Items.DYE, 2, 14), false); - register(getStack(Blocks.RED_FLOWER, 1, 6), getStack(Items.DYE, 2, 7), false); - register(getStack(Blocks.RED_FLOWER, 1, 7), getStack(Items.DYE, 2, 9), false); - register(getStack(Blocks.RED_FLOWER, 1, 8), getStack(Items.DYE, 2, 7), false); - register(getStack(Blocks.DOUBLE_PLANT), getStack(Items.DYE, 4, 11), false); - register(getStack(Blocks.DOUBLE_PLANT, 1, 1), getStack(Items.DYE, 4, 13), false); - register(getStack(Blocks.DOUBLE_PLANT, 1, 4), getStack(Items.DYE, 4, 1), false); - register(getStack(Blocks.DOUBLE_PLANT, 1, 5), getStack(Items.DYE, 4, 9), false); - - - register(getStack(Blocks.TALLGRASS, 1, 1), getStack(Items.WHEAT_SEEDS), false); - register(getStack(Blocks.TALLGRASS, 1, 2), getStack(Items.WHEAT_SEEDS), false); - register(getStack(Blocks.DOUBLE_PLANT, 1, 2), getStack(Items.WHEAT_SEEDS, 2), false); - register(getStack(Blocks.DOUBLE_PLANT, 1, 3), getStack(Items.WHEAT_SEEDS, 2), false); - register(getStack(Blocks.DEADBUSH, 1, 0), getStack(Items.STICK)); + register(getStack(Blocks.BLUE_ORCHID), getStack(Items.LIGHT_BLUE_DYE, 2), false); + register(getStack(Blocks.AZURE_BLUET), getStack(Items.LIGHT_GRAY_DYE, 2), false); + register(getStack(Blocks.OXEYE_DAISY), getStack(Items.LIGHT_GRAY_DYE, 2), false); + register(getStack(Blocks.WHITE_TULIP), getStack(Items.LIGHT_GRAY_DYE, 2), false); + register(getStack(Blocks.ALLIUM), getStack(Items.MAGENTA_DYE, 2), false); + register(getStack(Blocks.LILAC), getStack(Items.MAGENTA_DYE, 4), false); + register(getStack(Blocks.ORANGE_TULIP), getStack(Items.ORANGE_DYE, 2), false); + register(getStack(Blocks.PINK_TULIP), getStack(Items.PINK_DYE, 2), false); + register(getStack(Blocks.PEONY), getStack(Items.PINK_DYE, 4), false); + register(getStack(Blocks.DANDELION), getStack(Items.DANDELION_YELLOW, 2), false); + register(getStack(Blocks.SUNFLOWER), getStack(Items.DANDELION_YELLOW, 2), false); + register(getStack(Blocks.TALL_GRASS), getStack(Items.WHEAT_SEEDS), false); + register(getStack(Blocks.LARGE_FERN), getStack(Items.WHEAT_SEEDS), false); + register(getStack(Blocks.DEAD_BUSH), getStack(Items.STICK)); for (int i = 1; i < 15; i++) register(getStack(Blocks.WOOL, 1, i), getStack(Blocks.WOOL, 1, 0), false); for (Fluid fluid : FluidRegistry.getRegisteredFluids().values()) {