Jump to content

CountNoobula

Members
  • Posts

    14
  • Joined

  • Last visited

Everything posted by CountNoobula

  1. Hi! I am trying to implement PlayerAPI for my mod, but unfortunately the 1.6.4 version doesn't come with the src and I have to decompile it. Does anyone have any guide on how to do this in the gradle setup please? I can't find the bin where the main Jar is stored and if I did find it, don't know how I would force it to decompile and keep that version Any help much appreciated!
  2. Solved! Well, mostly. New problems now Anyway, the reason it wasn't being called is because my top and bottom were incorrectly set It's rendering now. Although behind the main hud now
  3. It looks like you are trying to register an item which hasn't been initialised yet. https://github.com/ProofTheEngineer/RedTech/blob/1214c2b009f138944d1a35f9d94764773ede2846/ProofTheEngineer/RedTech/items/tools/Tools.java Function: ToolsReg Needs to be called before you try initialise your recipes so that the screwdriver can be initialised. Reason I suspect it is this, is because if you look at this file on line 39: https://github.com/ProofTheEngineer/RedTech/blob/master/ProofTheEngineer/RedTech/items/Items.java You are trying to register a recipe for the screwdriver, which is only initialised in the ToolsReg function.
  4. Hey all! Working on creating a little interface with a scrollable list (not having the greatest luck, but getting there), and I have come across a two problems I need some help with. Firstly, the files related are located: https://github.com/countnoobula/AlchemyTrader/blob/master/src/com/nightfallstudios/alchemytrader/gui/GuiSlotExchange.java https://github.com/countnoobula/AlchemyTrader/blob/master/src/com/nightfallstudios/alchemytrader/gui/GuiExchangeTable.java My first problem is that the drawSlot function is not being called. I am not too sure why, I have the drawScreen called, and have the size as 1. Any insight much appreciated? My second problem is that I seem to be failing at aligning it to where I want, whenever I open the GUI, in the background, there is a dark area on the left (the scrollbar background?) and I need it to be shrunk and aligned into the available box here: https://github.com/countnoobula/AlchemyTrader/blob/master/assets/alchemytrader/textures/gui/exchange_table.png Any advice much appreciated on that aswell! I really hope you guys can help
  5. I am going to recommend checking out the MainMenu API for some help. It is outdated, but the src is available. http://www.minecraftforum.net/topic/1757119-151apiforge-main-menu-api-v11-have-your-own-main-menu-no-base-class-edits-jukebox-player/ Hope it helps
  6. Hey guys! Firstly, thanks for all the support in the past, I humbly come once again to ask for advice. I am busy working on a little exchange table system, I am trying to limit the objects that can go into the slots though. To do this, I am using the isItemValidForSlot method, it doesn't seem to be called though. Could you guys provide some help/insight please? The TileEntity, Container and Gui classes https://github.com/countnoobula/AlchemyTrader/blob/20d072a706db0175121686d1c1d5915f941b0f96/src/com/nightfallstudios/alchemytrader/tileentities/TileEntityExchangeTable.java https://github.com/countnoobula/AlchemyTrader/blob/20d072a706db0175121686d1c1d5915f941b0f96/src/com/nightfallstudios/alchemytrader/gui/GuiExchangeTable.java https://github.com/countnoobula/AlchemyTrader/blob/20d072a706db0175121686d1c1d5915f941b0f96/src/com/nightfallstudios/alchemytrader/containers/ContainerExchangeTable.java
  7. Thanks, will try that out and let you know how it goes
  8. Hi all! I am trying to make a stone that regenerates the players health and hunger. So far I have it working, but it doesn't save the data, so on the next update (lose health or hunger) it resets I'm using a tick handler to check for the item, then adjusting the player hunger/health. I tried to write the NBT data, that didn't work either. Here is my code for how I am doing it package com.nightfallstudios.alchemytrader.handlers; import java.util.EnumSet; import net.minecraft.client.Minecraft; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.item.Item; import cpw.mods.fml.common.ITickHandler; import cpw.mods.fml.common.TickType; public class TickHandler implements ITickHandler { private int tickCount = 0; @Override public void tickStart(EnumSet<TickType> type, Object... tickData) { } @Override public void tickEnd(EnumSet<TickType> type, Object... tickData) { if (type.equals(EnumSet.of(TickType.SERVER))) { onTickInGame(); } } private void onTickInGame() { if (Minecraft.getMinecraft().theWorld != null) { for (Object p : Minecraft.getMinecraft().theWorld.playerEntities) { EntityPlayer player = (EntityPlayer) p; InventoryPlayer inv = player.inventory; boolean hungerStone = false, healthStone = false, completeStone = false; boolean fireAmulet = false, waterAmulet = false; for (int i = 0; i < 9; i++) { if (inv.getStackInSlot(i) != null) { Item currentItem = inv.getStackInSlot(i).getItem(); if (currentItem.itemID == ItemHandler.itemHungerStone.itemID) { hungerStone = true; } if(currentItem.itemID == ItemHandler.itemHealthStone.itemID) { healthStone = true; } if(currentItem.itemID == ItemHandler.itemCompleteStone.itemID) { completeStone = true; } if(currentItem.itemID == ItemHandler.itemFireAmulet.itemID) { fireAmulet = true; } if(currentItem.itemID == ItemHandler.itemWaterAmulet.itemID) { waterAmulet = true; } } } if ((tickCount % 20) == 0) { if(completeStone) { if (player.getFoodStats().needFood()) { player.getFoodStats().setFoodLevel(player.getFoodStats().getFoodLevel() + 1); } if (player.getHealth() < player.getMaxHealth()) { player.setHealth(player.getHealth() + 1); } } else { if (hungerStone) { if (player.getFoodStats().needFood()) { player.getFoodStats().setFoodLevel(player.getFoodStats().getFoodLevel() + 1); } } if (healthStone) { if (player.getHealth() < player.getMaxHealth()) { player.setHealth(player.getHealth() + 1); } } } if(fireAmulet) { if(player.isBurning()) { player.extinguish(); } } if(waterAmulet) { } //player.writeEntityToNBT(player.getEntityData()); // i tried this, but it didn't help } tickCount++; } } } @Override public EnumSet<TickType> ticks() { return EnumSet.of(TickType.SERVER); } @Override public String getLabel() { return "TickHandler.SERVER"; } } Any help much appreciated!
  9. Hi all! I come seeking guidance once more, I am trying to override the left click function of my item (I want it to shoot a projectile when I left click). To solve this, I have been looking through the Item class, and Minecraft class, etc, but I can't seem to find an easy way to override it The two functions I found from Item were: this.onLeftClickEntity(stack, player, entity) //only occurs when you click an entity this.onEntitySwing(entityLiving, stack) //apparently played when entity tries to play swing animation, but doesn't seem to be called Any help would be greatly appreciated!
  10. Just updated my forge and tried that out, the subscription works perfectly!! Thanks Problem solved
  11. I'm very familiar with reflection, sadly not with ASM, thanks though, I'll go look into that Thanks for the help Draco18s!
  12. For mod items, that works great! However, I have an array of information, basically for each item I have some text that I need it to display to the user. Think how Thaumcraft show's their icons over an item (bad example considering I just want to add some text to the general tooltip) I have figured how to do individual item rendering, but well, again, that is just for mod items, and that permanently displays instead of only when I hover over it ;/ To elaborate with an example, I need to have the word 'Burnable' in the Birch log tooltip
  13. Hi all, As the title states, I am trying to add text to the tooltip that appears when you hover over an item in the inventory. I have done a fair bit of Googling, but can't seem to find a clean demonstration or tutorial of how to do it. Any help would be greatly appreciated!
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.