mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
please stop feeding my ComparableStacks with unregistered items :(
This commit is contained in:
parent
4c603298a7
commit
30b06bec46
@ -84,7 +84,7 @@ public class ArmorRecipes {
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.fau_legs, 1), new Object[] { "MPM", "PBP", "PDP", 'M', ModItems.motor_desh, 'P', ModItems.plate_armor_fau, 'B', ModItems.starmetal_legs, 'D', ModItems.billet_polonium });
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.fau_boots, 1), new Object[] { "PDP", "PBP", 'P', ModItems.plate_armor_fau, 'D', ModItems.billet_polonium, 'B', ModItems.starmetal_boots });
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.dns_helmet, 1), new Object[] { "PCP", "PBP", "PSP", 'P', ModItems.plate_armor_dnt, 'S', ModItems.ingot_chainsteel, 'B', ModItems.bj_helmet, 'C', ModItems.circuit_targeting_tier6 });
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.dns_plate, 1), new Object[] { "PCP", "PBP", "PSP", 'P', ModItems.plate_armor_dnt, 'S', ModItems.ingot_chainsteel, 'B', ModItems.bj_plate_jetpack, 'C', ItemBattery.getEmptyBattery(ModItems.singularity_spark) });
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.dns_plate, 1), new Object[] { "PCP", "PBP", "PSP", 'P', ModItems.plate_armor_dnt, 'S', ModItems.ingot_chainsteel, 'B', ModItems.bj_plate_jetpack, 'C', ModItems.singularity_spark });
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.dns_legs, 1), new Object[] { "PCP", "PBP", "PSP", 'P', ModItems.plate_armor_dnt, 'S', ModItems.ingot_chainsteel, 'B', ModItems.bj_legs, 'C', ModItems.coin_worm });
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.dns_boots, 1), new Object[] { "PCP", "PBP", "PSP", 'P', ModItems.plate_armor_dnt, 'S', ModItems.ingot_chainsteel, 'B', ModItems.bj_boots, 'C', ModItems.demon_core_closed });
|
||||
|
||||
|
||||
@ -176,6 +176,14 @@ public class RecipesCommon {
|
||||
item = Items.stick;
|
||||
}
|
||||
|
||||
String name = Item.itemRegistry.getNameForObject(item);
|
||||
|
||||
if(name == null) {
|
||||
MainRegistry.logger.error("ComparableStack holds an item that does not seem to be registered. How does that even happen?");
|
||||
Thread.currentThread().dumpStack();
|
||||
item = Items.stick; //we know sticks have a name, so sure, why not
|
||||
}
|
||||
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + Item.itemRegistry.getNameForObject(item).hashCode(); //using the int ID will cause fucky-wuckys if IDs are scrambled
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user