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. "Translate" is one word, the L does not need to be camel-cased.
  2. Mm, true. I don't use the function in survival though, so I tend not to think about it. Creative, its super extra useful.
  3. This isn't related to your problem...but OH GOD WHY. You're essentially telling Minecraft that your TileEntity will never be invalid. Yes, even if you break your block and place a chest there, your TE is still valid. Good job. Why is your base TE class implementing ITickable when your subclass does fuckall with it? Leave this off and let the subclass implement it (or not). By making all of your TEs ticking you consume system resources to do nothing. Good job. As for your problem. Use the debugger. Why is your IItemStackhandler getting created with 0 size? The debugger can answer this for you.
  4. Just remember to group them by functionality. "This ore appears in the nether" isn't really important. If you've only got 12 ores across all dimensions, you can still squeeze that into one block + metadata.
  5. If you want to use variants for your ore types you need to use a single block (BlockModOres) with a variant property, then distinguish your different ores by variant, including in the blockstate file. Here's the best example I have: https://github.com/Draco18s/ReasonableRealism/blob/1.12.1/src/main/java/com/draco18s/flowers/block/BlockOreFlower1.java https://github.com/Draco18s/ReasonableRealism/blob/1.12.1/src/main/java/com/draco18s/hardlib/api/blockproperties/flowers/EnumOreFlower1.java https://github.com/Draco18s/ReasonableRealism/blob/1.12.1/src/main/resources/assets/oreflowers/blockstates/oreflowers1.json You'll have to pretend that some of the block properties (Props.FLOWER_STALK,Props.HAS_2D_ITEM) don't actually exist, as they're handled magically* elsewhere (and not relevant here). Additionally, the enum field for ore type is just a convenience mapping for my useage. A flat enum like you already have is fine. *I use a custom statemapper.
  6. Go download JD-GUI. Have fun with it.
  7. Well, there isn't an event that corresponds to "LivingEntityUseItemEvent_But_Left_Click" because items aren't used on entities on left click. That's an attack.
  8. All of your ore blocks declare a variant which is not present in your blockstate.json
  9. Do your blocks have variants? Because the issue is that the blockstate file doens't have the variant (or there's an issue with the data inside that variant). Post your block code for your copper ore.
  10. The Fake World code is sprawling and in several files. If you're interested in knowing what I did, peruse my repository. Everything you need is there. I recommend starting here: https://github.com/Draco18s/ReasonableRealism/blob/1.12.1/src/main/java/com/draco18s/industry/entities/TileEntityFilter.java#L169 Follow the references. If you have specific questions, ask.
  11. https://github.com/Draco18s/ReasonableRealism/blob/1.12.1/src/main/java/com/draco18s/industry/world/FakeWorld.java
  12. I did this for a tile entity of mine. It's a massive headache. The way I went around doing it was to register a dimension, use that dimension as the place to "store" the block/TE information that I wanted. I mapped the six slots in my TE to six locations in the extra dimension (while possible to have two TEs use the same locations, it's not a concern, as the TE checks the BlockPos and if it isn't correct, changes it--there would be GC overhead involved, but the likelyhood that a player does this is small). The chunks in that dimension are chunkloaded while my TE has need of them (any given TE will chunkload at most 1 chunk). And of course, in order to get the world reference, I had to pass things through my Proxy class because the client and server worlds are different. This was less of a hassle than creating a World object that wasn't connected to anything at all (also possible).
  13. This won't work. ItemStacks do not override Equals (or the == operator). You need to check Item bitem = Item.getFromBlock(block); if(entry.getKey().getIem() == bitem) { }
  14. Don't override isOpaqueCube, getBlockLayer, or shouldSideBeRendered. Don't forget to call super() in your constructor.
  15. Post the error you get in the log. The whole thing. If you feel like it you can read them too and find a "Caused By" that actually tells you something.
  16. function int getRadius(int distance_from_top_of_tree) { return distance_from_top_of_tree; }
  17. Sounds like your f(n) is equal to n, you probably want n/2
  18. That's what f(d) does. It computes the radius based on the distance from the top of the tree. Presumably f(0) is 0, and f(n+1) is greater than or equal to f(n).
  19. More like "Eh, I'm already not doing professional Java work, I'm now more incentivized not to." I'm sure it works Fine, but it's not "what I do" so I don't see a reason to make it "what I do." I like modding Minecraft because there's a million billion things I don't have to worry about and I can make cool stuff.
  20. /me adds it to the "list of things to stay away from," keeping NPM company. Also http://www.stilldrinking.org/programming-sucks
  21. Calculate the distance of the current leaf position from the top. Perform some math, r = f(d)

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.