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. And change the block type to not be a full, opaque cube so it doesn't create holes in the world.
  2. but good practice
  3. You divide out the amount you want to transfer before you figure out the number of directions a transfer is valid for. Not your problem, but worth mentioning. Rather than doing getMaterialsAround() (which hardcodes every side...and stores the results in a class property!? Why!?) and then iterating over all the sides...just iterate over the sides and call world.getTileEntity inside the loop.
  4. in an EntityJoinWorldEvent event handler.
  5. Quote of the day right here. You need to add a new task to the zombie's AI task list. It's public.
  6. That sounds more like a populator or a decorator, the way vanilla does clay deposits in water or dirt and gravel underground.
  7. Which line is line 34?
  8. Its likely just a vertex color operation that changes the color. Vertex color is super cheap. It's used for particle systems with hundreds of thousands of particles and it runs just fine, one or a dozen items, easy peasy.
  9. Have you tried looking at the vanilla blocks that do this?
  10. You changed the physical height of the block, but you didn't increase it's texture UV size. You, in fact, decreased it: "uv": [ 0, 12, 16, 16 ] This says "this face has UV coordinates from (0,12) to (16,16)." Or 16x4.
  11. Don't post your code as attachments. Its much easier for us if you post it on Pastebin (or similar) or as a clonable Github repository. That said: http://mcforge.readthedocs.io/en/latest/models/using/#item-models
  12. Thanks Lex, I wasn't sure what the target version was (i.e. if Minecraft had moved up to J9 while I wasn't looking), but I knew it wasn't 10.
  13. Hmm. "The IHasModel is not necessary. All items require models that must be registered and the registration can be done without any non-public information from the Item instance. The same goes for blocks: not all blocks have items but the ones that do, follow the same rule. IHasModel was created and perpetuated through a series of uninformed tutorials and has become an example of Cargo Cult Programming." May be worth noting that ModelRegistryEvent is client-side-only as a Problematic Code separately. "The ModelRegistryEvent is in the Forge client namespace. This means that it may not be present on the dedicated server. As such, it should only be used inside a Client Proxy class to avoid issues."
  14. Generics are amazing. For example, one of my mods has this method: private <T extends Comparable<T>, V extends T,U extends Comparable<U>, W extends U> void addArbitraryOre(String orename, int numFlowers, int clusterSize, int threshold, OreFlowerDictator dictator, IBlockState flower, IBlockState desertFlower, @Nullable IProperty<T> flowerProp, @Nullable V flowerValue, @Nullable IProperty<U> desertProp, @Nullable W desertValue) { //... } T & V and U & W are what they are because I need to interact with an IBlockState object and its property without referencing a specific property (as I am using four related, but incompatible, enum variants). In theory I could get rid of U & W (and declare two <T> parameters), but there's no reason to.
  15. Also problematic code #7. Additionally, IHasModel is stupid. ALL items need models. The IHasModel interface does fuckall but make you write the same line of code over and over again when you could instead do this: @SubscribeEvent public static void onModelRegister(ModelRegistryEvent event) { for(Item item : ModItems.ITEMS) { Main.proxy.registerItemRenderer(item, 0, "inventory"); } } And I'll also point out that the ModelRegistryEvent is client side only and so this event should already be in your Client Proxy, which means you can do this: @SubscribeEvent public static void onModelRegister(ModelRegistryEvent event) { for(Item item : ModItems.ITEMS) { ModelLoader.setCustomModelResourceLocation(item, 0, new ModelResourceLocation(item.getRegistryName(), "inventory") } } Hey @diesieben07 can we add the stupidness of IHasModel to the list of Code Style issues? I've probably said "this is dumb" like 14 times now.
  16. Its not an array. It's a generic.
  17. Obstacles in dungeons, allowing all players to see when one person holds the item is a reasonable thing. If a group goes in together showing the blocks to everyone is a Quality of Life improvement IMO.
  18. Run, yes, compile, no. You want the Java 9 JDK (but the Java 10 RTE is fine).
  19. They can't, but that mob looks pretty easy to rebuild as a model in one of them. Looks like the model could be done in *counts* 13 cuboids. Once for the central body and then 4 for each of the 3 axises (they'd be long, so rather than 24 spikes, you'd make 12 rods).
  20. It's TerraFirmaCraft, the Minecraft mod that gives no fucks about being compatible with anyone or anything. And also:
  21. Posting a picture of what it looks like would probably be more helpful. In any case, I suggest using a tool like Blockbench or MrCrayfish. There are a few others as well.
  22. That is not the code. That is the error.

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.