Everything posted by Draco18s
-
Item entity detection
Presumably its about to contact the lava, which means it will take damage, and die. Both of which are detectable events.
-
Item entity detection
From what context? Do you want any dirt items any where in the world? Only around the player? Above a certain block?
-
Item entity detection
Yes, exactly which method you want depends on what you are trying to do. And I do not understand what you are trying to do.
-
[1.15.2] NoSuchMethodError when testing on server
I'm pretty sure new ItemStack(blockstate.getBlock()) is sufficient. Last I checked, the ItemStack class has a constructor that will do the block -> item conversion for you.
-
[1.15] Custom recipe type setting recipe output to air after being crafted
You need to clone the result stack before putting it into an inventory.
-
Game crashed by unknow thing.
TLDR: Learn to read your damn crash logs.
-
[1.14.4.]Check if the player is enough near to a block
That works most of the time. Not in the sense that you won't get an item, but the last time I was doing something similar--as an example--wheat's pick-block stack is "seeds" (which thankfully are not named "Wheat Seeds" now but they hadn't been back in 1.10). So you have to work around that particular problem.
-
[1.14.4.]Check if the player is enough near to a block
Have fun with that. Some block don't have (translated) names. Most crops can never exist in your inventory and so don't have names.
-
[1.15.2]insertItem this is wierd
There are two functions here. One is inserting a stack into a slot. The other is splitting the item stack in the player's hand and returning a new stack. The former is taking as a parameter the result of the latter. handstack is indeed left empty if it was a stack of 1 item. Empty stacks that are not air, and stacks of air, are functionally identical as far as all of vanilla's code is concerned. The whole point of split() is that you have TWO stacks after calling it, the original (now empty) and the new stack (with one item) that gets inserted into the tile entity. That's how the player's held item is cleared.
-
[1.16.1] Teleport In Line of Sight
Why are you suing a mutable blockpos when you aren't reusing it? What the fuck. Jesus christ. Inline this garbage or use intelligent variable names. "If the block blocks movement (player is not allowed to stand there) or we've reached max distance (we don't fucking care), then put the player inside that block. Yes, INSIDE the NON WALKABLE BLOCK."
-
Item with Crafting Table
Hi. Welcome to the internet. This is a forum, aka an asynchronous medium. Any given user does not sit and hit refresh constantly and they are not immediately notified of new replies. Instead they check in when they have time at their convenience. It has been all of 18 minutes, you do not need to bump your thread. I, however, do not know the answer to this as I have no familiarity with the mod in question. Examine their code and work it out for yourself.
-
[1.15.2]insertItem this is wierd
Vanilla treats stacks of size zero as identical to air. You don't have to do anything about it. That's why .isEmpty() is a thing.
-
[1.15.2]insertItem this is wierd
Yes. But keep in mind that that is not the only way these methods can be used. That's what it does here because only 1 of whatever item is trying to be inserted at a time. If we wanted to do more than 1, it gets a little trickier, but the general process is still the same: Attempt to insert Check if the remainder has a smaller stack size than what we tried to insert Actually split off and insert only the amount that will fit
-
[1.15.2]insertItem this is wierd
No. The first line calculates what would be left over if the stack were to be inserted.
-
[1.15.2]insertItem this is wierd
You want to do it for real, or just simulate it.
-
[1.15.2]insertItem this is wierd
To the surprise of no one: Yes. It splits the stack such that the returned stack has the indicated size (or the original's size, whichever is lower) and the original stack is reduced by that amount (to a minimum of zero). Oh and this: Is what checks to see if the item can be inserted, regardless of what stack is currently in the TE's inventory.
-
[1.15.2]insertItem this is wierd
- 1.15.2 Item with Gui And Container
They kind of will.- [1.14.4]Transperency issues
Welcome to the quest to find the holy grail of computing: transparency sorting. Whatever you did (which you didn't show your code) caused the polygons you tried to render to occlude the transparent blocks at a time when the triangle sorting was set to "nearest first".- [1.15.2]insertItem this is wierd
Have some working example code. https://github.com/Draco18s/ReasonableRealism/blob/1.14.4/src/main/java/com/draco18s/harderores/block/MillstoneBlock.java#L65-L67- [1.16+] Any alternatives for Block::onEntityCollision?
Sigh https://forums.minecraftforge.net/search/?&q=deprecated- Question about elements limit in JSON
The values are inclusive. Note that it is not wise to use values that extend beyond the 1x1.5x1 volume, instead using multiple blocks, but the model json format does permit the values.- Help
Also: All of those things.- (1.16.1) How to add another texture layer to chestplate
Well...of course not, the default chestplate model doesn't have the layer you want to add.- (1.16.1) How to add another texture layer to chestplate
That's not how generics work. This works: public List<Article> { return articles; } because of this (not shown): private List<Article> articles = new List<Article>(); Not because this: public List<FooBar> { return foobar; //return "foobar" because FooBar is inside <>! } The "thing inside the angle brackets" is a generic. List<T> is a list of things that are Type T. What is T? Whatever you want it to be. <A extends ModelBiped> is a Type A (and extends ModelBiped). You need to return some object that is of Type A. - 1.15.2 Item with Gui And Container
IPS spam blocked by CleanTalk.
Important Information
By using this site, you agree to our Terms of Use.