diff --git a/src/main/java/techreborn/blocks/BlockAlarm.java b/src/main/java/techreborn/blocks/BlockAlarm.java index ae895e7ca..a308d94bd 100644 --- a/src/main/java/techreborn/blocks/BlockAlarm.java +++ b/src/main/java/techreborn/blocks/BlockAlarm.java @@ -25,7 +25,7 @@ package techreborn.blocks; import net.minecraft.block.material.Material; -import net.minecraft.block.properties.PropertyBool; +import net.minecraft.state.BooleanProperty; import net.minecraft.state.DirectionProperty; import net.minecraft.block.state.BlockStateContainer; import net.minecraft.block.state.IBlockState; @@ -56,7 +56,7 @@ import java.util.List; public class BlockAlarm extends BaseTileBlock { public static DirectionProperty FACING; - public static PropertyBool ACTIVE; + public static BooleanProperty ACTIVE; private AxisAlignedBB[] bbs; public BlockAlarm() { @@ -100,7 +100,7 @@ public class BlockAlarm extends BaseTileBlock { @Override protected BlockStateContainer createBlockState() { FACING = DirectionProperty.create("facing"); - ACTIVE = PropertyBool.create("active"); + ACTIVE = BooleanProperty.create("active"); return new BlockStateContainer(this, FACING, ACTIVE); } diff --git a/src/main/java/techreborn/blocks/BlockNuke.java b/src/main/java/techreborn/blocks/BlockNuke.java index dbf12166a..2d106568f 100644 --- a/src/main/java/techreborn/blocks/BlockNuke.java +++ b/src/main/java/techreborn/blocks/BlockNuke.java @@ -26,7 +26,7 @@ package techreborn.blocks; import net.minecraft.block.Block; import net.minecraft.block.material.Material; -import net.minecraft.block.properties.PropertyBool; +import net.minecraft.state.BooleanProperty; import net.minecraft.block.state.BlockStateContainer; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.Entity; @@ -50,7 +50,7 @@ import techreborn.entities.EntityNukePrimed; * Created by Mark on 13/03/2016. */ public class BlockNuke extends BaseBlock { - public static final PropertyBool OVERLAY = PropertyBool.create("overlay"); + public static final BooleanProperty OVERLAY = BooleanProperty.create("overlay"); public BlockNuke() { super(Material.TNT); diff --git a/src/main/java/techreborn/blocks/BlockOre.java b/src/main/java/techreborn/blocks/BlockOre.java index 8d03dd65b..e5fed6202 100644 --- a/src/main/java/techreborn/blocks/BlockOre.java +++ b/src/main/java/techreborn/blocks/BlockOre.java @@ -67,9 +67,10 @@ public class BlockOre extends Block { public static int sphaleriteMaxQuantity = 2; public BlockOre() { - super(Material.ROCK); - setHardness(2.0f); - setHarvestLevel("pickaxe", 2); + super(Block.Builder + .create(Material.ROCK) + .hardnessAndResistance(2F) + ); } @Override diff --git a/src/main/java/techreborn/blocks/BlockRubberLog.java b/src/main/java/techreborn/blocks/BlockRubberLog.java index 8888c95c5..d5cd6ca55 100644 --- a/src/main/java/techreborn/blocks/BlockRubberLog.java +++ b/src/main/java/techreborn/blocks/BlockRubberLog.java @@ -27,7 +27,7 @@ package techreborn.blocks; import net.minecraft.block.Block; import net.minecraft.block.SoundType; import net.minecraft.block.material.Material; -import net.minecraft.block.properties.PropertyBool; +import net.minecraft.state.BooleanProperty; import net.minecraft.state.DirectionProperty; import net.minecraft.block.state.BlockStateContainer; import net.minecraft.block.state.IBlockState; @@ -64,7 +64,7 @@ import java.util.Random; public class BlockRubberLog extends Block { public static DirectionProperty SAP_SIDE = DirectionProperty.create("sapside", EnumFacing.Plane.HORIZONTAL); - public static PropertyBool HAS_SAP = PropertyBool.create("hassap"); + public static BooleanProperty HAS_SAP = BooleanProperty.create("hassap"); public BlockRubberLog() { super(Material.WOOD); diff --git a/src/main/java/techreborn/blocks/cable/BlockCable.java b/src/main/java/techreborn/blocks/cable/BlockCable.java index 5c9941aaa..10ffd885e 100644 --- a/src/main/java/techreborn/blocks/cable/BlockCable.java +++ b/src/main/java/techreborn/blocks/cable/BlockCable.java @@ -27,13 +27,14 @@ package techreborn.blocks.cable; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; import net.minecraft.block.properties.IProperty; -import net.minecraft.block.properties.PropertyBool; +import net.minecraft.state.BooleanProperty; import net.minecraft.block.state.BlockStateContainer; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; +import net.minecraft.state.BooleanProperty; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.*; import net.minecraft.util.math.AxisAlignedBB; @@ -62,12 +63,12 @@ import javax.annotation.Nullable; @RebornRegister(modID = TechReborn.MOD_ID) public class BlockCable extends BlockContainer { - public static final PropertyBool EAST = PropertyBool.create("east"); - public static final PropertyBool WEST = PropertyBool.create("west"); - public static final PropertyBool NORTH = PropertyBool.create("north"); - public static final PropertyBool SOUTH = PropertyBool.create("south"); - public static final PropertyBool UP = PropertyBool.create("up"); - public static final PropertyBool DOWN = PropertyBool.create("down"); + public static final BooleanProperty EAST = BooleanProperty.create("east"); + public static final BooleanProperty WEST = BooleanProperty.create("west"); + public static final BooleanProperty NORTH = BooleanProperty.create("north"); + public static final BooleanProperty SOUTH = BooleanProperty.create("south"); + public static final BooleanProperty UP = BooleanProperty.create("up"); + public static final BooleanProperty DOWN = BooleanProperty.create("down"); @ConfigRegistry(config = "misc", category = "cable", key = "uninsulatedElectrocutionDamage", comment = "When true an uninsulated cable will cause damage to entities") public static boolean uninsulatedElectrocutionDamage = true; diff --git a/src/main/java/techreborn/blocks/lighting/BlockLamp.java b/src/main/java/techreborn/blocks/lighting/BlockLamp.java index efd3519a3..c907ebf9f 100644 --- a/src/main/java/techreborn/blocks/lighting/BlockLamp.java +++ b/src/main/java/techreborn/blocks/lighting/BlockLamp.java @@ -25,7 +25,7 @@ package techreborn.blocks.lighting; import net.minecraft.block.material.Material; -import net.minecraft.block.properties.PropertyBool; +import net.minecraft.state.BooleanProperty; import net.minecraft.state.DirectionProperty; import net.minecraft.block.state.BlockFaceShape; import net.minecraft.block.state.BlockStateContainer; @@ -53,7 +53,7 @@ import techreborn.tiles.lighting.TileLamp; public class BlockLamp extends BaseTileBlock { public static DirectionProperty FACING; - public static PropertyBool ACTIVE; + public static BooleanProperty ACTIVE; private AxisAlignedBB[] bbs; private int cost; @@ -116,7 +116,7 @@ public class BlockLamp extends BaseTileBlock { @Override protected BlockStateContainer createBlockState() { FACING = DirectionProperty.create("facing"); - ACTIVE = PropertyBool.create("active"); + ACTIVE = BooleanProperty.create("active"); return new BlockStateContainer(this, FACING, ACTIVE); } diff --git a/src/main/java/techreborn/packets/PacketAesu.java b/src/main/java/techreborn/packets/PacketAesu.java index 3c6c275e4..f21d6b663 100644 --- a/src/main/java/techreborn/packets/PacketAesu.java +++ b/src/main/java/techreborn/packets/PacketAesu.java @@ -26,7 +26,7 @@ package techreborn.packets; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.math.BlockPos; -import net.minecraftforge.fml.common.network.simpleimpl.MessageContext; +import net.minecraftforge.fml.network.NetworkEvent; import reborncore.common.network.ExtendedPacketBuffer; import reborncore.common.network.INetworkPacket; import techreborn.tiles.storage.TileAdjustableSU; @@ -57,8 +57,8 @@ public class PacketAesu implements INetworkPacket { } @Override - public void processData(MessageContext context) { - TileEntity tile = context.getServerHandler().player.world.getTileEntity(pos); + public void processData(NetworkEvent.Context context) { + TileEntity tile = context.getSender().world.getTileEntity(pos); if (tile instanceof TileAdjustableSU){ ((TileAdjustableSU) tile).handleGuiInputFromClient(buttonID); } diff --git a/src/main/java/techreborn/packets/PacketAutoCraftingTableLock.java b/src/main/java/techreborn/packets/PacketAutoCraftingTableLock.java index aef30a065..5ec88a109 100644 --- a/src/main/java/techreborn/packets/PacketAutoCraftingTableLock.java +++ b/src/main/java/techreborn/packets/PacketAutoCraftingTableLock.java @@ -26,7 +26,7 @@ package techreborn.packets; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.math.BlockPos; -import net.minecraftforge.fml.common.network.simpleimpl.MessageContext; +import net.minecraftforge.fml.network.NetworkEvent; import reborncore.common.network.ExtendedPacketBuffer; import reborncore.common.network.INetworkPacket; import techreborn.tiles.machine.tier1.TileAutoCraftingTable; @@ -57,8 +57,8 @@ public class PacketAutoCraftingTableLock implements INetworkPacket { } @Override - public void processData(MessageContext context) { - TileEntity tileEntity = context.getServerHandler().player.world.getTileEntity(machinePos); + public void processData(NetworkEvent.Context context) { + TileEntity tileEntity = context.getSender().world.getTileEntity(machinePos); if(tileEntity instanceof TileAutoCraftingTable){ ((TileAutoCraftingTable) tileEntity).locked = locked; } diff --git a/src/main/java/techreborn/packets/PacketFusionControlSize.java b/src/main/java/techreborn/packets/PacketFusionControlSize.java index 6024ea630..87c80a12c 100644 --- a/src/main/java/techreborn/packets/PacketFusionControlSize.java +++ b/src/main/java/techreborn/packets/PacketFusionControlSize.java @@ -26,7 +26,7 @@ package techreborn.packets; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.math.BlockPos; -import net.minecraftforge.fml.common.network.simpleimpl.MessageContext; +import net.minecraftforge.fml.network.NetworkEvent; import reborncore.common.network.ExtendedPacketBuffer; import reborncore.common.network.INetworkPacket; import techreborn.tiles.fusionReactor.TileFusionControlComputer; @@ -57,8 +57,8 @@ public class PacketFusionControlSize implements INetworkPacket { } @Override - public void processData(MessageContext context) { - TileEntity tile = context.getServerHandler().player.world.getTileEntity(pos); + public void processData(NetworkEvent.Context context) { + TileEntity tile = context.getSender().world.getTileEntity(pos); if(tile instanceof TileFusionControlComputer){ ((TileFusionControlComputer) tile).changeSize(sizeDelta); } diff --git a/src/main/java/techreborn/packets/PacketIdsu.java b/src/main/java/techreborn/packets/PacketIdsu.java index 8faadd20e..830b7f260 100644 --- a/src/main/java/techreborn/packets/PacketIdsu.java +++ b/src/main/java/techreborn/packets/PacketIdsu.java @@ -25,7 +25,7 @@ package techreborn.packets; import net.minecraft.util.math.BlockPos; -import net.minecraftforge.fml.common.network.simpleimpl.MessageContext; +import net.minecraftforge.fml.network.NetworkEvent; import reborncore.common.network.ExtendedPacketBuffer; import reborncore.common.network.INetworkPacket; import techreborn.tiles.storage.idsu.TileInterdimensionalSU; @@ -56,7 +56,7 @@ public class PacketIdsu implements INetworkPacket { } @Override - public void processData(MessageContext context) { + public void processData(NetworkEvent.Context context) { // if (!pos.getWorld().isRemote) { // pos.handleGuiInputFromClient(buttonID); // } diff --git a/src/main/java/techreborn/packets/PacketRollingMachineLock.java b/src/main/java/techreborn/packets/PacketRollingMachineLock.java index 3af131e93..5c44599a9 100644 --- a/src/main/java/techreborn/packets/PacketRollingMachineLock.java +++ b/src/main/java/techreborn/packets/PacketRollingMachineLock.java @@ -26,7 +26,7 @@ package techreborn.packets; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.math.BlockPos; -import net.minecraftforge.fml.common.network.simpleimpl.MessageContext; +import net.minecraftforge.fml.network.NetworkEvent; import reborncore.common.network.ExtendedPacketBuffer; import reborncore.common.network.INetworkPacket; import techreborn.tiles.machine.tier1.TileRollingMachine; @@ -57,8 +57,8 @@ public class PacketRollingMachineLock implements INetworkPacket { } @Override - public void processData(MessageContext context) { - TileEntity tileEntity = context.getServerHandler().player.world.getTileEntity(machinePos); + public void processData(NetworkEvent.Context context) { + TileEntity tileEntity = context.getSender().world.getTileEntity(machinePos); if(tileEntity instanceof TileRollingMachine){ ((TileRollingMachine) tileEntity).locked = locked; }