-
Posts
16559 -
Joined
-
Last visited
-
Days Won
156
Everything posted by Draco18s
-
You shouldn't recreate LazyOptional instances every time they're needed. But essentially yes.
-
Don't implement a capability interface on your item, override initCapabilities and return your capability instance there.
-
Except that we don't want it divisible by 10, what we actually want is for it to be a clean power of 10. 1620 is not a "nice round number" as far as we, decimal loving, humans like. I mean, yeah, there's the imperial units system which is all over the place, but we don't actually deal with worrying about how many ounces are in a gallon. The problem with fractional bucket values is you'd have to assign unique names to those values and then have to figure out how to display quantities in a UI. "One bucket, two bottles, and three nuggets of liquid iron."
-
I understand that reading crash logs is hard, but come on.
-
Dude, it was literally the first reply to this thread. Like FIVE links about how to fix it.
-
You're correct, the only dividable liquid in vanilla is water, and only into thirds (although how many mb actually goes into a bottle and why only three bottles to a cauldron, we can't really say (i.e. a lot less water is stored in a cauldron than out in the world as a single block, as a cauldron takes up some of the space and a source block is enough water to partially fill its own volume AND seven other blocks)). But even if we disregard the 1000mb unit and try to find another amount that fits, I contend that you're not going to find one. It needs to be divisible by 81 (9 nuggets * 9 ingots to a block, this fortunately gets us a divided by 3 for free) and divisible by some number of 4s. So we get 324 as the smallest possible value that satisfies this requirement, but is a really awkward number to work with. The next is 1296 (already the value in use) 5184 20736 82944 331776 and so on, none of which are particularly nice to work with (ie. close to a whole power of 10). The only one that's small enough to be useful, but round enough for humans to easily work with, is 1296. Why doesn't a bucket actually hold 1296? Well because another mod came up with the milibucket unit of measure and 1296 was adopted afterwards as the rational value to work with (due to the 81*16 composite) and the two were *close enough* to just deal with the discrepancy as either imperfect conversions, transportation loss, or by just making the user have to use more than one bucket worth to get a full iron block out of it.
-
[1.15.2][SOLVED] Rendering Lines in unBatched Environments
Draco18s replied to Papa_Prime's topic in Modder Support
Having messed with this in the past: 1) Do not use GL11 directly, use the wrappers 2) GL11.GL_LINES does not work the way you want or expect (I don't know why and don't care). -
I wonder if there is some kind of damage method in the item stack class.
-
[1.15.2] Help with loot modifiers and global loot modifiers
Draco18s replied to BadBichShaquonda's topic in Modder Support
That helper class is someone a library mod (source here) where he uses a custom boat item, a custom "boat registry," a custom boat entity, which has a custom way of handling the drops. You are not guaranteed that every modder will do things using that same library. In fact, I would suspect the opposite: that every modder will run their own custom solution. Good (friggin') luck -
[1.15.2] Help with loot modifiers and global loot modifiers
Draco18s replied to BadBichShaquonda's topic in Modder Support
Possible. I don't have a modded boat to look at. I was just looking at what BoatEntity#updateFallState() does (the only place it generates its non BoatItem drops). -
[1.15.2] Help with loot modifiers and global loot modifiers
Draco18s replied to BadBichShaquonda's topic in Modder Support
Also BoatEntity#getBoatType().asPlank() -
[1.15.2] Help with loot modifiers and global loot modifiers
Draco18s replied to BadBichShaquonda's topic in Modder Support
I haven't looked at boats, but like I said, if the boat is generating the stacks without going through the standard systems, then correct: loot modifiers won't work. All you should have to do is "get boat, tell boat is is broken" and let the boat handle itself. -
Funny how 144mb for an ingot means that a nugget is 16mb, which is divisible by 4, and the 144 is also divisible by 9. But oh no, a bucket is only 1000mb, meaning an entire metal block block (9 ingots) does not perfectly fit in a bucket. So no, you don't want compatibility with base 4 and base 9, but also base 10. This is as mathematically possible as perfectly tuning a piano.
-
[1.15.2] Help with loot modifiers and global loot modifiers
Draco18s replied to BadBichShaquonda's topic in Modder Support
If the boat does its own drops via Java code, it does not hook into the loot_table system and therefor does not invoke the global loot modifiers system. Beyond that I do not understand how that relates to your shark. -
Using Multiple Images for a Single Texture
Draco18s replied to GamingZacharyC's topic in Modder Support
You need a model that uses more than one texture. eg.: https://github.com/Draco18s/ReasonableRealism/blob/1.14.4/src/main/resources/assets/harderores/models/block/ore_harddiamond_16.json -
Ok, but you didn't add your block/item to an existing ore tag (eg iron, gold) you created a new ore type (which is fine) but then didn't tell forge that your new ore type was an ore by adding it to the ores.json list (which is what your code is grabbing): https://github.com/MinecraftForge/MinecraftForge/blob/1.15.x/src/generated/resources/data/forge/tags/items/ores.json
-
404 Repository Not Found But here, have an example: https://github.com/Draco18s/ReasonableRealism/blob/1.14.4/src/main/resources/data/forge/tags/items/ores/iron.json
-
Generate ore that gives the player experience upon being harvested
Draco18s replied to Jenkkins's topic in Modder Support
Well it has fuckall to do with the code you posted because its entirely handled by the block class. I advise taking a look at the vanilla ores and their class hierarchy.- 1 reply
-
- 1
-
Its just like registering a block that isn't a whole new class. Except you call new on a different class. Shocking, I know.
-
It isn't sn asset. It is a property of logs. Go look at one of the log json files.
-
Show your code and the full error log. We're not telepathic.
-
ItemDurabilityTrigger is an ICriterionTrigger for use with advancements. There is not a Forge hook for this. But you could, conceivably, add a listener to the existing trigger, but keep in mind this is a server side effect only.
-
Well, I see a for loop that starts at a startHeight and if the block at that position is air, it (continues the loop and) goes down. If the block is the same as defaultBlock, then it does some other stuff to determine what block to place at that position instead. i (but starts at -1, meaning the first block that isn't air does something different than if i > 0--set by j) and j are based on some noise values. i and the seaHeight determine what block is placed.
-
Create a TickEvent handler and count ticks (specifically one of the subclasses, and check the Phase). Depending on what you're counting ticks for there may be other places you'd want to hook into
-
What.