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. Yeah. That's LoreMaster. I've made comments on his videos about the sort of crap he ends up recommending, whether intentionally or not.
  2. This is not going to work, for two reasons: 1) You're cloning an array, not the item stacks 2) You check for null *after* calling .clone() on it.
  3. This is the purview of IBlockStates and the blockstate json file.
  4. If you set a value to it, then save, then clear the value (so it is null), and then save.... ....what happens?
  5. There may also be isOpaque or isFullCube that you might have to fiddle with too. I haven't poked around in 1.13 yet, but isSolid (and isSideSolid) was used for mechanical transparency (i.e. could you place a torch on it) whereas isOpaque dealt with the rendering aspect.
  6. ReflectionHelper I believe was renamed to ReflectionObfuscationHelper (ObfuscationReflectionHelper?)
  7. Also works, yes. The point here was to get you to think, "Where does vanilla do this?" and go find it.
  8. "Get the crafting result, is that object equal to the string 'minecraft'?" Almost certainly not.
  9. *Referenced @SideOnly literally deletes the code on the other side. If you have a reference to it that isn't also covered by @SideOnly (even if its never called!) the JVM will say, "Whoah boy! You've got a method call in this class that isn't valid!" and terminate.
  10. Have you tried looking at the BlockDiamondOre class?
  11. Oh, and for reference, Forge doesn't even have to instantiate the class in order to get a ClassNotFoundException the way you have. Simply by telling the JVM that your client sided packet handler exists is sufficient. Because the JVM goes "I have to load this class, I don't know when--or indeed if at all--any given part of it will be executed, so I'm going to check that all of it is valid. To do that I need to make sure any additional classes it references are ones I can find, just in case I need to load them in the future. Oh what's this? I see a reference to EntityPlayerSP, I don't know what that is or where it find it. Crap."
  12. https://stackoverflow.com/q/17524673/1663383
  13. I can replace this: With this: nbtTagCompound.setInteger("lIndex", (nbtTagCompound.getInteger("lIndex") + 1) % 4);
  14. So, it will do this: 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0... Yes? If so, why do you need an integer? Or an if statement at all? 1 - currentValue will do this just fine. So will (currentValue + 1) % maximum
  15. See comments. Now go learn Java.
  16. Unrelated things: https://gitlab.com/LaDestitute/Spelunkcraft/blob/unstable/src/main/java/ladestitute/spelunkcraft/util/ModUtil.java#L64-73 ...You do know that setRegistryName and setTranslationKey both return the object, right? You can totally do this: Block b = new BlockWhatever().setRegistryName(...).setTranslationKey(...) Ditto items. Or you could do it right in the constructor where you're already calling setRegistryNames...The only real value this has is setting the translation key to the registry name, but because of where you're calling this, there is no reason why you need these generic overloaded helper functions, except here where, where it's still unneeded because of the above. You also return the entry object despite doing nothing with it, so what was the point? Ditto setCreateiveTab. https://gitlab.com/LaDestitute/Spelunkcraft/blob/unstable/src/main/java/ladestitute/spelunkcraft/util/ModUtil.java#L135-141 Why. Seriously, why did this need a method call? https://gitlab.com/LaDestitute/Spelunkcraft/blob/unstable/src/main/java/ladestitute/spelunkcraft/items/treasure/SmallRuby.java#L12 Classes like this....don't need classes. Seriously, you gained fuck and all with this class. And what's this? Didn't like your mod util class this time? Just use new Item() https://gitlab.com/LaDestitute/Spelunkcraft/blob/unstable/src/main/java/ladestitute/spelunkcraft/proxy/CommonProxy.java CommonProxy is stupid. Anything that would go here should go in your main mod class. Not that you even call these methods anyway. Speaking of the proxy, and sided things, you have a client folder. And a server folder. Why are your proxies not in these folders but instead in a special "proxy" folder? Organize by groups, that's what its for. Everything that's client side goes in the client folder the client proxy is client sided! It goes in the client folder.
  17. 1) remove this 2) use the logger the FMLPreInitializationEvent gives you Did you mean to leave this empty?
  18. With the correct Block#onBlockActivated method signature.*
  19. Why do you have a method inside a method?
  20. I mean, you CAN, but you're not going to get any help working with it here.
  21. Not necessarily, but yes, that would work. (There are only 4 or 5 actually levels in vanilla, but that's quibbling) What do you mean? You can reuse classes, you're just creating new instances with different data. For example, both the vanilla stick and iron ingots ate both instances of the Item class. They don't have a ItemStick or ItemIronIngot classes.
  22. Items.BREAD.setCreativeTab(null) Is the same as ForgeRegistries.ITEMS.get(new ResourceLocation("minecraft","bread")) Yes. Well, probably. You need the right event type. Sort of. The method signature needs to match in order for it to be called. If you don't have an Event type as the only parameter, then no event call will ever invoke your method because the signature would never match.
  23. Neither, because neither method takes a parameter of type Event. Neither, because neither is a startup even method (preInit, Init, postInit) Neither, because neither method correctly uses the Items registry (which item are you changing?) The second one also declares a return type that is both unneeded and never returned. Items.BREAD, Items.REDSTONE_DUST, Items.CAKE etc
  24. Double colons (e.g. SomeClass::SomeMethod) has a similar meaning, but I'll be honest that I haven't seen the distinction clarified for me. Just pointing out that you might see that sometimes too.

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.