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


  • Content Count

  • Joined

  • Last visited

Everything posted by dude22072

  1. Currently using the following code: @Override public void drawForeground(int mouseX, int mouseY) { long rupees = Minecraft.getMinecraft().thePlayer.getEntityData().getLong("rupeeCount"); System.out.println(rupees); Minecraft.getMinecraft().fontRendererObj.drawString(Long.toString(rupees), 45, 92, 4210752); } It always displays as 0. I know I am using the correct key for the long because I have added a chat command that checks it and it is returning the proper value.
  2. As the title says, what would the replacement be for "ItemRenderer.renderItemIn2D" and the getMin/MaxU/V of IIcon?
  3. I can't seem to find any tutorials on how to create RetroGen. What classes do i need to extend/implement?
  4. Yes, it's registered. Didn't know that, will fix. Finally, generateBacteria is an exact copy of Minecraft's vine generation with the function name changed. So go yell at Jeb_ or whoever makes Minecraft nowadays.
  5. I'm attempting to make world gen for a custom block that works the same as vines. The following is my IWorldGenerator code: package dudesmods.fancycheeses.world.gen.feature; import java.util.Random; import cpw.mods.fml.common.IWorldGenerator; import dudesmods.fancycheeses.FancyCheeses; import net.minecraft.util.Direction; import net.minecraft.util.Facing; import net.minecraft.world.World; import net.minecraft.world.chunk.IChunkProvider; public class WorldGenBacteraLactococcus implements IWorldGenerator { @Override public void generate(Random random, int chunkX, int chunkZ, World world
  6. ItemStacks have the method getItem(), but they don't seem to have getBlock(). Is it one of the func_s or does it simply not exist?
  7. And then how would I consume the item? ConsumeItem doesn't take a slot.
  8. In the code below i'm making it so a milk bucket acts as a normal bucket. But when "event.entityPlayer.inventory.consumeInventoryItem(Items.milk_bucket);" is called it will consume any milk bucket on the hotbar (in order from left to right) instead of the one in hand. @SubscribeEvent public void onPlayerInteraction(PlayerInteractEvent event) { if(event.action == PlayerInteractEvent.Action.RIGHT_CLICK_BLOCK) { if(event.entityPlayer.getHeldItem().getItem() != null && event.entityPlayer.getHeldItem().getItem() == Items.milk_bucket) { if(!event.entityPlayer.capabilities.isCre
  9. I was wondering how to make my TileEntity compatible with fluid pipes such as BuildCraft's Waterproof pipes or Thermal Expansion's Liquiducts.
  10. I was wondering how to overwrite the vanilla milk bucket so I can make milk a fluid, as MFR does. Also, If it's possible, have my mod detect if MFR is installed and use it's fluid instead of adding my own.
  11. where do i get fontRenderer from? Edit: Found it, It's ment to be fontRendererObj
  12. In mods such as Tinker's Construct and Thermal Expansion when you hover over a liquid in a gui it tells you the name of the liquid and the amount in mB. How is this accomplished?
  13. This man is correct. buttonList is deprecated. use controlList instead.
  14. I was wondering how to make something happen in onItemUse when the player Shift+Right Clicks, but not if the player is holding right-click and then hits shift.
  15. So, something like this? protected void guiDrawIcon(Item item, int x, int y) { Minecraft.getMinecraft().getTextureManager().bindTexture(TextureMap.locationBlocksTexture); IIcon icon = item.getIconFromDamage(0); GL11.glEnable(GL11.GL_BLEND); this.drawTexturedModelRectFromIcon(x, y, icon, 16, 16); GL11.glDisable(GL11.GL_BLEND); }
  16. I was wondering how I could get an item's icon to display in a GUI. (Or a fake slot would work too, but I don't know how to do that either.)
  17. OK, using these has solved some most of my problems. Sorry for being vague earlier. At the moment, the issue is that when I click a button on my gui, it doesn't seem to do anything. My System.out.println()s are telling me the IMessage class is receiving the message, but then the functions in the TileEntity class that they call don't seem to do anything.
  18. Whenever I close Minecraft and re-launch it the TileEntity is missing some data, but not all? Also it seems the GUI is not updating on certain things. Block: Container Custom Slot: GUI: GUI Handler: TileEntity: IMessage Class: stuff from main class:
  19. I know i'd do: this.slots[1].damageItem(amount, /*?*/); but I need the "/*?*/" bit. It needs an EntityLivingBase and I don't thinka TileEntity counts and I don't know how to get a player server-side.
  20. The function is being called when a button on the GUI is pressed.
  21. When I use setInventorySlotContents to set a slot to an item the item disappears when removing it from the slot. @Override public void setInventorySlotContents(int var1, ItemStack var2) { this.slots[var1] = var2; if(var2 != null && var2.stackSize > this.getInventoryStackLimit()) { var2.stackSize = this.getInventoryStackLimit(); } }
  22. EDIT:Solved by calling "super.initGui();" in my initGUi(); Before adding my buttons, my GUI appears as such: After adding buttons, it appears as this: (also there's that weird brown thing on the gui aswell. Plus it seems to break NEI.) My GUI class (with the buttons added): package dudesmods.fancycheeses.gui; import org.lwjgl.opengl.GL11; import dudesmods.fancycheeses.container.ContainerCheeseMaker; import dudesmods.fancycheeses.tileentity.TileEntityCheeseMaker; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiButton; import net.min
  23. How would I make it so that a bucket gets filled with a fluid by right-clicking on a mob?
  • Create New...

Important Information

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