Everything posted by Draco18s
-
1.17.1 breaking a block when block beneath broken
I wonder how vanilla handles this with doors, pressure plates, and torches...
-
ItemEntity version of LivingEvent.LivingUpdateEvent?
Generally speaking the way to handle this is to catch the ItemEntity spawn (EntityJoinedWorldEvent) and substitute a custom entity class (cancel the event, spawn your own item entity).
-
ItemEntity version of LivingEvent.LivingUpdateEvent?
What are you trying to do? This code: if (getItem().onEntityItemUpdate(this)) return; Calls the onEntityItemUpdate method on the Item. You don't subscribe to it, it's not an event, it's a method you override in your item class.
-
How to generate a explorer map that points to a village in code?
My point was, you don't make random items on the client, you only do it on the server. If you are not on the server, do nothing, if you ARE on the server, do what D7 said.
-
How to generate a explorer map that points to a village in code?
Through the magic of network packets. That said, I don't see why you'd need it here.
-
How to generate a explorer map that points to a village in code?
If you're not on the server, do nothing. The client has no say here.
-
[1.17.1] Add requirements to vanilla advancements
Ooh. Yeah, good point. Nothing exists right now that would do that, but that sounds like how it could be done. I had to do the loot modifier system because no one else had, so you might need to do the same.
-
1.16 regestring
Or store them in your own list.
-
Change Block hardness in Event
PlayerEvent.BreakSpeed
-
How to generate a explorer map that points to a village in code?
Knowing for a fact that it exists, and that it calls ForgeHooks.modifyLoot(...), I'm going to tell you to look harder.
-
How to generate a explorer map that points to a village in code?
I wonder how Blocks (being harvested) calls loot to be dropped. It's gotta call some code somewhere...
-
Cross block is strange
You need to set the block's render layer. There are dozens of posts on this forum about this problem.
-
How to make a block roate
Yes. Block states. Which are defined in the log class.
-
[1.16.5] Can't think of a solution for this
You could try setting the original damage value to 0 and not cancelling it. Not 100% sure this'll work. Or you could leaves the original damage alone and subtract off that amount from your desired amount and deal a second instance of damage.
-
How to make a block roate
Try the blockstate json files
-
How can I make a system that allows players to create custom weapons while in the game?
The image wouldn't work, unless it was a url, as then other players wouldn't see it. 2 and 3 are controllable with vanilla NBT I think, but you can do it with capabilities too.
-
[1.17.1] Need help with 'remaking / updating' one of my old items from 1.14.4
Also, you should use Capabilities. And key your NBT tags with your mod ID.
-
Tile Entity to make an Expanding Block?
It's javadoc notation, it means that the method is an instance method, not a static method. You still use a . when calling it.
-
Tile Entity to make an Expanding Block?
BlockPos#offset(direction, distance) Level#setBlockState(pos, state)
-
Tile Entity to make an Expanding Block?
Blocks cannot be larger than 1x1x1. If you need it to fill more space, you need more blocks.
-
[SOLVED][1.17.1] Using functions inside Global Loot Modifiers
Basically yes. You're probably going to have to do some poking around and testing on your own, but the Java side of a GlobalLootModifier is code like any other class, which means it has access to the vanilla loot functions. Just implement the doApply function and you're set. If you're clever enough you can make your modifier parse the desired loot function and do a lookup (via the existing registry), rather than only do one thing. The only reason that loot functions aren't parsed and handled for you (the way conditions are) is because generally a modifier is a loot function (that is, performing the same role), so there wasn't an explicit need.
-
Small issue with onArmorTick [1.16.5]
The fuck? Why not just compare the return value to something useful? Like, I don't know, getEffect() == null? Cool you stored whether or not the player has the absorption effect in a local variable. Which you then never use.
-
Hod do i call from the tileentity screen a class in the tileentity tile?
Cough.
-
[1.16.5] Stroke blocks
"Not easily." There's no prebuilt solution to draw blocks (or block outlines) through walls. I did something like this using particles, however.
-
1.16.X Loot Modifiers Only Run in Dev Environment [Solved]
Why does your custom condition live in the vanilla namespace?
IPS spam blocked by CleanTalk.