Run DataFixer on the Chest's and Shulker Boxes, and fix the conflicting recipes reguarding the shulker upgrades. Closes #115, #117
This commit is contained in:
parent
2e1612dc85
commit
5a9c3d77df
|
@ -16,9 +16,13 @@ import cpw.mods.ironchest.common.CommonProxy;
|
|||
import cpw.mods.ironchest.common.lib.BlockLists;
|
||||
import cpw.mods.ironchest.common.network.MessageCrystalChestSync;
|
||||
import cpw.mods.ironchest.common.network.MessageCrystalShulkerSync;
|
||||
import cpw.mods.ironchest.common.tileentity.chest.TileEntityIronChest;
|
||||
import cpw.mods.ironchest.common.tileentity.shulker.TileEntityIronShulkerBox;
|
||||
import cpw.mods.ironchest.common.util.MissingMappingsHandler;
|
||||
import cpw.mods.ironchest.common.util.OcelotsSitOnChestsHandler;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.common.util.CompoundDataFixer;
|
||||
import net.minecraftforge.fml.common.FMLCommonHandler;
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
import net.minecraftforge.fml.common.Mod.EventHandler;
|
||||
import net.minecraftforge.fml.common.Mod.Instance;
|
||||
|
@ -74,6 +78,15 @@ public class IronChest
|
|||
packetHandler.registerMessage(MessageCrystalShulkerSync.Handler.class, MessageCrystalShulkerSync.class, messageId++, Side.CLIENT);
|
||||
|
||||
BlockLists.createShulkerItemList();
|
||||
|
||||
registerDataFixes();
|
||||
}
|
||||
|
||||
public void registerDataFixes()
|
||||
{
|
||||
CompoundDataFixer dataFixer = FMLCommonHandler.instance().getDataFixer();
|
||||
|
||||
TileEntityIronChest.registerFixesChest(dataFixer);
|
||||
TileEntityIronShulkerBox.registerFixesShulkerBox(dataFixer);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -35,6 +35,9 @@ import net.minecraft.util.EnumFacing;
|
|||
import net.minecraft.util.ITickable;
|
||||
import net.minecraft.util.NonNullList;
|
||||
import net.minecraft.util.SoundCategory;
|
||||
import net.minecraft.util.datafix.DataFixer;
|
||||
import net.minecraft.util.datafix.FixTypes;
|
||||
import net.minecraft.util.datafix.walkers.ItemStackDataLists;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraftforge.common.util.Constants;
|
||||
import net.minecraftforge.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
|
@ -630,4 +633,9 @@ public class TileEntityIronChest extends TileEntityLockableLoot implements ITick
|
|||
{
|
||||
this.topStacks = topStacks;
|
||||
}
|
||||
|
||||
public static void registerFixesChest(DataFixer fixer)
|
||||
{
|
||||
fixer.registerWalker(FixTypes.BLOCK_ENTITY, new ItemStackDataLists(TileEntityIronChest.class, new String[] { "Items" }));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -43,6 +43,9 @@ import net.minecraft.util.EnumFacing;
|
|||
import net.minecraft.util.ITickable;
|
||||
import net.minecraft.util.NonNullList;
|
||||
import net.minecraft.util.SoundCategory;
|
||||
import net.minecraft.util.datafix.DataFixer;
|
||||
import net.minecraft.util.datafix.FixTypes;
|
||||
import net.minecraft.util.datafix.walkers.ItemStackDataLists;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraftforge.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
|
@ -185,7 +188,8 @@ public class TileEntityIronShulkerBox extends TileEntityLockableLoot implements
|
|||
|
||||
int compressedIdx = 0;
|
||||
|
||||
mainLoop: for (int i = 0; i < this.getSizeInventory(); i++)
|
||||
mainLoop:
|
||||
for (int i = 0; i < this.getSizeInventory(); i++)
|
||||
{
|
||||
ItemStack itemStack = this.getItems().get(i);
|
||||
|
||||
|
@ -228,7 +232,8 @@ public class TileEntityIronShulkerBox extends TileEntityLockableLoot implements
|
|||
|
||||
this.hadStuff = true;
|
||||
|
||||
Collections.sort(tempCopy, new Comparator<ItemStack>() {
|
||||
Collections.sort(tempCopy, new Comparator<ItemStack>()
|
||||
{
|
||||
@Override
|
||||
public int compare(ItemStack stack1, ItemStack stack2)
|
||||
{
|
||||
|
@ -792,4 +797,9 @@ public class TileEntityIronShulkerBox extends TileEntityLockableLoot implements
|
|||
{
|
||||
CLOSED, OPENING, OPENED, CLOSING;
|
||||
}
|
||||
|
||||
public static void registerFixesShulkerBox(DataFixer fixer)
|
||||
{
|
||||
fixer.registerWalker(FixTypes.BLOCK_ENTITY, new ItemStackDataLists(TileEntityIronShulkerBox.class, new String[] { "Items" }));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
],
|
||||
"type": "forge:ore_shaped",
|
||||
"pattern": [
|
||||
"MGM",
|
||||
"GSG",
|
||||
"GG",
|
||||
"MSM",
|
||||
"MGM"
|
||||
],
|
||||
"key": {
|
||||
|
|
|
@ -11,8 +11,8 @@
|
|||
],
|
||||
"type": "forge:ore_shaped",
|
||||
"pattern": [
|
||||
"MMM",
|
||||
"MSM",
|
||||
"MMM",
|
||||
"MMM"
|
||||
],
|
||||
"key": {
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
{
|
||||
"type": "forge:ore_shaped",
|
||||
"pattern": [
|
||||
"GGG",
|
||||
"GSG",
|
||||
"GGG",
|
||||
"GGG"
|
||||
],
|
||||
"key": {
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
{
|
||||
"type": "forge:ore_shaped",
|
||||
"pattern": [
|
||||
"MMM",
|
||||
"MGM",
|
||||
"MMM",
|
||||
"MMM"
|
||||
],
|
||||
"key": {
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
{
|
||||
"type": "forge:ore_shaped",
|
||||
"pattern": [
|
||||
"GGG",
|
||||
"MSM",
|
||||
"GGG"
|
||||
"GMG",
|
||||
"GSG",
|
||||
"GMG"
|
||||
],
|
||||
"key": {
|
||||
"M": {
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
{
|
||||
"type": "forge:ore_shaped",
|
||||
"pattern": [
|
||||
"MMM",
|
||||
"MSM",
|
||||
"MMM",
|
||||
"MMM"
|
||||
],
|
||||
"key": {
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
],
|
||||
"type": "forge:ore_shaped",
|
||||
"pattern": [
|
||||
"MGM",
|
||||
"GSG",
|
||||
"MSM",
|
||||
"GGG",
|
||||
"MGM"
|
||||
],
|
||||
"key": {
|
||||
|
|
Loading…
Reference in New Issue