Restrict the creative frequencies to creative-moded players.
This commit is contained in:
parent
84c13e098c
commit
60130d0616
1 changed files with 7 additions and 1 deletions
|
@ -32,10 +32,13 @@ public class GuiEntangledBlock extends GuiMekanism
|
||||||
|
|
||||||
public GuiTextField frequencyField;
|
public GuiTextField frequencyField;
|
||||||
|
|
||||||
|
public boolean isCreative;
|
||||||
|
|
||||||
public GuiEntangledBlock(InventoryPlayer inventory, TileEntityEntangledBlock tentity)
|
public GuiEntangledBlock(InventoryPlayer inventory, TileEntityEntangledBlock tentity)
|
||||||
{
|
{
|
||||||
super(new ContainerNull(inventory.player, tentity));
|
super(new ContainerNull(inventory.player, tentity));
|
||||||
tileEntity = tentity;
|
tileEntity = tentity;
|
||||||
|
isCreative = inventory.player.capabilities.isCreativeMode;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -108,7 +111,10 @@ public class GuiEntangledBlock extends GuiMekanism
|
||||||
data.add(0);
|
data.add(0);
|
||||||
data.add(toUse);
|
data.add(toUse);
|
||||||
|
|
||||||
Mekanism.packetHandler.sendToServer(new TileEntityMessage(Coord4D.get(tileEntity), data));
|
if(!toUse.startsWith("creative.") || isCreative)
|
||||||
|
{
|
||||||
|
Mekanism.packetHandler.sendToServer(new TileEntityMessage(Coord4D.get(tileEntity), data));
|
||||||
|
}
|
||||||
|
|
||||||
frequencyField.setText("");
|
frequencyField.setText("");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue