Update to Minecraft 1.19.3

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2022-12-08 03:00:00 +11:00
parent a13136ada2
commit 8b26bb8f3e
305 changed files with 3331 additions and 2864 deletions

View File

@@ -47,7 +47,7 @@
+ Object object = this.isChestBoat ? new ChestBoat(worldserver, event.getVelocity().getX(), event.getVelocity().getY(), event.getVelocity().getZ()) : new EntityBoat(worldserver, event.getVelocity().getX(), event.getVelocity().getY(), event.getVelocity().getZ());
+ // CraftBukkit end
((EntityBoat) object).setType(this.type);
((EntityBoat) object).setVariant(this.type);
((EntityBoat) object).setYRot(enumdirection.toYRot());
- worldserver.addFreshEntity((Entity) object);
- itemstack.shrink(1);

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/core/dispenser/IDispenseBehavior.java
+++ b/net/minecraft/core/dispenser/IDispenseBehavior.java
@@ -76,6 +76,21 @@
@@ -77,6 +77,21 @@
import net.minecraft.world.phys.MovingObjectPositionBlock;
import org.slf4j.Logger;
@@ -22,7 +22,7 @@
public interface IDispenseBehavior {
Logger LOGGER = LogUtils.getLogger();
@@ -200,14 +215,42 @@
@@ -201,14 +216,42 @@
EnumDirection enumdirection = (EnumDirection) isourceblock.getBlockState().getValue(BlockDispenser.FACING);
EntityTypes entitytypes = ((ItemMonsterEgg) itemstack.getItem()).getType(itemstack.getTag());
@@ -67,7 +67,7 @@
isourceblock.getLevel().gameEvent((Entity) null, GameEvent.ENTITY_PLACE, isourceblock.getPos());
return itemstack;
}
@@ -226,12 +269,40 @@
@@ -227,12 +270,40 @@
EnumDirection enumdirection = (EnumDirection) isourceblock.getBlockState().getValue(BlockDispenser.FACING);
BlockPosition blockposition = isourceblock.getPos().relative(enumdirection);
WorldServer worldserver = isourceblock.getLevel();
@@ -109,7 +109,7 @@
return itemstack;
}
});
@@ -250,8 +321,35 @@
@@ -251,8 +322,35 @@
});
if (!list.isEmpty()) {
@@ -146,7 +146,7 @@
this.setSuccess(true);
return itemstack;
} else {
@@ -278,7 +376,35 @@
@@ -279,7 +377,35 @@
entityhorseabstract = (EntityHorseAbstract) iterator1.next();
} while (!entityhorseabstract.isArmor(itemstack) || entityhorseabstract.isWearingArmor() || !entityhorseabstract.isTamed());
@@ -183,7 +183,7 @@
this.setSuccess(true);
return itemstack;
}
@@ -321,9 +447,35 @@
@@ -322,9 +448,35 @@
}
entityhorsechestedabstract = (EntityHorseChestedAbstract) iterator1.next();
@@ -221,7 +221,7 @@
this.setSuccess(true);
return itemstack;
}
@@ -332,12 +484,41 @@
@@ -333,12 +485,41 @@
@Override
public ItemStack execute(ISourceBlock isourceblock, ItemStack itemstack) {
EnumDirection enumdirection = (EnumDirection) isourceblock.getBlockState().getValue(BlockDispenser.FACING);
@@ -264,7 +264,7 @@
return itemstack;
}
@@ -359,12 +540,40 @@
@@ -360,12 +541,40 @@
double d3 = randomsource.triangle((double) enumdirection.getStepX(), 0.11485000000000001D);
double d4 = randomsource.triangle((double) enumdirection.getStepY(), 0.11485000000000001D);
double d5 = randomsource.triangle((double) enumdirection.getStepZ(), 0.11485000000000001D);
@@ -310,7 +310,7 @@
return itemstack;
}
@@ -396,9 +605,52 @@
@@ -399,9 +608,52 @@
BlockPosition blockposition = isourceblock.getPos().relative((EnumDirection) isourceblock.getBlockState().getValue(BlockDispenser.FACING));
WorldServer worldserver = isourceblock.getLevel();
@@ -364,7 +364,7 @@
} else {
return this.defaultDispenseItemBehavior.dispense(isourceblock, itemstack);
}
@@ -425,7 +677,7 @@
@@ -428,7 +680,7 @@
Block block = iblockdata.getBlock();
if (block instanceof IFluidSource) {
@@ -373,7 +373,7 @@
if (itemstack1.isEmpty()) {
return super.execute(isourceblock, itemstack);
@@ -433,6 +685,32 @@
@@ -436,6 +688,32 @@
worldserver.gameEvent((Entity) null, GameEvent.FLUID_PICKUP, blockposition);
Item item = itemstack1.getItem();
@@ -406,7 +406,7 @@
itemstack.shrink(1);
if (itemstack.isEmpty()) {
return new ItemStack(item);
@@ -454,14 +732,42 @@
@@ -457,14 +735,42 @@
protected ItemStack execute(ISourceBlock isourceblock, ItemStack itemstack) {
WorldServer worldserver = isourceblock.getLevel();
@@ -451,7 +451,7 @@
} else if (!BlockCampfire.canLight(iblockdata) && !CandleBlock.canLight(iblockdata) && !CandleCakeBlock.canLight(iblockdata)) {
if (iblockdata.getBlock() instanceof BlockTNT) {
BlockTNT.explode(worldserver, blockposition);
@@ -487,12 +793,62 @@
@@ -490,12 +796,62 @@
this.setSuccess(true);
WorldServer worldserver = isourceblock.getLevel();
BlockPosition blockposition = isourceblock.getPos().relative((EnumDirection) isourceblock.getBlockState().getValue(BlockDispenser.FACING));
@@ -514,7 +514,7 @@
return itemstack;
}
@@ -502,12 +858,41 @@
@@ -505,12 +861,41 @@
protected ItemStack execute(ISourceBlock isourceblock, ItemStack itemstack) {
WorldServer worldserver = isourceblock.getLevel();
BlockPosition blockposition = isourceblock.getPos().relative((EnumDirection) isourceblock.getBlockState().getValue(BlockDispenser.FACING));
@@ -558,7 +558,7 @@
return itemstack;
}
});
@@ -531,6 +916,30 @@
@@ -535,6 +920,30 @@
EnumDirection enumdirection = (EnumDirection) isourceblock.getBlockState().getValue(BlockDispenser.FACING);
BlockPosition blockposition = isourceblock.getPos().relative(enumdirection);
@@ -587,9 +587,9 @@
+ // CraftBukkit end
+
if (worldserver.isEmptyBlock(blockposition) && BlockWitherSkull.canSpawnMob(worldserver, blockposition, itemstack)) {
worldserver.setBlock(blockposition, (IBlockData) Blocks.WITHER_SKELETON_SKULL.defaultBlockState().setValue(BlockSkull.ROTATION, enumdirection.getAxis() == EnumDirection.EnumAxis.Y ? 0 : enumdirection.getOpposite().get2DDataValue() * 4), 3);
worldserver.setBlock(blockposition, (IBlockData) Blocks.WITHER_SKELETON_SKULL.defaultBlockState().setValue(BlockSkull.ROTATION, RotationSegment.convertToSegment(enumdirection)), 3);
worldserver.gameEvent((Entity) null, GameEvent.BLOCK_PLACE, blockposition);
@@ -556,6 +965,30 @@
@@ -560,6 +969,30 @@
BlockPosition blockposition = isourceblock.getPos().relative((EnumDirection) isourceblock.getBlockState().getValue(BlockDispenser.FACING));
BlockPumpkinCarved blockpumpkincarved = (BlockPumpkinCarved) Blocks.CARVED_PUMPKIN;
@@ -620,7 +620,7 @@
if (worldserver.isEmptyBlock(blockposition) && blockpumpkincarved.canSpawnGolem(worldserver, blockposition)) {
if (!worldserver.isClientSide) {
worldserver.setBlock(blockposition, blockpumpkincarved.defaultBlockState(), 3);
@@ -605,6 +1038,30 @@
@@ -609,6 +1042,30 @@
BlockPosition blockposition = isourceblock.getPos().relative((EnumDirection) isourceblock.getBlockState().getValue(BlockDispenser.FACING));
IBlockData iblockdata = worldserver.getBlockState(blockposition);