mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-11-24 22:14:42 +00:00
#2493 Coord Selector NBT can be missing causing crashes
This commit is contained in:
1 parent
bb6b84d255
commit
979f0727c2
2 files changed
+3
-7
No files matched your search
@@ -11,6 +11,7 @@ import crazypants.enderio.material.Alloy;
|
||||
import crazypants.enderio.material.BlockFusedQuartz;
|
||||
import crazypants.enderio.material.Material;
|
||||
import crazypants.enderio.power.Capacitors;
|
||||
import crazypants.enderio.teleport.telepad.ItemCoordSelector;
|
||||
|
||||
public class TeleportRecipes {
|
||||
|
||||
@@ -45,6 +46,7 @@ public class TeleportRecipes {
|
||||
}
|
||||
|
||||
ItemStack coordSelector = new ItemStack(EnderIO.itemCoordSelector);
|
||||
ItemCoordSelector.init(coordSelector);
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(coordSelector, "sps", " cs", " s", 's', "ingotElectricalSteel", 'p', Items.ender_pearl, 'c', Items.compass));
|
||||
}
|
||||
}
|
||||
@@ -51,13 +51,7 @@ public class ItemCoordSelector extends Item implements IResourceTooltipProvider
|
||||
list.add(stack);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreated(ItemStack stack, World world, EntityPlayer player) {
|
||||
super.onCreated(stack, world, player);
|
||||
init(stack);
|
||||
}
|
||||
|
||||
private void init(ItemStack stack) {
|
||||
public static void init(ItemStack stack) {
|
||||
stack.stackTagCompound = new NBTTagCompound();
|
||||
new BlockCoord().writeToNBT(stack.stackTagCompound);
|
||||
stack.stackTagCompound.setBoolean("default", true);
|
||||
|
||||
Reference in new issue
Block a user