Fix facade recipe desynchronization on client and server. Closes #2042

This bug was caused by tterrag's pull request having a hasNoNullIcons
function, which returned false on the server side, not letting any
facade recipe through. The new approach relies on replacing non-existant
textures with a transparent oeeN
This commit is contained in:
asiekierka 2014-10-15 15:51:57 +02:00
parent 3f752cca4b
commit f49b04da37

View file

@ -254,8 +254,7 @@ public class ItemFacade extends ItemBuildCraft {
ItemStack stack = new ItemStack(item, 1, i);
if (!Strings.isNullOrEmpty(stack.getUnlocalizedName())
&& names.add(stack.getUnlocalizedName())
&& hasNoNullIcons(block, i)) {
&& names.add(stack.getUnlocalizedName())) {
ItemFacade.addFacade(
"buildcraft:facade{" + Block.blockRegistry.getNameForObject(block) + "#"
+ stack.getItemDamage() + "}", stack);
@ -273,20 +272,6 @@ public class ItemFacade extends ItemBuildCraft {
}
}
private static boolean hasNoNullIcons(Block block, int meta) {
try {
for (int i = 0; i < 6; i++) {
if (block.getIcon(i, meta) == null) {
return false;
}
}
} catch (Throwable t) {
return false;
}
return true;
}
private static boolean isBlockBlacklisted(Block block) {
String blockName = Block.blockRegistry.getNameForObject(block);