Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

GodOfYeti

Members
  • Posts

    151
  • Joined

  • Last visited

Everything posted by GodOfYeti

  1. I have been trying to setup a Agrarian skies 2 server but keep getting this error [14:29:19] [server thread/WARN] [PulseManager-IguanaTweaksTConstruct/IguanaTweaksTConstruct]: Caught exception in findAndInvokeHandlers: java.lang.reflect.InvocationTargetException [14:29:19] [server thread/INFO] [sTDERR/IguanaTweaksTConstruct]: [java.lang.Throwable$WrappedPrintStream:println:-1]: java.lang.reflect.InvocationTargetException [14:29:19] [server thread/INFO] [sTDERR/IguanaTweaksTConstruct]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [14:29:19] [server thread/INFO] [sTDERR/IguanaTweaksTConstruct]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) [14:29:19] [server thread/INFO] [sTDERR/IguanaTweaksTConstruct]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) [14:29:19] [server thread/INFO] [sTDERR/IguanaTweaksTConstruct]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at java.lang.reflect.Method.invoke(Unknown Source) [14:29:19] [server thread/INFO] [sTDERR/IguanaTweaksTConstruct]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at mantle.pulsar.control.PulseManager.findAndInvokeHandlers(PulseManager.java:235) [14:29:19] [server thread/INFO] [sTDERR/IguanaTweaksTConstruct]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at mantle.pulsar.control.PulseManager.init(PulseManager.java:203) [14:29:19] [server thread/INFO] [sTDERR/IguanaTweaksTConstruct]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at iguanaman.iguanatweakstconstruct.IguanaTweaksTConstruct.load(IguanaTweaksTConstruct.java:119) [14:29:19] [server thread/INFO] [sTDERR/IguanaTweaksTConstruct]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [14:29:19] [server thread/INFO] [sTDERR/IguanaTweaksTConstruct]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) [14:29:19] [server thread/INFO] [sTDERR/IguanaTweaksTConstruct]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) [14:29:19] [server thread/INFO] [sTDERR/IguanaTweaksTConstruct]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at java.lang.reflect.Method.invoke(Unknown Source) [14:29:19] [server thread/INFO] [sTDERR/IguanaTweaksTConstruct]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:532) [14:29:19] [server thread/INFO] [sTDERR/IguanaTweaksTConstruct]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source) [14:29:19] [server thread/INFO] [sTDERR/IguanaTweaksTConstruct]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) [14:29:19] [server thread/INFO] [sTDERR/IguanaTweaksTConstruct]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at java.lang.reflect.Method.invoke(Unknown Source) [14:29:19] [server thread/INFO] [sTDERR/IguanaTweaksTConstruct]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) [14:29:19] [server thread/INFO] [sTDERR/IguanaTweaksTConstruct]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) [14:29:19] [server thread/INFO] [sTDERR/IguanaTweaksTConstruct]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) [14:29:19] [server thread/INFO] [sTDERR/IguanaTweaksTConstruct]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) [14:29:19] [server thread/INFO] [sTDERR/IguanaTweaksTConstruct]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at com.google.common.eventbus.EventBus.post(EventBus.java:275) [14:29:19] [server thread/INFO] [sTDERR/IguanaTweaksTConstruct]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:212) [14:29:19] [server thread/INFO] [sTDERR/IguanaTweaksTConstruct]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:190) [14:29:19] [server thread/INFO] [sTDERR/IguanaTweaksTConstruct]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [14:29:19] [server thread/INFO] [sTDERR/IguanaTweaksTConstruct]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) [14:29:19] [server thread/INFO] [sTDERR/IguanaTweaksTConstruct]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) [14:29:19] [server thread/INFO] [sTDERR/IguanaTweaksTConstruct]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at java.lang.reflect.Method.invoke(Unknown Source) [14:29:19] [server thread/INFO] [sTDERR/IguanaTweaksTConstruct]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) [14:29:19] [server thread/INFO] [sTDERR/IguanaTweaksTConstruct]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) [14:29:19] [server thread/INFO] [sTDERR/IguanaTweaksTConstruct]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) [14:29:19] [server thread/INFO] [sTDERR/IguanaTweaksTConstruct]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) [14:29:19] [server thread/INFO] [sTDERR/IguanaTweaksTConstruct]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at com.google.common.eventbus.EventBus.post(EventBus.java:275) [14:29:19] [server thread/INFO] [sTDERR/IguanaTweaksTConstruct]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:119) [14:29:19] [server thread/INFO] [sTDERR/IguanaTweaksTConstruct]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at cpw.mods.fml.common.Loader.initializeMods(Loader.java:713) [14:29:19] [server thread/INFO] [sTDERR/IguanaTweaksTConstruct]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at cpw.mods.fml.server.FMLServerHandler.finishServerLoading(FMLServerHandler.java:97) [14:29:19] [server thread/INFO] [sTDERR/IguanaTweaksTConstruct]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at cpw.mods.fml.common.FMLCommonHandler.onServerStarted(FMLCommonHandler.java:319) [14:29:19] [server thread/INFO] [sTDERR/IguanaTweaksTConstruct]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraft.server.dedicated.DedicatedServer.func_71197_b(DedicatedServer.java:210) [14:29:19] [server thread/INFO] [sTDERR/IguanaTweaksTConstruct]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:387) [14:29:19] [server thread/INFO] [sTDERR/IguanaTweaksTConstruct]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:685) [14:29:19] [server thread/INFO] [sTDERR/IguanaTweaksTConstruct]: [java.lang.Throwable$WrappedPrintStream:println:-1]: Caused by: java.lang.NoClassDefFoundError: iguanaman/iguanatweakstconstruct/leveling/LevelingActiveToolMod [14:29:28] [server thread/INFO] [sTDERR/IguanaTweaksTConstruct]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at iguanaman.iguanatweakstconstruct.leveling.IguanaToolLeveling.init(IguanaToolLeveling.java:72)
  2. Ok, what was wrong with mc.displayGuiScreen(new PowerBankGui(tile));
  3. Well could you help me to understand what im needing to know
  4. Ya I know my code is bad this was my first atempt at something like this
  5. I am needing help giving a block its own power instead of them all having the same amount here is my code package com.linumhost.Blocks; import org.lwjgl.input.Keyboard; import com.linumhost.CreativeTab.ServerCreativeTab; import com.linumhost.Gui.AirGeneratorGui; import com.linumhost.Gui.PowerBankGui; import com.linumhost.TileEntity.TileEntityAirGeneratorBlock; import com.linumhost.TileEntity.TileEntityServerCaseBlock; import com.linumhost.lib.RefStrings; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; import net.minecraft.client.Minecraft; import net.minecraft.client.particle.EntityFX; import net.minecraft.client.particle.EntitySmokeFX; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.IIcon; import net.minecraft.util.MathHelper; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; public class AirGenerator extends BlockContainer{ public AirGenerator(Material material) { super(material); setCreativeTab(ServerCreativeTab.tabBlocks); setHardness(5F); setResistance(10F); //this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 2.0F, 0.0F); } IIcon activeIcon; IIcon unactiveIcon; public Minecraft mc = Minecraft.getMinecraft(); TileEntity entity; TileEntityAirGeneratorBlock tile = new TileEntityAirGeneratorBlock(); public static IIcon[] icons = new IIcon[6]; @SideOnly(Side.CLIENT) public static IIcon topIcon; @SideOnly(Side.CLIENT) public static IIcon sideIcon; @SideOnly(Side.CLIENT) public static IIcon frontIcon; public void registerBlockIcons(IIconRegister reg, IBlockAccess blockAccess, int x, int y, int z) { activeIcon = reg.registerIcon(RefStrings.MODID + ":airGeneratorFrontActivated"); unactiveIcon = reg.registerIcon(RefStrings.MODID + ":airGeneratorFrontDeactivated"); for (int side = 0; side < 6; side ++) { //this.icons[side] = reg.registerIcon(this.textureName + "_" + i); if(side == 0 || side == 1) { //return topIcon; this.icons[side] = reg.registerIcon(RefStrings.MODID + ":airGeneratorTop"); } else if(side == 1 || side == 4 || side == 3 || side == 5) { //return sideIcon; this.icons[side] = reg.registerIcon(RefStrings.MODID + ":airGeneratorSide"); } else if(side == 2){ } } } @Override public IIcon getIcon(int side, int meta) { return this.icons[side]; } public boolean onBlockActivated(World par1World, int x, int y, int z, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9){ if (!par1World.isRemote){ //DO STUFF HERE mc.displayGuiScreen(new PowerBankGui(tile)); return true; } return false; } @Override public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase entity, ItemStack itemStack) { if(entity == null){ return; } //TileEntityAngleVentPipe2Block tile = (TileEntityAngleVentPipe2Block) world.getTileEntity(x,y,z); int rotation = MathHelper.floor_double((double)(entity.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3; if(rotation == 0) { world.setBlockMetadataWithNotify(x, y, z, 2, 2); } if(rotation == 1) { world.setBlockMetadataWithNotify(x, y, z, 5, 2); } if(rotation == 2) { world.setBlockMetadataWithNotify(x, y, z, 3, 2); } if(rotation == 3) { world.setBlockMetadataWithNotify(x, y, z, 4, 2); } } @Override public TileEntity createNewTileEntity(World world, int p_149915_2_) { try { return new TileEntityAirGeneratorBlock(); } catch (Exception var3) { throw new RuntimeException(var3); } } } package com.linumhost.TileEntity; import com.linumhost.Blocks.AirGenerator; import com.linumhost.Energy.IEnergyHandler; import com.linumhost.Energy.IEnergyProvider; import com.linumhost.Energy.IEnergyReceiver; import com.linumhost.lib.RefStrings; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.Entity; import net.minecraft.tileentity.TileEntity; import net.minecraftforge.common.util.ForgeDirection; public class TileEntityAirGeneratorBlock extends TileEntity implements IEnergyProvider{ TileEntity entity; TileEntityServerCaseBlock server = (TileEntityServerCaseBlock) entity; AirGenerator AirGen; public int energyGenerated = 0; public boolean isActive = false; public boolean canGen = false; private final static int MAX_EXTRACTABLE_ENERGY = 200; public final static int MAX_STORABLE_ENERGY = 100000; public int delay = 5; @Override public void updateEntity() { if(delay > 0) { delay--; return; } delay = 5; if(energyGenerated != MAX_STORABLE_ENERGY){ canGen = true; //AirGen.generatedEnergy = Math.min(AirGen.generatedEnergy + this.energyGenerated, MAX_STORABLE_ENERGY); //System.out.println(AirGen.generatedEnergy); }else if(energyGenerated > MAX_STORABLE_ENERGY){ energyGenerated = 0; isActive = false; } if(canGen){ isActive = true; this.energyGenerated = 80; } if(energyGenerated > 0 ) { int maxExtractable = MAX_EXTRACTABLE_ENERGY; for( ForgeDirection direction : ForgeDirection.VALID_DIRECTIONS ) { TileEntity te = this.worldObj.getTileEntity(this.xCoord + direction.offsetX, this.yCoord + direction.offsetY, this.zCoord + direction.offsetZ); if( te instanceof IEnergyReceiver ) { IEnergyReceiver receiver = (IEnergyReceiver) te; if( !receiver.canConnectEnergy(direction) ) { continue; } int extractable = this.extractEnergy(direction, maxExtractable, true); int receivable = receiver.receiveEnergy(direction.getOpposite(), extractable, false); maxExtractable -= receivable; this.extractEnergy(direction, receivable, false); } if( maxExtractable == 0 ) { break; } } } } @Override public int extractEnergy(ForgeDirection from, int maxExtract, boolean simulate) { int energyExtracted = Math.min(energyGenerated, Math.min(MAX_EXTRACTABLE_ENERGY, maxExtract)); if( !simulate ) { energyGenerated -= energyExtracted; } return energyExtracted; } @Override public int getEnergyStored(ForgeDirection from) { return energyGenerated; } @Override public int getMaxEnergyStored(ForgeDirection from) { return MAX_STORABLE_ENERGY; } @Override public boolean canConnectEnergy(ForgeDirection from) { return true; } }
  6. How can I send a player a message
  7. It doesnt even let me import enumhelper
  8. This is where im having the most trouble public static ArmorMaterial TitaniumArmorMaterial = EnumHelper.addArmorMaterial("TitaniumArmorMaterial", 16, new int[] {3,8,6,3}, 30); There is no EnumHelper and I cant find a fix to this problem
  9. The title says it well, I have been looking for the past couple of days on adding armor in 1.7.10 but no luck
  10. Heres my new code still not working package com.linumhost.Items; import java.util.List; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.world.World; public class DarkPickaxe extends Item{ public DarkPickaxe(){ } public Integer[] maxLevelXp = new Integer[5]; public void populateArray(){ maxLevelXp[0] = 10; maxLevelXp[1] = 20; maxLevelXp[2] = 30; maxLevelXp[3] = 40; maxLevelXp[4] = 50; } @Override public void onUpdate(ItemStack stack, World world, Entity entity, int metadata, boolean bool) { if (stack.stackTagCompound == null) { stack.stackTagCompound = new NBTTagCompound(); //or itemstack.setTagCompound(new NBTTagCompound()); } NBTTagCompound nbt = new NBTTagCompound(); nbt.setInteger("currentLevel", 0); nbt.setInteger("currentXp", 1); nbt.setInteger("maxXp", maxLevelXp[nbt.getInteger("currentLevel")]); stack.getTagCompound().setTag("itemLevelInfo", nbt); } public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer player) { itemstack.stackTagCompound.setInteger("XP", 1 + maxLevelXp[itemstack.stackTagCompound.getInteger("toolLevel")]); itemstack.damageItem(1, player); return itemstack; } @Override @SideOnly(Side.CLIENT) public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool) { NBTTagCompound nbt = (NBTTagCompound) stack.getTagCompound().getTag("itemLevelInfo"); int currentLevel = nbt.getInteger("currentLevel"); int maxXp = nbt.getInteger("maxXp"); int currentXp = nbt.getInteger("currentXp"); list.add("Level: " + currentLevel); list.add("XP: " + currentXp + "/" + maxXp); } } heres report ---- Minecraft Crash Report ---- // Quite honestly, I wouldn't worry myself about that. Time: 2/25/15 7:04 PM Description: Rendering screen java.lang.NullPointerException: Rendering screen at com.linumhost.Items.DarkPickaxe.addInformation(DarkPickaxe.java:62) at net.minecraft.item.ItemStack.getTooltip(ItemStack.java:641) at net.minecraft.client.gui.GuiScreen.renderToolTip(GuiScreen.java:124) at net.minecraft.client.gui.inventory.GuiContainerCreative.renderToolTip(GuiContainerCreative.java:769) at net.minecraft.client.gui.inventory.GuiContainer.drawScreen(GuiContainer.java:186) at net.minecraft.client.renderer.InventoryEffectRenderer.drawScreen(InventoryEffectRenderer.java:44) at net.minecraft.client.gui.inventory.GuiContainerCreative.drawScreen(GuiContainerCreative.java:673) at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1137) at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1056) at net.minecraft.client.Minecraft.run(Minecraft.java:951) at net.minecraft.client.main.Main.main(Main.java:164) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:85) at GradleStart.main(GradleStart.java:45) A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Stacktrace: at com.linumhost.Items.DarkPickaxe.addInformation(DarkPickaxe.java:62) at net.minecraft.item.ItemStack.getTooltip(ItemStack.java:641) at net.minecraft.client.gui.GuiScreen.renderToolTip(GuiScreen.java:124) at net.minecraft.client.gui.inventory.GuiContainerCreative.renderToolTip(GuiContainerCreative.java:769) at net.minecraft.client.gui.inventory.GuiContainer.drawScreen(GuiContainer.java:186) at net.minecraft.client.renderer.InventoryEffectRenderer.drawScreen(InventoryEffectRenderer.java:44) at net.minecraft.client.gui.inventory.GuiContainerCreative.drawScreen(GuiContainerCreative.java:673) -- Screen render details -- Details: Screen name: net.minecraft.client.gui.inventory.GuiContainerCreative Mouse location: Scaled: (287, 142). Absolute: (574, 420) Screen size: Scaled: (683, 353). Absolute: (1366, 706). Scale factor of 2 -- Affected level -- Details: Level name: MpServer All players: 1 total; [EntityClientPlayerMP['Player676'/278, l='MpServer', x=-163.28, y=5.62, z=75.15]] Chunk stats: MultiplayerChunkCache: 625, 625 Level seed: 0 Level generator: ID 01 - flat, ver 0. Features enabled: false Level generator options: Level spawn location: World: (-178,4,65), Chunk: (at 14,0,1 in -12,4; contains blocks -192,0,64 to -177,255,79), Region: (-1,0; contains chunks -32,0 to -1,31, blocks -512,0,0 to -1,255,511) Level time: 89021 game time, 32487 day time Level dimension: 0 Level storage version: 0x00000 - Unknown? Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false) Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: false Forced entities: 129 total; [EntitySlime['Slime'/257, l='MpServer', x=-88.13, y=4.00, z=126.75], EntitySheep['Sheep'/48, l='MpServer', x=-240.22, y=4.00, z=-2.63], EntityCow['Cow'/54, l='MpServer', x=-243.91, y=4.00, z=21.38], EntitySlime['Slime'/23618, l='MpServer', x=-172.00, y=4.00, z=128.52], EntityCow['Cow'/56, l='MpServer', x=-241.88, y=4.00, z=41.97], EntitySlime['Slime'/61, l='MpServer', x=-241.69, y=4.00, z=121.75], EntityHorse['Donkey'/76, l='MpServer', x=-233.06, y=4.00, z=5.38], EntitySheep['Sheep'/77, l='MpServer', x=-225.63, y=4.00, z=13.84], EntityHorse['Donkey'/78, l='MpServer', x=-227.81, y=4.00, z=14.41], EntitySlime['Slime'/79, l='MpServer', x=-229.78, y=4.00, z=13.71], EntityItem['item.item.seeds'/18094, l='MpServer', x=-159.22, y=5.13, z=49.69], EntityPig['Pig'/73, l='MpServer', x=-228.16, y=4.00, z=-3.69], EntityItem['item.item.seeds'/18093, l='MpServer', x=-158.81, y=5.13, z=48.31], EntityPig['Pig'/74, l='MpServer', x=-233.81, y=4.00, z=3.91], EntityItem['item.item.wheat'/18092, l='MpServer', x=-159.13, y=5.13, z=47.72], EntitySheep['Sheep'/75, l='MpServer', x=-229.44, y=4.00, z=4.50], EntitySlime['Slime'/85, l='MpServer', x=-240.61, y=5.01, z=61.60], EntityCow['Cow'/84, l='MpServer', x=-231.81, y=4.00, z=61.13], EntitySlime['Slime'/86, l='MpServer', x=-233.05, y=4.00, z=119.47], EntityChicken['Chicken'/81, l='MpServer', x=-233.53, y=4.00, z=40.53], EntityChicken['Chicken'/80, l='MpServer', x=-230.59, y=4.00, z=42.59], EntityCow['Cow'/83, l='MpServer', x=-229.94, y=4.00, z=50.09], EntityCow['Cow'/82, l='MpServer', x=-232.75, y=4.00, z=51.31], EntityCow['Cow'/93, l='MpServer', x=-228.81, y=4.00, z=45.09], EntityChicken['Chicken'/92, l='MpServer', x=-220.56, y=4.00, z=45.59], EntityCow['Cow'/95, l='MpServer', x=-222.09, y=4.00, z=53.28], EntitySlime['Slime'/94, l='MpServer', x=-225.09, y=4.00, z=41.13], EntitySlime['Slime'/91, l='MpServer', x=-200.72, y=4.00, z=17.94], EntityPig['Pig'/90, l='MpServer', x=-212.13, y=4.00, z=-1.25], EntitySlime['Slime'/103, l='MpServer', x=-201.47, y=4.00, z=11.34], EntitySlime['Slime'/98, l='MpServer', x=-228.15, y=4.00, z=132.20], EntitySlime['Slime'/99, l='MpServer', x=-221.28, y=4.69, z=147.65], EntitySlime['Slime'/96, l='MpServer', x=-213.80, y=4.00, z=67.10], EntitySlime['Slime'/97, l='MpServer', x=-209.41, y=4.47, z=121.54], EntitySlime['Slime'/108, l='MpServer', x=-210.55, y=5.00, z=136.13], EntitySlime['Slime'/109, l='MpServer', x=-211.13, y=4.00, z=155.41], EntitySlime['Slime'/106, l='MpServer', x=-183.75, y=4.00, z=140.28], EntitySlime['Slime'/107, l='MpServer', x=-212.94, y=4.00, z=137.01], EntitySlime['Slime'/104, l='MpServer', x=-194.92, y=4.32, z=72.17], EntitySlime['Slime'/105, l='MpServer', x=-200.99, y=4.32, z=102.77], EntitySlime['Slime'/127, l='MpServer', x=-199.62, y=5.00, z=134.61], EntitySlime['Slime'/126, l='MpServer', x=-180.87, y=5.00, z=103.74], EntitySlime['Slime'/125, l='MpServer', x=-189.91, y=4.00, z=73.88], EntitySlime['Slime'/124, l='MpServer', x=-178.53, y=6.00, z=65.97], EntitySlime['Slime'/123, l='MpServer', x=-196.87, y=4.47, z=28.41], EntityChicken['Chicken'/122, l='MpServer', x=-186.47, y=4.00, z=8.41], EntityChicken['Chicken'/121, l='MpServer', x=-180.44, y=4.00, z=-0.44], EntitySheep['Sheep'/137, l='MpServer', x=-165.25, y=4.00, z=-0.75], EntityChicken['Chicken'/140, l='MpServer', x=-173.38, y=4.00, z=1.78], EntityBat['Bat'/143, l='MpServer', x=-154.61, y=12.95, z=28.38], EntityItem['item.item.carrots'/142, l='MpServer', x=-162.88, y=5.13, z=19.56], EntitySlime['Slime'/128, l='MpServer', x=-187.28, y=4.00, z=149.88], EntitySlime['Slime'/5624, l='MpServer', x=-145.41, y=4.00, z=10.48], EntityItem['item.item.wheat'/144, l='MpServer', x=-171.38, y=5.13, z=56.91], EntityItem['item.item.seeds'/145, l='MpServer', x=-170.63, y=5.13, z=57.94], EntityItem['item.item.potato'/146, l='MpServer', x=-174.34, y=5.13, z=55.88], EntityItem['item.item.potato'/147, l='MpServer', x=-174.16, y=5.13, z=54.19], EntitySlime['Slime'/148, l='MpServer', x=-170.59, y=4.47, z=103.74], EntitySlime['Slime'/149, l='MpServer', x=-161.41, y=4.32, z=134.40], EntitySlime['Slime'/150, l='MpServer', x=-169.20, y=4.95, z=132.62], EntityVillager['Villager'/175, l='MpServer', x=-133.50, y=5.50, z=31.06], EntityClientPlayerMP['Player676'/278, l='MpServer', x=-163.28, y=5.62, z=75.15], EntitySlime['Slime'/32933, l='MpServer', x=-148.82, y=4.00, z=125.69], EntitySlime['Slime'/163, l='MpServer', x=-160.78, y=5.00, z=47.22], EntitySlime['Slime'/162, l='MpServer', x=-146.84, y=5.00, z=35.22], EntityVillager['Villager'/161, l='MpServer', x=-144.06, y=5.00, z=47.50], EntitySlime['Slime'/160, l='MpServer', x=-152.41, y=4.00, z=26.50], EntitySlime['Slime'/167, l='MpServer', x=-156.50, y=4.00, z=146.66], EntitySlime['Slime'/166, l='MpServer', x=-144.97, y=5.00, z=122.12], EntitySlime['Slime'/165, l='MpServer', x=-163.31, y=4.00, z=100.00], EntitySlime['Slime'/164, l='MpServer', x=-146.02, y=4.60, z=51.17], EntityVillager['Villager'/186, l='MpServer', x=-133.53, y=4.00, z=41.69], EntityVillager['Villager'/187, l='MpServer', x=-133.41, y=4.00, z=39.53], EntityVillager['Villager'/184, l='MpServer', x=-133.66, y=5.00, z=32.50], EntityVillager['Villager'/185, l='MpServer', x=-134.69, y=5.00, z=33.53], EntitySheep['Sheep'/190, l='MpServer', x=-128.78, y=4.00, z=60.59], EntityVillager['Villager'/191, l='MpServer', x=-138.88, y=4.00, z=42.47], EntitySlime['Slime'/188, l='MpServer', x=-130.69, y=4.00, z=43.31], EntityVillager['Villager'/189, l='MpServer', x=-135.00, y=5.00, z=51.94], EntityItem['item.item.seeds'/178, l='MpServer', x=-131.59, y=5.13, z=22.13], EntityItem['item.item.wheat'/179, l='MpServer', x=-134.63, y=5.13, z=17.53], EntityVillager['Villager'/176, l='MpServer', x=-130.72, y=5.00, z=30.72], EntityItem['item.item.wheat'/177, l='MpServer', x=-132.25, y=5.13, z=20.16], EntitySlime['Slime'/182, l='MpServer', x=-134.25, y=5.00, z=26.09], EntitySheep['Sheep'/183, l='MpServer', x=-135.50, y=4.00, z=39.34], EntityItem['item.item.seeds'/180, l='MpServer', x=-132.81, y=5.13, z=16.63], EntityItem['item.item.seeds'/181, l='MpServer', x=-132.25, y=5.13, z=18.63], EntityVillager['Villager'/205, l='MpServer', x=-125.63, y=4.00, z=27.63], EntitySlime['Slime'/204, l='MpServer', x=-126.77, y=4.00, z=0.68], EntitySlime['Slime'/207, l='MpServer', x=-123.16, y=4.00, z=22.13], EntitySlime['Slime'/206, l='MpServer', x=-119.63, y=4.00, z=28.38], EntityChicken['Chicken'/194, l='MpServer', x=-141.44, y=4.00, z=150.56], EntitySlime['Slime'/24467, l='MpServer', x=-213.05, y=4.00, z=108.59], EntitySheep['Sheep'/220, l='MpServer', x=-114.28, y=4.00, z=88.06], EntitySlime['Slime'/221, l='MpServer', x=-112.75, y=4.47, z=110.50], EntitySlime['Slime'/222, l='MpServer', x=-119.16, y=4.00, z=134.19], EntitySheep['Sheep'/216, l='MpServer', x=-115.16, y=4.00, z=56.78], EntitySheep['Sheep'/217, l='MpServer', x=-113.97, y=4.00, z=58.03], EntitySheep['Sheep'/218, l='MpServer', x=-126.88, y=4.00, z=59.06], EntitySheep['Sheep'/219, l='MpServer', x=-113.06, y=4.00, z=63.09], EntityVillager['Villager'/212, l='MpServer', x=-125.50, y=5.00, z=39.25], EntitySheep['Sheep'/213, l='MpServer', x=-113.56, y=4.00, z=60.56], EntitySheep['Sheep'/214, l='MpServer', x=-121.13, y=4.00, z=55.56], EntitySheep['Sheep'/215, l='MpServer', x=-123.69, y=4.00, z=48.38], EntitySheep['Sheep'/208, l='MpServer', x=-127.88, y=4.00, z=46.03], EntitySheep['Sheep'/209, l='MpServer', x=-127.06, y=4.00, z=36.81], EntityVillager['Villager'/210, l='MpServer', x=-124.56, y=5.00, z=39.31], EntityVillager['Villager'/211, l='MpServer', x=-129.90, y=6.00, z=33.50], EntityPig['Pig'/239, l='MpServer', x=-88.78, y=4.00, z=41.42], EntityCow['Cow'/238, l='MpServer', x=-89.94, y=4.00, z=41.57], EntityCow['Cow'/237, l='MpServer', x=-89.03, y=4.00, z=18.03], EntitySheep['Sheep'/235, l='MpServer', x=-86.34, y=4.00, z=24.53], EntitySlime['Slime'/234, l='MpServer', x=-91.59, y=4.00, z=0.56], EntitySlime['Slime'/232, l='MpServer', x=-99.66, y=4.00, z=92.78], EntityPig['Pig'/231, l='MpServer', x=-109.97, y=4.00, z=74.84], EntitySlime['Slime'/230, l='MpServer', x=-113.06, y=4.00, z=91.66], EntitySheep['Sheep'/229, l='MpServer', x=-94.28, y=4.00, z=70.38], EntityPig['Pig'/228, l='MpServer', x=-107.19, y=4.00, z=56.19], EntityCow['Cow'/227, l='MpServer', x=-102.75, y=4.00, z=37.31], EntityPig['Pig'/226, l='MpServer', x=-96.28, y=4.00, z=25.41], EntityPig['Pig'/225, l='MpServer', x=-100.81, y=4.00, z=18.28], EntitySheep['Sheep'/248, l='MpServer', x=-91.72, y=4.00, z=88.22], EntitySlime['Slime'/249, l='MpServer', x=-87.34, y=4.00, z=155.03], EntitySlime['Slime'/246, l='MpServer', x=-93.53, y=4.47, z=61.99], EntitySheep['Sheep'/247, l='MpServer', x=-93.69, y=4.00, z=89.44], EntityPig['Pig'/244, l='MpServer', x=-84.47, y=4.00, z=69.19], EntitySheep['Sheep'/245, l='MpServer', x=-86.72, y=4.00, z=72.53], EntitySlime['Slime'/242, l='MpServer', x=-86.28, y=4.00, z=42.49], EntitySheep['Sheep'/243, l='MpServer', x=-88.88, y=4.00, z=78.13]] Retry entities: 0 total; [] Server brand: fml,forge Server type: Integrated singleplayer server Stacktrace: at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:415) at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:2555) at net.minecraft.client.Minecraft.run(Minecraft.java:973) at net.minecraft.client.main.Main.main(Main.java:164) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:85) at GradleStart.main(GradleStart.java:45) -- System Details -- Details: Minecraft Version: 1.7.10 Operating System: Windows 7 (amd64) version 6.1 Java Version: 1.7.0_75, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 772474144 bytes (736 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 MB) JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0 FML: MCP v9.05 FML v7.10.85.1291 Minecraft Forge 10.13.2.1291 5 mods loaded, 5 mods active mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available FML{7.10.85.1291} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.2.1291.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available Forge{10.13.2.1291} [Minecraft Forge] (forgeSrc-1.7.10-10.13.2.1291.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available servermod{1.0} [server Mod] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available testmod{1.0} [Test Mod] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available Launched Version: 1.7.10 LWJGL: 2.9.1 OpenGL: Intel(R) HD Graphics 4600 GL version 4.0.0 - Build 9.18.10.3324, Intel GL Caps: Using GL 1.3 multitexturing. Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported. Anisotropic filtering is supported and maximum anisotropy is 16. Shaders are available because OpenGL 2.1 is supported. Is Modded: Definitely; Client brand changed to 'fml,forge' Type: Client (map_client.txt) Resource Packs: [] Current Language: English (US) Profiler Position: N/A (disabled) Vec3 Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used Anisotropic Filtering: Off (1)
  11. I keep crashing when I open my tool tab and its because of the new Item I added I think its because of the way im doing nbt now keep in mind I literally just figured out nbt. package com.linumhost.Items; import java.util.List; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.world.World; public class DarkPickaxe extends Item{ public DarkPickaxe(){ } public Integer[] maxLevelXp = new Integer[5]; public void populateArray(){ maxLevelXp[0] = 10; maxLevelXp[1] = 20; maxLevelXp[2] = 30; maxLevelXp[3] = 40; maxLevelXp[4] = 50; } @Override public void onUpdate(ItemStack itemstack, World world, Entity entity, int metadata, boolean bool) { if (itemstack.stackTagCompound == null) { itemstack.stackTagCompound = new NBTTagCompound(); //or itemstack.setTagCompound(new NBTTagCompound()); } itemstack.stackTagCompound.setInteger("toolLevel", 0); } public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer player) { itemstack.stackTagCompound.setInteger("XP", 1 + maxLevelXp[itemstack.stackTagCompound.getInteger("toolLevel")]); itemstack.damageItem(1, player); return itemstack; } @Override @SideOnly(Side.CLIENT) public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool) { int level = stack.stackTagCompound.getInteger("XP"); list.add(level); } } heres the crash report ---- Minecraft Crash Report ---- // Why is it breaking Time: 2/25/15 6:50 PM Description: Rendering screen java.lang.NullPointerException: Rendering screen at com.linumhost.Items.DarkPickaxe.addInformation(DarkPickaxe.java:59) at net.minecraft.item.ItemStack.getTooltip(ItemStack.java:641) at net.minecraft.client.gui.GuiScreen.renderToolTip(GuiScreen.java:124) at net.minecraft.client.gui.inventory.GuiContainerCreative.renderToolTip(GuiContainerCreative.java:769) at net.minecraft.client.gui.inventory.GuiContainer.drawScreen(GuiContainer.java:186) at net.minecraft.client.renderer.InventoryEffectRenderer.drawScreen(InventoryEffectRenderer.java:44) at net.minecraft.client.gui.inventory.GuiContainerCreative.drawScreen(GuiContainerCreative.java:673) at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1137) at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1056) at net.minecraft.client.Minecraft.run(Minecraft.java:951) at net.minecraft.client.main.Main.main(Main.java:164) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:85) at GradleStart.main(GradleStart.java:45) A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Stacktrace: at com.linumhost.Items.DarkPickaxe.addInformation(DarkPickaxe.java:59) at net.minecraft.item.ItemStack.getTooltip(ItemStack.java:641) at net.minecraft.client.gui.GuiScreen.renderToolTip(GuiScreen.java:124) at net.minecraft.client.gui.inventory.GuiContainerCreative.renderToolTip(GuiContainerCreative.java:769) at net.minecraft.client.gui.inventory.GuiContainer.drawScreen(GuiContainer.java:186) at net.minecraft.client.renderer.InventoryEffectRenderer.drawScreen(InventoryEffectRenderer.java:44) at net.minecraft.client.gui.inventory.GuiContainerCreative.drawScreen(GuiContainerCreative.java:673) -- Screen render details -- Details: Screen name: net.minecraft.client.gui.inventory.GuiContainerCreative Mouse location: Scaled: (285, 126). Absolute: (571, 453) Screen size: Scaled: (683, 353). Absolute: (1366, 706). Scale factor of 2 -- Affected level -- Details: Level name: MpServer All players: 1 total; [EntityClientPlayerMP['Player737'/280, l='MpServer', x=-163.28, y=5.62, z=75.15]] Chunk stats: MultiplayerChunkCache: 625, 625 Level seed: 0 Level generator: ID 01 - flat, ver 0. Features enabled: false Level generator options: Level spawn location: World: (-178,4,65), Chunk: (at 14,0,1 in -12,4; contains blocks -192,0,64 to -177,255,79), Region: (-1,0; contains chunks -32,0 to -1,31, blocks -512,0,0 to -1,255,511) Level time: 88607 game time, 32073 day time Level dimension: 0 Level storage version: 0x00000 - Unknown? Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false) Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: false Forced entities: 128 total; [EntitySlime['Slime'/51, l='MpServer', x=-232.63, y=4.00, z=57.31], EntityChicken['Chicken'/49, l='MpServer', x=-242.47, y=4.00, z=46.47], EntityCow['Cow'/48, l='MpServer', x=-243.91, y=4.00, z=21.38], EntitySheep['Sheep'/70, l='MpServer', x=-235.53, y=4.00, z=-2.06], EntitySheep['Sheep'/67, l='MpServer', x=-239.22, y=4.00, z=-2.16], EntitySheep['Sheep'/76, l='MpServer', x=-226.41, y=4.00, z=9.81], EntityHorse['Donkey'/77, l='MpServer', x=-232.50, y=4.00, z=14.59], EntitySlime['Slime'/78, l='MpServer', x=-240.47, y=4.81, z=13.44], EntitySlime['Slime'/79, l='MpServer', x=-219.71, y=4.00, z=26.60], EntitySlime['Slime'/72, l='MpServer', x=-239.97, y=4.47, z=-5.80], EntityPig['Pig'/73, l='MpServer', x=-233.75, y=4.00, z=4.03], EntitySheep['Sheep'/74, l='MpServer', x=-229.50, y=4.00, z=4.75], EntityHorse['Donkey'/75, l='MpServer', x=-228.44, y=4.00, z=6.19], EntityCow['Cow'/85, l='MpServer', x=-236.91, y=4.00, z=58.31], EntityChicken['Chicken'/84, l='MpServer', x=-231.30, y=4.00, z=43.57], EntitySlime['Slime'/86, l='MpServer', x=-235.47, y=4.00, z=141.70], EntityCow['Cow'/81, l='MpServer', x=-222.03, y=4.00, z=41.13], EntityCow['Cow'/80, l='MpServer', x=-241.84, y=4.00, z=41.94], EntityCow['Cow'/83, l='MpServer', x=-232.63, y=4.00, z=51.50], EntitySlime['Slime'/82, l='MpServer', x=-238.41, y=4.00, z=24.63], EntityClientPlayerMP['Player737'/280, l='MpServer', x=-163.28, y=5.62, z=75.15], EntityCow['Cow'/93, l='MpServer', x=-231.81, y=4.00, z=61.13], EntityCow['Cow'/92, l='MpServer', x=-222.09, y=4.00, z=53.28], EntitySlime['Slime'/95, l='MpServer', x=-224.91, y=4.00, z=104.00], EntitySlime['Slime'/94, l='MpServer', x=-227.62, y=4.85, z=75.53], EntityPig['Pig'/89, l='MpServer', x=-212.13, y=4.00, z=-1.25], EntitySlime['Slime'/91, l='MpServer', x=-220.50, y=4.00, z=31.09], EntityChicken['Chicken'/90, l='MpServer', x=-220.56, y=4.00, z=45.59], EntitySlime['Slime'/102, l='MpServer', x=-203.92, y=4.00, z=84.80], EntitySlime['Slime'/103, l='MpServer', x=-200.93, y=4.81, z=94.65], EntitySlime['Slime'/100, l='MpServer', x=-201.34, y=4.61, z=36.50], EntitySlime['Slime'/101, l='MpServer', x=-198.41, y=4.00, z=58.22], EntitySlime['Slime'/98, l='MpServer', x=-213.50, y=4.00, z=143.22], EntitySlime['Slime'/99, l='MpServer', x=-200.46, y=4.14, z=48.00], EntitySlime['Slime'/96, l='MpServer', x=-218.29, y=4.14, z=127.52], EntitySlime['Slime'/97, l='MpServer', x=-225.86, y=4.96, z=138.49], EntitySlime['Slime'/104, l='MpServer', x=-199.95, y=4.00, z=133.99], EntitySheep['Sheep'/119, l='MpServer', x=-173.94, y=4.00, z=-3.94], EntityChicken['Chicken'/117, l='MpServer', x=-180.44, y=4.00, z=-0.44], EntityPig['Pig'/115, l='MpServer', x=-183.16, y=4.00, z=-4.13], EntitySlime['Slime'/126, l='MpServer', x=-193.06, y=4.61, z=135.63], EntitySlime['Slime'/125, l='MpServer', x=-193.56, y=4.81, z=142.55], EntitySlime['Slime'/124, l='MpServer', x=-183.85, y=4.00, z=130.83], EntitySlime['Slime'/123, l='MpServer', x=-194.53, y=4.00, z=127.69], EntitySlime['Slime'/122, l='MpServer', x=-183.34, y=4.00, z=43.87], EntitySlime['Slime'/121, l='MpServer', x=-190.08, y=4.00, z=29.59], EntityChicken['Chicken'/120, l='MpServer', x=-186.47, y=4.00, z=8.41], EntitySheep['Sheep'/137, l='MpServer', x=-165.25, y=4.00, z=-0.75], EntityChicken['Chicken'/139, l='MpServer', x=-173.38, y=4.00, z=1.78], EntityItem['item.item.carrots'/141, l='MpServer', x=-162.88, y=5.13, z=19.56], EntityItem['item.item.wheat'/143, l='MpServer', x=-171.38, y=5.13, z=56.91], EntitySlime['Slime'/142, l='MpServer', x=-168.22, y=4.00, z=28.03], EntityItem['item.item.seeds'/144, l='MpServer', x=-170.63, y=5.13, z=57.94], EntityItem['item.item.potato'/145, l='MpServer', x=-174.34, y=5.13, z=55.88], EntityItem['item.item.potato'/146, l='MpServer', x=-174.16, y=5.13, z=54.19], EntitySlime['Slime'/147, l='MpServer', x=-159.80, y=4.00, z=60.45], EntitySlime['Slime'/148, l='MpServer', x=-166.60, y=4.35, z=81.84], EntitySlime['Slime'/149, l='MpServer', x=-171.66, y=4.85, z=87.00], EntitySlime['Slime'/150, l='MpServer', x=-179.85, y=4.35, z=130.63], EntityVillager['Villager'/175, l='MpServer', x=-133.50, y=5.50, z=31.06], EntitySlime['Slime'/163, l='MpServer', x=-148.96, y=4.00, z=61.11], EntitySlime['Slime'/162, l='MpServer', x=-146.84, y=5.47, z=35.22], EntityVillager['Villager'/161, l='MpServer', x=-144.06, y=5.00, z=47.50], EntitySlime['Slime'/160, l='MpServer', x=-145.91, y=4.00, z=27.19], EntitySlime['Slime'/167, l='MpServer', x=-152.10, y=4.96, z=155.08], EntitySlime['Slime'/166, l='MpServer', x=-149.78, y=4.00, z=143.21], EntitySlime['Slime'/165, l='MpServer', x=-143.84, y=4.18, z=146.91], EntitySlime['Slime'/164, l='MpServer', x=-152.91, y=4.00, z=122.28], EntityVillager['Villager'/186, l='MpServer', x=-135.91, y=4.00, z=41.69], EntityVillager['Villager'/187, l='MpServer', x=-134.59, y=4.00, z=40.97], EntityVillager['Villager'/184, l='MpServer', x=-133.66, y=5.00, z=32.50], EntityVillager['Villager'/185, l='MpServer', x=-134.69, y=5.00, z=33.53], EntitySheep['Sheep'/190, l='MpServer', x=-128.78, y=4.00, z=60.59], EntityVillager['Villager'/191, l='MpServer', x=-136.00, y=5.00, z=50.41], EntitySlime['Slime'/188, l='MpServer', x=-128.31, y=4.00, z=35.63], EntityVillager['Villager'/189, l='MpServer', x=-135.28, y=5.00, z=51.56], EntityItem['item.item.seeds'/178, l='MpServer', x=-131.59, y=5.13, z=22.13], EntityItem['item.item.wheat'/179, l='MpServer', x=-134.63, y=5.13, z=17.53], EntityVillager['Villager'/176, l='MpServer', x=-130.72, y=5.00, z=30.72], EntityItem['item.item.wheat'/177, l='MpServer', x=-132.25, y=5.13, z=20.16], EntitySheep['Sheep'/182, l='MpServer', x=-135.50, y=4.00, z=39.34], EntityVillager['Villager'/183, l='MpServer', x=-136.47, y=5.00, z=44.13], EntityItem['item.item.seeds'/180, l='MpServer', x=-132.81, y=5.13, z=16.63], EntityItem['item.item.seeds'/181, l='MpServer', x=-132.25, y=5.13, z=18.63], EntitySlime['Slime'/197, l='MpServer', x=-135.93, y=4.00, z=147.55], EntitySlime['Slime'/196, l='MpServer', x=-138.36, y=4.00, z=146.03], EntitySlime['Slime'/193, l='MpServer', x=-142.88, y=4.81, z=87.13], EntitySlime['Slime'/192, l='MpServer', x=-137.84, y=4.00, z=46.63], EntitySlime['Slime'/194, l='MpServer', x=-133.61, y=4.96, z=107.24], EntitySheep['Sheep'/220, l='MpServer', x=-126.88, y=4.00, z=59.06], EntitySheep['Sheep'/221, l='MpServer', x=-114.28, y=4.00, z=88.06], EntitySlime['Slime'/222, l='MpServer', x=-109.78, y=4.00, z=110.09], EntitySheep['Sheep'/216, l='MpServer', x=-121.13, y=4.00, z=55.56], EntitySheep['Sheep'/217, l='MpServer', x=-123.69, y=4.00, z=48.38], EntitySheep['Sheep'/218, l='MpServer', x=-115.16, y=4.00, z=56.78], EntitySheep['Sheep'/219, l='MpServer', x=-122.19, y=4.00, z=60.66], EntitySheep['Sheep'/212, l='MpServer', x=-127.38, y=4.00, z=37.53], EntityVillager['Villager'/213, l='MpServer', x=-124.56, y=5.00, z=39.31], EntityVillager['Villager'/214, l='MpServer', x=-120.41, y=4.00, z=42.78], EntitySheep['Sheep'/215, l='MpServer', x=-112.97, y=4.00, z=62.03], EntityVillager['Villager'/208, l='MpServer', x=-125.53, y=4.00, z=27.72], EntitySlime['Slime'/209, l='MpServer', x=-119.63, y=4.00, z=28.38], EntitySlime['Slime'/210, l='MpServer', x=-123.88, y=4.00, z=23.19], EntitySheep['Sheep'/211, l='MpServer', x=-118.50, y=5.00, z=34.63], EntityCow['Cow'/239, l='MpServer', x=-89.78, y=4.00, z=41.78], EntityCow['Cow'/238, l='MpServer', x=-93.25, y=4.00, z=36.44], EntitySlime['Slime'/237, l='MpServer', x=-88.59, y=4.00, z=20.61], EntityCow['Cow'/236, l='MpServer', x=-94.97, y=4.00, z=24.06], EntityCow['Cow'/235, l='MpServer', x=-83.15, y=4.00, z=25.03], EntitySheep['Sheep'/234, l='MpServer', x=-86.34, y=4.00, z=24.53], EntityPig['Pig'/233, l='MpServer', x=-98.03, y=4.00, z=77.03], EntityPig['Pig'/232, l='MpServer', x=-102.41, y=4.00, z=65.69], EntitySheep['Sheep'/231, l='MpServer', x=-99.78, y=4.00, z=68.47], EntitySlime['Slime'/230, l='MpServer', x=-101.44, y=4.99, z=58.38], EntitySheep['Sheep'/229, l='MpServer', x=-111.41, y=4.00, z=63.06], EntityPig['Pig'/228, l='MpServer', x=-96.28, y=4.00, z=25.41], EntityPig['Pig'/227, l='MpServer', x=-100.81, y=4.00, z=18.28], EntitySlime['Slime'/252, l='MpServer', x=-89.50, y=4.00, z=159.25], EntitySheep['Sheep'/248, l='MpServer', x=-94.25, y=4.00, z=99.34], EntitySlime['Slime'/249, l='MpServer', x=-88.09, y=4.35, z=119.73], EntityPig['Pig'/246, l='MpServer', x=-87.09, y=4.00, z=91.50], EntitySlime['Slime'/247, l='MpServer', x=-84.97, y=4.96, z=77.96], EntitySheep['Sheep'/244, l='MpServer', x=-86.72, y=4.00, z=72.53], EntitySheep['Sheep'/245, l='MpServer', x=-93.50, y=4.00, z=89.84], EntitySheep['Sheep'/242, l='MpServer', x=-85.26, y=4.00, z=75.77], EntityPig['Pig'/243, l='MpServer', x=-84.47, y=4.00, z=69.19], EntityPig['Pig'/240, l='MpServer', x=-88.63, y=4.00, z=41.72], EntitySheep['Sheep'/241, l='MpServer', x=-84.84, y=4.00, z=34.63]] Retry entities: 0 total; [] Server brand: fml,forge Server type: Integrated singleplayer server Stacktrace: at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:415) at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:2555) at net.minecraft.client.Minecraft.run(Minecraft.java:973) at net.minecraft.client.main.Main.main(Main.java:164) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:85) at GradleStart.main(GradleStart.java:45) -- System Details -- Details: Minecraft Version: 1.7.10 Operating System: Windows 7 (amd64) version 6.1 Java Version: 1.7.0_75, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 818467208 bytes (780 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 MB) JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0 FML: MCP v9.05 FML v7.10.85.1291 Minecraft Forge 10.13.2.1291 5 mods loaded, 5 mods active mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available FML{7.10.85.1291} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.2.1291.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available Forge{10.13.2.1291} [Minecraft Forge] (forgeSrc-1.7.10-10.13.2.1291.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available servermod{1.0} [server Mod] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available testmod{1.0} [Test Mod] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available Launched Version: 1.7.10 LWJGL: 2.9.1 OpenGL: Intel(R) HD Graphics 4600 GL version 4.0.0 - Build 9.18.10.3324, Intel GL Caps: Using GL 1.3 multitexturing. Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported. Anisotropic filtering is supported and maximum anisotropy is 16. Shaders are available because OpenGL 2.1 is supported. Is Modded: Definitely; Client brand changed to 'fml,forge' Type: Client (map_client.txt) Resource Packs: [] Current Language: English (US) Profiler Position: N/A (disabled) Vec3 Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used Anisotropic Filtering: Off (1)
  12. The collision works but if you stand on it and place the same block connecting to it the collision is gone for a second letting the player fall through heres my code package com.linumhost.Blocks; import java.util.Random; import org.lwjgl.opengl.GL11; import com.linumhost.CreativeTab.ServerCreativeTab; import com.linumhost.Items.Items; import com.linumhost.Items.Wrench; import com.linumhost.Renderer.BasicRenderer; import com.linumhost.TileEntity.TileEntityConduitPipe; import com.linumhost.TileEntity.TileEntityServerCaseBlock; import com.linumhost.TileEntity.Renderer.TileEntityConduitPipeRenderer; import com.linumhost.lib.RefStrings; 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.Minecraft; import net.minecraft.client.gui.FontRenderer; import net.minecraft.client.renderer.entity.RenderItem; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.IIcon; import net.minecraft.util.MathHelper; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import net.minecraftforge.client.IItemRenderer.ItemRenderType; import net.minecraftforge.client.IItemRenderer.ItemRendererHelper; public class ConduitPipe extends BlockContainer{ public ConduitPipe(Material material){ super(material); setCreativeTab(ServerCreativeTab.tabBlocks); float pixel = 1F/16F; this.setBlockBounds(11*pixel/2, 11*pixel/2, 11*pixel/2, 1-11*pixel/2, 1-11*pixel/2, 1-11*pixel/2); } private static RenderItem renderItem = new RenderItem(); public boolean handleRenderType(ItemStack itemStack, ItemRenderType type) { return type == ItemRenderType.INVENTORY; } public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) { return false; } public void renderItem(ItemRenderType type, ItemStack itemStack, Object... data) { FontRenderer fontRenderer = Minecraft.getMinecraft().fontRenderer; // ====================== Render item texture ====================== IIcon icon = itemStack.getIconIndex(); renderItem.renderIcon(0, 0, icon, 16, 16); // ====================== Render OpenGL square shape ====================== BasicRenderer.drawInventoryBlock(); // ====================== Render text ====================== GL11.glEnable(GL11.GL_TEXTURE_2D); String text = Integer.toString(itemStack.getItemDamage()); fontRenderer.drawStringWithShadow(text, 1, 1, 0xFFFFFF); } public AxisAlignedBB getSelectedBoundingBoxFromPool(World world, int x, int y, int z){ TileEntityConduitPipe conduit = (TileEntityConduitPipe)world.getTileEntity(x, y, z); float pixel = 1F / 16F; if(conduit != null){ float minX = 11*pixel/2-(conduit.connections[5]!=null?(11*pixel/2):0); float minY = 11*pixel/2-(conduit.connections[1]!=null?(11*pixel/2):0); float minZ = 11*pixel/2-(conduit.connections[2]!=null?(11*pixel/2):0); float maxX = 1-11*pixel/2+(conduit.connections[3]!=null?(11*pixel/2):0); float maxY = 1-11*pixel/2+(conduit.connections[0]!=null?(11*pixel/2):0); float maxZ = 1-11*pixel/2+(conduit.connections[4]!=null?(11*pixel/2):0); this.setBlockBounds(minX, minY, minZ, maxX, maxY, maxZ); } return AxisAlignedBB.getBoundingBox(x+this.minX, y+this.minY, z+this.minZ, x+this.maxX, y+this.maxY, z+this.maxZ); } float pixel = 1F / 16F; public int getRenderType(){ return -1; } public Block blockDropped(int par1, int y, int par3) { return com.linumhost.Blocks.Blocks.conduit; } public boolean isOpaqueCube(){ return false; } public boolean renderAsNormalBlock(){ return false; } @Override public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) { return new TileEntityConduitPipe(); } }
  13. heres my code so far package com.linumhost.TileEntity; import com.linumhost.Blocks.AirGenerator; import com.linumhost.Energy.IEnergyHandler; import com.linumhost.Energy.IEnergyProvider; import com.linumhost.Energy.IEnergyReceiver; import com.linumhost.lib.RefStrings; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.Entity; import net.minecraft.tileentity.TileEntity; import net.minecraftforge.common.util.ForgeDirection; public class TileEntityAirGeneratorBlock extends TileEntity implements IEnergyProvider{ TileEntity entity; TileEntityServerCaseBlock server = (TileEntityServerCaseBlock) entity; public static int energyAmount = 0; public int energyGenerated = 0; public static boolean isActive = false; public boolean canGen = false; private static final int MAX_EXTRACTABLE_ENERGY = 200; private static final int MAX_STORABLE_ENERGY = 100000; public int delay = 5; @Override public void updateEntity() { if(delay > 0) { delay--; return; } delay = 5; if(energyAmount != MAX_STORABLE_ENERGY){ canGen = true; this.energyAmount = Math.min(this.energyAmount + this.energyGenerated, MAX_STORABLE_ENERGY); //System.out.println(energyAmount); }else if(energyAmount > MAX_STORABLE_ENERGY){ energyGenerated = 0; isActive = false; } if(canGen){ isActive = true; this.energyGenerated = 80; } if( this.energyAmount > 0 ) { int maxExtractable = MAX_EXTRACTABLE_ENERGY; for( ForgeDirection direction : ForgeDirection.VALID_DIRECTIONS ) { TileEntity te = this.worldObj.getTileEntity(this.xCoord + direction.offsetX, this.yCoord + direction.offsetY, this.zCoord + direction.offsetZ); if( te instanceof IEnergyReceiver ) { IEnergyReceiver receiver = (IEnergyReceiver) te; if( !receiver.canConnectEnergy(direction) ) { continue; } int extractable = this.extractEnergy(direction, maxExtractable, true); int receivable = receiver.receiveEnergy(direction.getOpposite(), extractable, false); maxExtractable -= receivable; this.extractEnergy(direction, receivable, false); } if( maxExtractable == 0 ) { break; } } } } @Override public int extractEnergy(ForgeDirection from, int maxExtract, boolean simulate) { int energyExtracted = Math.min(this.energyAmount, Math.min(MAX_EXTRACTABLE_ENERGY, maxExtract)); if( !simulate ) { this.energyAmount -= energyExtracted; } return energyExtracted; } @Override public int getEnergyStored(ForgeDirection from) { return this.energyAmount; } @Override public int getMaxEnergyStored(ForgeDirection from) { return MAX_STORABLE_ENERGY; } @Override public boolean canConnectEnergy(ForgeDirection from) { return true; } } [code] [code]package com.linumhost.Blocks; import org.lwjgl.input.Keyboard; import com.linumhost.CreativeTab.ServerCreativeTab; import com.linumhost.Gui.AirGeneratorGui; import com.linumhost.TileEntity.TileEntityAirGeneratorBlock; import com.linumhost.TileEntity.TileEntityServerCaseBlock; import com.linumhost.lib.RefStrings; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.IIcon; import net.minecraft.util.MathHelper; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; public class AirGenerator extends BlockContainer{ public AirGenerator(Material material) { super(material); setCreativeTab(ServerCreativeTab.tabBlocks); setHardness(5F); setResistance(10F); //this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 2.0F, 0.0F); } IIcon activeIcon; IIcon unactiveIcon; public Minecraft mc = Minecraft.getMinecraft(); TileEntity entity; TileEntityAirGeneratorBlock tile = new TileEntityAirGeneratorBlock(); public static IIcon[] icons = new IIcon[6]; @SideOnly(Side.CLIENT) public static IIcon topIcon; @SideOnly(Side.CLIENT) public static IIcon sideIcon; @SideOnly(Side.CLIENT) public static IIcon frontIcon; public void registerBlockIcons(IIconRegister reg, IBlockAccess blockAccess, int x, int y, int z) { activeIcon = reg.registerIcon(RefStrings.MODID + ":airGeneratorFrontActivated"); unactiveIcon = reg.registerIcon(RefStrings.MODID + ":airGeneratorFrontDeactivated"); for (int side = 0; side < 6; side ++) { //this.icons[side] = reg.registerIcon(this.textureName + "_" + i); if(side == 0 || side == 1) { //return topIcon; this.icons[side] = reg.registerIcon(RefStrings.MODID + ":airGeneratorTop"); } else if(side == 1 || side == 4 || side == 3 || side == 5) { //return sideIcon; this.icons[side] = reg.registerIcon(RefStrings.MODID + ":airGeneratorSide"); } else if(side == 2){ this.icons[side] = getIcon(); } } } public IIcon getIcon(){ if(TileEntityAirGeneratorBlock.isActive == true){ return activeIcon; } return unactiveIcon; } @Override public IIcon getIcon(int side, int meta) { return this.icons[side]; } public boolean onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9){ if (!par1World.isRemote){ //DO STUFF HERE mc.displayGuiScreen(new AirGeneratorGui(tile)); return true; } return false; } @Override public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase entity, ItemStack itemStack) { if(entity == null){ return; } //TileEntityAngleVentPipe2Block tile = (TileEntityAngleVentPipe2Block) world.getTileEntity(x,y,z); int rotation = MathHelper.floor_double((double)(entity.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3; if(rotation == 0) { world.setBlockMetadataWithNotify(x, y, z, 2, 2); } if(rotation == 1) { world.setBlockMetadataWithNotify(x, y, z, 5, 2); } if(rotation == 2) { world.setBlockMetadataWithNotify(x, y, z, 3, 2); } if(rotation == 3) { world.setBlockMetadataWithNotify(x, y, z, 4, 2); } } @Override public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) { return new TileEntityAirGeneratorBlock(); } }
  14. Ok so I have a generator but how can I make it so each block stores its own energy and not the same amount and how can I save it with nbt data
  15. Hey guys, just wondering if anyone wants to start a mod project
  16. Ok and how can I make a gui on the ingame screen so you dont have to open a block
  17. How can I make a gui that would display time
  18. would I draw it the same was I draw it while it's placed and nah you didn't offended me
  19. TESR 1. Done with work 2. Can't play football was in car accident and knee is screwed to hell
  20. Messages like this don't help anybody. If you don't know what's going on, don't post. It does help because he will be like oh its a rendering problem let's check where I'm rendering the block and that's I can help with if he doesn't post code
  21. I'm just going by what Mitchellbrine was sayin
  22. Tesselectors my friend, would love to post code but at school
  23. Well Mr problem was I didn't have my tile registered and it was removing the block without the entity this leading to a crash
  24. so far this is what I got public void registerBlockIcons(IIconRegister reg, IBlockAccess blockAccess, int x, int y, int z) { activeIcon = reg.registerIcon(RefStrings.MODID + ":airGeneratorFrontActivated"); unactiveIcon = reg.registerIcon(RefStrings.MODID + ":airGeneratorFrontDeactivated"); for (int side = 0; side < 6; side ++) { //this.icons[side] = reg.registerIcon(this.textureName + "_" + i); if(side == 0 || side == 1) { //return topIcon; this.icons[side] = reg.registerIcon(RefStrings.MODID + ":airGeneratorTop"); } else if(side == 1 || side == 4 || side == 3 || side == 5) { //return sideIcon; this.icons[side] = reg.registerIcon(RefStrings.MODID + ":airGeneratorSide"); } else if(side == 2){ this.icons[side] = getIcon(); } } } public IIcon getIcon(){ if(TileEntityAirGeneratorBlock.isActive == true){ return activeIcon; } return unactiveIcon; }
×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.