-
Posts
16559 -
Joined
-
Last visited
-
Days Won
156
Everything posted by Draco18s
-
Trying to understand the MatrixStack's mulPose and translate methods
Draco18s replied to Sunfished's topic in Modder Support
looks like you're applying yaw and pitch swapped during partial ticks. That is, you're applying a large yaw change to the pitch angle and a small pitch change to the yaw angle. As for how the matrix works, you'll want to read up on projection matricies: https://jsantell.com/3d-projection/ -
This behavior is the default behavior for items with durability. Actually they disappear when they take damage and are at 0 durability, so you could just deny the usage when the item has 0 remaining durability. Or you could look at the elytra to see how it swaps out the item for a broken version.
-
This indicates that your DeferredRegister exists in another class. Don't do that. The entire god damn point of the DeferredRegister system was to allow people to register their blocks in static fields. In a single class. There is no registerNoItem() method in this class.
-
BlockState#get(Property) eg. someBlockState.getValue(RotatedPillarBlock.AXIS);
-
Custom Log Stripping problems with BlockState
Draco18s replied to urabaros's topic in Modder Support
BlockState#getBlock() -
[1.16.5] Cannot change custom item durability in use()
Draco18s replied to RCKraken's topic in Modder Support
No. Compare and contrast: -
[1.16.5] Custom Text Overlay not updating when playing on server
Draco18s replied to NindyBun's topic in Modder Support
You don't need a fully qualified name here if you just use an import statement. You need to synchronize your data. Also, use a capability instead of NBTtags. NBT is for saving to disk, Capabilities are for runtime. You aren't null-checking here. If you are absolutely sure your stack will have the capability, use orElseThrow(Exception). If you aren't sure, then use ifPresent(() -> {}) -
[1.16.5] Getting unexpected results for BlockState#getHarvestLevel()
Draco18s replied to olihewi's topic in Modder Support
This doesn't work. There is only one instance of your item class, so ALL copies for ALL players will share the same oxidation stage. You need to use Capabilities. Hardness of -1 is unbreakable. Harvest Level of -1 means something else.- 1 reply
-
- 1
-
-
Did you re-run the gradle tasks?
-
[1.16.3] How can i stop the Enderman from attack player?
Draco18s replied to Bandar's topic in Modder Support
This won't work when you compile your mod and put it in the actual game, due to the game being obfuscated. Second, attacking is an AI behavior, you'd need to remove it from the enderman's AI tasks. -
1.16.5 uses Mojang names, the documentation uses MCP names.
-
Not sure why you're posting here, this is the forum for "I need help making a mod" not the "some mod I have is doing things I don't like."
-
Oh, also: Because you didn't do this, you had to do this: And call empty methods.
-
1 specific mod won't work with my modded server
Draco18s replied to caleb2wavyyy's topic in Support & Bug Reports
Complain to the author of Total Darkness. -
How to get the server world from a chunk generator
Draco18s replied to Slit_bodmod's topic in Modder Support
I was absolutely joking. The unsafe package is called "unsafe" because it is not safe to use. -
You lack this method: https://github.com/Draco18s/ReasonableRealism/blob/1.14.4/src/main/java/com/draco18s/harderores/block/ore/HardOreBlock.java#L51-L54 I'm not sure what the Mojang mapping name is for it, but you still lack it.
-
Mojang marks methods as deprecated meaning "do not call this directly, call the BlockState version." It is not a "do not override indicator." There are literally hundreds of posts about it on this forum.
-
(1) do not use OnlyIn pretty much ever, and never on methods you are creating whole cloth. (2) your getType method is never called (3) your useOn method does a whole lotta nuthin (4) have you looked at the vanilla spawn egg? (5) why are you not extending the vanilla spawn egg?
-
...and this class? Also, you know it's spelled "items" with an M right?
-
None of the code you've shown here is registering an item. I also don't know why you wrapped DeferredRegister.create in a function with a convoluted signature rather than just going ENTITIES = DeferredRegister.create(ForgeRegistries.ENTITIES);
-
How to get the server world from a chunk generator
Draco18s replied to Slit_bodmod's topic in Modder Support
I read that like I read this: import sun.java.misc.unsafe -
How to get the server world from a chunk generator
Draco18s replied to Slit_bodmod's topic in Modder Support
Chunk generation happens on a separate thread, so the IWorld is all you're going to get. You cannot access the main server world yet, both because (a) it might not exist and (b) it wouldn't be thread safe. -
How does sneaking prevent the player from falling off a block?
Draco18s replied to _vertig0's topic in Modder Support
It's probably in the LivingEntity code. Basically rather than checking if the entity's center is over a block, it checks all four corners of the entity's bounding box. -
Convert from IInventory to IItemHandlerModifiable
Draco18s replied to skip999's topic in Modder Support
I knew one existed, just didn't know the name.