修复了无法选择的问题
This commit is contained in:
parent
c7a1218562
commit
1e7ff74eb6
1 changed files with 6 additions and 19 deletions
|
@ -5,7 +5,6 @@ import net.mcreator.superbwarfare.entity.projectile.MortarShellEntity;
|
|||
import net.mcreator.superbwarfare.init.ModEntities;
|
||||
import net.mcreator.superbwarfare.init.ModItems;
|
||||
import net.mcreator.superbwarfare.init.ModSounds;
|
||||
import net.minecraft.core.NonNullList;
|
||||
import net.minecraft.core.particles.ParticleTypes;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.network.chat.Component;
|
||||
|
@ -63,6 +62,10 @@ public class MortarEntity extends Entity implements GeoEntity, AnimatedEntity {
|
|||
this.entityData.define(PITCH, 70f);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isPickable() {
|
||||
return !this.isRemoved();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected float getEyeHeight(Pose pPose, EntityDimensions pSize) {
|
||||
|
@ -74,16 +77,6 @@ public class MortarEntity extends Entity implements GeoEntity, AnimatedEntity {
|
|||
return NetworkHooks.getEntitySpawningPacket(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterable<ItemStack> getArmorSlots() {
|
||||
return NonNullList.withSize(1, ItemStack.EMPTY);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void setItemSlot(EquipmentSlot pSlot, ItemStack pStack) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hurt(DamageSource source, float amount) {
|
||||
if (source.is(DamageTypes.IN_FIRE))
|
||||
|
@ -127,7 +120,6 @@ public class MortarEntity extends Entity implements GeoEntity, AnimatedEntity {
|
|||
|
||||
@Override
|
||||
public InteractionResult interactAt(Player player, Vec3 pVec, InteractionHand pHand) {
|
||||
|
||||
player.displayClientMessage(Component.literal("114"), true);
|
||||
if (!this.level().isClientSide) {
|
||||
ItemStack mainHandItem = player.getMainHandItem();
|
||||
|
@ -244,11 +236,6 @@ public class MortarEntity extends Entity implements GeoEntity, AnimatedEntity {
|
|||
this.refreshDimensions();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isPushable() {
|
||||
return false;
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public HumanoidArm getMainArm() {
|
||||
// return HumanoidArm.RIGHT;
|
||||
|
|
Loading…
Add table
Reference in a new issue