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.

ImaFool

Members
  • Joined

  • Last visited

Everything posted by ImaFool

  1. What does srg mean and how can I get it?
  2. I'm new to reflection, how do I add something to a field? My first attemt: f = Minecraft.class.getDeclaredField("defaultResourcePacks"); f.setAccessible(true); List list = (List) f.get(Minecraft.getMinecraft()); list.add(..);
  3. I don't know if I get this straight, you mean I can just put "C:\Users\User\Desktop" as a domain? Or I have to "create" a domain? Explain that part a little bit please
  4. Hello, Is it possible to make a resource location with a location outside the minecraft jar? Like just on my desktop or something?
  5. I suggest you just use onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4, int par5, int par6, int par7, float par8, float par9, float par10) wich gives u the x,y,z coords off the block clicked. note this will not work for clicking on air water and lava
  6. Uhm, im pretty damn sure the maxDamage parameters are the x, y, z coords How else would minecraft know where to spawn it?
  7. I dont know what this code is supposed to do at all. Just use this: if(!world.isRemote) { TileEntity tileEntity = world.getBlockTileEntity(x, y, z); if (tileEntity != null) player.openGui(OreManager.instance, 0, world, x, y, z); } return true;
  8. In your onBlockActivated check for !world.isRemote only open a tile entity on server
  9. Or world.getWorldInfo().getWorldName() Don't know where's the difference
  10. all resource packs do is, they contain all the items blocks gui's.. -textures for the redstone lamp this is "redstone_lamp_on" and "redstone_lamp_off", eg dirt only has "dirt". cuz its not ment to have a diffrent texture based on its powerd or not: Soooo, you cant achieve what u want with only a resource pack.
  11. Cant be that hard, check in breakBlockEvent (or something similar) if your custom pickaxe was used to break the block, no: do nothing. yes: check if the block has a furnace recipe. no: do nothing. yes: remove the old drop and add the furnace recipe output Edit: ahh w8, you don't have to use a event ofc
  12. int j1 = y + random.nextInt(4) - random.nextInt(4); Thats where u set the height, ofc your flowers get set in the groung use the method world.getHeightValue() to get the height of a position
  13. Is there a reason you dont use IWorldGenerator? That would make things easier
  14. So, u want to do that programmatically or with a resourcepack? For custom blocks or vanilla blocks? I dont know how that guy in the vid did it, dont think thats possible. Edit: look at the comments: "All the texture pack does is retexture redstone lamps, all of you have been fooled"
  15. Field xy = BiomeGenBase.class.getDeclaredField("enableRain"); xy.setAccessible(true); xy.set(BiomeGenBase.desert, true); like that? Cuz it's still not raining in the desert, I have the code in my preInit is that alright?
  16. Uhm, im trying to get into reflection, can somebody tell me whats wrong with this code: Field xy = BiomeGenBase.desert.getClass().getSuperclass().getDeclaredField("enableRain"); xy.setAccessible(true); xy.set(true, null); Cause the error looks somewhat weird in my eyes: Can not set boolean field net.minecraft.world.biome.BiomeGenBase.enableRain to java.lang.Boolean
  17. I found Block.getStateById & Block.getStateId, that's going to cause problems with other mods, hu?
  18. But how do I get the metadata of a block? world.getBlockMetadata() does not exist anymore
  19. Uhm, lil off-topic, did metadata actually got replaces by the BlockState in 1.8? if not, how do I get the metadata of a block? (sry didnt found something useful with google)
  20. Well, I'm writing a tool for structure generation, (I know there are a few out there), so basically u hit 2 blocks with a new item and it should give you the java code for all the blocks in between there like: world.setBlockState(pos, Blocks.sand.getStateFromMeta(..)); So what would you suggest to do? Can I get the block back from the id?
  21. Hey guys, probably a java question: When I for example call world.getBlockState(pos).getBlock() and there is a sand block, I want to have "Blocks.sand" as a String. The closest i got to is world.getBlockState(pos).getBlock().getClass().getTypeName() but well thats the BlockSand class.. So, basically I got the class X with the variable y in it, how can i get the String "X.y"?
  22. I guess PlayerUseItemEvent is a good place to start for example, check if the item is a pickaxe and if the players level is less then 10 and the cancel then event. I dont know what to do for the armor
  23. and to the harsh harassment thingy, well seriously, you'll get over it, u cant expect ever person in the world to be super nice to you. And actually this is not "harassment" They just got a little mad, maybe they could have said it a little bit nicer

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.