Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

dude22072

Members
  • Joined

  • Last visited

  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, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) { if(world.provider.dimensionId == 0) { int firstBlockXCoord = chunkX + random.nextInt(16); int firstBlockYCoord = 64; int firstBlockZCoord = chunkZ + random.nextInt(16); generateBacteria(world, random, firstBlockXCoord, firstBlockYCoord, firstBlockZCoord); } } public boolean generateBacteria(World world, Random rand, int x, int y, int z) { int l = x; for (int i1 = z; y < 128; ++y) { if (world.isAirBlock(x, y, z)) { for (int j1 = 2; j1 <= 5; ++j1) { if (FancyCheeses.bacteria_lactococcus.canPlaceBlockOnSide(world, x, y, z, j1)) { world.setBlock(x, y, z, FancyCheeses.bacteria_lactococcus, 1 << Direction.facingToDirection[Facing.oppositeSide[j1]], 2); break; } } } else { x = l + rand.nextInt(4) - rand.nextInt(4); z = i1 + rand.nextInt(4) - rand.nextInt(4); } } return true; } } but nothing is generating.
  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.isCreativeMode) { event.entityPlayer.inventory.consumeInventoryItem(Items.milk_bucket); event.entityPlayer.inventory.addItemStackToInventory(new ItemStack(Items.bucket, 1)); } switch (event.face) { case 0: event.world.setBlock(event.x, event.y-1, event.z, FancyCheeses.block_cow_milk); //y-1 case 1: event.world.setBlock(event.x, event.y+1, event.z, FancyCheeses.block_cow_milk); //y+1 case 2: event.world.setBlock(event.x, event.y, event.z-1, FancyCheeses.block_cow_milk); //z-1 case 3: event.world.setBlock(event.x, event.y, event.z+1, FancyCheeses.block_cow_milk); //z+1 case 4: event.world.setBlock(event.x-1, event.y, event.z, FancyCheeses.block_cow_milk); //x-1 case 5: event.world.setBlock(event.x+1, event.y, event.z, FancyCheeses.block_cow_milk); //x+1 } } } }
  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); }

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.