<commit_before>package zmaster587.advancedRocketry.tile.multiblock;

import io.netty.buffer.ByteBuf;

import java.util.LinkedList;
import java.util.List;

import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.ITickable;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.text.TextComponentString;
import net.minecraft.world.World;
import net.minecraftforge.common.DimensionManager;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import zmaster587.advancedRocketry.api.AdvancedRocketryItems;
import zmaster587.advancedRocketry.entity.EntityElevatorCapsule;
import zmaster587.advancedRocketry.inventory.modules.ModuleStellarBackground;
import zmaster587.advancedRocketry.item.ItemSpaceElevatorChip;
import zmaster587.advancedRocketry.util.DimensionBlockPosition;
import zmaster587.libVulpes.LibVulpes;
import zmaster587.libVulpes.api.LibVulpesBlocks;
import zmaster587.libVulpes.block.BlockMeta;
import zmaster587.libVulpes.block.RotatableBlock;
import zmaster587.libVulpes.interfaces.ILinkableTile;
import zmaster587.libVulpes.inventory.GuiHandler;
import zmaster587.libVulpes.inventory.TextureResources;
import zmaster587.libVulpes.inventory.modules.ModuleBase;
import zmaster587.libVulpes.inventory.modules.ModuleButton;
import zmaster587.libVulpes.inventory.modules.ModuleContainerPan;
import zmaster587.libVulpes.inventory.modules.ModuleSlotArray;
import zmaster587.libVulpes.inventory.modules.ModuleText;
import zmaster587.libVulpes.inventory.modules.ModuleTexturedSlotArray;
import zmaster587.libVulpes.items.ItemLinker;
import zmaster587.libVulpes.network.PacketHandler;
import zmaster587.libVulpes.network.PacketMachine;
import zmaster587.libVulpes.tile.multiblock.TileMultiPowerConsumer;
import zmaster587.libVulpes.util.EmbeddedInventory;
import zmaster587.libVulpes.util.HashedBlockPosition;

public class TileSpaceElevator extends TileMultiPowerConsumer implements ILinkableTile, IInventory, ITickable {

	Object[][][] structure =
		{
			{
				{null,null,null,null,null,null,null},
				{null,Blocks.REDSTONE_LAMP,null,Blocks.AIR,null,Blocks.REDSTONE_LAMP,null},
				{null,null,Blocks.AIR,Blocks.AIR,Blocks.AIR,null,null},
				{null,Blocks.AIR,Blocks.AIR,Blocks.AIR,Blocks.AIR,Blocks.AIR,null},
				{null,null,Blocks.AIR,Blocks.AIR,Blocks.AIR,null,null},
				{null,Blocks.REDSTONE_LAMP,null,Blocks.AIR,null,Blocks.REDSTONE_LAMP,null},
				{null,null,null,null,null,null,null},
			},
			{
				{null,null,'*','*','*',null,null},
				{null,'*','*',Blocks.AIR,'*','*',null},
				{'*','*',Blocks.AIR,Blocks.AIR,Blocks.AIR,'*','*'},
				{'*',Blocks.AIR,Blocks.AIR,Blocks.AIR,Blocks.AIR,Blocks.AIR,'*'},
				{'*','*',Blocks.AIR,Blocks.AIR,Blocks.AIR,'*','*'},
				{null,'*','*',Blocks.AIR,'*','*',null},
				{null,null,'*','*','*',null,null},
			},
			{
				{null,'*','*',null,'c','*',null},
				{'*','*','*',null,'*','*','*'},
				{'*','*',Blocks.AIR,Blocks.AIR,Blocks.AIR,'*','*'},
				{'*','*',Blocks.AIR,Blocks.AIR,Blocks.AIR,'*','*'},
				{'*','*',Blocks.AIR,Blocks.AIR,Blocks.AIR,'*','*'},
				{'*','*','*','*','*','*','*'},
				{null,'*','*','*','*','*',null},
			},
			{
				{'*','*','*',null,'*','*','*'},
				{'*','*','*',null,'*','*','*'},
				{'*','*',Blocks.AIR,Blocks.AIR,Blocks.AIR,'*','*'},
				{'*','*',Blocks.AIR,Blocks.AIR,Blocks.AIR,'*','*'},
				{'*','*',Blocks.AIR,Blocks.AIR,Blocks.AIR,'*','*'},
				{'*','*','*','*','*','*','*'},
				{'*','*','*','*','*','*','*'},
			},
			{
				{ '*', '*', '*', '*', '*', '*', '*' },
				{ '*', '*', "blockCoil", "blockCoil", "blockCoil", '*', '*' },
				{ LibVulpesBlocks.motors, "blockCoil", Blocks.AIR, Blocks.AIR, Blocks.AIR, "blockCoil", LibVulpesBlocks.motors },
				{ 'P', "blockCoil", Blocks.AIR, Blocks.AIR, Blocks.AIR, "blockCoil", 'P' },
				{ LibVulpesBlocks.motors, "blockCoil", Blocks.AIR, Blocks.AIR, Blocks.AIR, "blockCoil", LibVulpesBlocks.motors },
				{ '*', '*', "blockCoil", "blockCoil", "blockCoil", '*', '*' },
				{ '*', '*', LibVulpesBlocks.motors, 'P', LibVulpesBlocks.motors, '*', '*' },
			}
		};

