<commit_before>package com.gmail.ckrier3000.secureitmod.forge.tileentity;

import java.util.UUID;

import com.gmail.ckrier3000.secureitmod.forge.SecureItMod;

import net.minecraft.client.Minecraft;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntityChest;

public class ProtectedTileEntityChest extends TileEntityChest {
	private String lockID;
	private UUID owner;
	
	
	public ProtectedTileEntityChest(TileEntityChest chest) {
		worldObj = chest.getWorldObj();
		blockType = chest.blockType;
		blockMetadata = chest.getBlockMetadata();
		lidAngle = chest.lidAngle;
		prevLidAngle = chest.prevLidAngle;
		adjacentChestChecked = chest.adjacentChestChecked;
		adjacentChestXNeg = chest.adjacentChestXNeg;
		adjacentChestXPos = chest.adjacentChestXPos;
		adjacentChestZNeg = chest.adjacentChestZNeg;
		adjacentChestZPos = chest.adjacentChestZPos;
		tileEntityInvalid = chest.isInvalid();
	}

	@Override
	public void readFromNBT(NBTTagCompound arg0) {
		super.readFromNBT(arg0);
	}
	
	@Override
	public void writeToNBT(NBTTagCompound arg0) {
		super.writeToNBT(arg0);
	}
}
<commit_msg>commit from 05/16/14 19:01:35. 0 deletions, 0 adds, 1 modifications, 0 new tracks<commit_after>package com.gmail.ckrier3000.secureitmod.forge.tileentity;

import java.util.UUID;

import com.gmail.ckrier3000.secureitmod.forge.SecureItMod;

import net.minecraft.client.Minecraft;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.network.Packet;
import net.minecraft.tileentity.TileEntityChest;
import net.minecraftforge.common.util.Constants.NBT;

public class ProtectedTileEntityChest extends TileEntityChest {
	
	static final String COMPOUND_TAG_ID_CHEST_LOCK = "SILock";
	static final String COMPOUND_TAG_ID_CHEST_LOCK_OWNER = "owner";
	static final String COMPOUND_TAG_ID_CHEST_LOCK_ID = "lockId";
	
	
	private String lockID;
	private UUID owner;
	
	
	public ProtectedTileEntityChest(TileEntityChest chest) {
		worldObj = chest.getWorldObj();
		blockType = chest.blockType;
		blockMetadata = chest.getBlockMetadata();
		lidAngle = chest.lidAngle;
		prevLidAngle = chest.prevLidAngle;
		adjacentChestChecked = chest.adjacentChestChecked;
		adjacentChestXNeg = chest.adjacentChestXNeg;
		adjacentChestXPos = chest.adjacentChestXPos;
		adjacentChestZNeg = chest.adjacentChestZNeg;
		adjacentChestZPos = chest.adjacentChestZPos;
		tileEntityInvalid = chest.isInvalid();
		xCoord = chest.xCoord;
		yCoord = chest.yCoord;
		zCoord = chest.zCoord;
		for (int i = 0; i < chest.getSizeInventory(); i++)
			setInventorySlotContents(i, chest.getStackInSlot(i));
	}

	@Override
	public void readFromNBT(NBTTagCompound arg0) {
		if (arg0.hasKey(COMPOUND_TAG_ID_CHEST_LOCK, NBT.TAG_COMPOUND)) {
			lockID = arg0.getCompoundTag(COMPOUND_TAG_ID_CHEST_LOCK).getString(COMPOUND_TAG_ID_CHEST_LOCK_ID);
			owner = UUID.fromString(arg0.getCompoundTag(COMPOUND_TAG_ID_CHEST_LOCK).getString(COMPOUND_TAG_ID_CHEST_LOCK_OWNER));
		}
		super.readFromNBT(arg0);
	}
	
	@Override
	public Packet getDescriptionPacket() {
		return super.getDescriptionPacket();
	}
	
	@Override
	public void writeToNBT(NBTTagCompound arg0) {
		NBTTagCompound tag = new NBTTagCompound();
		tag.setString(COMPOUND_TAG_ID_CHEST_LOCK_ID, lockID);
		tag.setString(COMPOUND_TAG_ID_CHEST_LOCK_OWNER, owner.toString());
		
		arg0.setTag(COMPOUND_TAG_ID_CHEST_LOCK, tag);
		super.writeToNBT(arg0);
	}
}

{'fraction_non_alphanumeric': 0.0907204269196561, 'fraction_numerical': 0.013341239252890602, 'mean_word_length': 6.014553014553014, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6350998', 'n_tokens_mistral': 1317, 'n_tokens_neox': 1203, 'n_words': 189}