1591 - I think ill come back to this another day
This commit is contained in:
parent
b6312b124a
commit
f08fd1da4d
11 changed files with 36 additions and 34 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
// }
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue