Slight rework of the gui system, should fix some issues with wrenching. Should fix #1264 fixes #988 + a handful of weird gui de-syncs
This commit is contained in:
parent
8588a40474
commit
094b67e050
44 changed files with 183 additions and 229 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -24,3 +24,4 @@ changelog.txt
|
|||
java_pid2412.hprof
|
||||
/asmTemp/
|
||||
/logs/
|
||||
/classes/
|
||||
|
|
|
@ -34,6 +34,7 @@ import net.minecraft.util.math.BlockPos;
|
|||
import net.minecraft.world.World;
|
||||
import prospector.shootingstar.ShootingStar;
|
||||
import prospector.shootingstar.model.ModelCompound;
|
||||
import reborncore.api.tile.IMachineGuiHandler;
|
||||
import reborncore.common.blocks.BlockMachineBase;
|
||||
import techreborn.Core;
|
||||
import techreborn.client.EGui;
|
||||
|
@ -71,12 +72,7 @@ public class BlockAutoCraftingTable 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) {
|
||||
if (!player.isSneaking()) {
|
||||
player.openGui( Core.INSTANCE, EGui.AUTO_CRAFTING_TABLE.ordinal(), world, pos.getX(), pos.getY(),pos.getZ());
|
||||
}
|
||||
return true;
|
||||
public IMachineGuiHandler getGui() {
|
||||
return EGui.AUTO_CRAFTING_TABLE;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -31,6 +31,7 @@ import net.minecraft.util.EnumFacing;
|
|||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import reborncore.api.tile.IMachineGuiHandler;
|
||||
import reborncore.common.blocks.BlockMachineBase;
|
||||
import techreborn.Core;
|
||||
import techreborn.client.EGui;
|
||||
|
@ -45,11 +46,7 @@ public class BlockComputerCube 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) {
|
||||
if (!player.isSneaking())
|
||||
player.openGui(Core.INSTANCE, EGui.MANUAL.ordinal(), world, pos.getX(), pos.getY(), pos.getZ());
|
||||
return true;
|
||||
public IMachineGuiHandler getGui() {
|
||||
return EGui.MANUAL;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -39,6 +39,7 @@ import net.minecraft.world.World;
|
|||
import net.minecraftforge.fluids.BlockFluidBase;
|
||||
import prospector.shootingstar.ShootingStar;
|
||||
import prospector.shootingstar.model.ModelCompound;
|
||||
import reborncore.api.tile.IMachineGuiHandler;
|
||||
import reborncore.common.blocks.BlockMachineBase;
|
||||
import techreborn.Core;
|
||||
import techreborn.client.EGui;
|
||||
|
@ -123,11 +124,7 @@ public class BlockDigitalChest 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) {
|
||||
if (!player.isSneaking())
|
||||
player.openGui(Core.INSTANCE, EGui.DIGITAL_CHEST.ordinal(), world, pos.getX(), pos.getY(), pos.getZ());
|
||||
return true;
|
||||
public IMachineGuiHandler getGui() {
|
||||
return EGui.DIGITAL_CHEST;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,6 +34,7 @@ import net.minecraft.util.math.BlockPos;
|
|||
import net.minecraft.world.World;
|
||||
import prospector.shootingstar.ShootingStar;
|
||||
import prospector.shootingstar.model.ModelCompound;
|
||||
import reborncore.api.tile.IMachineGuiHandler;
|
||||
import reborncore.common.blocks.BlockMachineBase;
|
||||
import techreborn.Core;
|
||||
import techreborn.client.EGui;
|
||||
|
@ -56,9 +57,12 @@ public class BlockFusionControlComputer extends BlockMachineBase {
|
|||
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, pos.getX(), pos.getY(), pos.getZ());
|
||||
return true;
|
||||
return super.onBlockActivated(world, pos, state, player, hand, side, hitX, hitY, hitZ);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IMachineGuiHandler getGui() {
|
||||
return EGui.FUSION_CONTROLLER;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -47,11 +47,13 @@ import net.minecraftforge.fml.relauncher.Side;
|
|||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import prospector.shootingstar.ShootingStar;
|
||||
import prospector.shootingstar.model.ModelCompound;
|
||||
import reborncore.api.tile.IMachineGuiHandler;
|
||||
import reborncore.common.blocks.BlockMachineBase;
|
||||
import reborncore.common.blocks.PropertyString;
|
||||
import reborncore.common.util.ArrayUtils;
|
||||
import reborncore.common.util.ChatUtils;
|
||||
import reborncore.common.util.StringUtils;
|
||||
import techreborn.client.EGui;
|
||||
import techreborn.client.TechRebornCreativeTab;
|
||||
import techreborn.init.ModBlocks;
|
||||
import techreborn.lib.MessageIDs;
|
||||
|
@ -179,4 +181,9 @@ public class BlockPlayerDetector extends BlockMachineBase {
|
|||
public int getMetaFromState(IBlockState state) {
|
||||
return typeNamesList.indexOf(state.getValue(TYPE));
|
||||
}
|
||||
|
||||
@Override
|
||||
public IMachineGuiHandler getGui() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -39,6 +39,7 @@ import net.minecraft.world.World;
|
|||
import net.minecraftforge.fluids.BlockFluidBase;
|
||||
import prospector.shootingstar.ShootingStar;
|
||||
import prospector.shootingstar.model.ModelCompound;
|
||||
import reborncore.api.tile.IMachineGuiHandler;
|
||||
import reborncore.common.blocks.BlockMachineBase;
|
||||
import techreborn.Core;
|
||||
import techreborn.client.EGui;
|
||||
|
@ -124,10 +125,7 @@ public class BlockQuantumChest extends BlockMachineBase {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(final World worldIn, final BlockPos pos, final IBlockState state, final EntityPlayer playerIn,
|
||||
final EnumHand hand, final EnumFacing side, final float hitX, final float hitY, final float hitZ) {
|
||||
if (!playerIn.isSneaking())
|
||||
playerIn.openGui(Core.INSTANCE, EGui.QUANTUM_CHEST.ordinal(), worldIn, pos.getX(), pos.getY(), pos.getZ());
|
||||
return true;
|
||||
public IMachineGuiHandler getGui() {
|
||||
return EGui.QUANTUM_CHEST;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,6 +33,7 @@ import net.minecraft.util.math.BlockPos;
|
|||
import net.minecraft.world.World;
|
||||
import prospector.shootingstar.ShootingStar;
|
||||
import prospector.shootingstar.model.ModelCompound;
|
||||
import reborncore.api.tile.IMachineGuiHandler;
|
||||
import reborncore.common.blocks.BlockMachineBase;
|
||||
import techreborn.Core;
|
||||
import techreborn.client.EGui;
|
||||
|
@ -55,15 +56,7 @@ public class BlockQuantumTank 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) {
|
||||
if (this.fillBlockWithFluid(world, pos, player)) {
|
||||
return true;
|
||||
}
|
||||
if (!player.isSneaking()) {
|
||||
player.openGui(Core.INSTANCE, EGui.QUANTUM_TANK.ordinal(), world, pos.getX(), pos.getY(), pos.getZ());
|
||||
}
|
||||
return true;
|
||||
public IMachineGuiHandler getGui() {
|
||||
return EGui.QUANTUM_TANK;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -31,7 +31,9 @@ import net.minecraft.client.util.ITooltipFlag;
|
|||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.text.TextFormatting;
|
||||
import net.minecraft.world.World;
|
||||
import reborncore.api.tile.IMachineGuiHandler;
|
||||
import reborncore.common.blocks.BlockMachineBase;
|
||||
import techreborn.client.EGui;
|
||||
import techreborn.client.TechRebornCreativeTab;
|
||||
|
||||
public class BlockSupercondensator extends BlockMachineBase {
|
||||
|
@ -47,4 +49,9 @@ public class BlockSupercondensator extends BlockMachineBase {
|
|||
// TODO
|
||||
// Remember to remove WIP override and imports once complete
|
||||
}
|
||||
|
||||
@Override
|
||||
public IMachineGuiHandler getGui() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,7 +26,9 @@ package techreborn.blocks.advanced_machine;
|
|||
|
||||
import prospector.shootingstar.ShootingStar;
|
||||
import prospector.shootingstar.model.ModelCompound;
|
||||
import reborncore.api.tile.IMachineGuiHandler;
|
||||
import reborncore.common.blocks.BlockMachineBase;
|
||||
import techreborn.client.EGui;
|
||||
import techreborn.client.TechRebornCreativeTab;
|
||||
import techreborn.lib.ModInfo;
|
||||
|
||||
|
@ -37,4 +39,9 @@ public class BlockDistillationTower extends BlockMachineBase {
|
|||
setCreativeTab(TechRebornCreativeTab.instance);
|
||||
ShootingStar.registerModel(new ModelCompound(ModInfo.MOD_ID, this, "machines/tier2_machines"));
|
||||
}
|
||||
|
||||
@Override
|
||||
public IMachineGuiHandler getGui() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,6 +33,7 @@ import net.minecraft.util.math.BlockPos;
|
|||
import net.minecraft.world.World;
|
||||
import prospector.shootingstar.ShootingStar;
|
||||
import prospector.shootingstar.model.ModelCompound;
|
||||
import reborncore.api.tile.IMachineGuiHandler;
|
||||
import reborncore.common.blocks.BlockMachineBase;
|
||||
import techreborn.Core;
|
||||
import techreborn.client.EGui;
|
||||
|
@ -54,11 +55,7 @@ public class BlockImplosionCompressor 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) {
|
||||
if (!player.isSneaking())
|
||||
player.openGui( Core.INSTANCE, EGui.IMPLOSION_COMPRESSOR.ordinal(), world, pos.getX(), pos.getY(), pos.getZ());
|
||||
return true;
|
||||
public IMachineGuiHandler getGui() {
|
||||
return EGui.IMPLOSION_COMPRESSOR;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,6 +33,7 @@ import net.minecraft.util.math.BlockPos;
|
|||
import net.minecraft.world.World;
|
||||
import prospector.shootingstar.ShootingStar;
|
||||
import prospector.shootingstar.model.ModelCompound;
|
||||
import reborncore.api.tile.IMachineGuiHandler;
|
||||
import reborncore.common.blocks.BlockMachineBase;
|
||||
import techreborn.Core;
|
||||
import techreborn.client.EGui;
|
||||
|
@ -54,12 +55,8 @@ public class BlockIndustrialBlastFurnace 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) {
|
||||
if (!player.isSneaking())
|
||||
player.openGui(Core.INSTANCE, EGui.BLAST_FURNACE.ordinal(), world, pos.getX(), pos.getY(), pos.getZ());
|
||||
return true;
|
||||
public IMachineGuiHandler getGui() {
|
||||
return EGui.BLAST_FURNACE;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -33,6 +33,7 @@ import net.minecraft.util.math.BlockPos;
|
|||
import net.minecraft.world.World;
|
||||
import prospector.shootingstar.ShootingStar;
|
||||
import prospector.shootingstar.model.ModelCompound;
|
||||
import reborncore.api.tile.IMachineGuiHandler;
|
||||
import reborncore.common.blocks.BlockMachineBase;
|
||||
import techreborn.Core;
|
||||
import techreborn.client.EGui;
|
||||
|
@ -54,12 +55,7 @@ public class BlockIndustrialCentrifuge 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) {
|
||||
if (!player.isSneaking()) {
|
||||
player.openGui(Core.INSTANCE, EGui.CENTRIFUGE.ordinal(), world, pos.getX(), pos.getY(), pos.getZ());
|
||||
}
|
||||
return true;
|
||||
public IMachineGuiHandler getGui() {
|
||||
return EGui.CENTRIFUGE;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,6 +33,7 @@ import net.minecraft.util.math.BlockPos;
|
|||
import net.minecraft.world.World;
|
||||
import prospector.shootingstar.ShootingStar;
|
||||
import prospector.shootingstar.model.ModelCompound;
|
||||
import reborncore.api.tile.IMachineGuiHandler;
|
||||
import reborncore.common.blocks.BlockMachineBase;
|
||||
import techreborn.Core;
|
||||
import techreborn.client.EGui;
|
||||
|
@ -54,11 +55,7 @@ public class BlockIndustrialElectrolyzer 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) {
|
||||
if (!player.isSneaking())
|
||||
player.openGui( Core.INSTANCE, EGui.INDUSTRIAL_ELECTROLYZER.ordinal(), world, pos.getX(), pos.getY(),pos.getZ());
|
||||
return true;
|
||||
public IMachineGuiHandler getGui() {
|
||||
return EGui.INDUSTRIAL_ELECTROLYZER;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,6 +33,7 @@ import net.minecraft.util.math.BlockPos;
|
|||
import net.minecraft.world.World;
|
||||
import prospector.shootingstar.ShootingStar;
|
||||
import prospector.shootingstar.model.ModelCompound;
|
||||
import reborncore.api.tile.IMachineGuiHandler;
|
||||
import reborncore.common.blocks.BlockMachineBase;
|
||||
import techreborn.Core;
|
||||
import techreborn.client.EGui;
|
||||
|
@ -54,14 +55,7 @@ public class BlockIndustrialGrinder 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) {
|
||||
if (this.fillBlockWithFluid(world, pos, player)) {
|
||||
return true;
|
||||
}
|
||||
if (!player.isSneaking())
|
||||
player.openGui(Core.INSTANCE, EGui.INDUSTRIAL_GRINDER.ordinal(), world, pos.getX(), pos.getY(), pos.getZ());
|
||||
return true;
|
||||
public IMachineGuiHandler getGui() {
|
||||
return EGui.INDUSTRIAL_GRINDER;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,6 +33,7 @@ import net.minecraft.util.math.BlockPos;
|
|||
import net.minecraft.world.World;
|
||||
import prospector.shootingstar.ShootingStar;
|
||||
import prospector.shootingstar.model.ModelCompound;
|
||||
import reborncore.api.tile.IMachineGuiHandler;
|
||||
import reborncore.common.blocks.BlockMachineBase;
|
||||
import techreborn.Core;
|
||||
import techreborn.client.EGui;
|
||||
|
@ -54,14 +55,7 @@ public class BlockIndustrialSawmill 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) {
|
||||
if (this.fillBlockWithFluid(world, pos, player)) {
|
||||
return true;
|
||||
}
|
||||
if (!player.isSneaking())
|
||||
player.openGui(Core.INSTANCE, EGui.SAWMILL.ordinal(), world, pos.getX(), pos.getY(), pos.getZ());
|
||||
return true;
|
||||
public IMachineGuiHandler getGui() {
|
||||
return EGui.SAWMILL;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,6 +33,7 @@ import net.minecraft.util.math.BlockPos;
|
|||
import net.minecraft.world.World;
|
||||
import prospector.shootingstar.ShootingStar;
|
||||
import prospector.shootingstar.model.ModelCompound;
|
||||
import reborncore.api.tile.IMachineGuiHandler;
|
||||
import reborncore.common.blocks.BlockMachineBase;
|
||||
import techreborn.Core;
|
||||
import techreborn.client.EGui;
|
||||
|
@ -60,15 +61,7 @@ public class BlockDieselGenerator 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) {
|
||||
if (this.fillBlockWithFluid(world, pos, player)) {
|
||||
return true;
|
||||
}
|
||||
if (!player.isSneaking()) {
|
||||
player.openGui(Core.INSTANCE, EGui.DIESEL_GENERATOR.ordinal(), world, pos.getX(), pos.getY(), pos.getZ());
|
||||
}
|
||||
return true;
|
||||
public IMachineGuiHandler getGui() {
|
||||
return EGui.DIESEL_GENERATOR;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -31,7 +31,9 @@ import net.minecraft.util.text.TextFormatting;
|
|||
import net.minecraft.world.World;
|
||||
import prospector.shootingstar.ShootingStar;
|
||||
import prospector.shootingstar.model.ModelCompound;
|
||||
import reborncore.api.tile.IMachineGuiHandler;
|
||||
import reborncore.common.blocks.BlockMachineBase;
|
||||
import techreborn.client.EGui;
|
||||
import techreborn.client.TechRebornCreativeTab;
|
||||
import techreborn.lib.ModInfo;
|
||||
import techreborn.tiles.generator.TileDragonEggSyphon;
|
||||
|
@ -58,4 +60,9 @@ public class BlockDragonEggSyphon extends BlockMachineBase {
|
|||
//Remember to remove WIP override and imports once complete
|
||||
}
|
||||
|
||||
@Override
|
||||
public IMachineGuiHandler getGui() {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -33,6 +33,7 @@ import net.minecraft.util.math.BlockPos;
|
|||
import net.minecraft.world.World;
|
||||
import prospector.shootingstar.ShootingStar;
|
||||
import prospector.shootingstar.model.ModelCompound;
|
||||
import reborncore.api.tile.IMachineGuiHandler;
|
||||
import reborncore.common.blocks.BlockMachineBase;
|
||||
import techreborn.Core;
|
||||
import techreborn.client.EGui;
|
||||
|
@ -54,15 +55,8 @@ public class BlockGasTurbine 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) {
|
||||
if (this.fillBlockWithFluid(world, pos, player)) {
|
||||
return true;
|
||||
}
|
||||
if (!player.isSneaking())
|
||||
player.openGui(Core.INSTANCE, EGui.GAS_TURBINE.ordinal(), world, pos.getX(), pos.getY(), pos.getZ());
|
||||
return true;
|
||||
public IMachineGuiHandler getGui() {
|
||||
return EGui.GAS_TURBINE;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -28,7 +28,9 @@ import net.minecraft.tileentity.TileEntity;
|
|||
import net.minecraft.world.World;
|
||||
import prospector.shootingstar.ShootingStar;
|
||||
import prospector.shootingstar.model.ModelCompound;
|
||||
import reborncore.api.tile.IMachineGuiHandler;
|
||||
import reborncore.common.blocks.BlockMachineBase;
|
||||
import techreborn.client.EGui;
|
||||
import techreborn.client.TechRebornCreativeTab;
|
||||
import techreborn.lib.ModInfo;
|
||||
import techreborn.tiles.generator.TileLightningRod;
|
||||
|
@ -46,4 +48,9 @@ public class BlockLightningRod extends BlockMachineBase {
|
|||
return new TileLightningRod();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public IMachineGuiHandler getGui() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,7 +32,9 @@ import net.minecraft.util.text.TextFormatting;
|
|||
import net.minecraft.world.World;
|
||||
import prospector.shootingstar.ShootingStar;
|
||||
import prospector.shootingstar.model.ModelCompound;
|
||||
import reborncore.api.tile.IMachineGuiHandler;
|
||||
import reborncore.common.blocks.BlockMachineBase;
|
||||
import techreborn.client.EGui;
|
||||
import techreborn.client.TechRebornCreativeTab;
|
||||
import techreborn.lib.ModInfo;
|
||||
|
||||
|
@ -51,4 +53,9 @@ public class BlockMagicEnergyAbsorber extends BlockMachineBase {
|
|||
// Remember to remove WIP override and imports once complete
|
||||
}
|
||||
|
||||
@Override
|
||||
public IMachineGuiHandler getGui() {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -32,7 +32,9 @@ import net.minecraft.util.text.TextFormatting;
|
|||
import net.minecraft.world.World;
|
||||
import prospector.shootingstar.ShootingStar;
|
||||
import prospector.shootingstar.model.ModelCompound;
|
||||
import reborncore.api.tile.IMachineGuiHandler;
|
||||
import reborncore.common.blocks.BlockMachineBase;
|
||||
import techreborn.client.EGui;
|
||||
import techreborn.client.TechRebornCreativeTab;
|
||||
import techreborn.lib.ModInfo;
|
||||
|
||||
|
@ -50,4 +52,9 @@ public class BlockMagicEnergyConverter extends BlockMachineBase {
|
|||
//TODO
|
||||
//Remember to remove WIP override and imports once complete
|
||||
}
|
||||
|
||||
@Override
|
||||
public IMachineGuiHandler getGui() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -31,7 +31,9 @@ import net.minecraft.client.util.ITooltipFlag;
|
|||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.text.TextFormatting;
|
||||
import net.minecraft.world.World;
|
||||
import reborncore.api.tile.IMachineGuiHandler;
|
||||
import reborncore.common.blocks.BlockMachineBase;
|
||||
import techreborn.client.EGui;
|
||||
import techreborn.client.TechRebornCreativeTab;
|
||||
|
||||
public class BlockPlasmaGenerator extends BlockMachineBase {
|
||||
|
@ -48,4 +50,9 @@ public class BlockPlasmaGenerator extends BlockMachineBase {
|
|||
// TODO
|
||||
// Remember to remove WIP override and imports once complete
|
||||
}
|
||||
|
||||
@Override
|
||||
public IMachineGuiHandler getGui() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,6 +33,7 @@ import net.minecraft.util.math.BlockPos;
|
|||
import net.minecraft.world.World;
|
||||
import prospector.shootingstar.ShootingStar;
|
||||
import prospector.shootingstar.model.ModelCompound;
|
||||
import reborncore.api.tile.IMachineGuiHandler;
|
||||
import reborncore.common.blocks.BlockMachineBase;
|
||||
import techreborn.Core;
|
||||
import techreborn.client.EGui;
|
||||
|
@ -54,14 +55,7 @@ public class BlockSemiFluidGenerator 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) {
|
||||
if (this.fillBlockWithFluid(world, pos, player)) {
|
||||
return true;
|
||||
}
|
||||
if (!player.isSneaking())
|
||||
player.openGui( Core.INSTANCE, EGui.SEMIFLUID_GENERATOR.ordinal(), world, pos.getX(), pos.getY(), pos.getZ());
|
||||
return true;
|
||||
public IMachineGuiHandler getGui() {
|
||||
return EGui.SEMIFLUID_GENERATOR;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,6 +33,7 @@ import net.minecraft.util.math.BlockPos;
|
|||
import net.minecraft.world.World;
|
||||
import prospector.shootingstar.ShootingStar;
|
||||
import prospector.shootingstar.model.ModelCompound;
|
||||
import reborncore.api.tile.IMachineGuiHandler;
|
||||
import reborncore.common.blocks.BlockMachineBase;
|
||||
import techreborn.Core;
|
||||
import techreborn.client.EGui;
|
||||
|
@ -54,12 +55,7 @@ public class BlockSolidFuelGenerator 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) {
|
||||
if (!player.isSneaking()) {
|
||||
player.openGui(Core.INSTANCE, EGui.GENERATOR.ordinal(), world, pos.getX(), pos.getY(), pos.getZ());
|
||||
}
|
||||
return true;
|
||||
public IMachineGuiHandler getGui() {
|
||||
return EGui.GENERATOR;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,6 +33,7 @@ import net.minecraft.util.math.BlockPos;
|
|||
import net.minecraft.world.World;
|
||||
import prospector.shootingstar.ShootingStar;
|
||||
import prospector.shootingstar.model.ModelCompound;
|
||||
import reborncore.api.tile.IMachineGuiHandler;
|
||||
import reborncore.common.blocks.BlockMachineBase;
|
||||
import techreborn.Core;
|
||||
import techreborn.client.EGui;
|
||||
|
@ -54,14 +55,7 @@ public class BlockThermalGenerator 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) {
|
||||
if (this.fillBlockWithFluid(world, pos, player)) {
|
||||
return true;
|
||||
}
|
||||
if (!player.isSneaking())
|
||||
player.openGui(Core.INSTANCE, EGui.THERMAL_GENERATOR.ordinal(), world, pos.getX(), pos.getY(), pos.getZ());
|
||||
return true;
|
||||
public IMachineGuiHandler getGui() {
|
||||
return EGui.THERMAL_GENERATOR;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,7 +28,9 @@ import net.minecraft.tileentity.TileEntity;
|
|||
import net.minecraft.world.World;
|
||||
import prospector.shootingstar.ShootingStar;
|
||||
import prospector.shootingstar.model.ModelCompound;
|
||||
import reborncore.api.tile.IMachineGuiHandler;
|
||||
import reborncore.common.blocks.BlockMachineBase;
|
||||
import techreborn.client.EGui;
|
||||
import techreborn.client.TechRebornCreativeTab;
|
||||
import techreborn.lib.ModInfo;
|
||||
import techreborn.tiles.generator.TileWindMill;
|
||||
|
@ -50,4 +52,9 @@ public class BlockWindMill extends BlockMachineBase {
|
|||
return new TileWindMill();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public IMachineGuiHandler getGui() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -35,6 +35,7 @@ import net.minecraft.world.IBlockAccess;
|
|||
import net.minecraft.world.World;
|
||||
import prospector.shootingstar.ShootingStar;
|
||||
import prospector.shootingstar.model.ModelCompound;
|
||||
import reborncore.api.tile.IMachineGuiHandler;
|
||||
import reborncore.common.blocks.BlockMachineBase;
|
||||
import techreborn.Core;
|
||||
import techreborn.client.EGui;
|
||||
|
@ -59,12 +60,8 @@ public class BlockIronAlloyFurnace 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) {
|
||||
if (!player.isSneaking())
|
||||
player.openGui(Core.INSTANCE, EGui.ALLOY_FURNACE.ordinal(), world, pos.getX(), pos.getY(), pos.getZ());
|
||||
return true;
|
||||
public IMachineGuiHandler getGui() {
|
||||
return EGui.ALLOY_FURNACE;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -38,6 +38,7 @@ import net.minecraftforge.fml.relauncher.Side;
|
|||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import prospector.shootingstar.ShootingStar;
|
||||
import prospector.shootingstar.model.ModelCompound;
|
||||
import reborncore.api.tile.IMachineGuiHandler;
|
||||
import reborncore.common.blocks.BlockMachineBase;
|
||||
import techreborn.Core;
|
||||
import techreborn.client.EGui;
|
||||
|
@ -63,12 +64,8 @@ public class BlockIronFurnace 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) {
|
||||
if (!player.isSneaking())
|
||||
player.openGui(Core.INSTANCE, EGui.IRON_FURNACE.ordinal(), world, pos.getX(), pos.getY(), pos.getZ());
|
||||
return true;
|
||||
public IMachineGuiHandler getGui() {
|
||||
return EGui.IRON_FURNACE;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -33,6 +33,7 @@ import net.minecraft.util.math.BlockPos;
|
|||
import net.minecraft.world.World;
|
||||
import prospector.shootingstar.ShootingStar;
|
||||
import prospector.shootingstar.model.ModelCompound;
|
||||
import reborncore.api.tile.IMachineGuiHandler;
|
||||
import reborncore.common.blocks.BlockMachineBase;
|
||||
import techreborn.Core;
|
||||
import techreborn.client.EGui;
|
||||
|
@ -54,11 +55,7 @@ public class BlockAssemblingMachine 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) {
|
||||
if (!player.isSneaking())
|
||||
player.openGui(Core.INSTANCE, EGui.ASSEMBLING_MACHINE.ordinal(), world, pos.getX(), pos.getY(), pos.getZ());
|
||||
return true;
|
||||
public IMachineGuiHandler getGui() {
|
||||
return EGui.ASSEMBLING_MACHINE;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,6 +33,7 @@ import net.minecraft.util.math.BlockPos;
|
|||
import net.minecraft.world.World;
|
||||
import prospector.shootingstar.ShootingStar;
|
||||
import prospector.shootingstar.model.ModelCompound;
|
||||
import reborncore.api.tile.IMachineGuiHandler;
|
||||
import reborncore.common.blocks.BlockMachineBase;
|
||||
import techreborn.Core;
|
||||
import techreborn.client.EGui;
|
||||
|
@ -54,11 +55,7 @@ public class BlockChargeOMat 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) {
|
||||
if (!player.isSneaking())
|
||||
player.openGui(Core.INSTANCE, EGui.CHARGEBENCH.ordinal(), world, pos.getX(), pos.getY(), pos.getZ());
|
||||
return true;
|
||||
public IMachineGuiHandler getGui() {
|
||||
return EGui.CHARGEBENCH;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,6 +33,7 @@ import net.minecraft.util.math.BlockPos;
|
|||
import net.minecraft.world.World;
|
||||
import prospector.shootingstar.ShootingStar;
|
||||
import prospector.shootingstar.model.ModelCompound;
|
||||
import reborncore.api.tile.IMachineGuiHandler;
|
||||
import reborncore.common.blocks.BlockMachineBase;
|
||||
import techreborn.Core;
|
||||
import techreborn.client.EGui;
|
||||
|
@ -54,11 +55,7 @@ public class BlockChemicalReactor 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) {
|
||||
if (!player.isSneaking())
|
||||
player.openGui(Core.INSTANCE, EGui.CHEMICAL_REACTOR.ordinal(), world, pos.getX(), pos.getY(), pos.getZ());
|
||||
return true;
|
||||
public IMachineGuiHandler getGui() {
|
||||
return EGui.CHEMICAL_REACTOR;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,6 +33,7 @@ import net.minecraft.util.math.BlockPos;
|
|||
import net.minecraft.world.World;
|
||||
import prospector.shootingstar.ShootingStar;
|
||||
import prospector.shootingstar.model.ModelCompound;
|
||||
import reborncore.api.tile.IMachineGuiHandler;
|
||||
import reborncore.common.blocks.BlockMachineBase;
|
||||
import techreborn.Core;
|
||||
import techreborn.client.EGui;
|
||||
|
@ -54,11 +55,7 @@ public class BlockChunkLoader 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) {
|
||||
if (!player.isSneaking())
|
||||
player.openGui(Core.INSTANCE, EGui.CHUNK_LOADER.ordinal(), world, pos.getX(), pos.getY(), pos.getZ());
|
||||
return true;
|
||||
public IMachineGuiHandler getGui() {
|
||||
return EGui.CHUNK_LOADER;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,6 +33,7 @@ import net.minecraft.util.math.BlockPos;
|
|||
import net.minecraft.world.World;
|
||||
import prospector.shootingstar.ShootingStar;
|
||||
import prospector.shootingstar.model.ModelCompound;
|
||||
import reborncore.api.tile.IMachineGuiHandler;
|
||||
import reborncore.common.blocks.BlockMachineBase;
|
||||
import techreborn.Core;
|
||||
import techreborn.client.EGui;
|
||||
|
@ -54,12 +55,8 @@ public class BlockMatterFabricator 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) {
|
||||
if (!player.isSneaking())
|
||||
player.openGui(Core.INSTANCE, EGui.MATTER_FABRICATOR.ordinal(), world, pos.getX(), pos.getY(), pos.getZ());
|
||||
return true;
|
||||
public IMachineGuiHandler getGui() {
|
||||
return EGui.MATTER_FABRICATOR;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -33,6 +33,7 @@ import net.minecraft.util.math.BlockPos;
|
|||
import net.minecraft.world.World;
|
||||
import prospector.shootingstar.ShootingStar;
|
||||
import prospector.shootingstar.model.ModelCompound;
|
||||
import reborncore.api.tile.IMachineGuiHandler;
|
||||
import reborncore.common.blocks.BlockMachineBase;
|
||||
import techreborn.Core;
|
||||
import techreborn.client.EGui;
|
||||
|
@ -54,11 +55,7 @@ public class BlockRollingMachine 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) {
|
||||
if (!player.isSneaking())
|
||||
player.openGui(Core.INSTANCE, EGui.ROLLING_MACHINE.ordinal(), world, pos.getX(), pos.getY(), pos.getZ());
|
||||
return true;
|
||||
public IMachineGuiHandler getGui() {
|
||||
return EGui.ROLLING_MACHINE;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -36,6 +36,7 @@ import net.minecraft.util.text.TextFormatting;
|
|||
import net.minecraft.world.World;
|
||||
import prospector.shootingstar.ShootingStar;
|
||||
import prospector.shootingstar.model.ModelCompound;
|
||||
import reborncore.api.tile.IMachineGuiHandler;
|
||||
import reborncore.common.blocks.BlockMachineBase;
|
||||
import techreborn.Core;
|
||||
import techreborn.client.EGui;
|
||||
|
@ -59,13 +60,8 @@ public class BlockScrapboxinator 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) {
|
||||
if (!player.isSneaking()) {
|
||||
player.openGui(Core.INSTANCE, EGui.SCRAPBOXINATOR.ordinal(), world, pos.getX(), pos.getY(), pos.getZ());
|
||||
}
|
||||
return true;
|
||||
public IMachineGuiHandler getGui() {
|
||||
return EGui.SCRAPBOXINATOR;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -33,6 +33,7 @@ import net.minecraft.util.math.BlockPos;
|
|||
import net.minecraft.world.World;
|
||||
import prospector.shootingstar.ShootingStar;
|
||||
import prospector.shootingstar.model.ModelCompound;
|
||||
import reborncore.api.tile.IMachineGuiHandler;
|
||||
import reborncore.common.blocks.BlockMachineBase;
|
||||
import techreborn.Core;
|
||||
import techreborn.client.EGui;
|
||||
|
@ -54,13 +55,7 @@ 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) {
|
||||
if (!player.isSneaking()) {
|
||||
player.openGui(Core.INSTANCE, EGui.VACUUM_FREEZER.ordinal(), world, pos.getX(), pos.getY(), pos.getZ());
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
public IMachineGuiHandler getGui() {
|
||||
return EGui.VACUUM_FREEZER;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,6 +33,7 @@ import net.minecraft.util.math.BlockPos;
|
|||
import net.minecraft.world.World;
|
||||
import prospector.shootingstar.ShootingStar;
|
||||
import prospector.shootingstar.model.ModelCompound;
|
||||
import reborncore.api.tile.IMachineGuiHandler;
|
||||
import reborncore.common.blocks.BlockMachineBase;
|
||||
import techreborn.Core;
|
||||
import techreborn.client.EGui;
|
||||
|
@ -54,11 +55,7 @@ public class BlockAlloySmelter 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) {
|
||||
if (!player.isSneaking())
|
||||
player.openGui(Core.INSTANCE, EGui.ALLOY_SMELTER.ordinal(), world, pos.getX(), pos.getY(), pos.getZ());
|
||||
return true;
|
||||
public IMachineGuiHandler getGui() {
|
||||
return EGui.ALLOY_SMELTER;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,6 +33,7 @@ import net.minecraft.util.math.BlockPos;
|
|||
import net.minecraft.world.World;
|
||||
import prospector.shootingstar.ShootingStar;
|
||||
import prospector.shootingstar.model.ModelCompound;
|
||||
import reborncore.api.tile.IMachineGuiHandler;
|
||||
import reborncore.common.blocks.BlockMachineBase;
|
||||
import techreborn.Core;
|
||||
import techreborn.client.EGui;
|
||||
|
@ -54,12 +55,7 @@ public class BlockCompressor 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) {
|
||||
if (!player.isSneaking()) {
|
||||
player.openGui(Core.INSTANCE, EGui.COMPRESSOR.ordinal(), world, pos.getX(), pos.getY(), pos.getZ());
|
||||
}
|
||||
return true;
|
||||
public IMachineGuiHandler getGui() {
|
||||
return EGui.COMPRESSOR;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,6 +33,7 @@ import net.minecraft.util.math.BlockPos;
|
|||
import net.minecraft.world.World;
|
||||
import prospector.shootingstar.ShootingStar;
|
||||
import prospector.shootingstar.model.ModelCompound;
|
||||
import reborncore.api.tile.IMachineGuiHandler;
|
||||
import reborncore.common.blocks.BlockMachineBase;
|
||||
import techreborn.Core;
|
||||
import techreborn.client.EGui;
|
||||
|
@ -54,12 +55,7 @@ public class BlockElectricFurnace 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) {
|
||||
if (!player.isSneaking()) {
|
||||
player.openGui(Core.INSTANCE, EGui.ELECTRIC_FURNACE.ordinal(), world, pos.getX(), pos.getY(), pos.getZ());
|
||||
}
|
||||
return true;
|
||||
public IMachineGuiHandler getGui() {
|
||||
return EGui.ELECTRIC_FURNACE;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,6 +33,7 @@ import net.minecraft.util.math.BlockPos;
|
|||
import net.minecraft.world.World;
|
||||
import prospector.shootingstar.ShootingStar;
|
||||
import prospector.shootingstar.model.ModelCompound;
|
||||
import reborncore.api.tile.IMachineGuiHandler;
|
||||
import reborncore.common.blocks.BlockMachineBase;
|
||||
import techreborn.Core;
|
||||
import techreborn.client.EGui;
|
||||
|
@ -54,12 +55,7 @@ public class BlockExtractor 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) {
|
||||
if (!player.isSneaking()) {
|
||||
player.openGui(Core.INSTANCE, EGui.EXTRACTOR.ordinal(), world, pos.getX(), pos.getY(), pos.getZ());
|
||||
}
|
||||
return true;
|
||||
public IMachineGuiHandler getGui() {
|
||||
return EGui.EXTRACTOR;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,6 +33,7 @@ import net.minecraft.util.math.BlockPos;
|
|||
import net.minecraft.world.World;
|
||||
import prospector.shootingstar.ShootingStar;
|
||||
import prospector.shootingstar.model.ModelCompound;
|
||||
import reborncore.api.tile.IMachineGuiHandler;
|
||||
import reborncore.common.blocks.BlockMachineBase;
|
||||
import techreborn.Core;
|
||||
import techreborn.client.EGui;
|
||||
|
@ -54,12 +55,7 @@ public class BlockGrinder 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) {
|
||||
if (!player.isSneaking()) {
|
||||
player.openGui(Core.INSTANCE, EGui.GRINDER.ordinal(), world, pos.getX(), pos.getY(), pos.getZ());
|
||||
}
|
||||
return true;
|
||||
public IMachineGuiHandler getGui() {
|
||||
return EGui.GRINDER;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,6 +33,7 @@ import net.minecraft.util.math.BlockPos;
|
|||
import net.minecraft.world.World;
|
||||
import prospector.shootingstar.ShootingStar;
|
||||
import prospector.shootingstar.model.ModelCompound;
|
||||
import reborncore.api.tile.IMachineGuiHandler;
|
||||
import reborncore.common.blocks.BlockMachineBase;
|
||||
import techreborn.Core;
|
||||
import techreborn.client.EGui;
|
||||
|
@ -54,12 +55,8 @@ public class BlockRecycler 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) {
|
||||
if (!player.isSneaking()) {
|
||||
player.openGui(Core.INSTANCE, EGui.RECYCLER.ordinal(), world, pos.getX(), pos.getY(), pos.getZ());
|
||||
}
|
||||
return true;
|
||||
public IMachineGuiHandler getGui() {
|
||||
return EGui.RECYCLER;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -24,7 +24,13 @@
|
|||
|
||||
package techreborn.client;
|
||||
|
||||
public enum EGui {
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import reborncore.api.tile.IMachineGuiHandler;
|
||||
import techreborn.Core;
|
||||
|
||||
public enum EGui implements IMachineGuiHandler {
|
||||
|
||||
THERMAL_GENERATOR(true),
|
||||
QUANTUM_TANK(true),
|
||||
|
@ -76,4 +82,12 @@ public enum EGui {
|
|||
public boolean useContainerBuilder() {
|
||||
return this.containerBuilder;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void open(EntityPlayer player, BlockPos pos, World world) {
|
||||
if(!world.isRemote){
|
||||
player.openGui(Core.INSTANCE, this.ordinal(), world, pos.getX(), pos.getY(), pos.getZ());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue