Rebuild patches to fix decompilation of certain nested loops
This commit is contained in:
parent
1ffaef14e3
commit
63df70ec06
@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/server/bossevents/BossBattleCustom.java
|
||||
+++ b/net/minecraft/server/bossevents/BossBattleCustom.java
|
||||
@@ -19,6 +19,11 @@
|
||||
@@ -18,6 +18,11 @@
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.BossBattle;
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
public class BossBattleCustom extends BossBattleServer {
|
||||
|
||||
private static final int DEFAULT_MAX = 100;
|
||||
@@ -26,6 +31,16 @@
|
||||
@@ -25,6 +30,16 @@
|
||||
private final Set<UUID> players = Sets.newHashSet();
|
||||
private int value;
|
||||
private int max = 100;
|
||||
@ -29,7 +29,7 @@
|
||||
|
||||
public BossBattleCustom(MinecraftKey minecraftkey, IChatBaseComponent ichatbasecomponent) {
|
||||
super(ichatbasecomponent, BossBattle.BarColor.WHITE, BossBattle.BarStyle.PROGRESS);
|
||||
@@ -168,7 +183,7 @@
|
||||
@@ -145,7 +160,7 @@
|
||||
bossbattlecustom.setDarkenScreen(bossbattlecustom_a.darkenScreen);
|
||||
bossbattlecustom.setPlayBossMusic(bossbattlecustom_a.playBossMusic);
|
||||
bossbattlecustom.setCreateWorldFog(bossbattlecustom_a.createWorldFog);
|
||||
|
@ -424,15 +424,10 @@
|
||||
double d11 = d7;
|
||||
|
||||
d6 = d0 - this.player.getX();
|
||||
@@ -1175,10 +1404,76 @@
|
||||
@@ -1175,6 +1404,72 @@
|
||||
}
|
||||
|
||||
if (!this.player.noPhysics && !this.player.isSleeping() && (flag3 && worldserver.noCollision(this.player, axisalignedbb) || this.isPlayerCollidingWithAnythingNew(worldserver, axisalignedbb, d0, d1, d2))) {
|
||||
- this.teleport(d3, d4, d5, f, f1);
|
||||
+ this.internalTeleport(d3, d4, d5, f, f1); // CraftBukkit - SPIGOT-1807: Don't call teleport event, when the client thinks the player is falling, because the chunks are not loaded on the client yet.
|
||||
this.player.doCheckFallDamage(this.player.getX() - d3, this.player.getY() - d4, this.player.getZ() - d5, packetplayinflying.isOnGround());
|
||||
this.player.removeLatestMovementRecordingBatch();
|
||||
} else {
|
||||
if (this.player.noPhysics || this.player.isSleeping() || (!flag3 || !worldserver.noCollision(this.player, axisalignedbb)) && !this.isPlayerCollidingWithAnythingNew(worldserver, axisalignedbb, d0, d1, d2)) {
|
||||
+ // CraftBukkit start - fire PlayerMoveEvent
|
||||
+ // Reset to old location first
|
||||
+ this.player.absSnapTo(prevX, prevY, prevZ, prevYaw, prevPitch);
|
||||
@ -502,6 +497,15 @@
|
||||
this.player.absSnapTo(d0, d1, d2, f, f1);
|
||||
boolean flag4 = this.player.isAutoSpinAttack();
|
||||
|
||||
@@ -1198,7 +1493,7 @@
|
||||
this.lastGoodY = this.player.getY();
|
||||
this.lastGoodZ = this.player.getZ();
|
||||
} else {
|
||||
- this.teleport(d3, d4, d5, f, f1);
|
||||
+ this.internalTeleport(d3, d4, d5, f, f1); // CraftBukkit - SPIGOT-1807: Don't call teleport event, when the client thinks the player is falling, because the chunks are not loaded on the client yet.
|
||||
this.player.doCheckFallDamage(this.player.getX() - d3, this.player.getY() - d4, this.player.getZ() - d5, packetplayinflying.isOnGround());
|
||||
this.player.removeLatestMovementRecordingBatch();
|
||||
}
|
||||
@@ -1228,6 +1523,7 @@
|
||||
this.awaitingTeleportTime = this.tickCount;
|
||||
this.teleport(this.awaitingPositionFromClient.x, this.awaitingPositionFromClient.y, this.awaitingPositionFromClient.z, this.player.getYRot(), this.player.getXRot());
|
||||
@ -1236,7 +1240,7 @@
|
||||
- if (!(entity instanceof EntityItem) && !(entity instanceof EntityExperienceOrb) && entity != PlayerConnection.this.player) {
|
||||
+ // CraftBukkit
|
||||
+ if (!(entity instanceof EntityItem) && !(entity instanceof EntityExperienceOrb) && (entity != PlayerConnection.this.player || player.isSpectator())) {
|
||||
label23:
|
||||
label29:
|
||||
{
|
||||
if (entity instanceof EntityArrow) {
|
||||
@@ -1875,6 +2610,11 @@
|
||||
|
@ -647,10 +647,10 @@
|
||||
return false;
|
||||
} else {
|
||||
for (Entity entity1 = entity; entity1.vehicle != null; entity1 = entity1.vehicle) {
|
||||
@@ -2243,6 +2590,27 @@
|
||||
if (!flag && (!this.canRide(entity) || !entity.canAddPassenger(this))) {
|
||||
return false;
|
||||
} else {
|
||||
@@ -2241,6 +2588,27 @@
|
||||
}
|
||||
|
||||
if (flag || this.canRide(entity) && entity.canAddPassenger(this)) {
|
||||
+ // CraftBukkit start
|
||||
+ if (entity.getBukkitEntity() instanceof Vehicle && this.getBukkitEntity() instanceof LivingEntity) {
|
||||
+ VehicleEnterEvent event = new VehicleEnterEvent((Vehicle) entity.getBukkitEntity(), this.getBukkitEntity());
|
||||
|
@ -1107,7 +1107,7 @@
|
||||
Map<EnumItemSlot, ItemStack> map = this.collectEquipmentChanges();
|
||||
|
||||
if (map != null) {
|
||||
@@ -3005,6 +3560,7 @@
|
||||
@@ -3009,6 +3564,7 @@
|
||||
this.checkSlowFallDistance();
|
||||
if (!this.level().isClientSide) {
|
||||
if (!this.canGlide()) {
|
||||
@ -1115,7 +1115,7 @@
|
||||
this.setSharedFlag(7, false);
|
||||
return;
|
||||
}
|
||||
@@ -3192,14 +3748,21 @@
|
||||
@@ -3196,14 +3752,21 @@
|
||||
|
||||
@Override
|
||||
public boolean isPickable() {
|
||||
@ -1139,7 +1139,7 @@
|
||||
@Override
|
||||
public float getYHeadRot() {
|
||||
return this.yHeadRot;
|
||||
@@ -3404,7 +3967,30 @@
|
||||
@@ -3408,7 +3971,30 @@
|
||||
this.releaseUsingItem();
|
||||
} else {
|
||||
if (!this.useItem.isEmpty() && this.isUsingItem()) {
|
||||
@ -1171,7 +1171,7 @@
|
||||
|
||||
if (itemstack != this.useItem) {
|
||||
this.setItemInHand(enumhand, itemstack);
|
||||
@@ -3500,6 +4086,12 @@
|
||||
@@ -3504,6 +4090,12 @@
|
||||
}
|
||||
|
||||
public boolean randomTeleport(double d0, double d1, double d2, boolean flag) {
|
||||
@ -1184,7 +1184,7 @@
|
||||
double d3 = this.getX();
|
||||
double d4 = this.getY();
|
||||
double d5 = this.getZ();
|
||||
@@ -3524,16 +4116,41 @@
|
||||
@@ -3528,16 +4120,41 @@
|
||||
}
|
||||
|
||||
if (flag2) {
|
||||
@ -1229,7 +1229,7 @@
|
||||
} else {
|
||||
if (flag) {
|
||||
world.broadcastEntityEvent(this, (byte) 46);
|
||||
@@ -3545,7 +4162,7 @@
|
||||
@@ -3549,7 +4166,7 @@
|
||||
entitycreature.getNavigation().stop();
|
||||
}
|
||||
|
||||
@ -1238,7 +1238,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3638,7 +4255,7 @@
|
||||
@@ -3642,7 +4259,7 @@
|
||||
}
|
||||
|
||||
public void stopSleeping() {
|
||||
@ -1247,7 +1247,7 @@
|
||||
World world = this.level();
|
||||
|
||||
java.util.Objects.requireNonNull(world);
|
||||
@@ -3672,7 +4289,7 @@
|
||||
@@ -3676,7 +4293,7 @@
|
||||
|
||||
@Nullable
|
||||
public EnumDirection getBedOrientation() {
|
||||
|
@ -93,7 +93,7 @@
|
||||
if (t0 instanceof EntityInsentient) {
|
||||
EntityInsentient entityinsentient = (EntityInsentient) t0;
|
||||
|
||||
@@ -668,7 +695,7 @@
|
||||
@@ -665,7 +692,7 @@
|
||||
}
|
||||
|
||||
return entity;
|
||||
@ -102,7 +102,7 @@
|
||||
}
|
||||
|
||||
public static Stream<Entity> loadEntitiesRecursive(List<? extends NBTBase> list, World world, EntitySpawnReason entityspawnreason) {
|
||||
@@ -786,7 +813,7 @@
|
||||
@@ -783,7 +810,7 @@
|
||||
this.canSpawnFarFromPlayer = enumcreaturetype == EnumCreatureType.CREATURE || enumcreaturetype == EnumCreatureType.MISC;
|
||||
}
|
||||
|
||||
|
@ -28,7 +28,7 @@
|
||||
this.chooseRamPosition(entitycreature, entityliving);
|
||||
});
|
||||
}
|
||||
@@ -148,7 +162,7 @@
|
||||
@@ -142,7 +156,7 @@
|
||||
}
|
||||
|
||||
NavigationAbstract navigationabstract = entitycreature.getNavigation();
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/entity/ai/goal/target/PathfinderGoalHurtByTarget.java
|
||||
+++ b/net/minecraft/world/entity/ai/goal/target/PathfinderGoalHurtByTarget.java
|
||||
@@ -60,7 +60,7 @@
|
||||
@@ -62,7 +62,7 @@
|
||||
|
||||
@Override
|
||||
public void start() {
|
||||
@ -9,7 +9,16 @@
|
||||
this.targetMob = this.mob.getTarget();
|
||||
this.timestamp = this.mob.getLastHurtByMobTimestamp();
|
||||
this.unseenMemoryTicks = 300;
|
||||
@@ -99,6 +99,6 @@
|
||||
@@ -76,7 +76,7 @@
|
||||
protected void alertOthers() {
|
||||
double d0 = this.getFollowDistance();
|
||||
AxisAlignedBB axisalignedbb = AxisAlignedBB.unitCubeFromLowerCorner(this.mob.position()).inflate(d0, 10.0D, d0);
|
||||
- List<? extends EntityInsentient> list = this.mob.level().<EntityInsentient>getEntitiesOfClass(this.mob.getClass(), axisalignedbb, IEntitySelector.NO_SPECTATORS);
|
||||
+ List<? extends EntityInsentient> list = this.mob.level().getEntitiesOfClass(this.mob.getClass(), axisalignedbb, IEntitySelector.NO_SPECTATORS); // CraftBukkit - decompile error
|
||||
Iterator iterator = list.iterator();
|
||||
|
||||
while (true) {
|
||||
@@ -113,6 +113,6 @@
|
||||
}
|
||||
|
||||
protected void alertOther(EntityInsentient entityinsentient, EntityLiving entityliving) {
|
||||
|
@ -93,7 +93,7 @@
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1268,6 +1285,11 @@
|
||||
@@ -1272,6 +1289,11 @@
|
||||
int i = (Integer) iblockdata.getValue(BlockSweetBerryBush.AGE);
|
||||
|
||||
iblockdata.setValue(BlockSweetBerryBush.AGE, 1);
|
||||
|
@ -30,7 +30,7 @@
|
||||
}
|
||||
|
||||
}
|
||||
@@ -964,10 +970,10 @@
|
||||
@@ -965,10 +971,10 @@
|
||||
private final EntityPanda panda;
|
||||
|
||||
public c(EntityPanda entitypanda, Class<T> oclass, float f, double d0, double d1) {
|
||||
@ -44,7 +44,7 @@
|
||||
this.panda = entitypanda;
|
||||
}
|
||||
|
||||
@@ -1088,7 +1094,7 @@
|
||||
@@ -1089,7 +1095,7 @@
|
||||
@Override
|
||||
protected void alertOther(EntityInsentient entityinsentient, EntityLiving entityliving) {
|
||||
if (entityinsentient instanceof EntityPanda && entityinsentient.isAggressive()) {
|
||||
|
@ -71,17 +71,7 @@
|
||||
return EnumInteractionResult.SUCCESS;
|
||||
} else {
|
||||
if (item instanceof ItemDye) {
|
||||
@@ -474,7 +493,9 @@
|
||||
if (world instanceof WorldServer) {
|
||||
WorldServer worldserver = (WorldServer) world;
|
||||
|
||||
+ this.forceDrops = true; // CraftBukkit
|
||||
this.spawnAtLocation(worldserver, itemstack1);
|
||||
+ this.forceDrops = false; // CraftBukkit
|
||||
}
|
||||
|
||||
return EnumInteractionResult.SUCCESS;
|
||||
@@ -493,7 +514,7 @@
|
||||
@@ -479,7 +498,7 @@
|
||||
this.setOrderedToSit(!this.isOrderedToSit());
|
||||
this.jumping = false;
|
||||
this.navigation.stop();
|
||||
@ -90,7 +80,17 @@
|
||||
return EnumInteractionResult.SUCCESS.withoutItem();
|
||||
} else {
|
||||
return enuminteractionresult;
|
||||
@@ -510,7 +531,8 @@
|
||||
@@ -496,7 +515,9 @@
|
||||
if (world instanceof WorldServer) {
|
||||
WorldServer worldserver = (WorldServer) world;
|
||||
|
||||
+ this.forceDrops = true; // CraftBukkit
|
||||
this.spawnAtLocation(worldserver, itemstack2);
|
||||
+ this.forceDrops = false; // CraftBukkit
|
||||
}
|
||||
|
||||
return EnumInteractionResult.SUCCESS;
|
||||
@@ -512,7 +533,8 @@
|
||||
}
|
||||
|
||||
private void tryToTame(EntityHuman entityhuman) {
|
||||
|
@ -209,7 +209,7 @@
|
||||
this.gameEvent(GameEvent.ENTITY_DIE);
|
||||
}
|
||||
}
|
||||
@@ -788,6 +883,7 @@
|
||||
@@ -774,6 +869,7 @@
|
||||
super.addAdditionalSaveData(nbttagcompound);
|
||||
nbttagcompound.putInt("DragonPhase", this.phaseManager.getCurrentPhase().getPhase().getId());
|
||||
nbttagcompound.putInt("DragonDeathTime", this.dragonDeathTime);
|
||||
@ -217,7 +217,7 @@
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -797,6 +893,7 @@
|
||||
@@ -783,6 +879,7 @@
|
||||
this.phaseManager.setPhase(DragonControllerPhase.getById(integer));
|
||||
});
|
||||
this.dragonDeathTime = nbttagcompound.getIntOr("DragonDeathTime", 0);
|
||||
|
@ -18,16 +18,7 @@
|
||||
|
||||
protected EntityFireball(EntityTypes<? extends EntityFireball> entitytypes, World world) {
|
||||
super(entitytypes, world);
|
||||
@@ -69,7 +75,7 @@
|
||||
|
||||
this.applyInertia();
|
||||
if (!this.level().isClientSide && (entity != null && entity.isRemoved() || !this.level().hasChunkAt(this.blockPosition()))) {
|
||||
- this.discard();
|
||||
+ this.discard(EntityRemoveEvent.Cause.DESPAWN); // CraftBukkit - add Bukkit remove cause
|
||||
} else {
|
||||
MovingObjectPosition movingobjectposition = ProjectileHelper.getHitResultOnMoveVector(this, this::canHitEntity, this.getClipType());
|
||||
Vec3D vec3d;
|
||||
@@ -89,7 +95,7 @@
|
||||
@@ -87,12 +93,12 @@
|
||||
}
|
||||
|
||||
if (movingobjectposition.getType() != MovingObjectPosition.EnumMovingObjectType.MISS && this.isAlive()) {
|
||||
@ -36,3 +27,9 @@
|
||||
}
|
||||
|
||||
this.createParticleTrail();
|
||||
} else {
|
||||
- this.discard();
|
||||
+ this.discard(EntityRemoveEvent.Cause.DESPAWN); // CraftBukkit - add Bukkit remove cause
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -38,7 +38,7 @@
|
||||
this.stop();
|
||||
return;
|
||||
}
|
||||
@@ -368,6 +378,7 @@
|
||||
@@ -370,6 +380,7 @@
|
||||
}
|
||||
|
||||
if (j > 5) {
|
||||
@ -46,7 +46,7 @@
|
||||
this.stop();
|
||||
break;
|
||||
}
|
||||
@@ -379,6 +390,7 @@
|
||||
@@ -381,6 +392,7 @@
|
||||
} else {
|
||||
this.status = Raid.Status.VICTORY;
|
||||
|
||||
@ -54,7 +54,7 @@
|
||||
for (UUID uuid : this.heroesOfTheVillage) {
|
||||
Entity entity = worldserver.getEntity(uuid);
|
||||
|
||||
@@ -392,10 +404,12 @@
|
||||
@@ -394,10 +406,12 @@
|
||||
|
||||
entityplayer.awardStat(StatisticList.RAID_WIN);
|
||||
CriterionTriggers.RAID_WIN.trigger(entityplayer);
|
||||
@ -67,7 +67,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -403,6 +417,7 @@
|
||||
@@ -405,6 +419,7 @@
|
||||
} else if (this.isOver()) {
|
||||
++this.celebrationTicks;
|
||||
if (this.celebrationTicks >= 600) {
|
||||
@ -75,7 +75,7 @@
|
||||
this.stop();
|
||||
return;
|
||||
}
|
||||
@@ -524,6 +539,10 @@
|
||||
@@ -526,6 +541,10 @@
|
||||
DifficultyDamageScaler difficultydamagescaler = worldserver.getCurrentDifficultyAt(blockposition);
|
||||
boolean flag1 = this.shouldSpawnBonusGroup();
|
||||
|
||||
@ -86,7 +86,7 @@
|
||||
for (Raid.Wave raid_wave : Raid.Wave.VALUES) {
|
||||
int j = this.getDefaultNumSpawns(raid_wave, i, flag1) + this.getPotentialBonusSpawns(raid_wave, this.random, i, difficultydamagescaler, flag1);
|
||||
int k = 0;
|
||||
@@ -538,9 +557,11 @@
|
||||
@@ -541,9 +560,11 @@
|
||||
entityraider.setPatrolLeader(true);
|
||||
this.setLeader(i, entityraider);
|
||||
flag = true;
|
||||
@ -98,23 +98,15 @@
|
||||
if (raid_wave.entityType == EntityTypes.RAVAGER) {
|
||||
EntityRaider entityraider1 = null;
|
||||
|
||||
@@ -559,6 +580,7 @@
|
||||
@@ -562,6 +583,7 @@
|
||||
this.joinRaid(worldserver, i, entityraider1, blockposition, false);
|
||||
entityraider1.snapTo(blockposition, 0.0F, 0.0F);
|
||||
entityraider1.startRiding(entityraider);
|
||||
+ raiders.add(entityraider); // CraftBukkit
|
||||
}
|
||||
}
|
||||
|
||||
@@ -566,6 +588,7 @@
|
||||
continue;
|
||||
}
|
||||
}
|
||||
+ break; // CraftBukkit - decompile error
|
||||
}
|
||||
}
|
||||
|
||||
@@ -573,6 +596,7 @@
|
||||
@@ -571,6 +593,7 @@
|
||||
++this.groupsSpawned;
|
||||
this.updateBossbar();
|
||||
this.setDirty(worldserver);
|
||||
@ -122,7 +114,7 @@
|
||||
}
|
||||
|
||||
public void joinRaid(WorldServer worldserver, int i, EntityRaider entityraider, @Nullable BlockPosition blockposition, boolean flag) {
|
||||
@@ -588,7 +612,7 @@
|
||||
@@ -586,7 +609,7 @@
|
||||
entityraider.finalizeSpawn(worldserver, worldserver.getCurrentDifficultyAt(blockposition), EntitySpawnReason.EVENT, (GroupDataEntity) null);
|
||||
entityraider.applyRaidBuffs(worldserver, i, false);
|
||||
entityraider.setOnGround(true);
|
||||
@ -131,7 +123,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -811,6 +835,12 @@
|
||||
@@ -809,6 +832,12 @@
|
||||
this.heroesOfTheVillage.add(entity.getUUID());
|
||||
}
|
||||
|
||||
|
@ -91,15 +91,7 @@
|
||||
this.applyEffectsFromBlocks();
|
||||
this.applyEffectsFromBlocks();
|
||||
this.tickBubbleColumn();
|
||||
@@ -444,6 +497,7 @@
|
||||
} else if (f < 1.0F) {
|
||||
return (float) blockposition_mutableblockposition.getY() + f;
|
||||
}
|
||||
+ break; // CraftBukkit - decompile error
|
||||
}
|
||||
}
|
||||
|
||||
@@ -733,11 +787,18 @@
|
||||
@@ -729,11 +782,18 @@
|
||||
|
||||
@Override
|
||||
public void remove(Entity.RemovalReason entity_removalreason) {
|
||||
|
@ -12,7 +12,7 @@
|
||||
public class NewMinecartBehavior extends MinecartBehavior {
|
||||
|
||||
public static final int POS_ROT_LERP_TICKS = 3;
|
||||
@@ -513,6 +518,12 @@
|
||||
@@ -515,6 +520,12 @@
|
||||
|
||||
@Override
|
||||
public double getMaxSpeed(WorldServer worldserver) {
|
||||
@ -25,7 +25,7 @@
|
||||
return (double) worldserver.getGameRules().getInt(GameRules.RULE_MINECART_MAX_SPEED) * (this.minecart.isInWater() ? 0.5D : 1.0D) / 20.0D;
|
||||
}
|
||||
|
||||
@@ -541,7 +552,7 @@
|
||||
@@ -543,7 +554,7 @@
|
||||
|
||||
@Override
|
||||
public double getSlowdownFactor() {
|
||||
@ -34,7 +34,7 @@
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -564,6 +575,14 @@
|
||||
@@ -566,6 +577,14 @@
|
||||
if (!list.isEmpty()) {
|
||||
for (Entity entity : list) {
|
||||
if (!(entity instanceof EntityHuman) && !(entity instanceof EntityIronGolem) && !(entity instanceof EntityMinecartAbstract) && !this.minecart.isVehicle() && !entity.isPassenger()) {
|
||||
@ -49,7 +49,7 @@
|
||||
boolean flag = entity.startRiding(this.minecart);
|
||||
|
||||
if (flag) {
|
||||
@@ -586,6 +605,16 @@
|
||||
@@ -588,6 +607,16 @@
|
||||
if (!list.isEmpty()) {
|
||||
for (Entity entity : list) {
|
||||
if (entity instanceof EntityHuman || entity instanceof EntityIronGolem || entity instanceof EntityMinecartAbstract || this.minecart.isVehicle() || entity.isPassenger()) {
|
||||
@ -66,7 +66,7 @@
|
||||
entity.push((Entity) this.minecart);
|
||||
flag = true;
|
||||
}
|
||||
@@ -594,6 +623,14 @@
|
||||
@@ -596,6 +625,14 @@
|
||||
} else {
|
||||
for (Entity entity1 : this.level().getEntities(this.minecart, axisalignedbb)) {
|
||||
if (!this.minecart.hasPassenger(entity1) && entity1.isPushable() && entity1 instanceof EntityMinecartAbstract) {
|
||||
|
@ -106,7 +106,7 @@
|
||||
this.broadcastChanges();
|
||||
});
|
||||
} else {
|
||||
@@ -157,17 +219,46 @@
|
||||
@@ -159,17 +221,46 @@
|
||||
ItemStack itemstack2 = itemstack;
|
||||
List<WeightedRandomEnchant> list = this.getEnchantmentList(world.registryAccess(), itemstack, i, this.costs[i]);
|
||||
|
||||
|
@ -30,11 +30,3 @@
|
||||
world.levelEvent(1505, blockposition1, 15);
|
||||
}
|
||||
|
||||
@@ -139,6 +145,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
+ break; // CraftBukkit - decompile error for the while(true)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -9,15 +9,7 @@
|
||||
public class BlockTripwire extends Block {
|
||||
|
||||
public static final MapCodec<BlockTripwire> CODEC = RecordCodecBuilder.mapCodec((instance) -> {
|
||||
@@ -121,6 +123,7 @@
|
||||
continue;
|
||||
}
|
||||
}
|
||||
+ break; // CraftBukkit - decompile error
|
||||
}
|
||||
}
|
||||
|
||||
@@ -168,6 +171,40 @@
|
||||
@@ -166,6 +168,40 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -63,7 +63,7 @@
|
||||
private boolean isLit() {
|
||||
return this.litTimeRemaining > 0;
|
||||
}
|
||||
@@ -168,7 +213,7 @@
|
||||
@@ -164,7 +209,7 @@
|
||||
RecipeHolder<? extends RecipeCooking> recipeholder;
|
||||
|
||||
if (flag2) {
|
||||
@ -72,7 +72,7 @@
|
||||
} else {
|
||||
recipeholder = null;
|
||||
}
|
||||
@@ -176,9 +221,20 @@
|
||||
@@ -172,9 +217,20 @@
|
||||
int i = tileentityfurnace.getMaxStackSize();
|
||||
|
||||
if (!tileentityfurnace.isLit() && canBurn(worldserver.registryAccess(), recipeholder, singlerecipeinput, tileentityfurnace.items, i)) {
|
||||
@ -95,7 +95,7 @@
|
||||
flag1 = true;
|
||||
if (flag3) {
|
||||
Item item = itemstack.getItem();
|
||||
@@ -192,11 +248,23 @@
|
||||
@@ -188,11 +244,23 @@
|
||||
}
|
||||
|
||||
if (tileentityfurnace.isLit() && canBurn(worldserver.registryAccess(), recipeholder, singlerecipeinput, tileentityfurnace.items, i)) {
|
||||
@ -120,7 +120,7 @@
|
||||
tileentityfurnace.setRecipeUsed(recipeholder);
|
||||
}
|
||||
|
||||
@@ -235,17 +303,44 @@
|
||||
@@ -233,17 +301,44 @@
|
||||
}
|
||||
}
|
||||
|
||||
@ -166,7 +166,7 @@
|
||||
|
||||
if (itemstack.is(Blocks.WET_SPONGE.asItem()) && !((ItemStack) nonnulllist.get(1)).isEmpty() && ((ItemStack) nonnulllist.get(1)).is(Items.BUCKET)) {
|
||||
nonnulllist.set(1, new ItemStack(Items.WATER_BUCKET));
|
||||
@@ -263,6 +358,7 @@
|
||||
@@ -261,6 +356,7 @@
|
||||
}
|
||||
|
||||
private static int getTotalCookTime(WorldServer worldserver, TileEntityFurnace tileentityfurnace) {
|
||||
@ -174,7 +174,7 @@
|
||||
SingleRecipeInput singlerecipeinput = new SingleRecipeInput(tileentityfurnace.getItem(0));
|
||||
|
||||
return (Integer) tileentityfurnace.quickCheck.getRecipeFor(singlerecipeinput, worldserver).map((recipeholder) -> {
|
||||
@@ -353,8 +449,8 @@
|
||||
@@ -351,8 +447,8 @@
|
||||
@Override
|
||||
public void awardUsedRecipes(EntityHuman entityhuman, List<ItemStack> list) {}
|
||||
|
||||
@ -185,7 +185,7 @@
|
||||
|
||||
entityplayer.awardRecipes(list);
|
||||
|
||||
@@ -368,22 +464,28 @@
|
||||
@@ -366,22 +462,28 @@
|
||||
}
|
||||
|
||||
public List<RecipeHolder<?>> getRecipesToAwardAndPopExperience(WorldServer worldserver, Vec3D vec3d) {
|
||||
@ -217,7 +217,7 @@
|
||||
int j = MathHelper.floor((float) i * f);
|
||||
float f1 = MathHelper.frac((float) i * f);
|
||||
|
||||
@@ -391,6 +493,17 @@
|
||||
@@ -389,6 +491,17 @@
|
||||
++j;
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/level/chunk/ChunkGenerator.java
|
||||
+++ b/net/minecraft/world/level/chunk/ChunkGenerator.java
|
||||
@@ -286,7 +286,7 @@
|
||||
@@ -285,7 +285,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
ChunkCoordIntPair chunkcoordintpair = ichunkaccess.getPos();
|
||||
|
||||
if (!SharedConstants.debugVoidTerrain(chunkcoordintpair)) {
|
||||
@@ -305,7 +305,7 @@
|
||||
@@ -304,7 +304,7 @@
|
||||
IChunkAccess ichunkaccess1 = generatoraccessseed.getChunk(chunkcoordintpair1.x, chunkcoordintpair1.z);
|
||||
|
||||
for (ChunkSection chunksection : ichunkaccess1.getSections()) {
|
||||
@ -18,7 +18,7 @@
|
||||
|
||||
Objects.requireNonNull(set);
|
||||
palettedcontainerro.getAll(set::add);
|
||||
@@ -323,7 +323,7 @@
|
||||
@@ -322,7 +322,7 @@
|
||||
int i1 = 0;
|
||||
|
||||
if (structuremanager.shouldGenerateStructures()) {
|
||||
@ -27,7 +27,7 @@
|
||||
seededrandom.setFeatureSeed(i, i1, l);
|
||||
Supplier<String> supplier = () -> {
|
||||
Optional optional = iregistry.getResourceKey(structure).map(Object::toString);
|
||||
@@ -409,6 +409,33 @@
|
||||
@@ -408,6 +408,33 @@
|
||||
}
|
||||
}
|
||||
|
||||
@ -61,7 +61,7 @@
|
||||
private static StructureBoundingBox getWritableArea(IChunkAccess ichunkaccess) {
|
||||
ChunkCoordIntPair chunkcoordintpair = ichunkaccess.getPos();
|
||||
int i = chunkcoordintpair.getMinBlockX();
|
||||
@@ -540,6 +567,14 @@
|
||||
@@ -534,6 +561,14 @@
|
||||
StructureStart structurestart = structure.generate(structureset_a.structure(), resourcekey, iregistrycustom, this, this.biomeSource, randomstate, structuretemplatemanager, i, chunkcoordintpair, j, ichunkaccess, predicate);
|
||||
|
||||
if (structurestart.isValid()) {
|
||||
|
@ -48,7 +48,7 @@
|
||||
this.spreadTo(worldserver, blockposition1, worldserver.getBlockState(blockposition1), enumdirection, fluid1);
|
||||
}
|
||||
|
||||
@@ -424,10 +451,24 @@
|
||||
@@ -428,10 +455,24 @@
|
||||
if (fluid1.isEmpty()) {
|
||||
fluid = fluid1;
|
||||
iblockdata = Blocks.AIR.defaultBlockState();
|
||||
|
Loading…
x
Reference in New Issue
Block a user