// Path: src/com/jaquadro/minecraft/chameleon/Chameleon.java
// @Mod(modid = Chameleon.MOD_ID, name = Chameleon.MOD_NAME, version = Chameleon.MOD_VERSION, dependencies = "required-after:forge@[14.21.0.2362,);", acceptedMinecraftVersions = "[1.12,1.13)")
// public class Chameleon
// {
//     public static final String MOD_ID = "chameleon";
//     public static final String MOD_NAME = "Chameleon";
//     public static final String MOD_VERSION = "@VERSION@";
//     public static final String SOURCE_PATH = "com.jaquadro.minecraft.chameleon.";
// 
//     public static Logger log;
// 
//     @SideOnly(Side.CLIENT)
//     public IconRegistry iconRegistry;
// 
//     @SideOnly(Side.CLIENT)
//     public ModelRegistry modelRegistry;
// 
//     @Mod.Instance(MOD_ID)
//     public static Chameleon instance;
// 
//     @SidedProxy(clientSide = SOURCE_PATH + "core.ClientProxy", serverSide = SOURCE_PATH + "core.CommonProxy")
//     public static CommonProxy proxy;
// 
//     @Mod.EventHandler
//     public void preInit (FMLPreInitializationEvent event) {
//         log = event.getModLog();
// 
//         MinecraftForge.EVENT_BUS.register(proxy);
//         proxy.preInitSidedResources();
//     }
// 
//     @Mod.EventHandler
//     public void init (FMLInitializationEvent event) {
//         proxy.initSidedResources();
// 
//     }
// }
// 
// Path: src/com/jaquadro/minecraft/chameleon/block/tiledata/TileDataShim.java
// public abstract class TileDataShim implements INBTSerializable<NBTTagCompound>
// {
//     public abstract void readFromNBT (NBTTagCompound tag);
// 
//     public abstract NBTTagCompound writeToNBT (NBTTagCompound tag);
// 
//     @Override
//     public NBTTagCompound serializeNBT () {
//         NBTTagCompound tag = new NBTTagCompound();
//         return writeToNBT(tag);
//     }
// 
//     @Override
//     public void deserializeNBT (NBTTagCompound nbt) {
//         readFromNBT(nbt);
//     }
// }


import com.jaquadro.minecraft.chameleon.Chameleon;
import com.jaquadro.minecraft.chameleon.block.tiledata.TileDataShim;
import net.minecraft.block.state.IBlockState;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.network.NetworkManager;
import net.minecraft.network.play.server.SPacketUpdateTileEntity;
import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.fml.common.FMLLog;
import org.apache.logging.log4j.Level;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

    @Override
    public final void readFromNBT (NBTTagCompound tag) {
        super.readFromNBT(tag);

        failureSnapshot = null;

        try {
            readFromFixedNBT(tag);
            readFromPortableNBT(tag);
        }
        catch (Throwable t) {
            trapLoadFailure(t, tag);
        }
    }

    @Override
    public final NBTTagCompound writeToNBT (NBTTagCompound tag) {
        super.writeToNBT(tag);

        if (failureSnapshot != null) {
            restoreLoadFailure(tag);
            return tag;
        }

        try {
            tag = writeToFixedNBT(tag);
            tag = writeToPortableNBT(tag);
        }
        catch (Throwable t) {
// Path: src/com/jaquadro/minecraft/chameleon/Chameleon.java
// @Mod(modid = Chameleon.MOD_ID, name = Chameleon.MOD_NAME, version = Chameleon.MOD_VERSION, dependencies = "required-after:forge@[14.21.0.2362,);", acceptedMinecraftVersions = "[1.12,1.13)")
// public class Chameleon
// {
//     public static final String MOD_ID = "chameleon";
//     public static final String MOD_NAME = "Chameleon";
//     public static final String MOD_VERSION = "@VERSION@";
//     public static final String SOURCE_PATH = "com.jaquadro.minecraft.chameleon.";
// 
//     public static Logger log;
// 
//     @SideOnly(Side.CLIENT)
//     public IconRegistry iconRegistry;
// 
//     @SideOnly(Side.CLIENT)
//     public ModelRegistry modelRegistry;
// 
//     @Mod.Instance(MOD_ID)
//     public static Chameleon instance;
// 
//     @SidedProxy(clientSide = SOURCE_PATH + "core.ClientProxy", serverSide = SOURCE_PATH + "core.CommonProxy")
//     public static CommonProxy proxy;
// 
//     @Mod.EventHandler
//     public void preInit (FMLPreInitializationEvent event) {
//         log = event.getModLog();
// 
//         MinecraftForge.EVENT_BUS.register(proxy);
//         proxy.preInitSidedResources();
//     }
// 
//     @Mod.EventHandler
//     public void init (FMLInitializationEvent event) {
//         proxy.initSidedResources();
// 
//     }
// }
// 
// Path: src/com/jaquadro/minecraft/chameleon/block/tiledata/TileDataShim.java
// public abstract class TileDataShim implements INBTSerializable<NBTTagCompound>
// {
//     public abstract void readFromNBT (NBTTagCompound tag);
// 
//     public abstract NBTTagCompound writeToNBT (NBTTagCompound tag);
// 
//     @Override
//     public NBTTagCompound serializeNBT () {
//         NBTTagCompound tag = new NBTTagCompound();
//         return writeToNBT(tag);
//     }
// 
//     @Override
//     public void deserializeNBT (NBTTagCompound nbt) {
//         readFromNBT(nbt);
//     }
// }


// Path: src/com/jaquadro/minecraft/chameleon/block/ChamTileEntity.java
import com.jaquadro.minecraft.chameleon.Chameleon;
import com.jaquadro.minecraft.chameleon.block.tiledata.TileDataShim;
import net.minecraft.block.state.IBlockState;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.network.NetworkManager;
import net.minecraft.network.play.server.SPacketUpdateTileEntity;
import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.fml.common.FMLLog;
import org.apache.logging.log4j.Level;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;


    @Override
    public final void readFromNBT (NBTTagCompound tag) {
        super.readFromNBT(tag);

        failureSnapshot = null;

        try {
            readFromFixedNBT(tag);
            readFromPortableNBT(tag);
        }
        catch (Throwable t) {
            trapLoadFailure(t, tag);
        }
    }

    @Override
    public final NBTTagCompound writeToNBT (NBTTagCompound tag) {
        super.writeToNBT(tag);

        if (failureSnapshot != null) {
            restoreLoadFailure(tag);
            return tag;
        }

        try {
            tag = writeToFixedNBT(tag);
            tag = writeToPortableNBT(tag);
        }
        catch (Throwable t) {
            Chameleon.log.error("Tile Save Failure.", t);