-
Posts
1830 -
Joined
-
Last visited
-
Days Won
12
Everything posted by DavidM
-
https://www.geeksforgeeks.org/reflection-in-java/ Since Minecraft code is obfuscated, use ObfuscatedReflectionHelper.
-
[1.15.2] How to edit raw vanilla code with forge
DavidM replied to KdotDevelopment's topic in Modder Support
You can still do this with the method I described above. Add an if statement before the rendering to check for this option would work. In Forge, you can create a new ItemGroup and add in the items by overriding ItemGroup#fill. Overriding the registry on a specific side is fine as long as the entries still matches up with the server/client. I.e. the server and client can have completely different blocks under the entry "dirt block", but there will be no problem with the game; it would render as the block on the client, while certain server-side functions are handled by the server-side block under the same entry. Note that overriding registry entries might cause incompatibilities (when 2 mods try to modify the same entry, only one mod will succeed). However it is still better in terms of compatibility than using a core mod as the former still respects the Forge system. -
[1.15.2] How to edit raw vanilla code with forge
DavidM replied to KdotDevelopment's topic in Modder Support
Depends. If all you did is created a rendering method that would integrate well into Forge's event driven system, then yes. In vanilla Minecraft, barriers are rendered as particles, and handled inside ClientWorld. This might sound impossible, however you could replace the barrier block itself by overriding the registry and its entry in the Blocks class. After that, you have control over the full block. Simply use a TESR or subscribe to RenderWorldLastEvent and render the barrier sprite or emit the vanilla barrier particle in the block. If you feel like replacing the block entry may cause incompatibilities, you can also subscribe to RenderWorldLastEvent and render the barrier sprite at the vanilla barrier blocks (or use vanilla particles); however, this method would require you to set up a system to record all the barrier blocks in the world. -
[1.15.2] How to edit raw vanilla code with forge
DavidM replied to KdotDevelopment's topic in Modder Support
Modifying vanilla isn't supported on these forums. In your case, modifying vanilla code isn't even necessary (People always say "my case definitely need a core mod", but it is in fact not needed in 99% of their case. You just have to be creative with the system ). Simply replace the barrier renderer with your own implementation. -
AFAIK Forge would never do anything like that.
-
[SOLVED] [1.15.2] Players don't regenerate their full hp
DavidM replied to Skyriis's topic in Modder Support
Try adding a debug line before rendering and print out the health. What does it say? -
You need to stitch your texture into the atlas during TextureStitchEvent.Pre.
-
[1.15.2] How to properly damage entity every second
DavidM replied to lisilew's topic in Modder Support
Yes. It's fine, but stuff like potion effects might be better. -
You need to apply the Food you created to your item.
-
Create an instance of Food.Builder and build your food item with it.
-
[1.15.2] Rendering item in a Screen makes it dark
DavidM replied to FlashHUN's topic in Modder Support
1. I'm not sure if using GL11 in 1.15.2 is a good practice. Since GlStateManager has been made deprecated, there is probably a replacement for that. 2. Try disabling lighting. -
[1.15.2] Is it possible to modify a non-living Entities attackEntityFrom?
DavidM replied to Fuffles's topic in Modder Support
Reflection itself is actually pretty to understand; however, Mojang's obfuscation complicates the matter. I would suggest to look into Java's reflection itself before trying out Forge's API for it. -
Forge With PE and Win10 Editions Running OptiFine
DavidM replied to +=WhatSteve - Forge's topic in Support & Bug Reports
Optifine do not provide "Minecraft capes". All they do is add a render layer to the donators that can only be seen if others have Optifine installed. It has nothing to do with Mojang's cape. Optifine's adding custom cape is considered a dick move in the community, as Mojang stated that modders should not mess with capes. -
[1.15.2] Is it possible to modify a non-living Entities attackEntityFrom?
DavidM replied to Fuffles's topic in Modder Support
You can use reflection. -
Because at this point there is so many things that can go wrong, and it would take ages for other people to guess one by one. By seeing your code we can stop guessing in the dark and instead figure out what is wrong immediately. An analogy that is popular on this forum: just like in real life doctors have to examine your body to figure out what is wrong; they can’t magically know what is wrong if all information they have is “doctor it hurts”.
-
[1.15.2] Is it possible to modify a non-living Entities attackEntityFrom?
DavidM replied to Fuffles's topic in Modder Support
You can override the entire entity with an implementation of your own. -
How do i make forge tell me all missing registries ?
DavidM replied to Misadique's topic in Support & Bug Reports
I’m pretty sure that a log at debug level would log warn level problems. -
Please post your code as a GitHub repo.
-
[SOLVED] [1.15.2] Players don't regenerate their full hp
DavidM replied to Skyriis's topic in Modder Support
Post your code. -
Forge won't load zip file mods and crash
DavidM replied to megagigabyte050's topic in Support & Bug Reports
Mods aren’t supposed to be zip files. What mod are you using? -
What version of Minecraft? What version of Forge? What language are you playing in? Please also post your debug.log.
-
[SOLVED] [1.15.2] Nullifying fall damage does not work
DavidM replied to kaydogz's topic in Modder Support
Isn't LivingFallEvent also fired on the server side? -
Clear out BetterFPS then (it is a core mod, so try reporting to its author before reporting to Forge).
-
[SOLVED] [1.15.2] Nullifying fall damage does not work
DavidM replied to kaydogz's topic in Modder Support
if (event.side == LogicalSide.SERVER && DaBoisMod.getCapabilityOf(event.player, FallingFromSkyProvider.FALLING_FROM_SKY_CAPABILITY).isFallingFromSky()) { if (!event.player.onGround) event.player.fallDistance = 0F; else DBMPacketHandler.sendToServer(new SSyncFallingFromSkyPacket(false)); } Assuming that the method names are correct, you are already on the server side in this if statement; however, you are still sending a packet to the server. Also I think there is an entity land event or something, and it might be better to use that for your case. -
Forge With PE and Win10 Editions Running OptiFine
DavidM replied to +=WhatSteve - Forge's topic in Support & Bug Reports
OptiFine would have to add Forge support if they want it to work with Forge. Forge has nothing to do with launcher. It is modifications to the game to provide cross-mod compatibility.