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. You can't make a mod without knowing basic concepts like how to implement interfaces. If you don't register a renderer for your entity, Minecraft will use the one registered for its super class.
  2. Just like your capabilities, you're registering your packets in CommonProxy#preInit but ClientProxy overrides this and never calls the super method. Packets need to be registered on both sides, so do this from your @Mod class instead of your proxy classes.
  3. That's not valid Java, a class name isn't a value. You must have a solid understanding of Java and OO programming in general before you can make a mod. You need to create an instance of a class (named or anonymous) that implements IRenderFactory and pass it to RenderingRegistry.registerEntityRenderingHandler . This class must override IRenderFactory#createRenderFor to create and return the RenderFireball instance using the provided RenderManager instance.
  4. Capability registration must happen on both sides, so do it from your @Mod class instead of your proxy classes.
  5. From the description of this section:
  6. Use your IDE to find classes that extend Render , or look at the RenderManager constructor to see where vanilla creates its Render instances. If your entity extends EntityFireball and should render like the vanilla fireball, use RenderFireball .
  7. Use RenderingRegistry.registerEntityRenderingHandler(Class<T>, IRenderFactory<? super T>) in preInit. IRenderFactory has a single method that takes the RenderManager instance as an argument and creates and returns the instance of your Render class. You can implement it using a named or anonymous class (Java 6/7), a lambda or a constructor method reference (Java . You can find links to several tutorials here. McJty has a tutorial on mobs here. You can see how I register the IRenderFactory for an entity in my mod here. Edit: Removed unintentional smiley.
  8. I think Lex meant "Why would your capability already be on the player in AttachCapabilityEvent.Entity ?"
  9. The WorldType constructor automatically inserts the WorldType into the WorldType.WORLD_TYPES array (used by the GUI). Are you ever referencing the ApocalypseWorldType class anywhere to allow it to be loaded?
  10. You can technically use a TESR to render items by registering it with ForgeHooksClient.registerTESRItemStack , but this is deprecated and marked for removal as soon as possible. Apart from that, you have to use the model system.
  11. I don't think it's possible to do this with the builtin/generated model (or models that extend it like item/generated ), since the quads are automatically generated for each texture layer rather than specified in the model itself. You'll probably need to create a clone of ItemLayerModel (the IModel used for builtin/generated ) and its IBakedModel / ICustomModelLoader that has the option of generating unshaded (fullbright) quads for each texture layer. Although this is called shade in the model format, it's controlled by the BakedQuad#applyDiffuseLighting field in the code. To control which layers are rendered unshaded, you could either hardcode it for that particular item's needs (i.e. layer 0 is shaded, layer 1 is unshaded) or make your IModel implement IModelCustomData and specify this using Forge's blockstates format (which can also be used for items, despite the name). To make a block render as fullbright I had to make it emit light in addition to setting shade to false in the model; I'm not sure if shade is all you need for an item model. You could also request that something like this be added to Forge, though I believe the rendering guy (Fry) is currently away. There's also no guarantee that the request will be accepted or implemented immediately.
  12. I would recommend always posting solutions so people can find them in the future even if you're no longer reading/responding here.
  13. Like other singletons, Enchantment IDs are automatically assigned and can change between saves. Do not use IDs, pass the Enchantment instance to your constructor.
  14. You don't need to get the ID yourself. Use ItemStack#addEnchantment to add an Enchantment to an ItemStack . Make sure you've registered your Enchantment with GameRegistry.register .
  15. Your blockstates file has a syntax error. Edit: The error is in the blockstates file, not the block model as I originally said.
  16. ok sorry to bug you more you have helped me alot, I dont have gradle.properties in my .gradle file is there anywhere i can get it, if not how can i create it You need to create it yourself. It's a plain text file, so use a text editor or your IDE.
  17. The build Gradle task outputs the JAR to build/libs. Are you sure it's not working?
  18. You need to override Block#createBlockState to create a BlockStateContainer with your property.
  19. The item model you've specified doesn't exist. If an exception occurs when loading the item model, Forge will try to load the model specified by the corresponding variant of a blockstates file. I have a more detailed explanation of the model loading process here.
  20. Just like the OP, you've set JAVA_HOME to the JRE path instead of the JDK path.
  21. The model files you specified don't exist. Side note: I'd recommend using Forge's blockstates format or Vanilla's multipart blockstates format. These both allow you to combine models conditionally, eliminating the need to manually create a model for every possible combination of connections. I use Forge's blockstates format for a BuildCraft-style pipe model here. Vanilla uses the multipart blockstates format for Redstone and Fences, among other things.
  22. Forge does indeed force BiomeEvent.CreateDecorator to be fired in postInit for every registered Biome 's BiomeDecorator if it's an instance of DeferredBiomeDecorator ; I missed this before. As far as I can see, modifying the BiomeDecorator returned by BiomeEvent.CreateDecorator#getNewBiomeDecorator should work. You shouldn't need to call BiomeEvent.CreateDecorator#setNewBiomeDecorator with the BiomeDecorator returned by BiomeEvent.CreateDecorator#getNewBiomeDecorator , these methods are backed by the same field.
  23. Entity#getBoundingBox always returns null unless the Entity subclass has overridden it (only EntityBoat and EntityMincraft override it to return a non- null value in vanilla).
  24. You can't use the Minecraft class in common code, it's client-only. You're already provided the World as an argument of your Item#onItemRightClick and Item#onItemUse overrides, use this instead of trying to get it from the integrated server. Item s are singletons, you can't store per-item data in fields of your Item class. You need to store this data in the ItemStack using metadata, NBT or capabilities as appropriate. Always annotate override methods with @Override so you get a compilation error if they don't actually override a super method. Why are you using Vec3 s to store block positions? Just use BlockPos . You can find the official documentation for the capability system here. Forge itself has several capability examples, look at the usages of CapabilityManager.register in your IDE. There's also a test mod here. I have some examples here: API, implementation
  25. You should always be developing for the most recent version of Forge. This is the only version that receives new features and bug fixes. 1.10.2 is 99% backwards compatible with 1.9.4, so most 1.9.4 mods will work in 1.10.2.

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.