コード例 #1
0
 @Override
 public boolean isValidPaintSource(ItemStack paintSource) {
   if (paintSource == null) {
     return false;
   }
   Block block = Util.getBlockFromItemId(paintSource);
   if (block == null || block instanceof IPaintedBlock) {
     return false;
   }
   if (PaintSourceValidator.instance.isBlacklisted(paintSource)) {
     return false;
   }
   if (PaintSourceValidator.instance.isWhitelisted(paintSource)) {
     return true;
   }
   if (!Config.allowTileEntitiesAsPaintSource && block instanceof ITileEntityProvider) {
     return false;
   }
   if (block == EnderIO.blockFusedQuartz && paintSource.getItemDamage() < 2) {
     return true;
   }
   return block.getRenderType() == 0 || block.isOpaqueCube() || block.isNormalCube();
 }
コード例 #2
0
ファイル: ArrayInventory.java プロジェクト: Reyls/EnderIO
 @Override
 public ItemStack decrStackSize(int slot, int amount) {
   return Util.decrStackSize(this, slot, amount);
 }