feat: armadilloImmediateDespawns

This commit is contained in:
zly2006 committed 2024-07-17 06:16:16 +08:00
1 parent c7ffec6782
commit 75594d970e
8 files changed
+37 -18

No files matched your search

@@ -0,0 +1,20 @@
package com.github.zly2006.carpetslsaddition.mixin.entity;
import com.github.zly2006.carpetslsaddition.SLSCarpetSettings;
import net.minecraft.entity.EntityType;
import net.minecraft.entity.passive.AnimalEntity;
import net.minecraft.entity.passive.ArmadilloEntity;
import net.minecraft.world.World;
import org.spongepowered.asm.mixin.Mixin;
@Mixin(ArmadilloEntity.class)
public abstract class MixinArmadilloEntity extends AnimalEntity {
protected MixinArmadilloEntity(EntityType<? extends AnimalEntity> entityType, World world) {
super(entityType, world);
}
@Override
public boolean canImmediatelyDespawn(double distanceSquared) {
return SLSCarpetSettings.armadilloImmediateDespawns;
}
}