-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
crash with Plenty of golems (1.19.2) #2
Comments
Do you mean that you spawned a golem in jungle and then it crashed? What were the conditions? |
The jungle golem can be picked up and used as a gun, it shoots cocoa bullets but when it collides with an enemy, it crashes. |
What mods do you have installed except for vampire's delight and Plenty of golems? |
pfff, like 600 more mods, and among them, optimization mods, It was fixed with Neruina Mod but annoying messages appear |
Oh, ok, I'll look what may cause the crush, the crash report looks quite weird |
Yes, It must be one of the optimization mods, thanks to one who told me which ones were possibly responsible for the crash, I was able to know that it was this mod that caused it |
It looks like it tries to use vampire bite enchantment on cocoa bullet or something like that. |
yes, I noticed that in the report, but I couldn't figure out why it did it, and I suspect it may happen with more similar entities. |
I will try some things and combinations of mods that I think may be responsible and if I find something I will report it to you. |
Yes. is VampiresDelight, I have isolated the mods and I confirm that it is between the 2 mods |
Solution@TheGridExpert Lines 33 to 43 in 93ac013
to @SubscribeEvent
public static void onVampireBite(LivingHurtEvent event) {
if (event.getSource().getEntity() instanceof Player player) {
ItemStack weapon = player.getMainHandItem();
int enchantmentLevel = EnchantmentHelper.getItemEnchantmentLevel(VDEnchantments.VAMPIRE_BITE.get(), weapon);
Level level = event.getEntity().getCommandSenderWorld();
if (!level.isClientSide) {
healFromDamage(player, enchantmentLevel, event.getAmount());
}
}
} That way your code looks a little more fancy and you do not manually cast the Entity to LivingEntity. AdviceAnd a piece of advice for the future. |
Thank you. I'll change it in the next update |
crash-2023-12-18_03.16.47-server.txt
1.- Used jungle golem
2.- Crash
The text was updated successfully, but these errors were encountered: