@@ -1,15 +1,6 @@
|
||||
--- a/net/minecraft/world/entity/animal/allay/Allay.java
|
||||
+++ b/net/minecraft/world/entity/animal/allay/Allay.java
|
||||
@@ -93,13 +93,14 @@
|
||||
private final DynamicGameEventListener<Allay.a> dynamicJukeboxListener;
|
||||
private final InventorySubcontainer inventory = new InventorySubcontainer(1);
|
||||
@Nullable
|
||||
- private BlockPosition jukeboxPos;
|
||||
- private long duplicationCooldown;
|
||||
+ public BlockPosition jukeboxPos; // PAIL private -> public
|
||||
+ public long duplicationCooldown; // PAIL private -> public
|
||||
private float holdingItemAnimationTicks;
|
||||
private float holdingItemAnimationTicks0;
|
||||
@@ -99,6 +99,7 @@
|
||||
private float dancingAnimationTicks;
|
||||
private float spinningAnimationTicks;
|
||||
private float spinningAnimationTicks0;
|
||||
@@ -17,7 +8,7 @@
|
||||
|
||||
public Allay(EntityTypes<? extends Allay> entitytypes, World world) {
|
||||
super(entitytypes, world);
|
||||
@@ -111,6 +112,12 @@
|
||||
@@ -110,6 +111,12 @@
|
||||
this.dynamicJukeboxListener = new DynamicGameEventListener<>(new Allay.a(this.vibrationUser.getPositionSource(), GameEvent.JUKEBOX_PLAY.getNotificationRadius()));
|
||||
}
|
||||
|
||||
@@ -30,7 +21,7 @@
|
||||
@Override
|
||||
protected BehaviorController.b<Allay> brainProvider() {
|
||||
return BehaviorController.provider(Allay.MEMORY_TYPES, Allay.SENSOR_TYPES);
|
||||
@@ -123,7 +130,7 @@
|
||||
@@ -122,7 +129,7 @@
|
||||
|
||||
@Override
|
||||
public BehaviorController<Allay> getBrain() {
|
||||
@@ -39,7 +30,7 @@
|
||||
}
|
||||
|
||||
public static AttributeProvider.Builder createAttributes() {
|
||||
@@ -230,7 +237,7 @@
|
||||
@@ -229,7 +236,7 @@
|
||||
public void aiStep() {
|
||||
super.aiStep();
|
||||
if (!this.level().isClientSide && this.isAlive() && this.tickCount % 10 == 0) {
|
||||
@@ -48,7 +39,7 @@
|
||||
}
|
||||
|
||||
if (this.isDancing() && this.shouldStopDancing() && this.tickCount % 20 == 0) {
|
||||
@@ -300,7 +307,12 @@
|
||||
@@ -299,7 +306,12 @@
|
||||
ItemStack itemstack1 = this.getItemInHand(EnumHand.MAIN_HAND);
|
||||
|
||||
if (this.isDancing() && this.isDuplicationItem(itemstack) && this.canDuplicate()) {
|
||||
@@ -62,7 +53,7 @@
|
||||
this.level().broadcastEntityEvent(this, (byte) 18);
|
||||
this.level().playSound(entityhuman, (Entity) this, SoundEffects.AMETHYST_BLOCK_CHIME, SoundCategory.NEUTRAL, 2.0F, 1.0F);
|
||||
this.removeInteractionItem(entityhuman, itemstack);
|
||||
@@ -311,7 +323,7 @@
|
||||
@@ -310,7 +322,7 @@
|
||||
this.setItemInHand(EnumHand.MAIN_HAND, itemstack2);
|
||||
this.removeInteractionItem(entityhuman, itemstack);
|
||||
this.level().playSound(entityhuman, (Entity) this, SoundEffects.ALLAY_ITEM_GIVEN, SoundCategory.NEUTRAL, 2.0F, 1.0F);
|
||||
@@ -71,7 +62,7 @@
|
||||
return EnumInteractionResult.SUCCESS;
|
||||
} else if (!itemstack1.isEmpty() && enumhand == EnumHand.MAIN_HAND && itemstack.isEmpty()) {
|
||||
this.setItemSlot(EnumItemSlot.MAINHAND, ItemStack.EMPTY);
|
||||
@@ -432,6 +444,7 @@
|
||||
@@ -427,6 +439,7 @@
|
||||
}
|
||||
|
||||
private boolean shouldStopDancing() {
|
||||
@@ -79,7 +70,7 @@
|
||||
return this.jukeboxPos == null || !this.jukeboxPos.closerToCenterThan(this.position(), (double) GameEvent.JUKEBOX_PLAY.getNotificationRadius()) || !this.level().getBlockState(this.jukeboxPos).is(Blocks.JUKEBOX);
|
||||
}
|
||||
|
||||
@@ -476,7 +489,7 @@
|
||||
@@ -471,7 +484,7 @@
|
||||
public void addAdditionalSaveData(NBTTagCompound nbttagcompound) {
|
||||
super.addAdditionalSaveData(nbttagcompound);
|
||||
this.writeInventoryToTag(nbttagcompound);
|
||||
@@ -88,7 +79,7 @@
|
||||
Logger logger = Allay.LOGGER;
|
||||
|
||||
Objects.requireNonNull(logger);
|
||||
@@ -492,7 +505,7 @@
|
||||
@@ -487,7 +500,7 @@
|
||||
super.readAdditionalSaveData(nbttagcompound);
|
||||
this.readInventoryFromTag(nbttagcompound);
|
||||
if (nbttagcompound.contains("listener", 10)) {
|
||||
@@ -97,16 +88,16 @@
|
||||
Logger logger = Allay.LOGGER;
|
||||
|
||||
Objects.requireNonNull(logger);
|
||||
@@ -525,7 +538,7 @@
|
||||
@@ -520,7 +533,7 @@
|
||||
return Allay.DUPLICATION_ITEM.test(itemstack);
|
||||
}
|
||||
|
||||
- private void duplicateAllay() {
|
||||
+ public Allay duplicateAllay() { // CraftBukkit - return allay and private -> public
|
||||
- public void duplicateAllay() {
|
||||
+ public Allay duplicateAllay() { // CraftBukkit - return allay
|
||||
Allay allay = (Allay) EntityTypes.ALLAY.create(this.level());
|
||||
|
||||
if (allay != null) {
|
||||
@@ -533,17 +546,17 @@
|
||||
@@ -528,9 +541,9 @@
|
||||
allay.setPersistenceRequired();
|
||||
allay.resetDuplicationCooldown();
|
||||
this.resetDuplicationCooldown();
|
||||
@@ -117,14 +108,4 @@
|
||||
+ return allay; // CraftBukkit
|
||||
}
|
||||
|
||||
- private void resetDuplicationCooldown() {
|
||||
+ public void resetDuplicationCooldown() { // PAIL private -> public
|
||||
this.duplicationCooldown = 6000L;
|
||||
this.entityData.set(Allay.DATA_CAN_DUPLICATE, false);
|
||||
}
|
||||
|
||||
- private boolean canDuplicate() {
|
||||
+ public boolean canDuplicate() { // PAIL private -> public
|
||||
return (Boolean) this.entityData.get(Allay.DATA_CAN_DUPLICATE);
|
||||
}
|
||||
|
||||
public void resetDuplicationCooldown() {
|
||||
|
||||
Reference in New Issue
Block a user