mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-10 21:02:36 +01:00
Set hover in place to true for parrot npcs
This commit is contained in:
parent
5d1a1ad642
commit
fa4ea79606
@ -16,6 +16,7 @@ import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.NMS;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_15_R1.AxisAlignedBB;
|
||||
import net.minecraft.server.v1_15_R1.ControllerMoveFlying;
|
||||
import net.minecraft.server.v1_15_R1.DamageSource;
|
||||
import net.minecraft.server.v1_15_R1.Entity;
|
||||
import net.minecraft.server.v1_15_R1.EntityBoat;
|
||||
@ -53,6 +54,9 @@ public class ParrotController extends MobEntityController {
|
||||
public EntityParrotNPC(EntityTypes<? extends EntityParrot> types, World world, NPC npc) {
|
||||
super(types, world);
|
||||
this.npc = (CitizensNPC) npc;
|
||||
if (npc != null) {
|
||||
this.moveController = new ControllerMoveFlying(this, 10, true);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -16,6 +16,7 @@ import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.NMS;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_16_R3.AxisAlignedBB;
|
||||
import net.minecraft.server.v1_16_R3.ControllerMoveFlying;
|
||||
import net.minecraft.server.v1_16_R3.DamageSource;
|
||||
import net.minecraft.server.v1_16_R3.Entity;
|
||||
import net.minecraft.server.v1_16_R3.EntityBoat;
|
||||
@ -54,6 +55,9 @@ public class ParrotController extends MobEntityController {
|
||||
public EntityParrotNPC(EntityTypes<? extends EntityParrot> types, World world, NPC npc) {
|
||||
super(types, world);
|
||||
this.npc = (CitizensNPC) npc;
|
||||
if (npc != null) {
|
||||
this.moveController = new ControllerMoveFlying(this, 10, true);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -23,6 +23,7 @@ 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.ai.control.FlyingMoveControl;
|
||||
import net.minecraft.world.entity.animal.Parrot;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.entity.vehicle.AbstractMinecart;
|
||||
@ -53,6 +54,9 @@ public class ParrotController extends MobEntityController {
|
||||
public EntityParrotNPC(EntityType<? extends Parrot> types, Level level, NPC npc) {
|
||||
super(types, level);
|
||||
this.npc = (CitizensNPC) npc;
|
||||
if (npc != null) {
|
||||
this.moveControl = new FlyingMoveControl(this, 10, true);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -25,6 +25,7 @@ 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.ai.control.FlyingMoveControl;
|
||||
import net.minecraft.world.entity.animal.Parrot;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.entity.vehicle.AbstractMinecart;
|
||||
@ -55,6 +56,9 @@ public class ParrotController extends MobEntityController {
|
||||
public EntityParrotNPC(EntityType<? extends Parrot> types, Level level, NPC npc) {
|
||||
super(types, level);
|
||||
this.npc = (CitizensNPC) npc;
|
||||
if (npc != null) {
|
||||
this.moveControl = new FlyingMoveControl(this, 10, true);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -25,6 +25,7 @@ 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.ai.control.FlyingMoveControl;
|
||||
import net.minecraft.world.entity.animal.Parrot;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.entity.vehicle.AbstractMinecart;
|
||||
@ -55,6 +56,9 @@ public class ParrotController extends MobEntityController {
|
||||
public EntityParrotNPC(EntityType<? extends Parrot> types, Level level, NPC npc) {
|
||||
super(types, level);
|
||||
this.npc = (CitizensNPC) npc;
|
||||
if (npc != null) {
|
||||
this.moveControl = new FlyingMoveControl(this, 10, true);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -2541,6 +2541,7 @@ public class NMSImpl implements NMSBridge {
|
||||
}
|
||||
|
||||
private static final MethodHandle ATTRIBUTE_PROVIDER_MAP = NMS.getFirstGetter(AttributeSupplier.class, Map.class);
|
||||
|
||||
private static final MethodHandle ATTRIBUTE_PROVIDER_MAP_SETTER = NMS.getFirstFinalSetter(AttributeSupplier.class,
|
||||
Map.class);
|
||||
private static final MethodHandle ATTRIBUTE_SUPPLIER = NMS.getFirstGetter(AttributeMap.class,
|
||||
|
@ -23,6 +23,7 @@ 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.ai.control.FlyingMoveControl;
|
||||
import net.minecraft.world.entity.animal.Parrot;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.entity.vehicle.AbstractMinecart;
|
||||
@ -53,6 +54,9 @@ public class ParrotController extends MobEntityController {
|
||||
public EntityParrotNPC(EntityType<? extends Parrot> types, Level level, NPC npc) {
|
||||
super(types, level);
|
||||
this.npc = (CitizensNPC) npc;
|
||||
if (npc != null) {
|
||||
this.moveControl = new FlyingMoveControl(this, 10, true);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -22,6 +22,7 @@ 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.ai.control.FlyingMoveControl;
|
||||
import net.minecraft.world.entity.animal.Parrot;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.entity.vehicle.AbstractMinecart;
|
||||
@ -53,6 +54,9 @@ public class ParrotController extends MobEntityController {
|
||||
public EntityParrotNPC(EntityType<? extends Parrot> types, Level level, NPC npc) {
|
||||
super(types, level);
|
||||
this.npc = (CitizensNPC) npc;
|
||||
if (npc != null) {
|
||||
this.moveControl = new FlyingMoveControl(this, 10, true);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user