This commit is contained in:
parent
e9a8225f77
commit
0f3794e645
|
@ -470,7 +470,8 @@ public class ClientProxy extends CommonProxy {
|
||||||
IBakedModel texModel = Minecraft.getMinecraft().getRenderItem().getItemModelWithOverrides(stack,
|
IBakedModel texModel = Minecraft.getMinecraft().getRenderItem().getItemModelWithOverrides(stack,
|
||||||
null, null);
|
null, null);
|
||||||
TextureAtlasSprite sprite = texModel.getParticleTexture();
|
TextureAtlasSprite sprite = texModel.getParticleTexture();
|
||||||
if (sprite.hasAnimationMetadata()) {
|
//noinspection ConstantConditions
|
||||||
|
if (sprite == null || sprite.hasAnimationMetadata()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
int[][] data = sprite.getFrameTextureData(0);
|
int[][] data = sprite.getFrameTextureData(0);
|
||||||
|
|
|
@ -34,7 +34,7 @@ import javax.annotation.Nonnull;
|
||||||
public class RecipePanelTexture extends IForgeRegistryEntry.Impl<IRecipe> implements IRecipe {
|
public class RecipePanelTexture extends IForgeRegistryEntry.Impl<IRecipe> implements IRecipe {
|
||||||
@Override
|
@Override
|
||||||
public boolean matches(@Nonnull InventoryCrafting inv, @Nonnull World worldIn) {
|
public boolean matches(@Nonnull InventoryCrafting inv, @Nonnull World worldIn) {
|
||||||
boolean foundTexture = false;
|
int texX = -1, texY = -1;
|
||||||
boolean foundPanel = false;
|
boolean foundPanel = false;
|
||||||
for (int x = 0; x < inv.getWidth(); x++) {
|
for (int x = 0; x < inv.getWidth(); x++) {
|
||||||
for (int y = 0; y < inv.getHeight(); y++) {
|
for (int y = 0; y < inv.getHeight(); y++) {
|
||||||
|
@ -44,18 +44,23 @@ public class RecipePanelTexture extends IForgeRegistryEntry.Impl<IRecipe> implem
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
foundPanel = true;
|
foundPanel = true;
|
||||||
} else if (IndustrialWires.proxy.isValidTextureSource(here)) {
|
} else if (!here.isEmpty()) {
|
||||||
if (foundTexture || (here.getItem() == Item.getItemFromBlock(IndustrialWires.panel)
|
if (texX == -1) {
|
||||||
&& here.getMetadata() != BlockTypes_Panel.DUMMY.ordinal())) {
|
texX = x;
|
||||||
|
texY = y;
|
||||||
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
foundTexture = true;
|
|
||||||
} else if (!here.isEmpty()) {
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return foundPanel && foundTexture;
|
if (!foundPanel || texX == -1) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
ItemStack texSource = inv.getStackInRowAndColumn(texX, texY);
|
||||||
|
return IndustrialWires.proxy.isValidTextureSource(texSource) &&
|
||||||
|
(texSource.getItem() != Item.getItemFromBlock(IndustrialWires.panel)
|
||||||
|
|| texSource.getMetadata() == BlockTypes_Panel.DUMMY.ordinal());
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean isUnfinishedPanel(ItemStack stack) {
|
private boolean isUnfinishedPanel(ItemStack stack) {
|
||||||
|
|
Loading…
Reference in a new issue