修复爆炸不破坏方块bug

This commit is contained in:
Atsuihsio 2025-01-11 00:01:19 +08:00
parent ae634c5cb7
commit 00eeafb543
2 changed files with 1 additions and 9 deletions

View file

@ -13,5 +13,5 @@ mod_description=A Warfare Mod
minecraft_version=1.20.1 minecraft_version=1.20.1
jei_version=15.2.0.27 jei_version=15.2.0.27
cloth_config_version=11.1.106 cloth_config_version=11.1.106
mod_version=0.3.6 mod_version=0.3.7
mod_authors=Atsuishio, Roki27, Light_Quanta mod_authors=Atsuishio, Roki27, Light_Quanta

View file

@ -44,7 +44,6 @@ import net.minecraft.world.item.ItemStack;
import net.minecraft.world.level.GameRules; import net.minecraft.world.level.GameRules;
import net.minecraft.world.level.block.entity.HopperBlockEntity; import net.minecraft.world.level.block.entity.HopperBlockEntity;
import net.minecraftforge.event.entity.living.*; import net.minecraftforge.event.entity.living.*;
import net.minecraftforge.event.level.ExplosionEvent;
import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.network.PacketDistributor; import net.minecraftforge.network.PacketDistributor;
@ -55,13 +54,6 @@ import java.util.Objects;
@Mod.EventBusSubscriber @Mod.EventBusSubscriber
public class LivingEventHandler { public class LivingEventHandler {
@SubscribeEvent
public static void onExplode(ExplosionEvent.Detonate event) {
event.getExplosion().clearToBlow();
}
@SubscribeEvent @SubscribeEvent
public static void onEntityAttacked(LivingAttackEvent event) { public static void onEntityAttacked(LivingAttackEvent event) {
if (event.getEntity().getVehicle() != null && event.getEntity().getVehicle() instanceof ICannonEntity) { if (event.getEntity().getVehicle() != null && event.getEntity().getVehicle() instanceof ICannonEntity) {