|
@ -0,0 +1,12 @@
|
|||
package com.pahimar.ee3.array;
|
||||
|
||||
import com.pahimar.ee3.reference.Names;
|
||||
import com.pahimar.ee3.reference.Textures;
|
||||
|
||||
public class AlchemyArrayAccelerant extends AlchemyArrayEE
|
||||
{
|
||||
public AlchemyArrayAccelerant()
|
||||
{
|
||||
super(Textures.AlchemyArray.ACCELERANT_ALCHEMY_ARRAY, Names.AlchemyArrays.ACCELERANT_ALCHEMY_ARRAY);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
package com.pahimar.ee3.array;
|
||||
|
||||
import com.pahimar.ee3.reference.Names;
|
||||
import com.pahimar.ee3.reference.Textures;
|
||||
|
||||
public class AlchemyArrayCombustion extends AlchemyArrayEE
|
||||
{
|
||||
public AlchemyArrayCombustion()
|
||||
{
|
||||
super(Textures.AlchemyArray.COMBUSTION_ALCHEMY_ARRAY, Names.AlchemyArrays.COMBUSTION_ALCHEMY_ARRAY);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
package com.pahimar.ee3.array;
|
||||
|
||||
import com.pahimar.ee3.reference.Names;
|
||||
import com.pahimar.ee3.reference.Textures;
|
||||
|
||||
public class AlchemyArrayConstruction extends AlchemyArrayEE
|
||||
{
|
||||
public AlchemyArrayConstruction()
|
||||
{
|
||||
super(Textures.AlchemyArray.CONSTRUCTION_ALCHEMY_ARRAY, Names.AlchemyArrays.CONSTRUCTION_ALCHEMY_ARRAY);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
package com.pahimar.ee3.array;
|
||||
|
||||
import com.pahimar.ee3.reference.Names;
|
||||
import com.pahimar.ee3.reference.Textures;
|
||||
|
||||
public class AlchemyArrayConveyor extends AlchemyArrayEE
|
||||
{
|
||||
public AlchemyArrayConveyor()
|
||||
{
|
||||
super(Textures.AlchemyArray.CONVEYOR_ALCHEMY_ARRAY, Names.AlchemyArrays.CONVEYOR_ALCHEMY_ARRAY);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
package com.pahimar.ee3.array;
|
||||
|
||||
import com.pahimar.ee3.reference.Names;
|
||||
import com.pahimar.ee3.reference.Textures;
|
||||
|
||||
public class AlchemyArrayDestruction extends AlchemyArrayEE
|
||||
{
|
||||
public AlchemyArrayDestruction()
|
||||
{
|
||||
super(Textures.AlchemyArray.DESTRUCTION_ALCHEMY_ARRAY, Names.AlchemyArrays.DESTRUCTION_ALCHEMY_ARRAY);
|
||||
}
|
||||
}
|
|
@ -3,7 +3,7 @@ package com.pahimar.ee3.array;
|
|||
import com.pahimar.ee3.api.array.AlchemyArray;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class AlchemyArrayEE extends AlchemyArray
|
||||
public abstract class AlchemyArrayEE extends AlchemyArray
|
||||
{
|
||||
public AlchemyArrayEE(ResourceLocation texture, String unlocalizedName)
|
||||
{
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
package com.pahimar.ee3.array;
|
||||
|
||||
import com.pahimar.ee3.reference.Names;
|
||||
import com.pahimar.ee3.reference.Textures;
|
||||
|
||||
public class AlchemyArrayGelid extends AlchemyArrayEE
|
||||
{
|
||||
public AlchemyArrayGelid()
|
||||
{
|
||||
super(Textures.AlchemyArray.GELID_ALCHEMY_ARRAY, Names.AlchemyArrays.GELID_ALCHEMY_ARRAY);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
package com.pahimar.ee3.array;
|
||||
|
||||
import com.pahimar.ee3.reference.Names;
|
||||
import com.pahimar.ee3.reference.Textures;
|
||||
|
||||
public class AlchemyArrayParthenogenesis extends AlchemyArrayEE
|
||||
{
|
||||
public AlchemyArrayParthenogenesis()
|
||||
{
|
||||
super(Textures.AlchemyArray.PARTHENOGENESIS_ALCHEMY_ARRAY, Names.AlchemyArrays.PARTHENOGENESIS_ALCHEMY_ARRAY);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
package com.pahimar.ee3.array;
|
||||
|
||||
import com.pahimar.ee3.reference.Names;
|
||||
import com.pahimar.ee3.reference.Textures;
|
||||
|
||||
public class AlchemyArrayTransfiguration extends AlchemyArrayEE
|
||||
{
|
||||
public AlchemyArrayTransfiguration()
|
||||
{
|
||||
super(Textures.AlchemyArray.TRANSFIGURATION_ALCHEMY_ARRAY, Names.AlchemyArrays.TRANSFIGURATION_ALCHEMY_ARRAY);
|
||||
}
|
||||
}
|
|
@ -1,6 +1,5 @@
|
|||
package com.pahimar.ee3.array;
|
||||
|
||||
import com.pahimar.ee3.api.array.AlchemyArray;
|
||||
import com.pahimar.ee3.init.ModBlocks;
|
||||
import com.pahimar.ee3.reference.Names;
|
||||
import com.pahimar.ee3.reference.Particles;
|
||||
|
@ -22,11 +21,11 @@ import net.minecraftforge.common.util.ForgeDirection;
|
|||
|
||||
import java.util.Random;
|
||||
|
||||
public class TransmutationAlchemyArray extends AlchemyArray implements IInventory
|
||||
public class AlchemyArrayTransmutation extends AlchemyArrayEE implements IInventory
|
||||
{
|
||||
private ItemStack[] inventory = new ItemStack[25];
|
||||
|
||||
public TransmutationAlchemyArray()
|
||||
public AlchemyArrayTransmutation()
|
||||
{
|
||||
super(Textures.AlchemyArray.TRANSMUTATION_ALCHEMY_ARRAY, Names.AlchemyArrays.TRANSMUTATION_ALCHEMY_ARRAY);
|
||||
}
|
|
@ -10,7 +10,6 @@ import com.pahimar.ee3.tileentity.TileEntityAlchemicalChestMedium;
|
|||
import com.pahimar.ee3.tileentity.TileEntityAlchemicalChestSmall;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.ITileEntityProvider;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
@ -22,7 +21,7 @@ import net.minecraftforge.common.util.ForgeDirection;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
public class BlockAlchemicalChest extends BlockEE implements ITileEntityProvider
|
||||
public class BlockAlchemicalChest extends BlockTileEntityEE
|
||||
{
|
||||
public BlockAlchemicalChest()
|
||||
{
|
||||
|
@ -93,14 +92,6 @@ public class BlockAlchemicalChest extends BlockEE implements ITileEntityProvider
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockEventReceived(World world, int x, int y, int z, int eventId, int eventData)
|
||||
{
|
||||
super.onBlockEventReceived(world, x, y, z, eventId, eventData);
|
||||
TileEntity tileentity = world.getTileEntity(x, y, z);
|
||||
return tileentity != null && tileentity.receiveClientEvent(eventId, eventData);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubBlocks(Item item, CreativeTabs creativeTabs, List list)
|
||||
|
|
|
@ -11,7 +11,6 @@ import com.pahimar.ee3.tileentity.TileEntityEE;
|
|||
import com.pahimar.ee3.util.CommonSoundHelper;
|
||||
import com.pahimar.ee3.util.EntityHelper;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.ITileEntityProvider;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
|
@ -30,7 +29,7 @@ import net.minecraftforge.common.util.ForgeDirection;
|
|||
|
||||
import java.util.Random;
|
||||
|
||||
public class BlockAlchemyArray extends BlockEE implements ITileEntityProvider
|
||||
public class BlockAlchemyArray extends BlockTileEntityEE
|
||||
{
|
||||
public BlockAlchemyArray()
|
||||
{
|
||||
|
|
|
@ -9,7 +9,6 @@ import com.pahimar.ee3.reference.RenderIds;
|
|||
import com.pahimar.ee3.tileentity.TileEntityAludel;
|
||||
import com.pahimar.ee3.tileentity.TileEntityGlassBell;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.ITileEntityProvider;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
@ -22,7 +21,7 @@ import net.minecraftforge.common.util.ForgeDirection;
|
|||
|
||||
import java.util.Random;
|
||||
|
||||
public class BlockAludel extends BlockEE implements ITileEntityProvider
|
||||
public class BlockAludel extends BlockTileEntityEE
|
||||
{
|
||||
public BlockAludel()
|
||||
{
|
||||
|
@ -126,14 +125,6 @@ public class BlockAludel extends BlockEE implements ITileEntityProvider
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockEventReceived(World world, int x, int y, int z, int eventId, int eventData)
|
||||
{
|
||||
super.onBlockEventReceived(world, x, y, z, eventId, eventData);
|
||||
TileEntity tileentity = world.getTileEntity(x, y, z);
|
||||
return tileentity != null && tileentity.receiveClientEvent(eventId, eventData);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getLightValue(IBlockAccess world, int x, int y, int z)
|
||||
{
|
||||
|
|
|
@ -5,13 +5,12 @@ import com.pahimar.ee3.reference.GUIs;
|
|||
import com.pahimar.ee3.reference.Names;
|
||||
import com.pahimar.ee3.reference.RenderIds;
|
||||
import com.pahimar.ee3.tileentity.TileEntityAugmentationTable;
|
||||
import net.minecraft.block.ITileEntityProvider;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class BlockAugmentationTable extends BlockEE implements ITileEntityProvider
|
||||
public class BlockAugmentationTable extends BlockTileEntityEE
|
||||
{
|
||||
public BlockAugmentationTable()
|
||||
{
|
||||
|
|
|
@ -6,7 +6,6 @@ import com.pahimar.ee3.reference.Names;
|
|||
import com.pahimar.ee3.reference.Particles;
|
||||
import com.pahimar.ee3.reference.RenderIds;
|
||||
import com.pahimar.ee3.tileentity.TileEntityCalcinator;
|
||||
import net.minecraft.block.ITileEntityProvider;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
@ -15,7 +14,7 @@ import net.minecraft.world.World;
|
|||
|
||||
import java.util.Random;
|
||||
|
||||
public class BlockCalcinator extends BlockEE implements ITileEntityProvider
|
||||
public class BlockCalcinator extends BlockTileEntityEE
|
||||
{
|
||||
public BlockCalcinator()
|
||||
{
|
||||
|
@ -56,21 +55,12 @@ public class BlockCalcinator extends BlockEE implements ITileEntityProvider
|
|||
{
|
||||
if (((TileEntityCalcinator) world.getTileEntity(x, y, z)).getState() == 1)
|
||||
{
|
||||
// Fire pot particles
|
||||
world.spawnParticle(Particles.NORMAL_SMOKE, (double) x + 0.5F, (double) y + 0.4F, (double) ((z + 0.5F) + (random.nextFloat() * 0.5F - 0.3F)), 0.0D, 0.0D, 0.0D);
|
||||
world.spawnParticle(Particles.FLAME, (double) x + 0.5F, (double) y + 0.4F, (double) z + 0.5F, 0.0D, 0.0D, 0.0D);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockEventReceived(World world, int x, int y, int z, int eventId, int eventData)
|
||||
{
|
||||
super.onBlockEventReceived(world, x, y, z, eventId, eventData);
|
||||
TileEntity tileentity = world.getTileEntity(x, y, z);
|
||||
return tileentity != null && tileentity.receiveClientEvent(eventId, eventData);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9)
|
||||
{
|
||||
|
|
|
@ -6,7 +6,6 @@ import com.pahimar.ee3.tileentity.TileEntityAlchemyArray;
|
|||
import com.pahimar.ee3.tileentity.TileEntityDummyArray;
|
||||
import com.pahimar.ee3.tileentity.TileEntityEE;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.ITileEntityProvider;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
|
@ -23,7 +22,7 @@ import net.minecraftforge.common.util.ForgeDirection;
|
|||
|
||||
import java.util.Random;
|
||||
|
||||
public class BlockDummyArray extends BlockEE implements ITileEntityProvider
|
||||
public class BlockDummyArray extends BlockTileEntityEE
|
||||
{
|
||||
public BlockDummyArray()
|
||||
{
|
||||
|
|
|
@ -7,7 +7,6 @@ import com.pahimar.ee3.reference.RenderIds;
|
|||
import com.pahimar.ee3.tileentity.TileEntityAludel;
|
||||
import com.pahimar.ee3.tileentity.TileEntityEE;
|
||||
import com.pahimar.ee3.tileentity.TileEntityGlassBell;
|
||||
import net.minecraft.block.ITileEntityProvider;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
@ -19,7 +18,7 @@ import net.minecraft.world.IBlockAccess;
|
|||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class BlockGlassBell extends BlockEE implements ITileEntityProvider
|
||||
public class BlockGlassBell extends BlockTileEntityEE
|
||||
{
|
||||
public BlockGlassBell()
|
||||
{
|
||||
|
|
|
@ -5,13 +5,12 @@ import com.pahimar.ee3.reference.GUIs;
|
|||
import com.pahimar.ee3.reference.Names;
|
||||
import com.pahimar.ee3.reference.RenderIds;
|
||||
import com.pahimar.ee3.tileentity.TileEntityResearchStation;
|
||||
import net.minecraft.block.ITileEntityProvider;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class BlockResearchStation extends BlockEE implements ITileEntityProvider
|
||||
public class BlockResearchStation extends BlockTileEntityEE
|
||||
{
|
||||
public BlockResearchStation()
|
||||
{
|
||||
|
|
|
@ -0,0 +1,131 @@
|
|||
package com.pahimar.ee3.block;
|
||||
|
||||
import com.pahimar.ee3.creativetab.CreativeTab;
|
||||
import com.pahimar.ee3.reference.Textures;
|
||||
import com.pahimar.ee3.tileentity.TileEntityEE;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
public abstract class BlockTileEntityEE extends BlockContainer
|
||||
{
|
||||
protected BlockTileEntityEE(Material material)
|
||||
{
|
||||
super(material);
|
||||
this.setCreativeTab(CreativeTab.EE3_TAB);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName()
|
||||
{
|
||||
return String.format("tile.%s%s", Textures.RESOURCE_PREFIX, getUnwrappedUnlocalizedName(super.getUnlocalizedName()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconRegister)
|
||||
{
|
||||
blockIcon = iconRegister.registerIcon(String.format("%s", getUnwrappedUnlocalizedName(this.getUnlocalizedName())));
|
||||
}
|
||||
|
||||
protected String getUnwrappedUnlocalizedName(String unlocalizedName)
|
||||
{
|
||||
return unlocalizedName.substring(unlocalizedName.indexOf(".") + 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void breakBlock(World world, int x, int y, int z, Block block, int meta)
|
||||
{
|
||||
dropInventory(world, x, y, z);
|
||||
super.breakBlock(world, x, y, z, block, meta);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase entityLiving, ItemStack itemStack)
|
||||
{
|
||||
super.onBlockPlacedBy(world, x, y, z, entityLiving, itemStack);
|
||||
if (world.getTileEntity(x, y, z) instanceof TileEntityEE)
|
||||
{
|
||||
int direction = 0;
|
||||
int facing = MathHelper.floor_double(entityLiving.rotationYaw * 4.0F / 360.0F + 0.5D) & 3;
|
||||
|
||||
if (facing == 0)
|
||||
{
|
||||
direction = ForgeDirection.NORTH.ordinal();
|
||||
}
|
||||
else if (facing == 1)
|
||||
{
|
||||
direction = ForgeDirection.EAST.ordinal();
|
||||
}
|
||||
else if (facing == 2)
|
||||
{
|
||||
direction = ForgeDirection.SOUTH.ordinal();
|
||||
}
|
||||
else if (facing == 3)
|
||||
{
|
||||
direction = ForgeDirection.WEST.ordinal();
|
||||
}
|
||||
|
||||
if (itemStack.hasDisplayName())
|
||||
{
|
||||
((TileEntityEE) world.getTileEntity(x, y, z)).setCustomName(itemStack.getDisplayName());
|
||||
}
|
||||
|
||||
((TileEntityEE) world.getTileEntity(x, y, z)).setOrientation(direction);
|
||||
}
|
||||
}
|
||||
|
||||
protected void dropInventory(World world, int x, int y, int z)
|
||||
{
|
||||
TileEntity tileEntity = world.getTileEntity(x, y, z);
|
||||
|
||||
if (!(tileEntity instanceof IInventory))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
IInventory inventory = (IInventory) tileEntity;
|
||||
|
||||
for (int i = 0; i < inventory.getSizeInventory(); i++)
|
||||
{
|
||||
ItemStack itemStack = inventory.getStackInSlot(i);
|
||||
|
||||
if (itemStack != null && itemStack.stackSize > 0)
|
||||
{
|
||||
Random rand = new Random();
|
||||
|
||||
float dX = rand.nextFloat() * 0.8F + 0.1F;
|
||||
float dY = rand.nextFloat() * 0.8F + 0.1F;
|
||||
float dZ = rand.nextFloat() * 0.8F + 0.1F;
|
||||
|
||||
EntityItem entityItem = new EntityItem(world, x + dX, y + dY, z + dZ, itemStack.copy());
|
||||
|
||||
if (itemStack.hasTagCompound())
|
||||
{
|
||||
entityItem.getEntityItem().setTagCompound((NBTTagCompound) itemStack.getTagCompound().copy());
|
||||
}
|
||||
|
||||
float factor = 0.05F;
|
||||
entityItem.motionX = rand.nextGaussian() * factor;
|
||||
entityItem.motionY = rand.nextGaussian() * factor + 0.2F;
|
||||
entityItem.motionZ = rand.nextGaussian() * factor;
|
||||
world.spawnEntityInWorld(entityItem);
|
||||
itemStack.stackSize = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -6,7 +6,6 @@ import com.pahimar.ee3.reference.GUIs;
|
|||
import com.pahimar.ee3.reference.Names;
|
||||
import com.pahimar.ee3.reference.RenderIds;
|
||||
import com.pahimar.ee3.tileentity.TileEntityTransmutationTablet;
|
||||
import net.minecraft.block.ITileEntityProvider;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
|
@ -16,7 +15,7 @@ import net.minecraft.world.World;
|
|||
|
||||
import java.util.Random;
|
||||
|
||||
public class BlockTransmutationTablet extends BlockEE implements ITileEntityProvider
|
||||
public class BlockTransmutationTablet extends BlockTileEntityEE
|
||||
{
|
||||
public BlockTransmutationTablet()
|
||||
{
|
||||
|
|
|
@ -51,6 +51,14 @@ public class TileEntityRendererAlchemyArray extends TileEntitySpecialRenderer
|
|||
{
|
||||
scale = 5;
|
||||
}
|
||||
else if (tileEntityAlchemyArray.getSize() == 4)
|
||||
{
|
||||
scale = 7;
|
||||
}
|
||||
else if (tileEntityAlchemyArray.getSize() == 5)
|
||||
{
|
||||
scale = 9;
|
||||
}
|
||||
|
||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
|
|
|
@ -1,21 +1,19 @@
|
|||
package com.pahimar.ee3.client.renderer.tileentity;
|
||||
|
||||
import com.pahimar.ee3.client.renderer.model.ModelResearchStation;
|
||||
import com.pahimar.ee3.reference.Textures;
|
||||
import com.pahimar.ee3.tileentity.TileEntityResearchStation;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.entity.RenderItem;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.pahimar.ee3.client.renderer.model.ModelResearchStation;
|
||||
import com.pahimar.ee3.reference.Textures;
|
||||
import com.pahimar.ee3.tileentity.TileEntityResearchStation;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class TileEntityRendererResearchStation extends TileEntitySpecialRenderer
|
||||
{
|
||||
|
@ -67,7 +65,7 @@ public class TileEntityRendererResearchStation extends TileEntitySpecialRenderer
|
|||
GL11.glPushMatrix();
|
||||
|
||||
ItemStack tome = tileEntityResearchStation.getStackInSlot(TileEntityResearchStation.TOME_SLOT_INVENTORY_INDEX);
|
||||
if (tome != null)
|
||||
if (Minecraft.getMinecraft().gameSettings.fancyGraphics && tome != null)
|
||||
{
|
||||
EntityItem ghostEntityItem = new EntityItem(tileEntityResearchStation.getWorldObj());
|
||||
ghostEntityItem.hoverStart = 0.0F;
|
||||
|
|
|
@ -76,7 +76,7 @@ public class CommandSetItemNotRecoverable extends CommandBase
|
|||
}
|
||||
}
|
||||
|
||||
AbilityRegistryProxy.setAsRecoverable(itemStack);
|
||||
AbilityRegistryProxy.setAsNotRecoverable(itemStack);
|
||||
func_152373_a(commandSender, this, Messages.Commands.SET_ITEM_NOT_RECOVERABLE_SUCCESS, new Object[]{commandSender.getCommandSenderName(), itemStack.func_151000_E()});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -263,74 +263,6 @@ public class WrappedStack implements Comparable<WrappedStack>, JsonDeserializer<
|
|||
this.stackSize = stackSize;
|
||||
}
|
||||
|
||||
public static NBTTagCompound toNBTTagCompound(WrappedStack wrappedStack)
|
||||
{
|
||||
if (wrappedStack != null && wrappedStack.getWrappedObject() != null)
|
||||
{
|
||||
NBTTagCompound wrappedStackTagCompound = new NBTTagCompound();
|
||||
if (wrappedStack.getWrappedObject() instanceof ItemStack)
|
||||
{
|
||||
NBTTagCompound wrappedItemTagCompound = new NBTTagCompound();
|
||||
((ItemStack) wrappedStack.getWrappedObject()).writeToNBT(wrappedItemTagCompound);
|
||||
wrappedStackTagCompound.setInteger("type", 0);
|
||||
wrappedStackTagCompound.setTag("objectData", wrappedItemTagCompound);
|
||||
wrappedStackTagCompound.setInteger("stackSize", wrappedStack.getStackSize());
|
||||
return wrappedStackTagCompound;
|
||||
}
|
||||
else if (wrappedStack.getWrappedObject() instanceof OreStack)
|
||||
{
|
||||
NBTTagCompound wrappedOreTagCompound = new NBTTagCompound();
|
||||
((OreStack) wrappedStack.getWrappedObject()).writeToNBT(wrappedOreTagCompound);
|
||||
wrappedStackTagCompound.setInteger("type", 1);
|
||||
wrappedStackTagCompound.setTag("objectData", wrappedOreTagCompound);
|
||||
wrappedStackTagCompound.setInteger("stackSize", wrappedStack.getStackSize());
|
||||
return wrappedStackTagCompound;
|
||||
}
|
||||
else if (wrappedStack.getWrappedObject() instanceof FluidStack)
|
||||
{
|
||||
NBTTagCompound wrappedFluidTagCompound = new NBTTagCompound();
|
||||
((FluidStack) wrappedStack.getWrappedObject()).writeToNBT(wrappedFluidTagCompound);
|
||||
wrappedStackTagCompound.setInteger("type", 2);
|
||||
wrappedStackTagCompound.setTag("objectData", wrappedFluidTagCompound);
|
||||
wrappedStackTagCompound.setInteger("stackSize", wrappedStack.getStackSize());
|
||||
return wrappedStackTagCompound;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public static WrappedStack fromNBTTagCompound(NBTTagCompound nbtTagCompound)
|
||||
{
|
||||
if (nbtTagCompound.hasKey("type") && nbtTagCompound.hasKey("objectData") && nbtTagCompound.hasKey("stackSize"))
|
||||
{
|
||||
int objectType = nbtTagCompound.getInteger("type");
|
||||
int stackSize = nbtTagCompound.getInteger("stackSize");
|
||||
|
||||
if (objectType == 0)
|
||||
{
|
||||
ItemStack itemStack = ItemStack.loadItemStackFromNBT(nbtTagCompound.getCompoundTag("objectData"));
|
||||
return new WrappedStack(itemStack, stackSize);
|
||||
}
|
||||
else if (objectType == 1)
|
||||
{
|
||||
OreStack oreStack = OreStack.loadOreStackFromNBT(nbtTagCompound.getCompoundTag("objectData"));
|
||||
return new WrappedStack(oreStack, stackSize);
|
||||
}
|
||||
else if (objectType == 2)
|
||||
{
|
||||
FluidStack fluidStack = FluidStack.loadFluidStackFromNBT(nbtTagCompound.getCompoundTag("objectData"));
|
||||
return new WrappedStack(fluidStack, stackSize);
|
||||
}
|
||||
else
|
||||
{
|
||||
return new WrappedStack();
|
||||
}
|
||||
}
|
||||
|
||||
return new WrappedStack();
|
||||
}
|
||||
|
||||
public static WrappedStack wrap(Object object)
|
||||
{
|
||||
if (canBeWrapped(object))
|
||||
|
|
|
@ -15,11 +15,13 @@ public class ConfigurationHandler
|
|||
{
|
||||
public static Configuration configuration;
|
||||
|
||||
private final static String CATEGORY_DEBUG = "general.Debug";
|
||||
|
||||
public static void init(File configFile)
|
||||
{
|
||||
if (configuration == null)
|
||||
{
|
||||
configuration = new Configuration(configFile);
|
||||
configuration = new Configuration(configFile, true);
|
||||
loadConfiguration();
|
||||
}
|
||||
}
|
||||
|
@ -31,6 +33,7 @@ public class ConfigurationHandler
|
|||
Settings.Sounds.soundMode = ConfigurationHelper.getString(configuration, Messages.Configuration.SOUND_MODE, Configuration.CATEGORY_GENERAL, "All", StatCollector.translateToLocal(Messages.Configuration.SOUND_MODE_COMMENT), new String[]{"All", "Self", "None"}, Messages.Configuration.SOUND_MODE_LABEL);
|
||||
Settings.Abilities.onlyLoadFile = configuration.getBoolean(Messages.Configuration.ABILITIES_ONLY_LOAD_FILE, Configuration.CATEGORY_GENERAL, false, StatCollector.translateToLocal(Messages.Configuration.ABILITIES_ONLY_LOAD_FILE_COMMENT), Messages.Configuration.ABILITIES_ONLY_LOAD_FILE_LABEL);
|
||||
Settings.DynamicEnergyValueGeneration.regenerateEnergyValuesWhen = ConfigurationHelper.getString(configuration, Messages.Configuration.REGENERATE_ENERGYVALUES_WHEN, Configuration.CATEGORY_GENERAL, "When Mods Change", StatCollector.translateToLocal(Messages.Configuration.REGENERATE_ENERGYVALUES_WHEN_COMMENT), new String[]{"Never", "When Mods Change", "Always"}, Messages.Configuration.REGENERATE_ENERGYVALUES_WHEN_LABEL);
|
||||
Settings.Debug.logTraceToInfo = configuration.getBoolean(Messages.Configuration.LOG_TRACE_TO_INFO, CATEGORY_DEBUG, false, StatCollector.translateToLocal(Messages.Configuration.LOG_TRACE_TO_INFO_COMMENT), Messages.Configuration.LOG_TRACE_TO_INFO_LABEL);
|
||||
|
||||
if (configuration.hasChanged())
|
||||
{
|
||||
|
|
|
@ -2,14 +2,30 @@ package com.pahimar.ee3.init;
|
|||
|
||||
import com.pahimar.ee3.api.array.AlchemyArray;
|
||||
import com.pahimar.ee3.api.array.AlchemyArrayRegistryProxy;
|
||||
import com.pahimar.ee3.array.TransmutationAlchemyArray;
|
||||
import com.pahimar.ee3.array.*;
|
||||
|
||||
public class AlchemyArrays
|
||||
{
|
||||
public static final AlchemyArray transmutationAlchemyArray = new TransmutationAlchemyArray();
|
||||
public static final AlchemyArray accelerantAlchemyArray = new AlchemyArrayAccelerant();
|
||||
public static final AlchemyArray combustionAlchemyArray = new AlchemyArrayCombustion();
|
||||
public static final AlchemyArray constructionAlchemyArray = new AlchemyArrayConstruction();
|
||||
public static final AlchemyArray conveyorAlchemyArray = new AlchemyArrayConveyor();
|
||||
public static final AlchemyArray destructionAlchemyArray = new AlchemyArrayDestruction();
|
||||
public static final AlchemyArray gelidAlchemyArray = new AlchemyArrayGelid();
|
||||
public static final AlchemyArray parthenogenesisAlchemyArray = new AlchemyArrayParthenogenesis();
|
||||
public static final AlchemyArray transfigurationAlchemyArray = new AlchemyArrayTransfiguration();
|
||||
public static final AlchemyArray transmutationAlchemyArray = new AlchemyArrayTransmutation();
|
||||
|
||||
public static void registerAlchemyArrays()
|
||||
{
|
||||
AlchemyArrayRegistryProxy.registerAlchemyArray(accelerantAlchemyArray);
|
||||
AlchemyArrayRegistryProxy.registerAlchemyArray(combustionAlchemyArray);
|
||||
AlchemyArrayRegistryProxy.registerAlchemyArray(constructionAlchemyArray);
|
||||
AlchemyArrayRegistryProxy.registerAlchemyArray(conveyorAlchemyArray);
|
||||
AlchemyArrayRegistryProxy.registerAlchemyArray(destructionAlchemyArray);
|
||||
AlchemyArrayRegistryProxy.registerAlchemyArray(gelidAlchemyArray);
|
||||
AlchemyArrayRegistryProxy.registerAlchemyArray(parthenogenesisAlchemyArray);
|
||||
AlchemyArrayRegistryProxy.registerAlchemyArray(transfigurationAlchemyArray);
|
||||
AlchemyArrayRegistryProxy.registerAlchemyArray(transmutationAlchemyArray);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,16 +13,16 @@ public class ModBlocks
|
|||
{
|
||||
public static final BlockEE chalkBlock = new BlockChalk();
|
||||
public static final BlockEE alchemicalFuelBlock = new BlockAlchemicalFuel();
|
||||
public static final BlockEE alchemicalChest = new BlockAlchemicalChest();
|
||||
public static final BlockEE aludel = new BlockAludel();
|
||||
public static final BlockEE calcinator = new BlockCalcinator();
|
||||
public static final BlockEE glassBell = new BlockGlassBell();
|
||||
public static final BlockEE researchStation = new BlockResearchStation();
|
||||
public static final BlockEE augmentationTable = new BlockAugmentationTable();
|
||||
public static final BlockTileEntityEE alchemicalChest = new BlockAlchemicalChest();
|
||||
public static final BlockTileEntityEE aludel = new BlockAludel();
|
||||
public static final BlockTileEntityEE calcinator = new BlockCalcinator();
|
||||
public static final BlockTileEntityEE glassBell = new BlockGlassBell();
|
||||
public static final BlockTileEntityEE researchStation = new BlockResearchStation();
|
||||
public static final BlockTileEntityEE augmentationTable = new BlockAugmentationTable();
|
||||
public static final BlockEE ashInfusedStone = new BlockAshInfusedStone();
|
||||
public static final BlockEE alchemyArray = new BlockAlchemyArray();
|
||||
public static final BlockEE dummyArray = new BlockDummyArray();
|
||||
public static final BlockEE transmutationTablet = new BlockTransmutationTablet();
|
||||
public static final BlockTileEntityEE alchemyArray = new BlockAlchemyArray();
|
||||
public static final BlockTileEntityEE dummyArray = new BlockDummyArray();
|
||||
public static final BlockTileEntityEE transmutationTablet = new BlockTransmutationTablet();
|
||||
public static final Block ashInfusedStoneSlab = new BlockAshInfusedStoneSlab();
|
||||
|
||||
public static void init()
|
||||
|
|
|
@ -132,6 +132,12 @@ public class ContainerAlchemicalBag extends ContainerEE
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer entityPlayer)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean isItemStackParent(ItemStack itemStack)
|
||||
{
|
||||
if (NBTHelper.hasUUID(itemStack))
|
||||
|
|
|
@ -114,6 +114,12 @@ public class ContainerAlchemicalChest extends ContainerEE
|
|||
tileEntityAlchemicalChest.closeInventory();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer entityPlayer)
|
||||
{
|
||||
return this.tileEntityAlchemicalChest.isUseableByPlayer(entityPlayer);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer entityPlayer, int slotIndex)
|
||||
{
|
||||
|
|
|
@ -131,6 +131,12 @@ public class ContainerAlchemicalTome extends ContainerEE implements IElementButt
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer entityPlayer)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public int getInventorySize()
|
||||
{
|
||||
return inventoryAlchemicalTome.getSizeInventory();
|
||||
|
|
|
@ -190,4 +190,10 @@ public class ContainerAludel extends ContainerEE
|
|||
this.tileEntityAludel.itemCookTime = updatedValue;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer entityPlayer)
|
||||
{
|
||||
return this.tileEntityAludel.isUseableByPlayer(entityPlayer);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -108,4 +108,10 @@ public class ContainerAugmentationTable extends ContainerEE
|
|||
|
||||
return itemStack;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer entityPlayer)
|
||||
{
|
||||
return this.tileEntityAugmentationTable.isUseableByPlayer(entityPlayer);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -169,6 +169,12 @@ public class ContainerCalcinator extends ContainerEE
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer entityPlayer)
|
||||
{
|
||||
return this.tileEntityCalcinator.isUseableByPlayer(entityPlayer);
|
||||
}
|
||||
|
||||
private class SlotCalcinator extends Slot
|
||||
{
|
||||
public SlotCalcinator(IInventory inventory, int slotIndex, int x, int y)
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package com.pahimar.ee3.inventory;
|
||||
|
||||
import com.pahimar.ee3.util.ItemHelper;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
@ -11,12 +10,6 @@ public abstract class ContainerEE extends Container
|
|||
protected final int PLAYER_INVENTORY_ROWS = 3;
|
||||
protected final int PLAYER_INVENTORY_COLUMNS = 9;
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer entityPlayer)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean mergeItemStack(ItemStack itemStack, int slotMin, int slotMax, boolean ascending)
|
||||
{
|
||||
|
|
|
@ -8,8 +8,11 @@ import net.minecraft.item.ItemStack;
|
|||
|
||||
public class ContainerGlassBell extends ContainerEE
|
||||
{
|
||||
private TileEntityGlassBell tileGlassBell;
|
||||
|
||||
public ContainerGlassBell(InventoryPlayer inventoryPlayer, TileEntityGlassBell tileGlassBell)
|
||||
{
|
||||
this.tileGlassBell = tileGlassBell;
|
||||
this.addSlotToContainer(new Slot(tileGlassBell, TileEntityGlassBell.DISPLAY_SLOT_INVENTORY_INDEX, 80, 26));
|
||||
|
||||
// Add the player's inventory slots to the container
|
||||
|
@ -67,4 +70,10 @@ public class ContainerGlassBell extends ContainerEE
|
|||
|
||||
return itemStack;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer entityPlayer)
|
||||
{
|
||||
return this.tileGlassBell.isUseableByPlayer(entityPlayer);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -133,6 +133,12 @@ public class ContainerResearchStation extends ContainerEE
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer entityPlayer)
|
||||
{
|
||||
return this.tileEntityResearchStation.isUseableByPlayer(entityPlayer);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer entityPlayer, int slotIndex)
|
||||
{
|
||||
|
|
|
@ -1,5 +1,12 @@
|
|||
package com.pahimar.ee3.inventory;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
||||
public class ContainerSymbolSelection extends ContainerEE
|
||||
{
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer entityPlayer)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -119,4 +119,10 @@ public class ContainerTransmutationArray extends ContainerEE
|
|||
|
||||
return itemStack;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer entityPlayer)
|
||||
{
|
||||
return this.tileEntityAlchemyArray.isUseableByPlayer(entityPlayer);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@ public class ItemChalk extends ItemEE implements IKeyBound
|
|||
{
|
||||
super();
|
||||
this.setUnlocalizedName(Names.Items.CHALK);
|
||||
this.setMaxDamage(49);
|
||||
this.setMaxDamage(80);
|
||||
this.canRepair = true;
|
||||
}
|
||||
|
||||
|
|
|
@ -2,21 +2,18 @@ package com.pahimar.ee3.network.message;
|
|||
|
||||
import com.pahimar.ee3.api.exchange.EnergyValue;
|
||||
import com.pahimar.ee3.exchange.EnergyValueRegistry;
|
||||
import com.pahimar.ee3.exchange.EnergyValueStackMapping;
|
||||
import com.pahimar.ee3.exchange.WrappedStack;
|
||||
import com.pahimar.ee3.util.CompressionHelper;
|
||||
import com.pahimar.ee3.util.LogHelper;
|
||||
import cpw.mods.fml.common.network.simpleimpl.IMessage;
|
||||
import cpw.mods.fml.common.network.simpleimpl.IMessageHandler;
|
||||
import cpw.mods.fml.common.network.simpleimpl.MessageContext;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import net.minecraft.nbt.CompressedStreamTools;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.IOException;
|
||||
|
||||
public class MessageSetEnergyValue implements IMessage, IMessageHandler<MessageSetEnergyValue, IMessage>
|
||||
{
|
||||
public WrappedStack wrappedStack;
|
||||
public EnergyValue energyValue;
|
||||
public EnergyValueStackMapping energyValueStackMapping;
|
||||
|
||||
public MessageSetEnergyValue()
|
||||
{
|
||||
|
@ -24,66 +21,43 @@ public class MessageSetEnergyValue implements IMessage, IMessageHandler<MessageS
|
|||
|
||||
public MessageSetEnergyValue(WrappedStack wrappedStack, EnergyValue energyValue)
|
||||
{
|
||||
this.wrappedStack = wrappedStack;
|
||||
this.energyValue = energyValue;
|
||||
this.energyValueStackMapping = new EnergyValueStackMapping(wrappedStack, energyValue);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fromBytes(ByteBuf buf)
|
||||
{
|
||||
byte[] compressedWrappedStack = null;
|
||||
int wrappedStackByteCount = buf.readInt();
|
||||
byte[] compressedEnergyValueStackMapping = null;
|
||||
int energyValueStackMappingByteCount = buf.readInt();
|
||||
|
||||
if (wrappedStackByteCount > 0)
|
||||
if (energyValueStackMappingByteCount > 0)
|
||||
{
|
||||
compressedWrappedStack = buf.readBytes(wrappedStackByteCount).array();
|
||||
compressedEnergyValueStackMapping = buf.readBytes(energyValueStackMappingByteCount).array();
|
||||
}
|
||||
|
||||
byte[] compressedEnergyValue = null;
|
||||
int energyValueByteCount = buf.readInt();
|
||||
|
||||
if (energyValueByteCount > 0)
|
||||
if (compressedEnergyValueStackMapping != null)
|
||||
{
|
||||
compressedEnergyValue = buf.readBytes(energyValueByteCount).array();
|
||||
}
|
||||
|
||||
if (compressedWrappedStack != null && compressedEnergyValue != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
this.wrappedStack = WrappedStack.fromNBTTagCompound(CompressedStreamTools.readCompressed(new ByteArrayInputStream(compressedWrappedStack)));
|
||||
this.energyValue = EnergyValue.loadEnergyValueFromNBT(CompressedStreamTools.readCompressed(new ByteArrayInputStream(compressedEnergyValue)));
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
}
|
||||
String decompressedEnergyValueStackMapping = CompressionHelper.decompressStringFromByteArray(compressedEnergyValueStackMapping);
|
||||
this.energyValueStackMapping = EnergyValueStackMapping.createFromJson(decompressedEnergyValueStackMapping);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void toBytes(ByteBuf buf)
|
||||
{
|
||||
byte[] compressedWrappedStack = null;
|
||||
byte[] compressedEnergyValue = null;
|
||||
byte[] compressedBytes = null;
|
||||
String jsonEnergyValueStackMapping = this.energyValueStackMapping.toJson();
|
||||
|
||||
try
|
||||
|
||||
if (jsonEnergyValueStackMapping != null)
|
||||
{
|
||||
compressedWrappedStack = CompressedStreamTools.compress(WrappedStack.toNBTTagCompound(wrappedStack));
|
||||
compressedEnergyValue = CompressedStreamTools.compress(EnergyValue.writeEnergyValueToNBT(energyValue));
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
compressedBytes = CompressionHelper.compressStringToByteArray(jsonEnergyValueStackMapping);
|
||||
}
|
||||
|
||||
if (compressedWrappedStack != null && compressedEnergyValue != null)
|
||||
if (compressedBytes != null)
|
||||
{
|
||||
buf.writeInt(compressedWrappedStack.length);
|
||||
buf.writeBytes(compressedWrappedStack);
|
||||
|
||||
buf.writeInt(compressedEnergyValue.length);
|
||||
buf.writeBytes(compressedEnergyValue);
|
||||
buf.writeInt(compressedBytes.length);
|
||||
buf.writeBytes(compressedBytes);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -94,10 +68,10 @@ public class MessageSetEnergyValue implements IMessage, IMessageHandler<MessageS
|
|||
@Override
|
||||
public IMessage onMessage(MessageSetEnergyValue message, MessageContext ctx)
|
||||
{
|
||||
if (message.wrappedStack != null && message.energyValue != null)
|
||||
if (message.energyValueStackMapping != null && message.energyValueStackMapping.wrappedStack != null && message.energyValueStackMapping.energyValue != null)
|
||||
{
|
||||
EnergyValueRegistry.getInstance().setEnergyValue(message.wrappedStack, message.energyValue);
|
||||
LogHelper.info(String.format("Client successfully received new EnergyValue '%s' for object '%s'", message.energyValue, message.wrappedStack));
|
||||
EnergyValueRegistry.getInstance().setEnergyValue(message.energyValueStackMapping.wrappedStack, message.energyValueStackMapping.energyValue);
|
||||
LogHelper.info(String.format("Client successfully received new EnergyValue '%s' for object '%s'", message.energyValueStackMapping.wrappedStack, message.energyValueStackMapping.energyValue));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -123,5 +123,9 @@ public final class Messages
|
|||
public static final String REGENERATE_ENERGYVALUES_WHEN = "energyvalues.regenerateEnergyValuesWhen";
|
||||
public static final String REGENERATE_ENERGYVALUES_WHEN_LABEL = "general.energyvalues.regenerateEnergyValuesWhen.label";
|
||||
public static final String REGENERATE_ENERGYVALUES_WHEN_COMMENT = "general.energyvalues.regenerateEnergyValuesWhen.comment";
|
||||
|
||||
public static final String LOG_TRACE_TO_INFO = "debug.logTraceToInfo";
|
||||
public static final String LOG_TRACE_TO_INFO_LABEL = "debug.logTraceToInfo.label";
|
||||
public static final String LOG_TRACE_TO_INFO_COMMENT = "debug.logTraceToInfo.comment";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -169,7 +169,14 @@ public class Names
|
|||
public static final class AlchemyArrays
|
||||
{
|
||||
private static final String ALCHEMY_ARRAY_BASE = "arrays.ee3:";
|
||||
public static final String BASIC_ALCHEMY_ARRAY = ALCHEMY_ARRAY_BASE + "test";
|
||||
public static final String ACCELERANT_ALCHEMY_ARRAY = ALCHEMY_ARRAY_BASE + "accelerant";
|
||||
public static final String COMBUSTION_ALCHEMY_ARRAY = ALCHEMY_ARRAY_BASE + "combustion";
|
||||
public static final String CONSTRUCTION_ALCHEMY_ARRAY = ALCHEMY_ARRAY_BASE + "construction";
|
||||
public static final String CONVEYOR_ALCHEMY_ARRAY = ALCHEMY_ARRAY_BASE + "conveyor";
|
||||
public static final String DESTRUCTION_ALCHEMY_ARRAY = ALCHEMY_ARRAY_BASE + "destruction";
|
||||
public static final String GELID_ALCHEMY_ARRAY = ALCHEMY_ARRAY_BASE + "gelid";
|
||||
public static final String PARTHENOGENESIS_ALCHEMY_ARRAY = ALCHEMY_ARRAY_BASE + "parthenogenesis";
|
||||
public static final String TRANSFIGURATION_ALCHEMY_ARRAY = ALCHEMY_ARRAY_BASE + "transfiguration";
|
||||
public static final String TRANSMUTATION_ALCHEMY_ARRAY = ALCHEMY_ARRAY_BASE + "transmutation";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,4 +21,9 @@ public class Settings
|
|||
{
|
||||
public static String regenerateEnergyValuesWhen;
|
||||
}
|
||||
|
||||
public static class Debug
|
||||
{
|
||||
public static boolean logTraceToInfo;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -75,7 +75,14 @@ public final class Textures
|
|||
{
|
||||
private static final String SYMBOL_TEXTURE_LOCATION = "textures/arrays/";
|
||||
|
||||
public static final ResourceLocation BASIC_ALCHEMY_ARRAY = ResourceLocationHelper.getResourceLocation(SYMBOL_TEXTURE_LOCATION + "test.png");
|
||||
public static final ResourceLocation TRANSMUTATION_ALCHEMY_ARRAY = ResourceLocationHelper.getResourceLocation(SYMBOL_TEXTURE_LOCATION + "transmutation.png");
|
||||
public static final ResourceLocation ACCELERANT_ALCHEMY_ARRAY = ResourceLocationHelper.getResourceLocation(SYMBOL_TEXTURE_LOCATION + "arrayAccelerant.png");
|
||||
public static final ResourceLocation COMBUSTION_ALCHEMY_ARRAY = ResourceLocationHelper.getResourceLocation(SYMBOL_TEXTURE_LOCATION + "arrayCombustion.png");
|
||||
public static final ResourceLocation CONSTRUCTION_ALCHEMY_ARRAY = ResourceLocationHelper.getResourceLocation(SYMBOL_TEXTURE_LOCATION + "arrayConstruction.png");
|
||||
public static final ResourceLocation CONVEYOR_ALCHEMY_ARRAY = ResourceLocationHelper.getResourceLocation(SYMBOL_TEXTURE_LOCATION + "arrayConveyor.png");
|
||||
public static final ResourceLocation DESTRUCTION_ALCHEMY_ARRAY = ResourceLocationHelper.getResourceLocation(SYMBOL_TEXTURE_LOCATION + "arrayDestruction.png");
|
||||
public static final ResourceLocation GELID_ALCHEMY_ARRAY = ResourceLocationHelper.getResourceLocation(SYMBOL_TEXTURE_LOCATION + "arrayGelid.png");
|
||||
public static final ResourceLocation PARTHENOGENESIS_ALCHEMY_ARRAY = ResourceLocationHelper.getResourceLocation(SYMBOL_TEXTURE_LOCATION + "arrayParthenogenesis.png");
|
||||
public static final ResourceLocation TRANSFIGURATION_ALCHEMY_ARRAY = ResourceLocationHelper.getResourceLocation(SYMBOL_TEXTURE_LOCATION + "arrayTransfiguration.png");
|
||||
public static final ResourceLocation TRANSMUTATION_ALCHEMY_ARRAY = ResourceLocationHelper.getResourceLocation(SYMBOL_TEXTURE_LOCATION + "arrayTransmutation.png");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@ public class ChalkSettings implements INBTTaggable
|
|||
private int size;
|
||||
private int rotation;
|
||||
|
||||
private final int MAX_SIZE = 3;
|
||||
private final int MAX_SIZE = 5;
|
||||
|
||||
public ChalkSettings()
|
||||
{
|
||||
|
|
|
@ -146,7 +146,7 @@ public class TileEntityAlchemicalChest extends TileEntityEE implements IInventor
|
|||
@Override
|
||||
public boolean isUseableByPlayer(EntityPlayer entityplayer)
|
||||
{
|
||||
return true;
|
||||
return this.worldObj.getTileEntity(xCoord, yCoord, zCoord) == this && entityplayer.getDistanceSq((double) xCoord + 0.5D, (double) yCoord + 0.5D, (double) zCoord + 0.5D) <= 64D;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -167,9 +167,9 @@ public class TileEntityAludel extends TileEntityEE implements ISidedInventory
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean isUseableByPlayer(EntityPlayer var1)
|
||||
public boolean isUseableByPlayer(EntityPlayer entityPlayer)
|
||||
{
|
||||
return true;
|
||||
return this.worldObj.getTileEntity(xCoord, yCoord, zCoord) == this && entityPlayer.getDistanceSq((double) xCoord + 0.5D, (double) yCoord + 0.5D, (double) zCoord + 0.5D) <= 64D;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -101,7 +101,7 @@ public class TileEntityAugmentationTable extends TileEntityEE implements IInvent
|
|||
@Override
|
||||
public boolean isUseableByPlayer(EntityPlayer entityplayer)
|
||||
{
|
||||
return true;
|
||||
return this.worldObj.getTileEntity(xCoord, yCoord, zCoord) == this && entityplayer.getDistanceSq((double) xCoord + 0.5D, (double) yCoord + 0.5D, (double) zCoord + 0.5D) <= 64D;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -169,7 +169,7 @@ public class TileEntityCalcinator extends TileEntityEE implements ISidedInventor
|
|||
@Override
|
||||
public boolean isUseableByPlayer(EntityPlayer entityplayer)
|
||||
{
|
||||
return true;
|
||||
return this.worldObj.getTileEntity(xCoord, yCoord, zCoord) == this && entityplayer.getDistanceSq((double) xCoord + 0.5D, (double) yCoord + 0.5D, (double) zCoord + 0.5D) <= 64D;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -143,7 +143,7 @@ public class TileEntityGlassBell extends TileEntityEE implements IInventory
|
|||
@Override
|
||||
public boolean isUseableByPlayer(EntityPlayer entityPlayer)
|
||||
{
|
||||
return true;
|
||||
return this.worldObj.getTileEntity(xCoord, yCoord, zCoord) == this && entityPlayer.getDistanceSq((double) xCoord + 0.5D, (double) yCoord + 0.5D, (double) zCoord + 0.5D) <= 64D;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -109,7 +109,7 @@ public class TileEntityResearchStation extends TileEntityEE implements IInventor
|
|||
@Override
|
||||
public boolean isUseableByPlayer(EntityPlayer entityplayer)
|
||||
{
|
||||
return true;
|
||||
return this.worldObj.getTileEntity(xCoord, yCoord, zCoord) == this && entityplayer.getDistanceSq((double) xCoord + 0.5D, (double) yCoord + 0.5D, (double) zCoord + 0.5D) <= 64D;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -296,7 +296,7 @@ public class TileEntityTransmutationTablet extends TileEntityEE implements ISide
|
|||
@Override
|
||||
public boolean isUseableByPlayer(EntityPlayer entityPlayer)
|
||||
{
|
||||
return true;
|
||||
return this.worldObj.getTileEntity(xCoord, yCoord, zCoord) == this && entityPlayer.getDistanceSq((double) xCoord + 0.5D, (double) yCoord + 0.5D, (double) zCoord + 0.5D) <= 64D;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package com.pahimar.ee3.util;
|
||||
|
||||
import com.pahimar.ee3.reference.Reference;
|
||||
import com.pahimar.ee3.reference.Settings;
|
||||
import cpw.mods.fml.common.FMLLog;
|
||||
import org.apache.logging.log4j.Level;
|
||||
|
||||
|
@ -43,7 +44,14 @@ public class LogHelper
|
|||
|
||||
public static void trace(Object object)
|
||||
{
|
||||
log(Level.TRACE, object);
|
||||
if (!Settings.Debug.logTraceToInfo)
|
||||
{
|
||||
log(Level.TRACE, object);
|
||||
}
|
||||
else
|
||||
{
|
||||
log(Level.INFO, object);
|
||||
}
|
||||
}
|
||||
|
||||
public static void warn(Object object)
|
||||
|
|
|
@ -11,6 +11,9 @@ general.abilities.onlyLoadFile.comment=Setting this to true means that Abilities
|
|||
general.energyvalues.regenerateEnergyValuesWhen.label=Regenerate EnergyValues
|
||||
general.energyvalues.regenerateEnergyValuesWhen.comment=When to regenerate EnergyValues. Options are "Always" (every time Minecraft starts), "When Mods Change" (when mods are added, removed, or updated) or "Never" (only generate the first time).
|
||||
|
||||
debug.logTraceToInfo.label=Log TRACE to INFO
|
||||
debug.logTraceToInfo.comment=Whether or not to log TRACE level logging events to INFO
|
||||
|
||||
# Keys
|
||||
key.categories.ee3=Equivalent Exchange 3
|
||||
key.charge=Charge
|
||||
|
@ -96,7 +99,14 @@ tile.ee3:transmutationTablet.name=Transmutation Tablet
|
|||
fluid.ee3.milk=Milk
|
||||
|
||||
# Alchemy Arrays
|
||||
arrays.ee3:basicAlchemyArray=Basic Alchemy Array [WIP]
|
||||
arrays.ee3:accelerant=Accelerant Alchemy Array [WIP]
|
||||
arrays.ee3:combustion=Combustion Alchemy Array [WIP]
|
||||
arrays.ee3:construction=Construction Alchemy Array [WIP]
|
||||
arrays.ee3:conveyor=Conveyor Alchemy Array [WIP]
|
||||
arrays.ee3:destruction=Destruction Alchemy Array [WIP]
|
||||
arrays.ee3:gelid=Gelid Alchemy Array [WIP]
|
||||
arrays.ee3:parthenogenesis=Parthenogenesis Alchemy Array [WIP]
|
||||
arrays.ee3:transfiguration=Transfiguration Alchemy Array [WIP]
|
||||
arrays.ee3:transmutation=Transmutation Alchemy Array [WIP]
|
||||
|
||||
# GUIs
|
||||
|
|
After Width: | Height: | Size: 98 KiB |
After Width: | Height: | Size: 119 KiB |
After Width: | Height: | Size: 96 KiB |
After Width: | Height: | Size: 106 KiB |
After Width: | Height: | Size: 77 KiB |
After Width: | Height: | Size: 101 KiB |
After Width: | Height: | Size: 97 KiB |
After Width: | Height: | Size: 116 KiB |
After Width: | Height: | Size: 84 KiB |
Before Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 134 KiB |