Skip 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. You kinda need to register an entity renderer too.
  2. For example: https://github.com/Draco18s/HarderStuff/blob/master/src/main/java/com/draco18s/ores/recipes/NEIIntegration.java
  3. Compare written world time to the currnet world time + delay amount. If greater: Do your effect and write the current world time to the ItemStack's NBT. Else: Do nothing
  4. That will crash a dedicated server. The server may not have a keyboard attached or know what a keyboard is. Not to mention having no fucking clue about the remote connection's keyboard status. You will have to implement this as a Capability / IExtendedEntityProperty that's set on the client via the Keybind class (don't ever directly reference the Keyboard: there are Keybinds for a reason, use them) and then use packets to sync. Then hold on a moment, you're looking at the shift key. Shift makes the player sneak. player.isSneaking done. Jesus.
  5. There is not. You would need to handle every mod individually.
  6. The right-click method has an ItemStack parameter and returns an ItemStack. Just return a different item stack.
  7. All of this is bad: public ItemBase init(FMLInitializationEvent event) { GameRegistry.register(this); if(event.getSide() != Side.SERVER) { registerModel(); } return this; } private void registerModel() { ModelLoader.setCustomModelResourceLocation(this, 0, new ModelResourceLocation(TheMod.MODID + ":" + name, "inventory")); }
  8. Mind there's also Smelting recipes (Furnace.getSmelting() iirc) and brewing recipes. Mods then may add their own recipes devices (grinders, sifters, macerators, crushers, extractors, compressers, canners, electrolyzers, injectors, washers, mixers...).
  9. Even with no attached source you'll still get code hinting.
  10. "Using" and "Reading" are two separate things: Eclipse can still use the jar to validate code that you right, it just can't show you the source.
  11. The book is just an item that displays a GUI. In that GUI you can make it draw whatever you want.
  12. Item.getItemFromBlock... gets...the item form of the block...
  13. You gave it a model for the item but not the block. Also:
  14. Along with that, don't use item.getUnlocalizedName().substring(5) , use getRegistryName . Then go punch whoever told you to use getUnlocalizedName.
  15. Yes. Because you have a common class ( BlocClearInventory ) that contains sided code ( registerRenders references Minecraft.getMinecraft() ). As soon as the server reads your block class from the disk, it needs to make sure that the class is valid code. This includes loading every class referenced by your class. This means that it will then attempt to load the Minecraft class, which won't exist. This is not a question of "where is it called from." This is a question of "does the code exist." Your class contains CLIENT SIDE ONLY code. The mere existence of that code crashes the dedicated server, even if you never call the function from anywhere ever. This is why the registerRenders code must be moved out of the block class and into the ClientProxy.
  16. Have you registered your block model with the rendering registry?
  17. That's because you're looking at the raw bytecode for the mod, not the source code. If you wanted to read .class files as code, you'd need to decompile it first (fortunately Java is an open source format, albeit complicated). Or you can write it as a mod, as diesieben suggests.
  18. I'm not quite I see the error. I apologize, I didn't realize your main class was named "Chest." What I saw was the openGui command that vanilla uses to open chests, not the mod-specific openGui. You should refactor -> rename your main class so it's some like "MoreChests" or better still "MoreChestsBase" or "MoreChestsMain" so it's clear that it's your base or main mod class file.
  19. If you smelted to a custom item then you'd be able to tell. But yeah, smelting isn't supposed to give you a lot of exp.
  20. You need to add BOP to your gradle.build file under Dependencies
  21. You aren't using the correct onBlockActivated method. Look at the Gui Handler tutorial again.
  22. Apparently not, just looked at the call stack for it. The only thing passed to the event is the player and the result stack.
  23. You can't. The number is not "how much experience to drop per smelt" it is "what is the probability of dropping 1 experience per smelt." You would need to use events to drop more.
  24. You can't. The number is not "how much experience to drop per smelt" it is "what is the probability of dropping 1 experience per smelt." You would need to use events to drop more.

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

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.