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.

coolboy4531

Members
  • Joined

  • Last visited

Everything posted by coolboy4531

  1. Why are you registering / making your items during class construction? They need to be in a method (preInit) with (FMLPreInitializationEvent) for Forge to read. Check this out: http://www.wuppy29.com/minecraft/modding-tutorials/forge-modding-1-7/
  2. That most likely means - its null.
  3. You named your preInit - FMLInitializationEvent (instead of) FMLPreInitializationEvent
  4. What do you mean its illegal in 1.7.2? Are you trying to replace the whole class, or patch some methods/fields?
  5. I made a teleport wand (cursor location) a few weeks ago, in Forge 10.12.0.997, I will tell you how I did it [ !!! INCOMING: WALL OF TEXT !!! ] I created a special class for the teleportation and made a method [void] method with (World, EntityPlayer) for the whatchamacallit [forgot ><, someone please tell me] Checking if the world is NOT remote, I get the player's look location [getLook] and position [getPosition] through vectors (Vec3) [vector, lookVector], and multiplying the lookVector (x, y, z) by 50 doubles (50D) to another vector (addedVector). Then I used (World.clip(Vec3, Vec3)) as a MovingObjectPosition to create an object (that helps locate the error you are looking at). Checking if the moving object is not null, and the thing it hits is a block, I save the coordinates of where it hits, and teleport the player to the location of the saved coordinates through the server net handler, making fall distance to 0F to remove fall damage. I might give you PSUEDO CODE if you need more help/this makes NO sense.
  6. I hope you know what this is doing. int d = j.getItemDamage(); if(d > 128) { inv.setInventorySlotContents(i, null); } This is checking when - your item is above the max damage (greater than 128). You can check if it is at 0, then remove the item, but the problem is that you probably don't even know what (d>128) really means - d (greater than) 128. You should use (checks if it is equal to 0 or below 0. [0,-1,-2,-3,etc.]) int d = j.getItemDamage(); if(d <= 0) { //break / delete item }
  7. In your eclipse workspace, it should be (in the folder) src -> main -> resources -> assets -> [modid] -> textures -> items -> [itemName].png It your case it should be: src -> main -> resources -> assets -> extratools -> textures -> items -> EnderShard.png
  8. What Forge version are you using? I'm using 10.12.0.1024 - and this works: Note: You may have to change some fields to match your needs. Pseudo Code EntityRegistry.registerGlobalEntityID(MB_FireSkeleton.class, "FireSkeleton", EntityRegistry.findGlobalUniqueEntityId()); If you want a custom renderer use this: Pseudo Code RenderingRegistry.registerEntityRenderingHandler(MB_FireSkeleton.class, new RenderFireSkeleton());
  9. If you're using 1.7+: ------------------------- Use PreInit (FMLPreInitializationEvent) not Init (FMLInitializationEvent) If you're using 1.6 (or below): -------------------------------------- Not sure.
  10. Why not use a switch?
  11. Yeah, we all have been having this problem. Even for me, I can't find a fix on how to use color on a seperate line. You can however do the color code / color enum for it, but changing the GUI scale for chat would make that color discontinue. I'll check back if I ever find a fix for it, or someone finds a fix (in this subject)
  12. You can cancel the main menu music, and replace it with events. > PlayBackgroundMusicEvent <
  13. Dude. Learn basic Java before coming to mod. You don't put another method inside a method, to use the onItemRightClick you need to create your own Item class.
  14. coolboy4531 replied to Z@Nka's topic in Modder Support
    Not the most efficient way, but I have some ideas that might work. If your damage is damageable, let's say like a sword... then you could save the damage of the item, and use it later. Remove the item with - Smite - from your inventory, then spawn another item with your needs (Sharpness) then apply the damage that you saved earlier.
  15. I think he means that its not biomeList, he can't find it. @OP: Probably as field/func names.
  16. Have you even set the spawn rates (and made it spawnable) in your main class (where you register your stuff)?
  17. Why don't you check for the durability in those methods, instead of returning a boolean?
  18. Not sure what you are asking... but there are 20 ticks per second.
  19. Do all your registering stuff in preInit (FMLPreInitializationEvent)
  20. Minecraft minecraft = Minecraft.getMinecraft(); if (minecraft.renderViewEntity != minecraft.thePlayer) { return; } if (YOURGUISCREEN != null) { minecraft.displayGuiScreen(YOURGUISCREEN); } That's what I use for displaying things without the Player instance, probably not the best, but works.
  21. I never sad that cancels the GuiIngame menu.
  22. How am I get to get the entity hit by a custom arrow. For example, I'm going to create a fire bow (w/o enchantments) - not doing this but just an example. Is there a method / event I can use? I am extending my arrow class to EntityArrow (also). Any help would be appreciated!
  23. I'm not sure what you mean, you mean you can't install it? Well, I hope you have read the tutorial. http://www.minecraftforge.net/forum/index.php/topic,14048.0.html
  24. Okay, I know this is another one of those nub questions lmao. Couldn't solve it myself... Is there a way to retrieve all blocks like Block.blockList or something? It was removed in 1.7

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.