Fixes #271
This commit is contained in:
parent
25b5715ab8
commit
19d269b1de
24 changed files with 38 additions and 34 deletions
|
@ -204,10 +204,10 @@ public class BlockMachineBase extends BlockContainer {
|
|||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer entityplayer, int side, float hitX, float hitY, float hitZ) {
|
||||
if(super.onBlockActivated(world, x, y, z, entityplayer, side, hitX, hitY, hitZ)){
|
||||
if(fillBlockWithFluid(world, x, y, z, entityplayer, side, hitX, hitY, hitZ)){
|
||||
return true;
|
||||
}
|
||||
return fillBlockWithFluid(world, x, y, z, entityplayer, side, hitX, hitY, hitZ);
|
||||
return super.onBlockActivated(world, x, y, z, entityplayer, side, hitX, hitY, hitZ);
|
||||
}
|
||||
|
||||
public boolean fillBlockWithFluid(World world, int x, int y, int z, EntityPlayer entityplayer, int side, float hitX, float hitY, float hitZ) {
|
||||
|
|
|
@ -32,6 +32,9 @@ public class BlockQuantumTank extends BlockMachineBase {
|
|||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
if(fillBlockWithFluid(world, x, y, z, player, side, hitX, hitY, hitZ)){
|
||||
return true;
|
||||
}
|
||||
if (!player.isSneaking())
|
||||
player.openGui(Core.INSTANCE, GuiHandler.quantumTankID, world, x, y, z);
|
||||
return true;
|
||||
|
|
|
@ -46,6 +46,9 @@ public class BlockDieselGenerator extends BlockMachineBase {
|
|||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z,
|
||||
EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
if(fillBlockWithFluid(world, x, y, z, player, side, hitX, hitY, hitZ)){
|
||||
return true;
|
||||
}
|
||||
if (!player.isSneaking())
|
||||
player.openGui(Core.INSTANCE, GuiHandler.dieselGeneratorID, world, x, y,
|
||||
z);
|
||||
|
|
|
@ -37,6 +37,9 @@ public class BlockGasTurbine extends BlockMachineBase {
|
|||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z,
|
||||
EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
if(fillBlockWithFluid(world, x, y, z, player, side, hitX, hitY, hitZ)){
|
||||
return true;
|
||||
}
|
||||
if (!player.isSneaking())
|
||||
player.openGui(Core.INSTANCE, GuiHandler.gasTurbineID, world, x, y,
|
||||
z);
|
||||
|
|
|
@ -37,6 +37,9 @@ public class BlockSemiFluidGenerator extends BlockMachineBase {
|
|||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z,
|
||||
EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
if(fillBlockWithFluid(world, x, y, z, player, side, hitX, hitY, hitZ)){
|
||||
return true;
|
||||
}
|
||||
if (!player.isSneaking())
|
||||
player.openGui(Core.INSTANCE, GuiHandler.semifluidGeneratorID, world, x, y,
|
||||
z);
|
||||
|
|
|
@ -37,6 +37,9 @@ public class BlockThermalGenerator extends BlockMachineBase {
|
|||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z,
|
||||
EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
if(fillBlockWithFluid(world, x, y, z, player, side, hitX, hitY, hitZ)){
|
||||
return true;
|
||||
}
|
||||
if (!player.isSneaking())
|
||||
player.openGui(Core.INSTANCE, GuiHandler.thermalGeneratorID, world, x, y,
|
||||
z);
|
||||
|
|
|
@ -44,6 +44,9 @@ public class BlockGrinder extends BlockMachineBase {
|
|||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z,
|
||||
EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
if(fillBlockWithFluid(world, x, y, z, player, side, hitX, hitY, hitZ)){
|
||||
return true;
|
||||
}
|
||||
if (!player.isSneaking())
|
||||
player.openGui(Core.INSTANCE, GuiHandler.grinderID, world, x, y,
|
||||
z);
|
||||
|
|
|
@ -41,6 +41,9 @@ public class BlockIndustrialSawmill extends BlockMachineBase {
|
|||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z,
|
||||
EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
if(fillBlockWithFluid(world, x, y, z, player, side, hitX, hitY, hitZ)){
|
||||
return true;
|
||||
}
|
||||
if (!player.isSneaking())
|
||||
player.openGui(Core.INSTANCE, GuiHandler.sawMillID, world, x, y,
|
||||
z);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue