@Override
 public DataTransactionResult removeFrom(ValueContainer<?> container) {
   if (container instanceof ItemStack) {
     final ItemStack itemStack = (ItemStack) container;
     if (itemStack.getItem() == Items.water_bucket) {
       itemStack.setItem(Items.bucket);
       return DataTransactionResult.successRemove(constructImmutableValue(WATER));
     } else if (itemStack.getItem() == Items.lava_bucket) {
       itemStack.setItem(Items.bucket);
       return DataTransactionResult.successRemove(constructImmutableValue(LAVA));
     }
   }
   return DataTransactionResult.failNoData();
 }
 @Override
 public DataTransactionResult removeFrom(ValueContainer<?> container) {
   return DataTransactionResult.failNoData();
 }
예제 #3
0
 @Override
 public DataTransactionResult remove(DataHolder dataHolder) {
   return DataTransactionResult.failNoData();
 }