aboutsummaryrefslogtreecommitdiffhomepage
path: root/patch-remap/mache-spigotflower/net/minecraft/world/level/block/SpawnerBlock.java.patch
diff options
context:
space:
mode:
authorMiniDigger | Martin <[email protected]>2024-01-14 11:04:49 +0100
committerMiniDigger | Martin <[email protected]>2024-01-14 11:04:49 +0100
commitbee74680e607c2e29b038329f62181238911cd83 (patch)
tree708fd1a4a0227d9071243adf2a42d5e9e96cde4a /patch-remap/mache-spigotflower/net/minecraft/world/level/block/SpawnerBlock.java.patch
parent0a44692ef6ff6e255d48eb3ba1bb114166eafda9 (diff)
downloadPaper-softspoon.tar.gz
Paper-softspoon.zip
add remapped patches as a testsoftspoon
Diffstat (limited to 'patch-remap/mache-spigotflower/net/minecraft/world/level/block/SpawnerBlock.java.patch')
-rw-r--r--patch-remap/mache-spigotflower/net/minecraft/world/level/block/SpawnerBlock.java.patch83
1 files changed, 83 insertions, 0 deletions
diff --git a/patch-remap/mache-spigotflower/net/minecraft/world/level/block/SpawnerBlock.java.patch b/patch-remap/mache-spigotflower/net/minecraft/world/level/block/SpawnerBlock.java.patch
new file mode 100644
index 0000000000..e27a18b7d9
--- /dev/null
+++ b/patch-remap/mache-spigotflower/net/minecraft/world/level/block/SpawnerBlock.java.patch
@@ -0,0 +1,83 @@
+--- a/net/minecraft/world/level/block/SpawnerBlock.java
++++ b/net/minecraft/world/level/block/SpawnerBlock.java
+@@ -16,57 +16,59 @@
+ import net.minecraft.world.level.block.entity.BlockEntityType;
+ import net.minecraft.world.level.block.entity.SpawnerBlockEntity;
+ import net.minecraft.world.level.block.state.BlockBehaviour;
+-import net.minecraft.world.level.block.state.BlockState;
++import net.minecraft.world.level.block.state.IBlockData;
+
+ public class SpawnerBlock extends BaseEntityBlock {
+
+ public static final MapCodec<SpawnerBlock> CODEC = simpleCodec(SpawnerBlock::new);
+
+ @Override
+- @Override
+ public MapCodec<SpawnerBlock> codec() {
+ return SpawnerBlock.CODEC;
+ }
+
+- protected SpawnerBlock(BlockBehaviour.Properties blockbehaviour_properties) {
+- super(blockbehaviour_properties);
++ protected SpawnerBlock(BlockBehaviour.Properties properties) {
++ super(properties);
+ }
+
+ @Override
+- @Override
+- public BlockEntity newBlockEntity(BlockPos blockpos, BlockState blockstate) {
+- return new SpawnerBlockEntity(blockpos, blockstate);
++ public BlockEntity newBlockEntity(BlockPos pos, IBlockData state) {
++ return new SpawnerBlockEntity(pos, state);
+ }
+
+ @Nullable
+ @Override
++ public <T extends BlockEntity> BlockEntityTicker<T> getTicker(Level level, IBlockData state, BlockEntityType<T> blockEntityType) {
++ return createTickerHelper(blockEntityType, BlockEntityType.MOB_SPAWNER, level.isClientSide ? SpawnerBlockEntity::clientTick : SpawnerBlockEntity::serverTick);
++ }
++
+ @Override
+- public <T extends BlockEntity> BlockEntityTicker<T> getTicker(Level level, BlockState blockstate, BlockEntityType<T> blockentitytype) {
+- return createTickerHelper(blockentitytype, BlockEntityType.MOB_SPAWNER, level.isClientSide ? SpawnerBlockEntity::clientTick : SpawnerBlockEntity::serverTick);
++ public void spawnAfterBreak(IBlockData state, ServerLevel level, BlockPos pos, ItemStack stack, boolean dropExperience) {
++ super.spawnAfterBreak(state, level, pos, stack, dropExperience);
++ // CraftBukkit start - Delegate to getExpDrop
+ }
+
+ @Override
+- @Override
+- public void spawnAfterBreak(BlockState blockstate, ServerLevel serverlevel, BlockPos blockpos, ItemStack itemstack, boolean flag) {
+- super.spawnAfterBreak(blockstate, serverlevel, blockpos, itemstack, flag);
++ public int getExpDrop(IBlockData iblockdata, ServerLevel worldserver, BlockPos blockposition, ItemStack itemstack, boolean flag) {
+ if (flag) {
+- int i = 15 + serverlevel.random.nextInt(15) + serverlevel.random.nextInt(15);
++ int i = 15 + worldserver.random.nextInt(15) + worldserver.random.nextInt(15);
+
+- this.popExperience(serverlevel, blockpos, i);
++ // this.popExperience(worldserver, blockposition, i);
++ return i;
+ }
+
++ return 0;
++ // CraftBukkit end
+ }
+
+ @Override
+- @Override
+- public RenderShape getRenderShape(BlockState blockstate) {
+- return RenderShape.MODEL;
++ public EnumRenderType getRenderShape(IBlockData state) {
++ return EnumRenderType.MODEL;
+ }
+
+ @Override
+- @Override
+- public void appendHoverText(ItemStack itemstack, @Nullable BlockGetter blockgetter, List<Component> list, TooltipFlag tooltipflag) {
+- super.appendHoverText(itemstack, blockgetter, list, tooltipflag);
+- Spawner.appendHoverText(itemstack, list, "SpawnData");
++ public void appendHoverText(ItemStack stack, @Nullable BlockGetter level, List<Component> tooltip, TooltipFlag flag) {
++ super.appendHoverText(stack, level, tooltip, flag);
++ Spawner.appendHoverText(stack, tooltip, "SpawnData");
+ }
+ }