mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-11-20 04:09:43 +00:00
Enchanter now breaks correctly.
This commit is contained in:
1 parent
93fb450d5f
commit
6ebec3fa89
2 files changed
+9
-3
No files matched your search
@@ -100,8 +100,8 @@ public class BlockEnchanter extends BlockEio implements IGuiHandler, IResourceTo
|
||||
public boolean removedByPlayer(World world, EntityPlayer player, int x, int y, int z, boolean harvested) {
|
||||
if(!world.isRemote) {
|
||||
TileEntity te = world.getTileEntity(x, y, z);
|
||||
if(te instanceof TileVacuumChest) {
|
||||
TileEnchanter cb = (TileEnchanter) te;
|
||||
if(te instanceof TileEnchanter) {
|
||||
TileEnchanter enchanter = (TileEnchanter) te;
|
||||
if(!player.capabilities.isCreativeMode) {
|
||||
ItemStack itemStack = new ItemStack(this);
|
||||
float f = 0.7F;
|
||||
@@ -112,7 +112,12 @@ public class BlockEnchanter extends BlockEio implements IGuiHandler, IResourceTo
|
||||
entityitem.delayBeforeCanPickup = 10;
|
||||
world.spawnEntityInWorld(entityitem);
|
||||
|
||||
Util.dropItems(world, cb, x, y, z, true);
|
||||
if(enchanter.getStackInSlot(0) != null) {
|
||||
Util.dropItems(world, enchanter.getStackInSlot(0), x, y, z, true);
|
||||
}
|
||||
if(enchanter.getStackInSlot(1) != null) {
|
||||
Util.dropItems(world, enchanter.getStackInSlot(1), x, y, z, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,6 +47,7 @@ public class GuiEnchanter extends GuiContainer {
|
||||
col = 8453920; //all good
|
||||
} else {
|
||||
col = 16736352; //not enough levels
|
||||
RenderUtil.bindTexture("enderio:textures/gui/enchanter.png");
|
||||
drawTexturedModalRect(sx + 99, sy + 33, 176, 0, 28, 21);
|
||||
}
|
||||
String s = I18n.format("container.repair.cost", new Object[] {Integer.valueOf(curCost)});
|
||||
|
||||
Reference in new issue
Block a user