Update onBlockActivated to use newer method
This commit is contained in:
parent
ceac5fc282
commit
ace5813745
36 changed files with 317 additions and 145 deletions
|
@ -28,6 +28,9 @@ import net.minecraft.block.state.BlockStateContainer;
|
|||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import prospector.shootingstar.ShootingStar;
|
||||
import prospector.shootingstar.model.ModelCompound;
|
||||
|
@ -68,10 +71,11 @@ public class BlockAutoCraftingTable extends BlockMachineBase {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(final World world, final int x, final int y, final int z, final EntityPlayer player, final int side, final float hitX,
|
||||
final float hitY, final float hitZ) {
|
||||
public boolean onBlockActivated(final World world, final BlockPos pos, final IBlockState state,
|
||||
final EntityPlayer player, final EnumHand hand, final EnumFacing side,
|
||||
final float hitX, final float hitY, final float hitZ) {
|
||||
if (!player.isSneaking()) {
|
||||
player.openGui(Core.INSTANCE, EGui.AUTO_CRAFTING_TABLE.ordinal(), world, x, y, z);
|
||||
player.openGui( Core.INSTANCE, EGui.AUTO_CRAFTING_TABLE.ordinal(), world, pos.getX(), pos.getY(),pos.getZ());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -25,7 +25,11 @@
|
|||
package techreborn.blocks;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import reborncore.common.blocks.BlockMachineBase;
|
||||
import techreborn.Core;
|
||||
|
@ -41,10 +45,11 @@ public class BlockComputerCube extends BlockMachineBase {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(final World world, final int x, final int y, final int z, final EntityPlayer player, final int side, final float hitX,
|
||||
final float hitY, final float hitZ) {
|
||||
public boolean onBlockActivated(final World world, final BlockPos pos, final IBlockState state,
|
||||
final EntityPlayer player, final EnumHand hand, final EnumFacing side,
|
||||
final float hitX, final float hitY, final float hitZ) {
|
||||
if (!player.isSneaking())
|
||||
player.openGui(Core.INSTANCE, EGui.MANUAL.ordinal(), world, x, y, z);
|
||||
player.openGui(Core.INSTANCE, EGui.MANUAL.ordinal(), world, pos.getX(), pos.getY(), pos.getZ());
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,11 +26,14 @@ package techreborn.blocks;
|
|||
|
||||
import net.minecraft.block.BlockDynamicLiquid;
|
||||
import net.minecraft.block.BlockStaticLiquid;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fluids.BlockFluidBase;
|
||||
|
@ -82,8 +85,8 @@ public class BlockDigitalChest extends BlockMachineBase {
|
|||
if (!itemStack.isEmpty() && itemStack.getCount() > 0) {
|
||||
if (itemStack.getItem() instanceof ItemBlock) {
|
||||
if (((ItemBlock) itemStack.getItem()).getBlock() instanceof BlockFluidBase
|
||||
|| ((ItemBlock) itemStack.getItem()).getBlock() instanceof BlockStaticLiquid
|
||||
|| ((ItemBlock) itemStack.getItem()).getBlock() instanceof BlockDynamicLiquid) {
|
||||
|| ((ItemBlock) itemStack.getItem()).getBlock() instanceof BlockStaticLiquid
|
||||
|| ((ItemBlock) itemStack.getItem()).getBlock() instanceof BlockDynamicLiquid) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
@ -99,7 +102,7 @@ public class BlockDigitalChest extends BlockMachineBase {
|
|||
final float dZ = rand.nextFloat() * 0.8F + 0.1F;
|
||||
|
||||
final EntityItem entityItem = new EntityItem(world, pos.getX() + dX, pos.getY() + dY, pos.getZ() + dZ,
|
||||
itemStack.copy());
|
||||
itemStack.copy());
|
||||
|
||||
if (itemStack.hasTagCompound()) {
|
||||
entityItem.getItem().setTagCompound(itemStack.getTagCompound().copy());
|
||||
|
@ -120,10 +123,11 @@ public class BlockDigitalChest extends BlockMachineBase {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(final World world, final int x, final int y, final int z, final EntityPlayer player, final int side, final float hitX,
|
||||
final float hitY, final float hitZ) {
|
||||
public boolean onBlockActivated(final World world, final BlockPos pos, final IBlockState state,
|
||||
final EntityPlayer player, final EnumHand hand, final EnumFacing side,
|
||||
final float hitX, final float hitY, final float hitZ) {
|
||||
if (!player.isSneaking())
|
||||
player.openGui(Core.INSTANCE, EGui.DIGITAL_CHEST.ordinal(), world, x, y, z);
|
||||
player.openGui(Core.INSTANCE, EGui.DIGITAL_CHEST.ordinal(), world, pos.getX(), pos.getY(), pos.getZ());
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,9 +24,12 @@
|
|||
|
||||
package techreborn.blocks;
|
||||
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import prospector.shootingstar.ShootingStar;
|
||||
|
@ -48,13 +51,13 @@ public class BlockFusionControlComputer extends BlockMachineBase {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(final World world, final int x, final int y, final int z, final EntityPlayer player, final int side, final float hitX,
|
||||
final float hitY, final float hitZ) {
|
||||
final TileFusionControlComputer tileFusionControlComputer = (TileFusionControlComputer) world
|
||||
.getTileEntity(new BlockPos(x, y, z));
|
||||
public boolean onBlockActivated(final World world, final BlockPos pos, final IBlockState state,
|
||||
final EntityPlayer player, final EnumHand hand, final EnumFacing side,
|
||||
final float hitX, final float hitY, final float hitZ) {
|
||||
final TileFusionControlComputer tileFusionControlComputer = (TileFusionControlComputer) world.getTileEntity(pos);
|
||||
tileFusionControlComputer.checkCoils();
|
||||
if (!player.isSneaking())
|
||||
player.openGui(Core.INSTANCE, EGui.FUSION_CONTROLLER.ordinal(), world, x, y, z);
|
||||
player.openGui(Core.INSTANCE, EGui.FUSION_CONTROLLER.ordinal(), world, pos.getX(), pos.getY(), pos.getZ());
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -63,7 +66,7 @@ public class BlockFusionControlComputer extends BlockMachineBase {
|
|||
super.onEntityWalk(worldIn, pos, entityIn);
|
||||
if (worldIn.getTileEntity(pos) instanceof TileFusionControlComputer) {
|
||||
if (((TileFusionControlComputer) worldIn.getTileEntity(pos)).crafingTickTime != 0
|
||||
&& ((TileFusionControlComputer) worldIn.getTileEntity(pos)).checkCoils()) {
|
||||
&& ((TileFusionControlComputer) worldIn.getTileEntity(pos)).checkCoils()) {
|
||||
entityIn.attackEntityFrom(new FusionDamageSource(), 200F);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,8 +24,11 @@
|
|||
|
||||
package techreborn.blocks;
|
||||
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import prospector.shootingstar.ShootingStar;
|
||||
|
@ -52,13 +55,14 @@ public class BlockQuantumTank extends BlockMachineBase {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(final World world, final int x, final int y, final int z, final EntityPlayer player, final int side, final float hitX,
|
||||
final float hitY, final float hitZ) {
|
||||
if (this.fillBlockWithFluid(world, new BlockPos(x, y, z), player)) {
|
||||
public boolean onBlockActivated(final World world, final BlockPos pos, final IBlockState state,
|
||||
final EntityPlayer player, final EnumHand hand, final EnumFacing side,
|
||||
final float hitX, final float hitY, final float hitZ) {
|
||||
if (this.fillBlockWithFluid(world, pos, player)) {
|
||||
return true;
|
||||
}
|
||||
if (!player.isSneaking()) {
|
||||
player.openGui(Core.INSTANCE, EGui.QUANTUM_TANK.ordinal(), world, x, y, z);
|
||||
player.openGui(Core.INSTANCE, EGui.QUANTUM_TANK.ordinal(), world, pos.getX(), pos.getY(), pos.getZ());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -24,7 +24,13 @@
|
|||
|
||||
package techreborn.blocks;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.util.ITooltipFlag;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.text.TextFormatting;
|
||||
import net.minecraft.world.World;
|
||||
import reborncore.common.blocks.BlockMachineBase;
|
||||
import techreborn.client.TechRebornCreativeTab;
|
||||
|
||||
|
@ -34,4 +40,11 @@ public class BlockSupercondensator extends BlockMachineBase {
|
|||
setUnlocalizedName("techreborn.supercondensator");
|
||||
setCreativeTab(TechRebornCreativeTab.instance);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, World world, List<String> tooltip, ITooltipFlag flag) {
|
||||
tooltip.add(TextFormatting.RED + "WIP Coming Soon");
|
||||
// TODO
|
||||
// Remember to remove WIP override and imports once complete
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,8 +24,12 @@
|
|||
|
||||
package techreborn.blocks.advanced_machine;
|
||||
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import prospector.shootingstar.ShootingStar;
|
||||
import prospector.shootingstar.model.ModelCompound;
|
||||
|
@ -50,10 +54,11 @@ public class BlockImplosionCompressor extends BlockMachineBase {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(final World world, final int x, final int y, final int z, final EntityPlayer player, final int side, final float hitX,
|
||||
final float hitY, final float hitZ) {
|
||||
public boolean onBlockActivated(final World world, final BlockPos pos, final IBlockState state,
|
||||
final EntityPlayer player, final EnumHand hand, final EnumFacing side,
|
||||
final float hitX, final float hitY, final float hitZ) {
|
||||
if (!player.isSneaking())
|
||||
player.openGui(Core.INSTANCE, EGui.IMPLOSION_COMPRESSOR.ordinal(), world, x, y, z);
|
||||
player.openGui( Core.INSTANCE, EGui.IMPLOSION_COMPRESSOR.ordinal(), world, pos.getX(), pos.getY(), pos.getZ());
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,8 +24,12 @@
|
|||
|
||||
package techreborn.blocks.advanced_machine;
|
||||
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import prospector.shootingstar.ShootingStar;
|
||||
import prospector.shootingstar.model.ModelCompound;
|
||||
|
@ -50,10 +54,11 @@ public class BlockIndustrialBlastFurnace extends BlockMachineBase {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(final World world, final int x, final int y, final int z, final EntityPlayer player, final int side, final float hitX,
|
||||
final float hitY, final float hitZ) {
|
||||
public boolean onBlockActivated(final World world, final BlockPos pos, final IBlockState state,
|
||||
final EntityPlayer player, final EnumHand hand, final EnumFacing side,
|
||||
final float hitX, final float hitY, final float hitZ) {
|
||||
if (!player.isSneaking())
|
||||
player.openGui(Core.INSTANCE, EGui.BLAST_FURNACE.ordinal(), world, x, y, z);
|
||||
player.openGui(Core.INSTANCE, EGui.BLAST_FURNACE.ordinal(), world, pos.getX(), pos.getY(), pos.getZ());
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -24,8 +24,12 @@
|
|||
|
||||
package techreborn.blocks.advanced_machine;
|
||||
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import prospector.shootingstar.ShootingStar;
|
||||
import prospector.shootingstar.model.ModelCompound;
|
||||
|
@ -38,8 +42,6 @@ import techreborn.tiles.TileIndustrialCentrifuge;
|
|||
|
||||
public class BlockIndustrialCentrifuge extends BlockMachineBase {
|
||||
|
||||
private final String prefix = "techreborn:blocks/machine/advanced_machines/";
|
||||
|
||||
public BlockIndustrialCentrifuge() {
|
||||
super();
|
||||
this.setCreativeTab(TechRebornCreativeTab.instance);
|
||||
|
@ -52,10 +54,11 @@ public class BlockIndustrialCentrifuge extends BlockMachineBase {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(final World world, final int x, final int y, final int z, final EntityPlayer player, final int side, final float hitX,
|
||||
final float hitY, final float hitZ) {
|
||||
public boolean onBlockActivated(final World world, final BlockPos pos, final IBlockState state,
|
||||
final EntityPlayer player, final EnumHand hand, final EnumFacing side,
|
||||
final float hitX, final float hitY, final float hitZ) {
|
||||
if (!player.isSneaking()) {
|
||||
player.openGui(Core.INSTANCE, EGui.CENTRIFUGE.ordinal(), world, x, y, z);
|
||||
player.openGui(Core.INSTANCE, EGui.CENTRIFUGE.ordinal(), world, pos.getX(), pos.getY(), pos.getZ());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -24,8 +24,12 @@
|
|||
|
||||
package techreborn.blocks.advanced_machine;
|
||||
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import prospector.shootingstar.ShootingStar;
|
||||
import prospector.shootingstar.model.ModelCompound;
|
||||
|
@ -50,10 +54,11 @@ public class BlockIndustrialElectrolyzer extends BlockMachineBase {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(final World world, final int x, final int y, final int z, final EntityPlayer player, final int side, final float hitX,
|
||||
final float hitY, final float hitZ) {
|
||||
public boolean onBlockActivated(final World world, final BlockPos pos, final IBlockState state,
|
||||
final EntityPlayer player, final EnumHand hand, final EnumFacing side,
|
||||
final float hitX, final float hitY, final float hitZ) {
|
||||
if (!player.isSneaking())
|
||||
player.openGui(Core.INSTANCE, EGui.INDUSTRIAL_ELECTROLYZER.ordinal(), world, x, y, z);
|
||||
player.openGui( Core.INSTANCE, EGui.INDUSTRIAL_ELECTROLYZER.ordinal(), world, pos.getX(), pos.getY(),pos.getZ());
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,8 +24,11 @@
|
|||
|
||||
package techreborn.blocks.advanced_machine;
|
||||
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import prospector.shootingstar.ShootingStar;
|
||||
|
@ -51,13 +54,14 @@ public class BlockIndustrialGrinder extends BlockMachineBase {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(final World world, final int x, final int y, final int z, final EntityPlayer player, final int side, final float hitX,
|
||||
final float hitY, final float hitZ) {
|
||||
if (this.fillBlockWithFluid(world, new BlockPos(x, y, z), player)) {
|
||||
public boolean onBlockActivated(final World world, final BlockPos pos, final IBlockState state,
|
||||
final EntityPlayer player, final EnumHand hand, final EnumFacing side,
|
||||
final float hitX, final float hitY, final float hitZ) {
|
||||
if (this.fillBlockWithFluid(world, pos, player)) {
|
||||
return true;
|
||||
}
|
||||
if (!player.isSneaking())
|
||||
player.openGui(Core.INSTANCE, EGui.INDUSTRIAL_GRINDER.ordinal(), world, x, y, z);
|
||||
player.openGui(Core.INSTANCE, EGui.INDUSTRIAL_GRINDER.ordinal(), world, pos.getX(), pos.getY(), pos.getZ());
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,8 +24,11 @@
|
|||
|
||||
package techreborn.blocks.advanced_machine;
|
||||
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import prospector.shootingstar.ShootingStar;
|
||||
|
@ -51,13 +54,14 @@ public class BlockIndustrialSawmill extends BlockMachineBase {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(final World world, final int x, final int y, final int z, final EntityPlayer player, final int side, final float hitX,
|
||||
final float hitY, final float hitZ) {
|
||||
if (this.fillBlockWithFluid(world, new BlockPos(x, y, z), player)) {
|
||||
public boolean onBlockActivated(final World world, final BlockPos pos, final IBlockState state,
|
||||
final EntityPlayer player, final EnumHand hand, final EnumFacing side,
|
||||
final float hitX, final float hitY, final float hitZ) {
|
||||
if (this.fillBlockWithFluid(world, pos, player)) {
|
||||
return true;
|
||||
}
|
||||
if (!player.isSneaking())
|
||||
player.openGui(Core.INSTANCE, EGui.SAWMILL.ordinal(), world, x, y, z);
|
||||
player.openGui(Core.INSTANCE, EGui.SAWMILL.ordinal(), world, pos.getX(), pos.getY(), pos.getZ());
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -55,21 +55,14 @@ public class BlockDieselGenerator extends BlockMachineBase {
|
|||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(final World world,
|
||||
final int p_149915_2_) {
|
||||
public TileEntity createNewTileEntity(final World world, final int p_149915_2_) {
|
||||
return new TileDieselGenerator();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(final World world,
|
||||
final BlockPos pos,
|
||||
final IBlockState state,
|
||||
final EntityPlayer player,
|
||||
EnumHand hand,
|
||||
EnumFacing side,
|
||||
float hitX,
|
||||
float hitY,
|
||||
float hitZ) {
|
||||
public boolean onBlockActivated(final World world, final BlockPos pos, final IBlockState state,
|
||||
final EntityPlayer player, final EnumHand hand, final EnumFacing side,
|
||||
final float hitX, final float hitY, final float hitZ) {
|
||||
if (this.fillBlockWithFluid(world, pos, player)) {
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -24,8 +24,11 @@
|
|||
|
||||
package techreborn.blocks.generator;
|
||||
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import prospector.shootingstar.ShootingStar;
|
||||
|
@ -51,13 +54,14 @@ public class BlockGasTurbine extends BlockMachineBase {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(final World world, final int x, final int y, final int z, final EntityPlayer player, final int side, final float hitX,
|
||||
final float hitY, final float hitZ) {
|
||||
if (this.fillBlockWithFluid(world, new BlockPos(x, y, z), player)) {
|
||||
public boolean onBlockActivated(final World world, final BlockPos pos, final IBlockState state,
|
||||
final EntityPlayer player, final EnumHand hand, final EnumFacing side,
|
||||
final float hitX, final float hitY, final float hitZ) {
|
||||
if (this.fillBlockWithFluid(world, pos, player)) {
|
||||
return true;
|
||||
}
|
||||
if (!player.isSneaking())
|
||||
player.openGui(Core.INSTANCE, EGui.GAS_TURBINE.ordinal(), world, x, y, z);
|
||||
player.openGui(Core.INSTANCE, EGui.GAS_TURBINE.ordinal(), world, pos.getX(), pos.getY(), pos.getZ());
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -24,6 +24,12 @@
|
|||
|
||||
package techreborn.blocks.generator;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.util.ITooltipFlag;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.text.TextFormatting;
|
||||
import net.minecraft.world.World;
|
||||
import prospector.shootingstar.ShootingStar;
|
||||
import prospector.shootingstar.model.ModelCompound;
|
||||
import reborncore.common.blocks.BlockMachineBase;
|
||||
|
@ -38,4 +44,11 @@ public class BlockMagicEnergyAbsorber extends BlockMachineBase {
|
|||
ShootingStar.registerModel(new ModelCompound(ModInfo.MOD_ID, this, "machines/generators"));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, World world, List<String> tooltip, ITooltipFlag flag) {
|
||||
tooltip.add(TextFormatting.RED + "WIP Coming Soon");
|
||||
// TODO
|
||||
// Remember to remove WIP override and imports once complete
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -24,6 +24,12 @@
|
|||
|
||||
package techreborn.blocks.generator;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.util.ITooltipFlag;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.text.TextFormatting;
|
||||
import net.minecraft.world.World;
|
||||
import prospector.shootingstar.ShootingStar;
|
||||
import prospector.shootingstar.model.ModelCompound;
|
||||
import reborncore.common.blocks.BlockMachineBase;
|
||||
|
@ -37,4 +43,11 @@ public class BlockMagicEnergyConverter extends BlockMachineBase {
|
|||
setCreativeTab(TechRebornCreativeTab.instance);
|
||||
ShootingStar.registerModel(new ModelCompound(ModInfo.MOD_ID, this, "machines/generators"));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, World world, List<String> tooltip, ITooltipFlag flag) {
|
||||
tooltip.add(TextFormatting.RED + "WIP Coming Soon");
|
||||
//TODO
|
||||
//Remember to remove WIP override and imports once complete
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,7 +24,13 @@
|
|||
|
||||
package techreborn.blocks.generator;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.util.ITooltipFlag;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.text.TextFormatting;
|
||||
import net.minecraft.world.World;
|
||||
import reborncore.common.blocks.BlockMachineBase;
|
||||
import techreborn.client.TechRebornCreativeTab;
|
||||
|
||||
|
@ -35,4 +41,11 @@ public class BlockPlasmaGenerator extends BlockMachineBase {
|
|||
setUnlocalizedName("techreborn.plasmagenerator");
|
||||
setCreativeTab(TechRebornCreativeTab.instance);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, World world, List<String> tooltip, ITooltipFlag flag) {
|
||||
tooltip.add(TextFormatting.RED + "WIP Coming Soon");
|
||||
// TODO
|
||||
// Remember to remove WIP override and imports once complete
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,8 +24,11 @@
|
|||
|
||||
package techreborn.blocks.generator;
|
||||
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import prospector.shootingstar.ShootingStar;
|
||||
|
@ -51,13 +54,14 @@ public class BlockSemiFluidGenerator extends BlockMachineBase {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(final World world, final int x, final int y, final int z, final EntityPlayer player, final int side, final float hitX,
|
||||
final float hitY, final float hitZ) {
|
||||
if (this.fillBlockWithFluid(world, new BlockPos(x, y, z), player)) {
|
||||
public boolean onBlockActivated(final World world, final BlockPos pos, final IBlockState state,
|
||||
final EntityPlayer player, final EnumHand hand, final EnumFacing side,
|
||||
final float hitX, final float hitY, final float hitZ) {
|
||||
if (this.fillBlockWithFluid(world, pos, player)) {
|
||||
return true;
|
||||
}
|
||||
if (!player.isSneaking())
|
||||
player.openGui(Core.INSTANCE, EGui.SEMIFLUID_GENERATOR.ordinal(), world, x, y, z);
|
||||
player.openGui( Core.INSTANCE, EGui.SEMIFLUID_GENERATOR.ordinal(), world, pos.getX(), pos.getY(), pos.getZ());
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,8 +24,12 @@
|
|||
|
||||
package techreborn.blocks.generator;
|
||||
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import prospector.shootingstar.ShootingStar;
|
||||
import prospector.shootingstar.model.ModelCompound;
|
||||
|
@ -50,10 +54,11 @@ public class BlockSolidFuelGenerator extends BlockMachineBase {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(final World world, final int x, final int y, final int z, final EntityPlayer player, final int side, final float hitX,
|
||||
final float hitY, final float hitZ) {
|
||||
public boolean onBlockActivated(final World world, final BlockPos pos, final IBlockState state,
|
||||
final EntityPlayer player, final EnumHand hand, final EnumFacing side,
|
||||
final float hitX, final float hitY, final float hitZ) {
|
||||
if (!player.isSneaking()) {
|
||||
player.openGui(Core.INSTANCE, EGui.GENERATOR.ordinal(), world, x, y, z);
|
||||
player.openGui(Core.INSTANCE, EGui.GENERATOR.ordinal(), world, pos.getX(), pos.getY(), pos.getZ());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -24,8 +24,11 @@
|
|||
|
||||
package techreborn.blocks.generator;
|
||||
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import prospector.shootingstar.ShootingStar;
|
||||
|
@ -51,13 +54,14 @@ public class BlockThermalGenerator extends BlockMachineBase {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(final World world, final int x, final int y, final int z, final EntityPlayer player, final int side, final float hitX,
|
||||
final float hitY, final float hitZ) {
|
||||
if (this.fillBlockWithFluid(world, new BlockPos(x, y, z), player)) {
|
||||
public boolean onBlockActivated(final World world, final BlockPos pos, final IBlockState state,
|
||||
final EntityPlayer player, final EnumHand hand, final EnumFacing side,
|
||||
final float hitX, final float hitY, final float hitZ) {
|
||||
if (this.fillBlockWithFluid(world, pos, player)) {
|
||||
return true;
|
||||
}
|
||||
if (!player.isSneaking())
|
||||
player.openGui(Core.INSTANCE, EGui.THERMAL_GENERATOR.ordinal(), world, x, y, z);
|
||||
player.openGui(Core.INSTANCE, EGui.THERMAL_GENERATOR.ordinal(), world, pos.getX(), pos.getY(), pos.getZ());
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,6 +28,8 @@ import net.minecraft.block.state.IBlockState;
|
|||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
@ -57,10 +59,11 @@ public class BlockIronAlloyFurnace extends BlockMachineBase {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(final World world, final int x, final int y, final int z, final EntityPlayer player, final int side, final float hitX,
|
||||
final float hitY, final float hitZ) {
|
||||
public boolean onBlockActivated(final World world, final BlockPos pos, final IBlockState state,
|
||||
final EntityPlayer player, final EnumHand hand, final EnumFacing side,
|
||||
final float hitX, final float hitY, final float hitZ) {
|
||||
if (!player.isSneaking())
|
||||
player.openGui(Core.INSTANCE, EGui.ALLOY_FURNACE.ordinal(), world, x, y, z);
|
||||
player.openGui(Core.INSTANCE, EGui.ALLOY_FURNACE.ordinal(), world, pos.getX(), pos.getY(), pos.getZ());
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -29,6 +29,7 @@ import net.minecraft.entity.player.EntityPlayer;
|
|||
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.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
@ -62,10 +63,11 @@ public class BlockIronFurnace extends BlockMachineBase {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(final World world, final int x, final int y, final int z, final EntityPlayer player, final int side, final float hitX,
|
||||
final float hitY, final float hitZ) {
|
||||
public boolean onBlockActivated(final World world, final BlockPos pos, final IBlockState state,
|
||||
final EntityPlayer player, final EnumHand hand, final EnumFacing side,
|
||||
final float hitX, final float hitY, final float hitZ) {
|
||||
if (!player.isSneaking())
|
||||
player.openGui(Core.INSTANCE, EGui.IRON_FURNACE.ordinal(), world, x, y, z);
|
||||
player.openGui(Core.INSTANCE, EGui.IRON_FURNACE.ordinal(), world, pos.getX(), pos.getY(), pos.getZ());
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -88,25 +90,25 @@ public class BlockIronFurnace extends BlockMachineBase {
|
|||
final double d4 = rand.nextDouble() * 0.6D - 0.3D;
|
||||
|
||||
switch (enumfacing) {
|
||||
case WEST:
|
||||
worldIn.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, d0 - d3, d1, d2 + d4, 0.0D, 0.0D, 0.0D,
|
||||
new int[0]);
|
||||
worldIn.spawnParticle(EnumParticleTypes.FLAME, d0 - d3, d1, d2 + d4, 0.0D, 0.0D, 0.0D, new int[0]);
|
||||
break;
|
||||
case EAST:
|
||||
worldIn.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, d0 + d3, d1, d2 + d4, 0.0D, 0.0D, 0.0D,
|
||||
new int[0]);
|
||||
worldIn.spawnParticle(EnumParticleTypes.FLAME, d0 + d3, d1, d2 + d4, 0.0D, 0.0D, 0.0D, new int[0]);
|
||||
break;
|
||||
case NORTH:
|
||||
worldIn.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, d0 + d4, d1, d2 - d3, 0.0D, 0.0D, 0.0D,
|
||||
new int[0]);
|
||||
worldIn.spawnParticle(EnumParticleTypes.FLAME, d0 + d4, d1, d2 - d3, 0.0D, 0.0D, 0.0D, new int[0]);
|
||||
break;
|
||||
case SOUTH:
|
||||
worldIn.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, d0 + d4, d1, d2 + d3, 0.0D, 0.0D, 0.0D,
|
||||
new int[0]);
|
||||
worldIn.spawnParticle(EnumParticleTypes.FLAME, d0 + d4, d1, d2 + d3, 0.0D, 0.0D, 0.0D, new int[0]);
|
||||
case WEST:
|
||||
worldIn.spawnParticle( EnumParticleTypes.SMOKE_NORMAL, d0 - d3, d1, d2 + d4, 0.0D, 0.0D, 0.0D,
|
||||
new int[0]);
|
||||
worldIn.spawnParticle(EnumParticleTypes.FLAME, d0 - d3, d1, d2 + d4, 0.0D, 0.0D, 0.0D, new int[0]);
|
||||
break;
|
||||
case EAST:
|
||||
worldIn.spawnParticle( EnumParticleTypes.SMOKE_NORMAL, d0 + d3, d1, d2 + d4, 0.0D, 0.0D, 0.0D,
|
||||
new int[0]);
|
||||
worldIn.spawnParticle(EnumParticleTypes.FLAME, d0 + d3, d1, d2 + d4, 0.0D, 0.0D, 0.0D, new int[0]);
|
||||
break;
|
||||
case NORTH:
|
||||
worldIn.spawnParticle( EnumParticleTypes.SMOKE_NORMAL, d0 + d4, d1, d2 - d3, 0.0D, 0.0D, 0.0D,
|
||||
new int[0]);
|
||||
worldIn.spawnParticle(EnumParticleTypes.FLAME, d0 + d4, d1, d2 - d3, 0.0D, 0.0D, 0.0D, new int[0]);
|
||||
break;
|
||||
case SOUTH:
|
||||
worldIn.spawnParticle( EnumParticleTypes.SMOKE_NORMAL, d0 + d4, d1, d2 + d3, 0.0D, 0.0D, 0.0D,
|
||||
new int[0]);
|
||||
worldIn.spawnParticle(EnumParticleTypes.FLAME, d0 + d4, d1, d2 + d3, 0.0D, 0.0D, 0.0D, new int[0]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,8 +24,12 @@
|
|||
|
||||
package techreborn.blocks.machine;
|
||||
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import prospector.shootingstar.ShootingStar;
|
||||
import prospector.shootingstar.model.ModelCompound;
|
||||
|
@ -50,10 +54,11 @@ public class BlockAssemblingMachine extends BlockMachineBase {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(final World world, final int x, final int y, final int z, final EntityPlayer player, final int side, final float hitX,
|
||||
final float hitY, final float hitZ) {
|
||||
public boolean onBlockActivated(final World world, final BlockPos pos, final IBlockState state,
|
||||
final EntityPlayer player, final EnumHand hand, final EnumFacing side,
|
||||
final float hitX, final float hitY, final float hitZ) {
|
||||
if (!player.isSneaking())
|
||||
player.openGui(Core.INSTANCE, EGui.ASSEMBLING_MACHINE.ordinal(), world, x, y, z);
|
||||
player.openGui(Core.INSTANCE, EGui.ASSEMBLING_MACHINE.ordinal(), world, pos.getX(), pos.getY(), pos.getZ());
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,8 +24,12 @@
|
|||
|
||||
package techreborn.blocks.machine;
|
||||
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import prospector.shootingstar.ShootingStar;
|
||||
import prospector.shootingstar.model.ModelCompound;
|
||||
|
@ -50,10 +54,11 @@ public class BlockChargeOMat extends BlockMachineBase {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(final World world, final int x, final int y, final int z, final EntityPlayer player, final int side, final float hitX,
|
||||
final float hitY, final float hitZ) {
|
||||
public boolean onBlockActivated(final World world, final BlockPos pos, final IBlockState state,
|
||||
final EntityPlayer player, final EnumHand hand, final EnumFacing side,
|
||||
final float hitX, final float hitY, final float hitZ) {
|
||||
if (!player.isSneaking())
|
||||
player.openGui(Core.INSTANCE, EGui.CHARGEBENCH.ordinal(), world, x, y, z);
|
||||
player.openGui(Core.INSTANCE, EGui.CHARGEBENCH.ordinal(), world, pos.getX(), pos.getY(), pos.getZ());
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,8 +24,12 @@
|
|||
|
||||
package techreborn.blocks.machine;
|
||||
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import prospector.shootingstar.ShootingStar;
|
||||
import prospector.shootingstar.model.ModelCompound;
|
||||
|
@ -50,10 +54,11 @@ public class BlockChemicalReactor extends BlockMachineBase {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(final World world, final int x, final int y, final int z, final EntityPlayer player, final int side, final float hitX,
|
||||
final float hitY, final float hitZ) {
|
||||
public boolean onBlockActivated(final World world, final BlockPos pos, final IBlockState state,
|
||||
final EntityPlayer player, final EnumHand hand, final EnumFacing side,
|
||||
final float hitX, final float hitY, final float hitZ) {
|
||||
if (!player.isSneaking())
|
||||
player.openGui(Core.INSTANCE, EGui.CHEMICAL_REACTOR.ordinal(), world, x, y, z);
|
||||
player.openGui(Core.INSTANCE, EGui.CHEMICAL_REACTOR.ordinal(), world, pos.getX(), pos.getY(), pos.getZ());
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,8 +24,12 @@
|
|||
|
||||
package techreborn.blocks.machine;
|
||||
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import prospector.shootingstar.ShootingStar;
|
||||
import prospector.shootingstar.model.ModelCompound;
|
||||
|
@ -50,10 +54,11 @@ public class BlockChunkLoader extends BlockMachineBase {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(final World world, final int x, final int y, final int z, final EntityPlayer player, final int side, final float hitX,
|
||||
final float hitY, final float hitZ) {
|
||||
public boolean onBlockActivated(final World world, final BlockPos pos, final IBlockState state,
|
||||
final EntityPlayer player, final EnumHand hand, final EnumFacing side,
|
||||
final float hitX, final float hitY, final float hitZ) {
|
||||
if (!player.isSneaking())
|
||||
player.openGui(Core.INSTANCE, EGui.CHUNK_LOADER.ordinal(), world, x, y, z);
|
||||
player.openGui(Core.INSTANCE, EGui.CHUNK_LOADER.ordinal(), world, pos.getX(), pos.getY(), pos.getZ());
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,8 +24,12 @@
|
|||
|
||||
package techreborn.blocks.machine;
|
||||
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import prospector.shootingstar.ShootingStar;
|
||||
import prospector.shootingstar.model.ModelCompound;
|
||||
|
@ -50,10 +54,11 @@ public class BlockMatterFabricator extends BlockMachineBase {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(final World world, final int x, final int y, final int z, final EntityPlayer player, final int side, final float hitX,
|
||||
final float hitY, final float hitZ) {
|
||||
public boolean onBlockActivated(final World world, final BlockPos pos, final IBlockState state,
|
||||
final EntityPlayer player, final EnumHand hand, final EnumFacing side,
|
||||
final float hitX, final float hitY, final float hitZ) {
|
||||
if (!player.isSneaking())
|
||||
player.openGui(Core.INSTANCE, EGui.MATTER_FABRICATOR.ordinal(), world, x, y, z);
|
||||
player.openGui(Core.INSTANCE, EGui.MATTER_FABRICATOR.ordinal(), world, pos.getX(), pos.getY(), pos.getZ());
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -24,8 +24,12 @@
|
|||
|
||||
package techreborn.blocks.machine;
|
||||
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import prospector.shootingstar.ShootingStar;
|
||||
import prospector.shootingstar.model.ModelCompound;
|
||||
|
@ -50,10 +54,11 @@ public class BlockRollingMachine extends BlockMachineBase {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(final World world, final int x, final int y, final int z, final EntityPlayer player, final int side, final float hitX,
|
||||
final float hitY, final float hitZ) {
|
||||
public boolean onBlockActivated(final World world, final BlockPos pos, final IBlockState state,
|
||||
final EntityPlayer player, final EnumHand hand, final EnumFacing side,
|
||||
final float hitX, final float hitY, final float hitZ) {
|
||||
if (!player.isSneaking())
|
||||
player.openGui(Core.INSTANCE, EGui.ROLLING_MACHINE.ordinal(), world, x, y, z);
|
||||
player.openGui(Core.INSTANCE, EGui.ROLLING_MACHINE.ordinal(), world, pos.getX(), pos.getY(), pos.getZ());
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,10 +24,14 @@
|
|||
|
||||
package techreborn.blocks.machine;
|
||||
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.client.util.ITooltipFlag;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.text.TextFormatting;
|
||||
import net.minecraft.world.World;
|
||||
import prospector.shootingstar.ShootingStar;
|
||||
|
@ -55,10 +59,11 @@ public class BlockScrapboxinator extends BlockMachineBase {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(final World world, final int x, final int y, final int z, final EntityPlayer player, final int side, final float hitX,
|
||||
final float hitY, final float hitZ) {
|
||||
public boolean onBlockActivated(final World world, final BlockPos pos, final IBlockState state,
|
||||
final EntityPlayer player, final EnumHand hand, final EnumFacing side,
|
||||
final float hitX, final float hitY, final float hitZ) {
|
||||
if (!player.isSneaking()) {
|
||||
player.openGui(Core.INSTANCE, EGui.SCRAPBOXINATOR.ordinal(), world, x, y, z);
|
||||
player.openGui(Core.INSTANCE, EGui.SCRAPBOXINATOR.ordinal(), world, pos.getX(), pos.getY(), pos.getZ());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -66,7 +71,7 @@ public class BlockScrapboxinator extends BlockMachineBase {
|
|||
@Override
|
||||
public void addInformation(ItemStack stack, World world, List<String> tooltip, ITooltipFlag flag) {
|
||||
tooltip.add(TextFormatting.RED + "WIP Coming Soon");
|
||||
//TODO Finish Scrapboxinator and add recipe
|
||||
//Remember to remove WIP override and imports once complete
|
||||
// TODO Finish Scrapboxinator and add recipe
|
||||
// Remember to remove WIP override and imports once complete
|
||||
}
|
||||
}
|
||||
|
|
|
@ -54,15 +54,9 @@ public class BlockVacuumFreezer extends BlockMachineBase {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(final World world,
|
||||
final BlockPos pos,
|
||||
final IBlockState state,
|
||||
final EntityPlayer player,
|
||||
final EnumHand hand,
|
||||
final EnumFacing side,
|
||||
final float hitX,
|
||||
final float hitY,
|
||||
final float hitZ) {
|
||||
public boolean onBlockActivated(final World world, final BlockPos pos, final IBlockState state,
|
||||
final EntityPlayer player, final EnumHand hand, final EnumFacing side,
|
||||
final float hitX, final float hitY, final float hitZ) {
|
||||
if (!player.isSneaking()) {
|
||||
player.openGui(Core.INSTANCE, EGui.VACUUM_FREEZER.ordinal(), world, pos.getX(), pos.getY(), pos.getZ());
|
||||
return true;
|
||||
|
|
|
@ -24,8 +24,12 @@
|
|||
|
||||
package techreborn.blocks.tier1;
|
||||
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import prospector.shootingstar.ShootingStar;
|
||||
import prospector.shootingstar.model.ModelCompound;
|
||||
|
@ -50,10 +54,11 @@ public class BlockAlloySmelter extends BlockMachineBase {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(final World world, final int x, final int y, final int z, final EntityPlayer player, final int side, final float hitX,
|
||||
final float hitY, final float hitZ) {
|
||||
public boolean onBlockActivated(final World world, final BlockPos pos, final IBlockState state,
|
||||
final EntityPlayer player, final EnumHand hand, final EnumFacing side,
|
||||
final float hitX, final float hitY, final float hitZ) {
|
||||
if (!player.isSneaking())
|
||||
player.openGui(Core.INSTANCE, EGui.ALLOY_SMELTER.ordinal(), world, x, y, z);
|
||||
player.openGui(Core.INSTANCE, EGui.ALLOY_SMELTER.ordinal(), world, pos.getX(), pos.getY(), pos.getZ());
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,8 +24,12 @@
|
|||
|
||||
package techreborn.blocks.tier1;
|
||||
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import prospector.shootingstar.ShootingStar;
|
||||
import prospector.shootingstar.model.ModelCompound;
|
||||
|
@ -50,10 +54,11 @@ public class BlockCompressor extends BlockMachineBase {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(final World world, final int x, final int y, final int z, final EntityPlayer player, final int side, final float hitX,
|
||||
final float hitY, final float hitZ) {
|
||||
public boolean onBlockActivated(final World world, final BlockPos pos, final IBlockState state,
|
||||
final EntityPlayer player, final EnumHand hand, final EnumFacing side,
|
||||
final float hitX, final float hitY, final float hitZ) {
|
||||
if (!player.isSneaking()) {
|
||||
player.openGui(Core.INSTANCE, EGui.COMPRESSOR.ordinal(), world, x, y, z);
|
||||
player.openGui(Core.INSTANCE, EGui.COMPRESSOR.ordinal(), world, pos.getX(), pos.getY(), pos.getZ());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -24,8 +24,12 @@
|
|||
|
||||
package techreborn.blocks.tier1;
|
||||
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import prospector.shootingstar.ShootingStar;
|
||||
import prospector.shootingstar.model.ModelCompound;
|
||||
|
@ -50,10 +54,11 @@ public class BlockElectricFurnace extends BlockMachineBase {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(final World world, final int x, final int y, final int z, final EntityPlayer player, final int side, final float hitX,
|
||||
final float hitY, final float hitZ) {
|
||||
public boolean onBlockActivated(final World world, final BlockPos pos, final IBlockState state,
|
||||
final EntityPlayer player, final EnumHand hand, final EnumFacing side,
|
||||
final float hitX, final float hitY, final float hitZ) {
|
||||
if (!player.isSneaking()) {
|
||||
player.openGui(Core.INSTANCE, EGui.ELECTRIC_FURNACE.ordinal(), world, x, y, z);
|
||||
player.openGui(Core.INSTANCE, EGui.ELECTRIC_FURNACE.ordinal(), world, pos.getX(), pos.getY(), pos.getZ());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -24,8 +24,12 @@
|
|||
|
||||
package techreborn.blocks.tier1;
|
||||
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import prospector.shootingstar.ShootingStar;
|
||||
import prospector.shootingstar.model.ModelCompound;
|
||||
|
@ -50,10 +54,11 @@ public class BlockExtractor extends BlockMachineBase {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(final World world, final int x, final int y, final int z, final EntityPlayer player, final int side, final float hitX,
|
||||
final float hitY, final float hitZ) {
|
||||
public boolean onBlockActivated(final World world, final BlockPos pos, final IBlockState state,
|
||||
final EntityPlayer player, final EnumHand hand, final EnumFacing side,
|
||||
final float hitX, final float hitY, final float hitZ) {
|
||||
if (!player.isSneaking()) {
|
||||
player.openGui(Core.INSTANCE, EGui.EXTRACTOR.ordinal(), world, x, y, z);
|
||||
player.openGui(Core.INSTANCE, EGui.EXTRACTOR.ordinal(), world, pos.getX(), pos.getY(), pos.getZ());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -24,8 +24,12 @@
|
|||
|
||||
package techreborn.blocks.tier1;
|
||||
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import prospector.shootingstar.ShootingStar;
|
||||
import prospector.shootingstar.model.ModelCompound;
|
||||
|
@ -50,10 +54,11 @@ public class BlockGrinder extends BlockMachineBase {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(final World world, final int x, final int y, final int z, final EntityPlayer player, final int side, final float hitX,
|
||||
final float hitY, final float hitZ) {
|
||||
public boolean onBlockActivated(final World world, final BlockPos pos, final IBlockState state,
|
||||
final EntityPlayer player, final EnumHand hand, final EnumFacing side,
|
||||
final float hitX, final float hitY, final float hitZ) {
|
||||
if (!player.isSneaking()) {
|
||||
player.openGui(Core.INSTANCE, EGui.GRINDER.ordinal(), world, x, y, z);
|
||||
player.openGui(Core.INSTANCE, EGui.GRINDER.ordinal(), world, pos.getX(), pos.getY(), pos.getZ());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -24,8 +24,12 @@
|
|||
|
||||
package techreborn.blocks.tier1;
|
||||
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import prospector.shootingstar.ShootingStar;
|
||||
import prospector.shootingstar.model.ModelCompound;
|
||||
|
@ -50,10 +54,11 @@ public class BlockRecycler extends BlockMachineBase {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(final World world, final int x, final int y, final int z, final EntityPlayer player, final int side, final float hitX,
|
||||
final float hitY, final float hitZ) {
|
||||
public boolean onBlockActivated(final World world, final BlockPos pos, final IBlockState state,
|
||||
final EntityPlayer player, final EnumHand hand, final EnumFacing side,
|
||||
final float hitX, final float hitY, final float hitZ) {
|
||||
if (!player.isSneaking()) {
|
||||
player.openGui(Core.INSTANCE, EGui.RECYCLER.ordinal(), world, x, y, z);
|
||||
player.openGui(Core.INSTANCE, EGui.RECYCLER.ordinal(), world, pos.getX(), pos.getY(), pos.getZ());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue