Everything posted by Draco18s
-
Need help with JSON recipes and Custom Furnace
Define "doesn't work"
-
[Solved]I18n.translateToLocal Not Working For Entities Anymore?
"Translate" is one word, the L does not need to be camel-cased.
-
Custom fluid rendering in world as water. [1.11.2]
- {SOLVED} [1.8.9] How to right-click with specific Item drop ItemBlock
Mm, true. I don't use the function in survival though, so I tend not to think about it. Creative, its super extra useful.- {SOLVED} [1.8.9] How to right-click with specific Item drop ItemBlock
+in creative- Block with inventory crashes on click: Slot 0 not in valid range - [0,0)
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.- Block JSON problems
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.- Block JSON problems
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.- Created a deobfuscator.
Go download JD-GUI. Have fun with it.- Hook like LivingEntityUseItemEvent but for left click
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.- Block JSON problems
All of your ore blocks declare a variant which is not present in your blockstate.json- Block JSON problems
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.- MC 1.12.2 setters in constructor
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.- MC 1.12.2 setters in constructor
https://github.com/Draco18s/ReasonableRealism/blob/1.12.1/src/main/java/com/draco18s/industry/world/FakeWorld.java- MC 1.12.2 setters in constructor
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).- Getting a block's smelting recipe? (1.12)
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) { }- Need Info On Tree Leaf Gen [1.12.2]
Don't override isOpaqueCube, getBlockLayer, or shouldSideBeRendered. Don't forget to call super() in your constructor.- Need Info On Tree Leaf Gen [1.12.2]
#PostYourCode- Block JSON problems
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.- Need Info On Tree Leaf Gen [1.12.2]
function int getRadius(int distance_from_top_of_tree) { return distance_from_top_of_tree; }- Need Info On Tree Leaf Gen [1.12.2]
Sounds like your f(n) is equal to n, you probably want n/2- Need Info On Tree Leaf Gen [1.12.2]
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).- Fields vs. Properties
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.- Fields vs. Properties
/me adds it to the "list of things to stay away from," keeping NPM company. Also http://www.stilldrinking.org/programming-sucks- Need Info On Tree Leaf Gen [1.12.2]
Calculate the distance of the current leaf position from the top. Perform some math, r = f(d) - {SOLVED} [1.8.9] How to right-click with specific Item drop ItemBlock
IPS spam blocked by CleanTalk.
Important Information
By using this site, you agree to our Terms of Use.