Пример #1
0
 public ItemStack getPlantedSapling() {
   if (!this.shouldPlantSapling()) return null;
   if (treeCopy.isDyeTree())
     return new ItemStack(TreeGetter.getSaplingID(), 1, treeCopy.getDyeTreeMeta());
   else if (treeCopy.getTreeType() != null) return treeCopy.getSapling();
   else return null;
 }
Пример #2
0
 private void checkAndMatchInventory() {
   ItemStack sapling = null;
   if (tree.isDyeTree()) {
     sapling = new ItemStack(TreeGetter.getSaplingID(), 1, tree.getDyeTreeMeta());
   } else if (tree.getTreeType() != null) {
     sapling = tree.getSapling();
   }
   if (!ReikaItemHelper.matchStacks(inv[0], sapling)) {
     this.dumpInventory();
   }
 }