-
Posts
16559 -
Joined
-
Last visited
-
Days Won
156
Everything posted by Draco18s
-
This forum is for helping people make mods, not debugging someone else's mod. You have a bazillion mods. Use binary search to figure out which mod is causing the problem (remove half your mods to see if the problem persists, if it does, remove half again. If it doesn't, put the half removed back and remove half of them, repeat).
-
Is there are any examples of multi-mod project structure
Draco18s replied to talmdal's topic in Modder Support
https://github.com/Draco18s/ReasonableRealism/blob/1.12.1/build.gradle -
My post was about rotation only around Y. For X and Z you just need to swap out the X and Y for X/Y/Z as necessary and then remember to perform the rotations in the correct order. Usually X, then Y, then Z. Or you can use a quaternion. Point is, because the rotations are in 90 degree increments, the coordinates just exchange places with each other with the occasional -1
-
[1.17.1] What has ContainerBlock turned into
Draco18s replied to BeardlessBrady's topic in Modder Support
Look at the Chest and its hierarchy? -
That said, it wouldn't be hard to write that function. You just have to do the following: X1 -> -Y2 Y1 -> X2
-
1.17 when a Block is placed , create another Block
Draco18s replied to blinky000's topic in Modder Support
I wonder how the bed or door does this. -
Note: BlockColors does multiplication of a color with a grayscale texture. If you want a true hue shift, you'll have to handle it differently. Last time I did something like that was back in...god, 1.7? 1.10? with the TextureStitchEvent I can't even find that code now.
-
Why not replicate what it does? Obviously not exactly, but I'm sure somewhere in it is the code that handles the right-click action and spawns an entity.
-
Gosh, maybe there's a MinecartItem?
-
Temporary blocks tile entity or separate handler
Draco18s replied to matthew123's topic in Modder Support
TileEntities have a large overhead. Thousands of them would grind the server to a hault. #2 is a huge pain in the ass to implement, so don't. Use random ticks as D7 suggested (look at crops). -
In Eclipse if you have any event type already in your code you can press F4 on it to open the type hierarchy. Navigate up to the Event base class and then refocus the hierarchy there. This also exists.
-
(1.17.1 Forge) How To Add A New Pickaxe,Axe,Shovel And Hoe
Draco18s replied to technokraken's topic in Modder Support
-
[1.16.5] I don't think I fully understand how capabilities work...
Draco18s replied to cwJn's topic in Modder Support
Show your code. -
No, for two reasons: 1) x1 and x2 are not equal and have no apparent relationship 2) matrix transformations are non-associative The only thing I can think of is working backwards from the output of the first chunk, removing the rotation, removing the scale, then adding the new rotation and scale back.
-
Your mod needs to load after the other mod.
-
Draw a line on blocks at specific coordinates (1.16X)
Draco18s replied to shadeslate's topic in Modder Support
This is some really old code, but most of the logic wouldn't have changed as a result of newer minecraft versions, though some of the wrapper classes have. Basically you just need to find a line between two points (trivial) find a perpendicular line between that one and vertical (or along the camera's view vector), which is a dot product, then use the resulting values to find the four corners of a quad those two lines represent, and add that quad to the render buffer. https://github.com/Draco18s/HarderStuff/blob/master/src/main/java/com/draco18s/hazards/client/HazardsClientEventHandler.java#L235 -
Note that enchanting an existing item does not call AttachCapabilities because it's adding data to an existing item stack, not creating a new one.
-
Then you're going to have to pass in either the RegistryObject<> or a supplier that returns such.
-
OOB Exception when adding entity to world.
Draco18s replied to AkitaAttribute's topic in Modder Support
I think you can modify the drops array during the LivingDropsEvent, though (well, collection, but it's not read-only so I don't see why you couldn't remove the originals and add yours). -
OOB Exception when adding entity to world.
Draco18s replied to AkitaAttribute's topic in Modder Support
https://github.com/AkitaAttribute/rpg-elements/blob/working_but_crashing/src/main/java/magicsixteen/rpgelements/RpgElements.java#L252 item.isEmpty() https://github.com/AkitaAttribute/rpg-elements/blob/working_but_crashing/src/main/java/magicsixteen/rpgelements/events/item/GlowingItemEntity.java#L15 Why are you storing an item entity inside your custom item entity? Just use the details of that entity to create yours using an existing constructor. You're trying to replace the entity, not wrap it. https://github.com/AkitaAttribute/rpg-elements/blob/working_but_crashing/src/main/java/magicsixteen/rpgelements/RpgElements.java#L255 Not sure this check is needed. https://github.com/AkitaAttribute/rpg-elements/blob/working_but_crashing/src/main/java/magicsixteen/rpgelements/events/item/GlowingItemEntity.java#L62-L108 This is a disgusting hack. One that I'm not even sure works. https://github.com/AkitaAttribute/rpg-elements/blob/working_but_crashing/src/main/java/magicsixteen/rpgelements/util/GlowHelper.java#L61 This check almost certainly won't pass. Existing item entities will never appear in the glowing list. Actually wait a minute. This entire class is useless. Jesus fucking christ. Just use the GlowingItemEntity to store a number of ticks and then in its on-tick, subtract one, and if it's less than 0, set glowing to false. You don't need a globally accessible list of all glowing item entities and when they should stop glowing. Nothing cares except the entity itself, so just store that data in the entity. -
This is why DeferredRegister is great.
-
Because door_block is a supplier and you called get() which gives you a new DoorBlock(ModBlockProperties.PLANKS), not the door block you registered.
-
*Skeptical look* That might be a 1.14 workspace, but that's because I haven't poked at 1.16 or 1.17 yet. But it's still the same.
-
the json files are also available in your IDE under Referenced Libraries -> Client Jar
-
1.17.1 breaking a block when block beneath broken
Draco18s replied to KaboomRoads's topic in Modder Support
Gosh I wonder how the vanilla door, bed, and pressure plate handle this...