コード例 #1
0
 @Override
 public int isProvidingWeakPower(IBlockAccess world, int x, int y, int z, int side) {
   TileEntityOutput te = getTileEntity(world, x, y, z);
   if (te != null) {
     return te.getStrengthFromOppositeSide(side);
   }
   return 0;
 }
コード例 #2
0
 @Override
 public Icon getBlockTexture(IBlockAccess world, int x, int y, int z, int side) {
   TileEntityOutput te = getTileEntity(world, x, y, z);
   if (te != null && te.getStrengthFromSide(side) > 0) {
     return te.hasStrongSignalAtSide(side) ? strongIcon : weakIcon;
   }
   return inactiveIcon;
 }