generated from tilera/1710mod
Compare commits
2 commits
3db4a140e3
...
0349b88293
Author | SHA1 | Date | |
---|---|---|---|
0349b88293 | |||
4a4798738e |
3 changed files with 9 additions and 0 deletions
|
@ -27,4 +27,6 @@ public interface ICrystal {
|
|||
*/
|
||||
void harvestShard(EntityPlayer player);
|
||||
|
||||
boolean canHarvest(EntityPlayer player);
|
||||
|
||||
}
|
||||
|
|
|
@ -30,6 +30,7 @@ class SlotWorkbenchWand extends Slot {
|
|||
!this.workbench.getWorldObj().isRemote &&
|
||||
this.inventory.getStackInSlot(this.getSlotIndex()) != null &&
|
||||
this.inventory.getStackInSlot(this.getSlotIndex()).getItem() instanceof ItemWandCasting) {
|
||||
player.inventory.setItemStack(null);
|
||||
player.openGui(Thaumcraft.instance, 13, this.workbench.getWorldObj(), this.workbench.xCoord, this.workbench.yCoord, this.workbench.zCoord);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -119,4 +119,10 @@ public abstract class MixinTileCrystal extends TileThaumcraft implements ICrysta
|
|||
worldObj.spawnEntityInWorld(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canHarvest(EntityPlayer player) {
|
||||
int md = this.worldObj.getBlockMetadata(this.xCoord, this.yCoord, this.zCoord);
|
||||
return md != 6 && md != 9 && count > 1;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue