mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-26 06:42:56 +00:00
Check and make sure toolsItem is not a empty stack
Else we crash and crash can be caused by a number of things including Join Game transition packets, login delays, server lag.
This commit is contained in:
1 parent
c2144495bd
commit
f206cb9bed
1 file changed
+4
-2
@@ -160,8 +160,10 @@ public enum ToolsItem {
|
||||
|
||||
public static void remapItems() {
|
||||
for (ToolsItem toolsItem : values()) {
|
||||
ResourceLocation registryName = toolsItem.getItem().getRegistryName();
|
||||
toolsItem.updateItem(ForgeRegistries.ITEMS.getValue(registryName));
|
||||
if(!toolsItem.getItemStack().isEmpty()) {
|
||||
ResourceLocation registryName = toolsItem.getItem().getRegistryName();
|
||||
toolsItem.updateItem(ForgeRegistries.ITEMS.getValue(registryName));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user