mirror of
https://github.com/PaperMC/Paper.git
synced 2025-03-13 19:28:03 +01:00
More var name fixes
This commit is contained in:
parent
a5b8df6674
commit
c530c39f4e
16 changed files with 57 additions and 94 deletions
|
@ -5,11 +5,11 @@
|
|||
}
|
||||
|
||||
- if (!canSetSpawn(level)) {
|
||||
+ if (false && !canSetSpawn(level)) { // CraftBukkit - moved world and biome check into EntityHuman
|
||||
+ if (false && !canSetSpawn(level)) { // CraftBukkit - moved world and biome check into Player
|
||||
level.removeBlock(pos, false);
|
||||
BlockPos blockPos = pos.relative(state.getValue(FACING).getOpposite());
|
||||
if (level.getBlockState(blockPos).is(this)) {
|
||||
@@ -103,22 +_,62 @@
|
||||
@@ -103,22 +_,56 @@
|
||||
level.explode(null, level.damageSources().badRespawnPointExplosion(center), null, center, 5.0F, true, Level.ExplosionInteraction.BLOCK);
|
||||
return InteractionResult.SUCCESS_SERVER;
|
||||
} else if (state.getValue(OCCUPIED)) {
|
||||
|
@ -21,20 +21,20 @@
|
|||
return InteractionResult.SUCCESS_SERVER;
|
||||
} else {
|
||||
+ // CraftBukkit start
|
||||
+ BlockState finaliblockdata = state;
|
||||
+ BlockPos finalblockposition = pos;
|
||||
+ final BlockState finalBlockState = state;
|
||||
+ final BlockPos finalBlockPos = pos;
|
||||
+ // CraftBukkit end
|
||||
player.startSleepInBed(pos).ifLeft(bedSleepingProblem -> {
|
||||
+ // Paper start - PlayerBedFailEnterEvent
|
||||
+ if (bedSleepingProblem != null) {
|
||||
+ io.papermc.paper.event.player.PlayerBedFailEnterEvent event = new io.papermc.paper.event.player.PlayerBedFailEnterEvent((org.bukkit.entity.Player) player.getBukkitEntity(), io.papermc.paper.event.player.PlayerBedFailEnterEvent.FailReason.values()[bedSleepingProblem.ordinal()], org.bukkit.craftbukkit.block.CraftBlock.at(level, finalblockposition), !level.dimensionType().bedWorks(), io.papermc.paper.adventure.PaperAdventure.asAdventure(bedSleepingProblem.getMessage()));
|
||||
+ io.papermc.paper.event.player.PlayerBedFailEnterEvent event = new io.papermc.paper.event.player.PlayerBedFailEnterEvent((org.bukkit.entity.Player) player.getBukkitEntity(), io.papermc.paper.event.player.PlayerBedFailEnterEvent.FailReason.values()[bedSleepingProblem.ordinal()], org.bukkit.craftbukkit.block.CraftBlock.at(level, finalBlockPos), !level.dimensionType().bedWorks(), io.papermc.paper.adventure.PaperAdventure.asAdventure(bedSleepingProblem.getMessage()));
|
||||
+ if (!event.callEvent()) {
|
||||
+ return;
|
||||
+ }
|
||||
+ // Paper end - PlayerBedFailEnterEvent
|
||||
+ // CraftBukkit start - handling bed explosion from below here
|
||||
+ if (event.getWillExplode()) { // Paper - PlayerBedFailEnterEvent
|
||||
+ this.explodeBed(finaliblockdata, level, finalblockposition);
|
||||
+ this.explodeBed(finalBlockState, level, finalBlockPos);
|
||||
+ } else
|
||||
+ // CraftBukkit end
|
||||
if (bedSleepingProblem.getMessage() != null) {
|
||||
|
@ -49,24 +49,18 @@
|
|||
}
|
||||
}
|
||||
|
||||
+ // CraftBukkit start
|
||||
+ private InteractionResult explodeBed(BlockState iblockdata, Level world, BlockPos blockposition) {
|
||||
+ {
|
||||
+ {
|
||||
+ org.bukkit.block.BlockState blockState = org.bukkit.craftbukkit.block.CraftBlock.at(world, blockposition).getState(); // CraftBukkit - capture BlockState before remove block
|
||||
+ world.removeBlock(blockposition, false);
|
||||
+ BlockPos blockposition1 = blockposition.relative(((Direction) iblockdata.getValue(BedBlock.FACING)).getOpposite());
|
||||
+ // CraftBukkit start - Copied from the above method
|
||||
+ private InteractionResult explodeBed(BlockState state, Level level, BlockPos pos) {
|
||||
+ org.bukkit.block.BlockState blockState = org.bukkit.craftbukkit.block.CraftBlock.at(level, pos).getState(); // CraftBukkit - capture BlockState before remove block
|
||||
+ level.removeBlock(pos, false);
|
||||
+ BlockPos blockPos = pos.relative(state.getValue(FACING).getOpposite());
|
||||
+ if (level.getBlockState(blockPos).is(this)) {
|
||||
+ level.removeBlock(blockPos, false);
|
||||
+ }
|
||||
+
|
||||
+ if (world.getBlockState(blockposition1).getBlock() == this) {
|
||||
+ world.removeBlock(blockposition1, false);
|
||||
+ }
|
||||
+
|
||||
+ Vec3 vec3d = blockposition.getCenter();
|
||||
+
|
||||
+ world.explode(null, world.damageSources().badRespawnPointExplosion(vec3d, blockState), null, vec3d, 5.0F, true, Level.ExplosionInteraction.BLOCK); // CraftBukkit - add state
|
||||
+ return InteractionResult.SUCCESS;
|
||||
+ }
|
||||
+ }
|
||||
+ Vec3 center = pos.getCenter();
|
||||
+ level.explode(null, level.damageSources().badRespawnPointExplosion(center, blockState), null, center, 5.0F, true, Level.ExplosionInteraction.BLOCK); // CraftBukkit - add state
|
||||
+ return InteractionResult.SUCCESS_SERVER;
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
+
|
||||
|
|
|
@ -19,8 +19,8 @@
|
|||
- this.setTiltAndScheduleTick(state, level, pos, Tilt.UNSTABLE, null);
|
||||
+ // CraftBukkit start - tilt dripleaf
|
||||
+ org.bukkit.event.Cancellable cancellable;
|
||||
+ if (entity instanceof net.minecraft.world.entity.player.Player) {
|
||||
+ cancellable = org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent((net.minecraft.world.entity.player.Player) entity, org.bukkit.event.block.Action.PHYSICAL, pos, null, null, null);
|
||||
+ if (entity instanceof net.minecraft.world.entity.player.Player player) {
|
||||
+ cancellable = org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(player, org.bukkit.event.block.Action.PHYSICAL, pos, null, null, null);
|
||||
+ } else {
|
||||
+ cancellable = new org.bukkit.event.entity.EntityInteractEvent(entity.getBukkitEntity(), level.getWorld().getBlockAt(pos.getX(), pos.getY(), pos.getZ()));
|
||||
+ level.getCraftServer().getPluginManager().callEvent((org.bukkit.event.entity.EntityInteractEvent) cancellable);
|
||||
|
|
|
@ -133,7 +133,7 @@
|
|||
+ return 0; // CraftBukkit
|
||||
+ }
|
||||
+ // CraftBukkit start
|
||||
+ public int getExpDrop(BlockState iblockdata, ServerLevel worldserver, BlockPos blockposition, ItemStack itemstack, boolean flag) {
|
||||
+ public int getExpDrop(BlockState state, ServerLevel level, BlockPos pos, ItemStack stack, boolean dropExperience) {
|
||||
+ return 0;
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
|
|
|
@ -1,13 +1,5 @@
|
|||
--- a/net/minecraft/world/level/block/BushBlock.java
|
||||
+++ b/net/minecraft/world/level/block/BushBlock.java
|
||||
@@ -6,6 +_,7 @@
|
||||
import net.minecraft.tags.BlockTags;
|
||||
import net.minecraft.util.RandomSource;
|
||||
import net.minecraft.world.level.BlockGetter;
|
||||
+import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.level.LevelReader;
|
||||
import net.minecraft.world.level.ScheduledTickAccess;
|
||||
import net.minecraft.world.level.block.state.BlockBehaviour;
|
||||
@@ -35,9 +_,15 @@
|
||||
BlockState neighborState,
|
||||
RandomSource random
|
||||
|
@ -18,7 +10,7 @@
|
|||
+ // CraftBukkit start
|
||||
+ if (!state.canSurvive(level, pos)) {
|
||||
+ // Suppress during worldgen
|
||||
+ if (!(level instanceof net.minecraft.server.level.ServerLevel world1 && world1.hasPhysicsEvent) || !org.bukkit.craftbukkit.event.CraftEventFactory.callBlockPhysicsEvent(world1, pos).isCancelled()) { // Paper
|
||||
+ if (!(level instanceof net.minecraft.server.level.ServerLevel serverLevel && serverLevel.hasPhysicsEvent) || !org.bukkit.craftbukkit.event.CraftEventFactory.callBlockPhysicsEvent(serverLevel, pos).isCancelled()) { // Paper
|
||||
+ return Blocks.AIR.defaultBlockState();
|
||||
+ }
|
||||
+ }
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
- player.getFoodData().eat(2, 0.1F);
|
||||
- int bitesValue = state.getValue(BITES);
|
||||
+ // CraftBukkit start
|
||||
+ // entityhuman.getFoodData().eat(2, 0.1F);
|
||||
+ // player.getFoodData().eat(2, 0.1F);
|
||||
+ int oldFoodLevel = player.getFoodData().foodLevel;
|
||||
+
|
||||
+ org.bukkit.event.entity.FoodLevelChangeEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callFoodLevelChangeEvent(player, 2 + oldFoodLevel);
|
||||
|
|
|
@ -10,8 +10,8 @@
|
|||
+ return InteractionResult.SUCCESS;
|
||||
+ }
|
||||
+
|
||||
+ if (entity instanceof net.minecraft.world.entity.player.Player) {
|
||||
+ org.bukkit.event.player.PlayerHarvestBlockEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerHarvestBlockEvent(level, pos, (net.minecraft.world.entity.player.Player) entity, net.minecraft.world.InteractionHand.MAIN_HAND, java.util.Collections.singletonList(new ItemStack(Items.GLOW_BERRIES, 1)));
|
||||
+ if (entity instanceof net.minecraft.world.entity.player.Player player) {
|
||||
+ org.bukkit.event.player.PlayerHarvestBlockEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerHarvestBlockEvent(level, pos, player, net.minecraft.world.InteractionHand.MAIN_HAND, java.util.Collections.singletonList(new ItemStack(Items.GLOW_BERRIES, 1)));
|
||||
+ if (event.isCancelled()) {
|
||||
+ return InteractionResult.SUCCESS; // We need to return a success either way, because making it PASS or FAIL will result in a bug where cancelling while harvesting w/ block in hand places block
|
||||
+ }
|
||||
|
|
|
@ -39,8 +39,8 @@
|
|||
public static BlockState extractProduce(Entity entity, BlockState state, Level level, BlockPos pos) {
|
||||
+ // CraftBukkit start
|
||||
+ if (entity != null && !(entity instanceof Player)) {
|
||||
+ BlockState iblockdata1 = ComposterBlock.empty(entity, state, org.bukkit.craftbukkit.util.DummyGeneratorAccess.INSTANCE, pos);
|
||||
+ if (!org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(entity, pos, iblockdata1)) {
|
||||
+ BlockState emptyState = ComposterBlock.empty(entity, state, org.bukkit.craftbukkit.util.DummyGeneratorAccess.INSTANCE, pos);
|
||||
+ if (!org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(entity, pos, emptyState)) {
|
||||
+ return state;
|
||||
+ }
|
||||
+ }
|
||||
|
@ -100,9 +100,9 @@
|
|||
|
||||
public static class EmptyContainer extends SimpleContainer implements WorldlyContainer {
|
||||
- public EmptyContainer() {
|
||||
+ public EmptyContainer(LevelAccessor generatoraccess, BlockPos blockposition) { // CraftBukkit
|
||||
+ public EmptyContainer(LevelAccessor levelAccessor, BlockPos blockPos) { // CraftBukkit
|
||||
super(0);
|
||||
+ this.bukkitOwner = new org.bukkit.craftbukkit.inventory.CraftBlockInventoryHolder(generatoraccess, blockposition, this); // CraftBukkit
|
||||
+ this.bukkitOwner = new org.bukkit.craftbukkit.inventory.CraftBlockInventoryHolder(levelAccessor, blockPos, this); // CraftBukkit
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -31,8 +31,8 @@
|
|||
+
|
||||
+ org.bukkit.inventory.Inventory destinationInventory;
|
||||
+ // Have to special case large chests as they work oddly
|
||||
+ if (containerAt instanceof CompoundContainer) {
|
||||
+ destinationInventory = new org.bukkit.craftbukkit.inventory.CraftInventoryDoubleChest((CompoundContainer) containerAt);
|
||||
+ if (containerAt instanceof CompoundContainer compoundContainer) {
|
||||
+ destinationInventory = new org.bukkit.craftbukkit.inventory.CraftInventoryDoubleChest(compoundContainer);
|
||||
+ } else {
|
||||
+ destinationInventory = containerAt.getOwner().getInventory();
|
||||
+ }
|
||||
|
@ -57,8 +57,8 @@
|
|||
+
|
||||
+ org.bukkit.inventory.Inventory destinationInventory;
|
||||
+ // Have to special case large chests as they work oddly
|
||||
+ if (containerAt instanceof CompoundContainer) {
|
||||
+ destinationInventory = new org.bukkit.craftbukkit.inventory.CraftInventoryDoubleChest((CompoundContainer) containerAt);
|
||||
+ if (containerAt instanceof CompoundContainer compoundContainer) {
|
||||
+ destinationInventory = new org.bukkit.craftbukkit.inventory.CraftInventoryDoubleChest(compoundContainer);
|
||||
+ } else {
|
||||
+ destinationInventory = containerAt.getOwner().getInventory();
|
||||
+ }
|
||||
|
|
|
@ -4,16 +4,15 @@
|
|||
@Override
|
||||
protected void spawnAfterBreak(BlockState state, ServerLevel level, BlockPos pos, ItemStack stack, boolean dropExperience) {
|
||||
super.spawnAfterBreak(state, level, pos, stack, dropExperience);
|
||||
- if (dropExperience) {
|
||||
- this.tryDropExperience(level, pos, stack, this.xpRange);
|
||||
- }
|
||||
+ // CraftBukkit start - Delegate to getExpDrop
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public int getExpDrop(BlockState iblockdata, ServerLevel worldserver, BlockPos blockposition, ItemStack itemstack, boolean flag) {
|
||||
+ if (flag) {
|
||||
+ return this.tryDropExperience(worldserver, blockposition, itemstack, this.xpRange);
|
||||
+ public int getExpDrop(BlockState state, ServerLevel level, BlockPos pos, ItemStack stack, boolean dropExperience) {
|
||||
if (dropExperience) {
|
||||
- this.tryDropExperience(level, pos, stack, this.xpRange);
|
||||
- }
|
||||
+ return this.tryDropExperience(level, pos, stack, this.xpRange);
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
|
|
|
@ -39,8 +39,8 @@
|
|||
+
|
||||
+ org.bukkit.inventory.Inventory destinationInventory;
|
||||
+ // Have to special case large chests as they work oddly
|
||||
+ if (containerAt instanceof CompoundContainer) {
|
||||
+ destinationInventory = new org.bukkit.craftbukkit.inventory.CraftInventoryDoubleChest((CompoundContainer) containerAt);
|
||||
+ if (containerAt instanceof CompoundContainer compoundContainer) {
|
||||
+ destinationInventory = new org.bukkit.craftbukkit.inventory.CraftInventoryDoubleChest(compoundContainer);
|
||||
+ } else {
|
||||
+ destinationInventory = containerAt.getOwner().getInventory();
|
||||
+ }
|
||||
|
|
|
@ -71,15 +71,14 @@
|
|||
@Override
|
||||
protected void spawnAfterBreak(BlockState state, ServerLevel level, BlockPos pos, ItemStack stack, boolean dropExperience) {
|
||||
super.spawnAfterBreak(state, level, pos, stack, dropExperience);
|
||||
- if (dropExperience) {
|
||||
- this.tryDropExperience(level, pos, stack, UniformInt.of(1, 5));
|
||||
+ // CraftBukkit start - Delegated to getExpDrop
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public int getExpDrop(BlockState iblockdata, ServerLevel worldserver, BlockPos blockposition, ItemStack itemstack, boolean flag) {
|
||||
+ if (flag) {
|
||||
+ return this.tryDropExperience(worldserver, blockposition, itemstack, UniformInt.of(1, 5));
|
||||
+ public int getExpDrop(BlockState state, ServerLevel level, BlockPos pos, ItemStack stack, boolean dropExperience) {
|
||||
if (dropExperience) {
|
||||
- this.tryDropExperience(level, pos, stack, UniformInt.of(1, 5));
|
||||
+ return this.tryDropExperience(level, pos, stack, UniformInt.of(1, 5));
|
||||
}
|
||||
+
|
||||
+ return 0;
|
||||
|
|
|
@ -1,11 +1,9 @@
|
|||
--- a/net/minecraft/world/level/block/entity/SignBlockEntity.java
|
||||
+++ b/net/minecraft/world/level/block/entity/SignBlockEntity.java
|
||||
@@ -54,11 +_,16 @@
|
||||
return new SignText();
|
||||
@@ -55,10 +_,15 @@
|
||||
}
|
||||
|
||||
- public boolean isFacingFrontText(Player player) {
|
||||
+ public boolean isFacingFrontText(net.minecraft.world.entity.player.Player player) {
|
||||
public boolean isFacingFrontText(Player player) {
|
||||
+ // Paper start - More Sign Block API
|
||||
+ return this.isFacingFrontText(player.getX(), player.getZ());
|
||||
+ }
|
||||
|
@ -15,8 +13,8 @@
|
|||
Vec3 signHitboxCenterPosition = signBlock.getSignHitboxCenterPosition(this.getBlockState());
|
||||
- double d = player.getX() - (this.getBlockPos().getX() + signHitboxCenterPosition.x);
|
||||
- double d1 = player.getZ() - (this.getBlockPos().getZ() + signHitboxCenterPosition.z);
|
||||
+ double d = x - ((double) this.getBlockPos().getX() + signHitboxCenterPosition.x); // Paper - More Sign Block API
|
||||
+ double d1 = z - ((double) this.getBlockPos().getZ() + signHitboxCenterPosition.z); // Paper - More Sign Block AP
|
||||
+ double d = x - (this.getBlockPos().getX() + signHitboxCenterPosition.x); // Paper - More Sign Block API
|
||||
+ double d1 = z - (this.getBlockPos().getZ() + signHitboxCenterPosition.z); // Paper - More Sign Block AP
|
||||
float yRotationDegrees = signBlock.getYRotationDegrees(this.getBlockState());
|
||||
float f = (float)(Mth.atan2(d1, d) * 180.0F / (float)Math.PI) - 90.0F;
|
||||
return Mth.degreesDifferenceAbs(yRotationDegrees, f) <= 90.0F;
|
||||
|
@ -136,14 +134,14 @@
|
|||
+ }
|
||||
+ };
|
||||
+
|
||||
+ private CommandSourceStack createCommandSourceStack(@Nullable Player player, Level world, BlockPos pos) {
|
||||
+ private CommandSourceStack createCommandSourceStack(@Nullable Player player, Level level, BlockPos pos) {
|
||||
+ // CraftBukkit end
|
||||
String string = player == null ? "Sign" : player.getName().getString();
|
||||
Component component = (Component)(player == null ? Component.literal("Sign") : player.getDisplayName());
|
||||
- return new CommandSourceStack(CommandSource.NULL, Vec3.atCenterOf(pos), Vec2.ZERO, (ServerLevel)level, 2, string, component, level.getServer(), player);
|
||||
+
|
||||
+ // Paper start - Fix commands from signs not firing command events
|
||||
+ CommandSource commandSource = world.paperConfig().misc.showSignClickCommandFailureMsgsToPlayer ? new io.papermc.paper.commands.DelegatingCommandSource(this.commandSource) {
|
||||
+ CommandSource commandSource = level.paperConfig().misc.showSignClickCommandFailureMsgsToPlayer ? new io.papermc.paper.commands.DelegatingCommandSource(this.commandSource) {
|
||||
+ @Override
|
||||
+ public void sendSystemMessage(Component message) {
|
||||
+ if (player instanceof final net.minecraft.server.level.ServerPlayer serverPlayer) {
|
||||
|
@ -158,7 +156,7 @@
|
|||
+ } : this.commandSource;
|
||||
+ // Paper end - Fix commands from signs not firing command events
|
||||
+ // CraftBukkit - this
|
||||
+ return new CommandSourceStack(commandSource, Vec3.atCenterOf(pos), Vec2.ZERO, (ServerLevel) world, 2, string, component, world.getServer(), player); // Paper - Fix commands from signs not firing command events
|
||||
+ return new CommandSourceStack(commandSource, Vec3.atCenterOf(pos), Vec2.ZERO, (ServerLevel)level, 2, string, component, level.getServer(), player); // Paper - Fix commands from signs not firing command events
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -64,9 +64,9 @@
|
|||
- LoadingCache<UUID, CompletableFuture<Optional<GameProfile>>> loadingCache = profileCacheById;
|
||||
- return loadingCache != null ? loadingCache.getUnchecked(profileUuid) : CompletableFuture.completedFuture(Optional.empty());
|
||||
+ // Paper start - player profile events
|
||||
+ public static CompletableFuture<Optional<GameProfile>> fetchGameProfile(UUID uuid, @Nullable String name) {
|
||||
+ public static CompletableFuture<Optional<GameProfile>> fetchGameProfile(UUID profileUuid, @Nullable String name) {
|
||||
+ LoadingCache<com.mojang.datafixers.util.Pair<java.util.UUID, @org.jetbrains.annotations.Nullable GameProfile>, CompletableFuture<Optional<GameProfile>>> loadingCache = profileCacheById;
|
||||
+ return loadingCache != null ? loadingCache.getUnchecked(new com.mojang.datafixers.util.Pair<>(uuid, name != null ? new com.mojang.authlib.GameProfile(uuid, name) : null)) : CompletableFuture.completedFuture(Optional.empty());
|
||||
+ return loadingCache != null ? loadingCache.getUnchecked(new com.mojang.datafixers.util.Pair<>(profileUuid, name != null ? new com.mojang.authlib.GameProfile(profileUuid, name) : null)) : CompletableFuture.completedFuture(Optional.empty());
|
||||
+ // Paper end - player profile events
|
||||
}
|
||||
|
||||
|
|
|
@ -1,24 +1,5 @@
|
|||
--- a/net/minecraft/world/level/block/piston/PistonBaseBlock.java
|
||||
+++ b/net/minecraft/world/level/block/piston/PistonBaseBlock.java
|
||||
@@ -145,6 +_,18 @@
|
||||
i = 2;
|
||||
}
|
||||
|
||||
+ // CraftBukkit start
|
||||
+ // if (!this.isSticky) { // Paper - Fix sticky pistons and BlockPistonRetractEvent; Move further down
|
||||
+ // org.bukkit.block.Block block = world.getWorld().getBlockAt(pos.getX(), pos.getY(), pos.getZ());
|
||||
+ // BlockPistonRetractEvent event = new BlockPistonRetractEvent(block, ImmutableList.<org.bukkit.block.Block>of(), CraftBlock.notchToBlockFace(enumdirection));
|
||||
+ // world.getCraftServer().getPluginManager().callEvent(event);
|
||||
+ //
|
||||
+ // if (event.isCancelled()) {
|
||||
+ // return;
|
||||
+ // }
|
||||
+ // }
|
||||
+ // PAIL: checkME - what happened to setTypeAndData?
|
||||
+ // CraftBukkit end
|
||||
level.blockEvent(pos, this, i, direction.get3DDataValue());
|
||||
}
|
||||
}
|
||||
@@ -174,6 +_,12 @@
|
||||
@Override
|
||||
protected boolean triggerEvent(BlockState state, Level level, BlockPos pos, int id, int param) {
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
+ }
|
||||
+
|
||||
+ // CraftBukkit start
|
||||
+ protected void onPlace(BlockState iblockdata, Level world, BlockPos blockposition, BlockState iblockdata1, boolean flag, @Nullable net.minecraft.world.item.context.UseOnContext context) {
|
||||
+ this.onPlace(iblockdata, world, blockposition, iblockdata1, flag);
|
||||
+ protected void onPlace(BlockState state, Level level, BlockPos pos, BlockState oldState, boolean movedByPiston, @Nullable net.minecraft.world.item.context.UseOnContext context) {
|
||||
+ this.onPlace(state, level, pos, oldState, movedByPiston);
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
|
||||
|
|
|
@ -13,9 +13,9 @@ public class CraftBlockInventoryHolder implements BlockInventoryHolder {
|
|||
private final Block block;
|
||||
private final Inventory inventory;
|
||||
|
||||
public CraftBlockInventoryHolder(LevelAccessor world, BlockPos pos, Container inv) {
|
||||
this.block = CraftBlock.at(world, pos);
|
||||
this.inventory = new CraftInventory(inv);
|
||||
public CraftBlockInventoryHolder(LevelAccessor levelAccessor, BlockPos pos, Container container) {
|
||||
this.block = CraftBlock.at(levelAccessor, pos);
|
||||
this.inventory = new CraftInventory(container);
|
||||
}
|
||||
// Paper start - Add missing InventoryHolders
|
||||
public CraftBlockInventoryHolder(net.minecraft.world.inventory.ContainerLevelAccess levelAccess, Inventory inventory) {
|
||||
|
|
Loading…
Add table
Reference in a new issue