public RemoveLogAction(IBlockPattern block) { this.block = block; for (IBlock partial : block.getBlocks()) { Block mcBlock = MineTweakerMC.getBlock(partial); if (MFRRegistry.getFruitLogBlocks().contains(mcBlock)) { if (!removedLogs.contains(mcBlock)) removedLogs.add(mcBlock); } } }
public RemoveFruitAction(IBlockPattern block) { this.block = block; Map<Block, IFactoryFruit> fruits = MFRRegistry.getFruits(); removed = new HashMap<Block, IFactoryFruit>(); for (IBlock partial : block.getBlocks()) { Block mcBlock = MineTweakerMC.getBlock(partial); if (fruits.containsKey(mcBlock)) { removed.put(mcBlock, fruits.get(mcBlock)); } } }
@Override public String describeUndo() { return "Restoring MFR Fruit Picker log block " + block.getDisplayName(); }
@Override public String describeUndo() { return "Restoring fruit picker fruit block " + block.getDisplayName(); }