	EmbeddedInventory inv;
	EntityElevatorCapsule capsule;
	boolean firstTick;
	DimensionBlockPosition dimBlockPos;

	private ModuleText landingPadDisplayText;
	private static final byte SUMMON_PACKET = 2;
	private static final byte SELECT_DST = 3;
	private static final int BUTTON_ID_OFFSET = 5;

	public TileSpaceElevator() {
		super();
		inv = new EmbeddedInventory(1);
		capsule = null;
		firstTick = true;

		landingPadDisplayText = new ModuleText(256, 16, "", 0x00FF00, 2f);
		landingPadDisplayText.setColor(0x00ff00);
		dimBlockPos = null;
	}

	@Override
	public Object[][][] getStructure() {
		return structure;
	}

	@Override
	public String getMachineName() {
		return "tile.spaceElevator.name";
	}

	@Override
	public AxisAlignedBB getRenderBoundingBox() {
		
		return new AxisAlignedBB(pos.add(-5,-3,-5),pos.add(5,3000,5));
	}

	@Override
	public List<ModuleBase> getModules(int ID, EntityPlayer player) {<commit_msg>balance changes to space elevator<commit_after>package zmaster587.advancedRocketry.tile.multiblock;

import io.netty.buffer.ByteBuf;

import java.util.LinkedList;
import java.util.List;

import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.ITickable;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.text.TextComponentString;
import net.minecraft.world.World;
import net.minecraftforge.common.DimensionManager;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import zmaster587.advancedRocketry.api.AdvancedRocketryItems;
import zmaster587.advancedRocketry.entity.EntityElevatorCapsule;
import zmaster587.advancedRocketry.inventory.modules.ModuleStellarBackground;
import zmaster587.advancedRocketry.item.ItemSpaceElevatorChip;
import zmaster587.advancedRocketry.util.DimensionBlockPosition;
import zmaster587.libVulpes.LibVulpes;
import zmaster587.libVulpes.api.LibVulpesBlocks;
import zmaster587.libVulpes.block.BlockMeta;
import zmaster587.libVulpes.block.RotatableBlock;
import zmaster587.libVulpes.interfaces.ILinkableTile;
import zmaster587.libVulpes.inventory.GuiHandler;
import zmaster587.libVulpes.inventory.TextureResources;
import zmaster587.libVulpes.inventory.modules.ModuleBase;
import zmaster587.libVulpes.inventory.modules.ModuleButton;
import zmaster587.libVulpes.inventory.modules.ModuleContainerPan;
import zmaster587.libVulpes.inventory.modules.ModuleSlotArray;
import zmaster587.libVulpes.inventory.modules.ModuleText;
import zmaster587.libVulpes.inventory.modules.ModuleTexturedSlotArray;
import zmaster587.libVulpes.items.ItemLinker;
import zmaster587.libVulpes.network.PacketHandler;
import zmaster587.libVulpes.network.PacketMachine;
import zmaster587.libVulpes.tile.multiblock.TileMultiPowerConsumer;
import zmaster587.libVulpes.util.EmbeddedInventory;
import zmaster587.libVulpes.util.HashedBlockPosition;

public class TileSpaceElevator extends TileMultiPowerConsumer implements ILinkableTile, IInventory, ITickable {

	Object[][][] structure =
		{
			{
				{null,null,null,null,null,null,null},
				{null,Blocks.REDSTONE_LAMP,null,Blocks.AIR,null,Blocks.REDSTONE_LAMP,null},
				{null,null,Blocks.AIR,Blocks.AIR,Blocks.AIR,null,null},
				{null,Blocks.AIR,Blocks.AIR,Blocks.AIR,Blocks.AIR,Blocks.AIR,null},
				{null,null,Blocks.AIR,Blocks.AIR,Blocks.AIR,null,null},
				{null,Blocks.REDSTONE_LAMP,null,Blocks.AIR,null,Blocks.REDSTONE_LAMP,null},
				{null,null,null,null,null,null,null},
			},
			{
				{null,null,'*','*','*',null,null},
				{null,'*','*','*','*','*',null},
				{'*','*',Blocks.AIR,Blocks.AIR,Blocks.AIR,'*','*'},
				{'*','*',Blocks.AIR,Blocks.AIR,Blocks.AIR,'*','*'},
				{'*','*',Blocks.AIR,Blocks.AIR,Blocks.AIR,'*','*'},
				{null,'*','*','*','*','*',null},
				{null,null,'*','*','*',null,null},
			},
			{
				{null,'*','*',null,'c','*',null},
				{'*','*','*',null,'*','*','*'},
				{'*','*',Blocks.AIR,Blocks.AIR,Blocks.AIR,'*','*'},
				{'*','*',Blocks.AIR,Blocks.AIR,Blocks.AIR,'*','*'},
				{'*','*',Blocks.AIR,Blocks.AIR,Blocks.AIR,'*','*'},
				{'*','*','*','*','*','*','*'},
				{null,'*','*','*','*','*',null},
			},
			{
				{'*','*','*',null,'*','*','*'},
				{'*','*','*',null,'*','*','*'},
				{'*','*',Blocks.AIR,Blocks.AIR,Blocks.AIR,'*','*'},
				{'*','*',Blocks.AIR,Blocks.AIR,Blocks.AIR,'*','*'},
				{'*','*',Blocks.AIR,Blocks.AIR,Blocks.AIR,'*','*'},
				{'*','*','*','*','*','*','*'},
				{'*','*','*','*','*','*','*'},
			},
			{
				{ '*', '*', '*', '*', '*', '*', '*' },
				{ '*', '*', "blockCoil", "blockCoil", "blockCoil", '*', '*' },
				{ LibVulpesBlocks.motors, "blockCoil", Blocks.AIR, Blocks.AIR, Blocks.AIR, "blockCoil", LibVulpesBlocks.motors },
				{ 'P', "blockCoil", Blocks.AIR, Blocks.AIR, Blocks.AIR, "blockCoil", 'P' },
				{ LibVulpesBlocks.motors, "blockCoil", Blocks.AIR, Blocks.AIR, Blocks.AIR, "blockCoil", LibVulpesBlocks.motors },
				{ '*', '*', "blockCoil", "blockCoil", "blockCoil", '*', '*' },
				{ '*', '*', LibVulpesBlocks.motors, 'P', LibVulpesBlocks.motors, '*', '*' },
			}
		};

	EmbeddedInventory inv;
	EntityElevatorCapsule capsule;
	boolean firstTick;
	DimensionBlockPosition dimBlockPos;

	private ModuleText landingPadDisplayText;
	private static final byte SUMMON_PACKET = 2;
	private static final byte SELECT_DST = 3;
	private static final int BUTTON_ID_OFFSET = 5;

	public TileSpaceElevator() {
		super();
		inv = new EmbeddedInventory(1);
		capsule = null;
		firstTick = true;

		landingPadDisplayText = new ModuleText(256, 16, "", 0x00FF00, 2f);
		landingPadDisplayText.setColor(0x00ff00);
		dimBlockPos = null;
	}
	
	@Override
	public void deconstructMultiBlock(World world, BlockPos destroyedPos,
			boolean blockBroken, IBlockState state) {
		super.deconstructMultiBlock(world, destroyedPos, blockBroken, state);
		
		Entity e = getCapsuleOnLine();
		
		if(e != null)
			e.setDead();
	}

	@Override
	public Object[][][] getStructure() {
		return structure;
	}

	@Override
	public String getMachineName() {
		return "tile.spaceElevator.name";
	}

	@Override
	public AxisAlignedBB getRenderBoundingBox() {
		
		return new AxisAlignedBB(pos.add(-5,-3,-5),pos.add(5,3000,5));
	}

	@Override
	public List<ModuleBase> getModules(int ID, EntityPlayer player) {
{'fraction_non_alphanumeric': 0.1978565539983512, 'fraction_numerical': 0.019052853347989375, 'mean_word_length': 6.117340286831812, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '2896320', 'n_tokens_mistral': 4534, 'n_tokens_neox': 4052, 'n_words': 481}