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. Something something, this is why I have to try-catch a chunk of my code, because I specifically want to know what the hardness of a block (and its harvest tool/level) is without having a valid world position to look at (so I pass null for the world and catch the null pointer exception).
  2. Probably the while loops. Like, their entire existence.
  3. No that's-- User was banned for coremodding
  4. TL;DR: Chunk data needs to exist in its own native class object during runtime. You only need to save to NBT when the chunk is saved (and then read it when its loaded again). You'll need these events: https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/java/com/draco18s/flowers/FlowerEventHandler.java#L74 (CogOreGenEvent is just a deferred chunk generation event that I must use; you can use the vanilla chunk generation events) And this is what I do with them: https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/java/com/draco18s/flowers/util/OreDataHooks.java There's a lot going on for me (because my data is complex) but the basics is that when the chunk is generated I create some data that gets stored. There's a "get" method for retrieving the stored value as well. Then during ChunkSave the data is added to the chunk's nbt, and on ChunkLoad it's read. At ChunkUnload the data is removed from the runtime storage (so memory isn't leaked by a player flying through the world).
  5. An "is this my sword?" check is super cheap. Don't even worry about it.
  6. Ok, then you're going to have to initialize your own Item handler. It's not hard. https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/java/com/draco18s/ores/entities/TileEntitySifter.java#L40
  7. Then you're probably going to have to initialize the item handler capability's size to the maximum you're ever going to need.
  8. That entirely depends on what you're doing and how you're doing it. Did the array that holds all the times increase in size?
  9. Unable to resolve texture reference is that there is an unspecified texture in the model/blockstate.
  10. if(slot < getSizeInventory()) ?
  11. Oh sweet. That's exactly what I needed. Hell, I'd have been sufficed with ModelLoaderRegistry.getModel( location ); and been left to figure the rest out. THAT is the class I could not find out about. Naw, we good. Oak planks.
  12. I think the point is that hitEntity is called even while the cooldown is active. So you get full bonus damage even if the sword itself is dealing 0.1 damage.
  13. You have to make sure that the requested slot is writing the inventory size before you call super.
  14. Not having done this, my guess is that you would have to create your own IBakedModel implementation that gets the quads from another baked model. In any case it is likely not going to be easy.
  15. Mucho gracias. https://s17.postimg.org/5c7zad6lb/2016_10_09_18_03_42.png[/img] Need to create a bottom model now (the carpet is placeholder; just wanted something about the right height that already existed). Last question: How to I register a model that isn't associated with a block?
  16. Ok, back to this. Questions: 1) Am I registering the block with a model as normal, then that model gets loaded and baked, then retrieve it? 2) How do I tell the model registry to use my new baked model? I took a look at your repo, but I couldn't find where you actually do this stuff (I found your @SubscribeEvent handler, but it made calls off to arbitrary objects via an API, so I couldn't follow what it did).
  17. 1) Why aren't you using the registry name? 2) What is the value of "file"? 3) What is the block's registry name?
  18. Yes, I have one there, it works fine. https://github.com/Draco18s/ReasonableRealism/tree/master/src/main/resources/assets/harderores/models/block/item { "__comment": "Allows blockstates files to use basic item models", "parent": "minecraft:item/generated" }
  19. The event fires once for each hand.
  20. Blockstate folder Take a look through my git repo https://github.com/Draco18s/ReasonableRealism Might want to go back to the Jul 28, 2016 commit, there's less stuff in there at that point.
  21. { "forge_marker": 1, "defaults": { "model": "harderores:item/generated" }, "variants": { "ore_type": { "iron": {"textures": {"layer0": "harderores:items/irondust_sm"} }, "gold": {"textures": {"layer0": "harderores:items/golddust_sm"} }, "flour": {"textures": {"layer0": "harderores:items/flourdust_sm"} }, "sugar": {"textures": {"layer0": "harderores:items/sugardust_sm"} }, "tin": {"textures": {"layer0": "harderores:items/tindust_sm"} }, "copper": {"textures": {"layer0": "harderores:items/copperdust_sm"} }, "lead": {"textures": {"layer0": "harderores:items/leaddust_sm"} }, "silver": {"textures": {"layer0": "harderores:items/silverdust_sm"} }, "nickel": {"textures": {"layer0": "harderores:items/nickeldust_sm"} }, "aluminum": {"textures": {"layer0": "harderores:items/aluminumdust_sm"} }, "osmium": {"textures": {"layer0": "harderores:items/osmiumdust_sm"} } } } } And you're not limited to 16, either. "Osmium" there is meta-data value 24.
  22. Noted for later. Struggling through getting the liquid portion to do what I want (slowly, oh so slowly). At the moment 3 facings work correctly, south doesn't. Nevermind, I had "sorth" in my blockstate file. I'm an idiot. Next step is to get the water level working at the desired heights. @..@

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.