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.

Draco18s

Members
  • Joined

  • Last visited

Everything posted by Draco18s

  1. Alternatively, https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/java/com/draco18s/industry/item/ItemCastingMold.java#L80 https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/java/com/draco18s/hardlib/client/ClientEasyRegistry.java#L103-L109 Rather a bit more complicated, but very flexible.
  2. That's....not....true....even by half. @SideOnly makes the thing marked as side only stripped when run on the dedicated server. Which is not necessarily sufficient to avoid crashing the dedicated server, as you may be trying to invoke this method from common code.
  3. Which is part of what I made my code do, specially.
  4. Did you try something like... ""+worldIn.playerEntities.size() ? Because a raw integer value isn't terribly useful. You'd probably really want to display something like "5 players in world" which would be worldIn.playerEntities.size()+" players in world" which wouldn't have your int->string conversion problem.
  5. Probably the same way as CoFH. Using the LivingAttackEvent.
  6. Except that I don't think other player's inventories are synced to your client.
  7. You also need: @Override public boolean isOpaqueCube(IBlockState state) { return false; }
  8. Go look at BlockCrops.
  9. You will need to create your own property. It's not hard. As in, you could literally copy-paste it and change one number. Move it out of your blocks class and into your client proxy.
  10. If your IDE told you to remove the override annotation then actually, there is a problem. And it's not with the annotation. It's with the method signature.
  11. Why do you not have methods marked with @Override?
  12. Function? You mean init and postInit? Those methods have been around since forever. If you mean Items.REGISTRY (which is a field) I don't know when it was added.
  13. Items may still be being created by mods (that load after yours) during preInit, but after preInit (init, postInit, during game) the registries are finalized and cannot be modified. So yes.
  14. Not entirely true. As items/blocks/etc can only be registered during PreInit, then any point after that will see every item that exists, regardless of mod load order.
  15. It is not. When a chunk is generated fresh, it gets saved, regardless of if anything changed or not.
  16. Look at Items.REGISTRY
  17. And now I'm reminded of a time when I poked around with a Microsoft HTML tool that was so buggy I had website images displaying inside the program's UI (completely breaking it).
  18. Personal preference, though users of one will generally espouse some feature that makes their IDE better.
  19. ShadowFacts has one. He does some things that make me twitch (such as having his Item or Block class contain the rendering registration code...) but it is up to date. There's also Forge's own docs, although in some respects it doesn't have everything.
  20. Not to mention other things that work fine for him, but which are unnecessary and make it more difficult for new modders to efficiently understand what's going on, and when asking for help, able to quickly supply the code more experienced folks want to look at. For example, if I asked you to post your main mod class so I could look at your mod lifecycle events (to see when and how you are registering your items, recipes, and renderers) would I find that information, or would there just be a proxy.preInit(ev), ModBlocks.preInit(ev) or similar line making me have to ask for that class too?
  21. Probably because the item is still being given to the inventory as 0/4/8/12 but you registered an item renderer for a different metadata value. i.e. this chunk: @SideOnly(Side.CLIENT) public void getSubBlocks(Item itemIn, CreativeTabs tab, List<ItemStack> list) { // item , amount, meta list.add(new ItemStack(itemIn)); list.add(new ItemStack(itemIn, 1, 4)); list.add(new ItemStack(itemIn, 1, 8)); list.add(new ItemStack(itemIn, 1, 12)); } If you're going to change your metadata values in one place, you need to change them in the other. THIS IS IMPORTANT, IT IS NOT ARBITRARY. Most importantly, you need to use the metadata values that your block actually drops when broken. If it exists in your inventory, then you have an item. item = new ItemMultiTexture(tudorSet, tudorSet, ModBlockTudorSet.subTypes; Surprise, there it is. In order to override the unlocalized name you need a custom ItemBlock class. Surprise! Alternatively, pass a name function to the ItemMultiTexture's constructor. E.g. here is how vanilla handles the stone variants: registerItemBlock(Blocks.STONE, (new ItemMultiTexture(Blocks.STONE, Blocks.STONE, new Function<ItemStack, String>() { @Nullable public String apply(@Nullable ItemStack p_apply_1_) { return BlockStone.EnumType.byMetadata(p_apply_1_.getMetadata()).getUnlocalizedName(); } })).setUnlocalizedName("stone"));
  22. You need to register an entity renderer. Try this thread:
  23. Again, that method is only used for populating the Creative inventory. Name: you need to override the getUnlocalizedName method in your item in order to supply a name that can be localized. Meta: I don't understand your question I am not sure what you want to know here
  24. Try setting the opacity as white, but at 1% opaque. When rendering transparency as transparent, Minecraft ignores transparency values below about 10%.

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.