-
Posts
16559 -
Joined
-
Last visited
-
Days Won
156
Everything posted by Draco18s
-
Not really no. I did something like this a long while back, but you can't fiddle with that property. You have to fiddle with whatever you can do with the available methods. e.g. you can return an empty voxel shape from getCollisionShape which does allow you to check what the player has or is.
-
Because of how Capabilities work.
-
No, that's how its supposed to work. Forge injects the value to non-null at runtime. You still need to register the capability. https://github.com/Draco18s/ReasonableRealism/blob/1.12.1/src/main/java/com/draco18s/farming/FarmingBase.java#L189
-
https://github.com/Draco18s/ReasonableRealism/blob/1.12.1/src/main/java/com/draco18s/farming/FarmingBase.java#L86-L87 Pretty sure this hasn't changed.
-
No, you would create your own class that implements MySavedIntegerStorage<MySavedIntegerInterface> https://github.com/Draco18s/ReasonableRealism/blob/1.12.1/src/main/java/com/draco18s/farming/entities/capabilities/MilkStorage.java
-
[1.16.1] New Lantern Not Supporting Transparency
Draco18s replied to Matt Wild's topic in Modder Support
No! Bad modder! Put client side code in a client side event subscriber! Do not hide exceptions. -
Or read the depreciation comment.
-
Its called a SRG name. Its an automatically assigned identifier by the decompilation process so that even as obfuscated names get shuffled and changed every time Mojang updates the game, the SRG names stay constant. But it means that when major versions happen the SRG -> MCP name identification and mapping needs to be rediscovered.
-
Yes, you have marked a method with @Override but are not actually overriding a method. You need to correct the method signature so that you are overriding a method.
-
Your class, CzechVoiceControl, is referencing the Minecraft class directly. You can't do this from common code.
-
1.15.2 Mod making: code not working for ModItemGroups
Draco18s replied to llamacorn1921's topic in Modder Support
Why does your static class have a constructor? -
Check what value the parameter is and compare it against a desired value.
-
BlockItemBase is an antipattern. There is already a base BlockItem class, it is called BlockItem. Ditto ItemBase. It's called Item. Code Style #4
-
End portals are special and can be located via the same code that ender eyes use. But in a more generic sense, no, there is no built-in method of locating the nearest block. As the only way to do that would be to literally examine 30,000,000,000 blocks one by one. The reason you can locate end portal frames is because those generate naturally, there are only three strong holds, and the game knows where those three strong holds are.
-
World#getBlockState
-
Yes, it is. It is still badly named, even if you didn't name it. Have you tried to figure out what it does?
-
This is a parameter. It is badly named. Maybe this value means something?
-
you need to show more code to resolve this.
-
You're looking at the right thing, the problem is that you're seeing SRG names (automated consistent naming between versions) and not human readable (MCP) names (which are a community sourced project that takes a while to identify methods and update the names). Either you need to update your mappings or you have to wait for new mappings to be available.
-
[1.16.4] Modifying length of Day and Nighttime
Draco18s replied to Bertrahm's topic in Modder Support
You can't without getting into doing java bytecode modification. A thing that if you don't already know how to do, we will not help you do, because if you don't do it right, and the game crashes users will report it as a bug to the wrong person. -
Probably the wrong bus. But I'd go with D7's suggestion of the player logged in event.
-
That's what container items are for. Vanilla does this with buckets of milk, for example. This is not handled by the crafting recipe json, but the item's class. You need slots that only accept specific items. As an example: https://github.com/Draco18s/ReasonableRealism/blob/1.14.4/src/main/java/com/draco18s/harderfarming/inventory/SaltSlotHandler.java Used: https://github.com/Draco18s/ReasonableRealism/blob/1.14.4/src/main/java/com/draco18s/harderfarming/entity/TannerTileEntity.java#L56
-
You need to wait until after tags have been read and generated. There's an event for that too, but I'm blanking on its name. IIRC it doesn't happen until after you start or load a save though.
-
Why not use the debugger and set a breakpoint at the desired location and inspect the variable?