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.

Choonster

Moderators
  • Joined

  • Last visited

Everything posted by Choonster

  1. I can assure you that the method and field both exist in 1.8.9.
  2. Side note: The instanceof operator already returns false if the object is null , there's no need to check for null before using the operator.
  3. The EAQ explains how to disable the loading screen (search for "loading screen"). Try disabling the loading screen and see if it makes any difference to the loading time.
  4. You shouldn't need a custom implementation of IItemHandler , just use ItemStackHandler . Create an IItemHandler field in your TileEntity to contain its inventory and set it to an instance of ItemStackHandler . To replicate ISidedInventory , use a separate IItemHandler for each group of slots. Override hasCapability to return true when the Capability is CapabilityItemHandler.ITEM_HANDLER_CAPABILITY and the inventory can be accessed from the specified EnumFacing (if you actually care about the facing at all). Override getCapability to check if the Capability is CapabilityItemHandler.ITEM_HANDLER_CAPABILITY . If it is, return the appropriate IItemHandler for the specified EnumFacing . In both hasCapability and getCapability , return the result of the super method when the Capability isn't CapabilityItemHandler.ITEM_HANDLER_CAPABILITY . This allows external capabilities attached from AttachCapabilitiesEvent to be used.
  5. I'm not entirely sure if this is possible with the baked model system. You can disable shadows for a model element/ BakedQuad (see the model format or this example), but that doesn't render the model at full brightness. You may need to use a TESR for this.
  6. Minecraft#getCurrentServerData returns the ServerData of the current server, if any. ServerData#serverIP contains the IP/URL of the server.
  7. See the wiki page. They're basically a more flexible replacement for ChestGenHooks / WeightedRandomChestContent that are also used for entity drops. Forge hasn't added any hooks for loot tables yet, but you can still register your own using the vanilla classes. You can see my loot table registration class here and a loot table here.
  8. Don't call ModelBakery.registerItemVariants for the override models, they will automatically be loaded. This error looks like it's caused by Forge trying to load tetracraft:item/ballisticBow_pulling_1 , which is trying to load the parent model tetracraft:item/ballisticBow , which is trying to load the override model tetracraft:item/ballisticBow_pulling_1 . If you allow the override models to be loaded automatically, you won't run into any circular reference errors.
  9. The last argument of World#rayTraceBlocks (used by both EntityLivingBase#rayTrace and Item#getMovingObjectPositionFromPlayer ) determines whether it should return the MovingObjectPosition of the last uncollidable block or null when the raytrace doesn't hit anything. You'll need to call this yourself with the appropriate arguments rather than using one of its wrappers, though you can reuse the code from Item#getMovingObjectPositionFromPlayer .
  10. Minecraft ran out of memory. There are lots of tutorials out there that explain how to give Minecraft more memory.
  11. Some 1.8 mods may work in 1.8.9, but there's no guarantee that every mod will. 1.8.8/1.8.9 didn't change a lot of things, but there were a few minor changes that will break some 1.8 mods.
  12. Although I agree that the imports should be cleaned up, imported classes aren't actually loaded at runtime unless they're referenced in the code itself. Importing a client-only class won't crash the server, using it outside of client-only code will. In IDEA (which I believe the OP is using), Ctrl-Alt-O optimises imports. I also make heavy use of Ctrl-Alt-L to reformat the current class, which also optimises imports.
  13. It's trying to load the client-only interface IStateMapper on the server when you call Registers.addItem because another method of Registers references IStateMapper . This is exactly the same error as diesieben07 was talking about earlier in the thread: you need to separate your client-only code from your common code (the proper solution) or mark client-only methods with @SideOnly(Side.CLIENT) (a quick fix).
  14. It used to, but it now returns a ResourceLocation under the new registry system. Edit: I can't spell.
  15. Raytracing doesn't have to happen on the client side, you've just picked a client-only method. Look at ItemMonsterPlacer#onItemRightClick to see how it raytraces on the server side.
  16. Have you updated your models to use the new override system? You can see my bow's new model here.
  17. Update your MCP mappings by setting the minecraft.mappings property in build.gradle, re-run setupDecompWorkspace and refresh your IDE project. The MCPBot website shows the mappings available for each version of Minecraft.
  18. Method references were introduced in Java 8, so setting the language level to 8 should allow them. There is no isAmmo method in ItemBow , though; only isArrow .
  19. I briefly skimmed through your code and couldn't see any obvious errors. I suggest you post the FML log from the server and client using Gist. I did notice a few things that could be improved: Instead of checking the event's side in your @EventHandler methods to do client-only things, use the @SidedProxy system. Instead of using the deprecated GameRegistry.registerItem method, use the new GameRegistry.register method. It's recommended that you use the single-argument overload of this method and set the registry name of the object you're registering (e.g. an Item ) with IForgeRegistryEntry#setRegistryName (or one of the overloads from IForgeRegistryEntry.Impl ) before registering it. Instead of registering models with ItemModelMesher#register in init, use ModelLoader.setCustomModelResourceLocation / setCustomMeshDefinition in preInit. The default model loaded for every Item is the one with its registry name ( IForgeRegistryEntry#getRegistryName ), so you should use this rather than creating your own name field and getName methods.
  20. Look for the getBlockReachDistance / setBlockReachDistance methods of ItemInWorldManager (1.8.9 and earlier) or PlayerInteractionManager (1.9+).
  21. To give a sound event a subtitle, set the "subtitle" key of the sound event in sounds.json to a string containing the translation key. An example from the vanilla sounds.json file: "item.shovel.flatten": { "sounds": [ "item/shovel/flatten1", "item/shovel/flatten2", "item/shovel/flatten3", "item/shovel/flatten4" ], "subtitle": "subtitles.item.shovel.flatten" },
  22. The OP is using 1.8.9, where the Forge and FML event buses have been merged. Anything that was fired on the FML bus is now fired on the Forge bus.
  23. Are there any errors in either of the logs? Upload them both to Gist and link them here. Try stepping through SoundManager#playSound like I suggested to the OP.
  24. The sounds.json format hasn't changed much in 1.9 except for the addition of the "voice" category for sounds and the need to include the resource domain for sound file paths and sound event names in the "sounds" array of sound events. This page explains the format. Each value in the top-level object is a sound event, you can register a SoundEvent for each one of these to play one of their sound files. The values in the "sounds" array of each sound event are either the path of a sound file as a string (e.g. "tetracraft:entity/terrakon/bark1" ) or an object with its "name" property set to the path of a sound file or the name of another sound event. This object can also contain various other properties, see the wiki page I linked for more details.
  25. The sound name passed to the SoundEvent constructor is the name of a sound event in your sounds.json file (i.e. the keys of the top-level object), not the name of a sound file. In your case, tetracraft:mob.terrakon.bark is the name to use for the first sound.

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.