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. The Foo#bar notation refers to an instance method/field of the class Foo called bar . Foo.bar refers to a static method/field. BlockBush extends Block . A class can override methods from any of the classes it inherits from, not just its direct parent. The methods I mentioned are part of the Block class, so they can only be overridden by a class that inherits from Block or a subclass of it. CUTOUT is a value of the BlockRenderLayer enum (essentially a static field). Like I said in my first post, you can override Block#getBlockLayer and then return this value from your override method. If your class extends BlockBush it shouldn't be displaying like it does in the screenshots, since BlockBush already overrides all of the methods I mentioned. Post your code. It seems like you may need to revise some of the basics of Java like inheritance and enums.
  2. If you call EntityPlayer#openGUI on the server and your IGuiHandler#getServerGuiElement method returns a Container , FML will send a packet to the client telling it to open the same GUI (via your IGuiHandler ). If the open request needs to be sent from the client side (e.g. in response to a key press), send a custom packet to the server. The same applies if your GUI doesn't have a Container and you need to send the response packet manually. Forge's documentation explains networking in Minecraft here. This includes the Simple Network Implementation, which you should use to send the packet.
  3. I see, and how would I go about doing that, if I may ask? Call OreDictionary.registerOre in init. Forge registers vanilla planks as "plankWood" and uses this as a replacement ingredient for planks when it replaces vanilla recipes with ore recipes; so register your planks as "plankWood" as well.
  4. Which version of Minecraft are you using? In 1.8.9 and earlier, use LivingDropsEvent to modify the drops of living entities. In 1.9 and later, you can either use LivingDropsEvent or add/remove entries from the appropriate loot table during LootTableLoadEvent .
  5. If your model has textures with transparency, you need to override Block#getBlockLayer to return CUTOUT , CUTOUT_MIPPED or TRANSLUCENT . The Grey Ghost explains when to use each layer here. If your model isn't an opaque cube, you need to override Block#isOpaqueCube to return false ; this tells Minecraft to render the sides of adjacent blocks that would normally be completely covered by an opaque cube. Also override Block#isFullCube to return false , this is used in various places in the game logic to determine whether the block is a full cube. You could also extend BlockBush , which does all of this for you.
  6. The block/cross model uses the "cross" texture, the block/crop model uses the "crop" texture. Neither use the "all" texture.
  7. The closest thing to an ISBRH replacement would probably be an ICustomModelLoader , IModel and IBakedModel implementation. I don't think there are any tutorials on the system, but there are several examples in Forge itself.
  8. MCPBot tells me that func_185496_a is Block#getBoundingBox in the current mappings for 1.9+.
  9. I don't see any obvious errors. Post your models and describe (possibly with screenshots) how it's not displaying correctly.
  10. In addition to the GUI, you can set environment variables from batch scripts (which could be used to run Gradle). These can either be permanent or only apply for the duration of the script (and only to processes started by the script). See this page for a better explanation and more details.
  11. See this page for an explanation of sub-models in Forge's blockstates format. I also have an example of the format here. This is a BuildCraft-style pipe composed of two individual models: the centre cube and the side attachment. The cube is used as a base model and the side attachment is added as a sub-model rotated as necessary.
  12. I don't understand why you need an array of block IDs, but you should probably replace it with an array of Block s (the block type) or IBlockState s (essentially a Block and metadata). You can read more about block states here.
  13. World#getBlockState returns the current state of the block at the specified position. Numeric block IDs are automatically assigned per-world and can change on world load. You should avoid using them if at all possible. What are you actually trying to do? What is the Lvl0Id array for?
  14. Your resource domain (i.e. the name of the folder where your assets are) and mod ID must be the same. Either move your assets to assets/morefuelsmod-bleeding/... or change your mod ID to morefuelsmod .
  15. fml-client-latest.log in the logs folder of your game directory.
  16. YAFM 1.04 doesn't support Forge versions newer than 1805. Update it to 1.05.
  17. You're telling Minecraft to look for the model in the morefuelsmod-bleeding resource domain, but your assets are in assets/morefuelsmod/... rather than assets/morefuelsmod-bleeding/....
  18. Please post the new FML log.
  19. Post the FML log, it should say what the issue is.
  20. It looks like it's an error from jsoup, I can't really help you with it.
  21. You don't use the new package in your code, you just write your code as if jsoup was a regular dependency (i.e. use the org.jsoup package). ForgeGradle will rewrite your classes at compile time to use the new package.
  22. jsoup will be added as a dependency in your IDE project. It won't put any source code in your workspace.
  23. Don't modify the buildscript block, that specifies the dependencies of the buildscript itself rather than the mod. Since jsoup is hosted on Maven Central, you don't need to explicitly add a Maven repository for it; simply add it as a dependency. The new package for the srgExtra line should be something unique to your mod, ForgeGradle will move the classes in org.jsoup to the new package and (at compile time) rewrite any class that references these classes to use the new package. If your mod's package is ultratechx.whatever , use something like ultratechx.whatever.repack.org.jsoup as the new package.
  24. That will work, but you should make the field private (so it can't be accessed outside of the class) and final (so it can't be modified after it's set in the constructor).
  25. Draco's point is that a static field will be shared between all instances of the class, so all instances would use the Block passed to the last instance created. This is basic Java that you should already know before creating a mod. Use an instance field instead.

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.