mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2025-02-01 13:01:34 +01:00
Fix creaking spawning
This commit is contained in:
parent
a96d800c91
commit
ff00cf1111
@ -20,17 +20,12 @@ import net.minecraft.server.level.ServerLevel;
|
||||
import net.minecraft.server.level.ServerPlayer;
|
||||
import net.minecraft.sounds.SoundEvent;
|
||||
import net.minecraft.tags.TagKey;
|
||||
import net.minecraft.world.InteractionHand;
|
||||
import net.minecraft.world.InteractionResult;
|
||||
import net.minecraft.world.damagesource.DamageSource;
|
||||
import net.minecraft.world.entity.Entity;
|
||||
import net.minecraft.world.entity.EntityType;
|
||||
import net.minecraft.world.entity.monster.creaking.Creaking;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.entity.vehicle.AbstractMinecart;
|
||||
import net.minecraft.world.entity.vehicle.Boat;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.item.Items;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.material.Fluid;
|
||||
@ -106,9 +101,6 @@ public class CreakingController extends MobEntityController {
|
||||
if (npc != null) {
|
||||
NMSImpl.updateMinecraftAIState(npc, this);
|
||||
npc.update();
|
||||
if (npc.isProtected()) {
|
||||
NMSImpl.setScuteTime(this, 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -177,16 +169,6 @@ public class CreakingController extends MobEntityController {
|
||||
return NMSBoundingBox.makeBB(npc, super.makeBoundingBox(vec3));
|
||||
}
|
||||
|
||||
@Override
|
||||
public InteractionResult mobInteract(Player entityhuman, InteractionHand enumhand) {
|
||||
if (npc == null || !npc.isProtected())
|
||||
return super.mobInteract(entityhuman, enumhand);
|
||||
ItemStack itemstack = entityhuman.getItemInHand(enumhand);
|
||||
if (itemstack.getItem() == Items.BRUSH)
|
||||
return InteractionResult.FAIL;
|
||||
return super.mobInteract(entityhuman, enumhand);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onClimbable() {
|
||||
if (npc == null || !npc.isFlyable())
|
||||
|
Loading…
Reference in New Issue
Block a user