change filter texture, fix lens recipe, add filter recipe, fix NPE in ColorUtils
This commit is contained in:
parent
4ec969c272
commit
8fba5bb6a1
4 changed files with 7 additions and 1 deletions
Binary file not shown.
Before Width: | Height: | Size: 212 B After Width: | Height: | Size: 228 B |
Binary file not shown.
Before Width: | Height: | Size: 214 B After Width: | Height: | Size: 229 B |
|
@ -538,8 +538,10 @@ public class BuildCraftTransport extends BuildCraftMod {
|
||||||
|
|
||||||
// Lens
|
// Lens
|
||||||
for (int i = 0; i < 16; i++) {
|
for (int i = 0; i < 16; i++) {
|
||||||
BuildcraftRecipeRegistry.assemblyTable.addRecipe("buildcraft:lens:" + i, 10000, new ItemStack(lensItem, i, 4),
|
BuildcraftRecipeRegistry.assemblyTable.addRecipe("buildcraft:lens:" + i, 10000, new ItemStack(lensItem, 2, i),
|
||||||
ColorUtils.getOreDictionaryName(15 - i), "blockGlass", "ingotIron");
|
ColorUtils.getOreDictionaryName(15 - i), "blockGlass", "ingotIron");
|
||||||
|
BuildcraftRecipeRegistry.assemblyTable.addRecipe("buildcraft:filter:" + i, 10000, new ItemStack(lensItem, 2, i + 16),
|
||||||
|
ColorUtils.getOreDictionaryName(15 - i), "blockGlass", Blocks.iron_bars);
|
||||||
}
|
}
|
||||||
|
|
||||||
// GATES
|
// GATES
|
||||||
|
|
|
@ -54,6 +54,10 @@ public final class ColorUtils {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int getColorIDFromDye(ItemStack stack) {
|
public static int getColorIDFromDye(ItemStack stack) {
|
||||||
|
if (stack == null || stack.getItem() == null) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
if (stack.getItem() == Items.dye) {
|
if (stack.getItem() == Items.dye) {
|
||||||
return 15 - stack.getItemDamage();
|
return 15 - stack.getItemDamage();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue