mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-29 12:27:59 +01:00
compile fixes
This commit is contained in:
parent
9c8593cb14
commit
af2e3abf87
@ -14,7 +14,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
|
||||
+ // Paper start - Add PlayerChangeBeaconEffectEvent
|
||||
+ private static @Nullable org.bukkit.potion.PotionEffectType convert(Optional<Holder<MobEffect>> optionalEffect) {
|
||||
+ return optionalEffect.map(org.bukkit.craftbukkit.potion.CraftPotionEffectType::minecraftToBukkit).orElse(null);
|
||||
+ return optionalEffect.map(org.bukkit.craftbukkit.potion.CraftPotionEffectType::minecraftHolderToBukkit).orElse(null);
|
||||
+ }
|
||||
+ // Paper end - Add PlayerChangeBeaconEffectEvent
|
||||
+
|
||||
|
@ -3,20 +3,9 @@ From: Josh Roy <10731363+JRoy@users.noreply.github.com>
|
||||
Date: Wed, 26 Aug 2020 02:12:31 -0400
|
||||
Subject: [PATCH] Add additional open container api to HumanEntity
|
||||
|
||||
== AT ==
|
||||
public net/minecraft/world/level/block/state/BlockBehaviour getMenuProvider(Lnet/minecraft/world/level/block/state/BlockState;Lnet/minecraft/world/level/Level;Lnet/minecraft/core/BlockPos;)Lnet/minecraft/world/MenuProvider;
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
|
||||
@@ -0,0 +0,0 @@ public abstract class BlockBehaviour implements FeatureElement {
|
||||
}
|
||||
|
||||
@Nullable
|
||||
- protected MenuProvider getMenuProvider(BlockState state, Level world, BlockPos pos) {
|
||||
+ public MenuProvider getMenuProvider(BlockState state, Level world, BlockPos pos) { // Paper - public
|
||||
return null;
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
||||
|
@ -107,7 +107,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
}
|
||||
|
||||
private void explode(BlockState state, Level world, final BlockPos explodedPos) {
|
||||
+ final org.bukkit.block.BlockState explodedBlockState = org.bukkit.craftbukkit.block.CraftBlockStates.getBlockState(explodedPos, state, null); // Paper - add exploded state
|
||||
+ final org.bukkit.block.BlockState explodedBlockState = org.bukkit.craftbukkit.block.CraftBlockStates.getBlockState(world, explodedPos, state, null); // Paper - add exploded state
|
||||
world.removeBlock(explodedPos, false);
|
||||
Stream<Direction> stream = Direction.Plane.HORIZONTAL.stream(); // CraftBukkit - decompile error
|
||||
|
||||
|
@ -66,7 +66,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ // Paper start - Custom beacon ranges
|
||||
+ BeaconBlockEntity.applyEffects(world, pos, beaconLevel, primaryEffect, secondaryEffect, null);
|
||||
+ }
|
||||
+ private static void applyEffects(Level world, BlockPos pos, int beaconLevel, @Nullable MobEffect primaryEffect, @Nullable MobEffect secondaryEffect, @Nullable BeaconBlockEntity blockEntity) {
|
||||
+ private static void applyEffects(Level world, BlockPos pos, int beaconLevel, @Nullable Holder<MobEffect> primaryEffect, @Nullable Holder<MobEffect> secondaryEffect, @Nullable BeaconBlockEntity blockEntity) {
|
||||
+ // Paper end - Custom beacon ranges
|
||||
if (!world.isClientSide && primaryEffect != null) {
|
||||
double d0 = (double) (beaconLevel * 10 + 10);
|
||||
|
@ -691,7 +691,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ // call BlockStateBase#neighborChanged directly. This change mostly
|
||||
+ // restores old behavior, at the cost of bypassing the
|
||||
+ // max-chained-neighbor-updates server property.
|
||||
+ worldIn.getBlockState(upd.self).neighborChanged(worldIn, upd.self, wire, upd.parent, false);
|
||||
+ worldIn.getBlockState(upd.self).handleNeighborChanged(worldIn, upd.self, wire, upd.parent, false);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
|
@ -192,7 +192,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
CandleBlock candleblock = (CandleBlock) block;
|
||||
-
|
||||
+ // Paper start - call change block event
|
||||
+ if (!org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(player, pos, CandleCakeBlock.byCandle(block))) {
|
||||
+ if (!org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(player, pos, CandleCakeBlock.byCandle(candleblock))) {
|
||||
+ player.containerMenu.sendAllDataToRemote(); // update inv because candle could decrease
|
||||
+ return ItemInteractionResult.PASS_TO_DEFAULT_BLOCK_INTERACTION;
|
||||
+ }
|
||||
@ -234,7 +234,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
BlockState iblockdata1 = ComposterBlock.addItem(player, state, world, pos, stack);
|
||||
+ // Paper start - handle cancelled events
|
||||
+ if (iblockdata1 == null) {
|
||||
+ return InteractionResult.PASS;
|
||||
+ return ItemInteractionResult.SKIP_DEFAULT_BLOCK_INTERACTION;
|
||||
+ }
|
||||
+ // Paper end
|
||||
|
||||
|
@ -367,7 +367,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+
|
||||
+ // Paper start - Fix MC-224454
|
||||
+ @Override
|
||||
+ public boolean isPathfindable(BlockState state, BlockGetter world, BlockPos pos, net.minecraft.world.level.pathfinder.PathComputationType type) {
|
||||
+ public boolean isPathfindable(BlockState state, net.minecraft.world.level.pathfinder.PathComputationType type) {
|
||||
+ return false;
|
||||
+ }
|
||||
+ // Paper end
|
||||
|
@ -14,7 +14,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
}
|
||||
+ // Paper start - track changed items in the dispense event
|
||||
+ itemstack1 = CraftItemStack.unwrap(event.getItem()); // unwrap is safe because the stack won't be modified
|
||||
+ entitytypes = ((SpawnEggItem) itemstack1.getItem()).getType(itemstack1.getTag());
|
||||
+ entitytypes = ((SpawnEggItem) itemstack1.getItem()).getType(itemstack1);
|
||||
+ // Paper end - track changed item from dispense event
|
||||
}
|
||||
|
||||
|
@ -9000,12 +9000,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ LOGGER.warn("Future status not complete after scheduling: " + this.toStatus.toString() + ", generate: " + generation);
|
||||
+ }
|
||||
+
|
||||
+ final ChunkResult<ChunkAccess> either;
|
||||
+ final ChunkAccess newChunk;
|
||||
+
|
||||
+ try {
|
||||
+ either = completeFuture.join();
|
||||
+ newChunk = (either == null) ? null : either.orElse(null);
|
||||
+ newChunk = completeFuture.join();
|
||||
+ } catch (final Throwable throwable) {
|
||||
+ this.complete(null, throwable);
|
||||
+ // ensure the chunk system can respond, then die
|
||||
@ -9016,7 +9014,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ }
|
||||
+
|
||||
+ if (newChunk == null) {
|
||||
+ this.complete(null, new IllegalStateException("Chunk for status: " + ChunkUpgradeGenericStatusTask.this.toStatus.toString() + ", generation: " + generation + " should not be null! Either: " + either).fillInStackTrace());
|
||||
+ this.complete(null, new IllegalStateException("Chunk for status: " + ChunkUpgradeGenericStatusTask.this.toStatus.toString() + ", generation: " + generation + " should not be null! Future: " + completeFuture).fillInStackTrace());
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
|
Loading…
Reference in New Issue
Block a user