aboutsummaryrefslogtreecommitdiffhomepage
path: root/patch-remap/mache-vineflower/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-vineflower/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-vineflower/net/minecraft/world/level/block/SpawnerBlock.java.patch')
-rw-r--r--patch-remap/mache-vineflower/net/minecraft/world/level/block/SpawnerBlock.java.patch70
1 files changed, 70 insertions, 0 deletions
diff --git a/patch-remap/mache-vineflower/net/minecraft/world/level/block/SpawnerBlock.java.patch b/patch-remap/mache-vineflower/net/minecraft/world/level/block/SpawnerBlock.java.patch
new file mode 100644
index 0000000000..731a9ad28a
--- /dev/null
+++ b/patch-remap/mache-vineflower/net/minecraft/world/level/block/SpawnerBlock.java.patch
@@ -0,0 +1,70 @@
+--- a/net/minecraft/world/level/block/SpawnerBlock.java
++++ b/net/minecraft/world/level/block/SpawnerBlock.java
+@@ -16,14 +16,15 @@
+ 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
+ public MapCodec<SpawnerBlock> codec() {
+- return CODEC;
++ return SpawnerBlock.CODEC;
+ }
+
+ protected SpawnerBlock(BlockBehaviour.Properties properties) {
+@@ -31,30 +32,38 @@
+ }
+
+ @Override
+- public BlockEntity newBlockEntity(BlockPos pos, BlockState state) {
++ public BlockEntity newBlockEntity(BlockPos pos, IBlockData state) {
+ return new SpawnerBlockEntity(pos, state);
+ }
+
+ @Nullable
+ @Override
+- public <T extends BlockEntity> BlockEntityTicker<T> getTicker(Level level, BlockState state, BlockEntityType<T> blockEntityType) {
+- return createTickerHelper(
+- blockEntityType, BlockEntityType.MOB_SPAWNER, level.isClientSide ? SpawnerBlockEntity::clientTick : SpawnerBlockEntity::serverTick
+- );
++ 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 void spawnAfterBreak(BlockState state, ServerLevel level, BlockPos pos, ItemStack stack, boolean dropExperience) {
++ public void spawnAfterBreak(IBlockData state, ServerLevel level, BlockPos pos, ItemStack stack, boolean dropExperience) {
+ super.spawnAfterBreak(state, level, pos, stack, dropExperience);
+- if (dropExperience) {
+- int i = 15 + level.random.nextInt(15) + level.random.nextInt(15);
+- this.popExperience(level, pos, i);
++ // CraftBukkit start - Delegate to getExpDrop
++ }
++
++ @Override
++ public int getExpDrop(IBlockData iblockdata, ServerLevel worldserver, BlockPos blockposition, ItemStack itemstack, boolean flag) {
++ if (flag) {
++ int i = 15 + worldserver.random.nextInt(15) + worldserver.random.nextInt(15);
++
++ // this.popExperience(worldserver, blockposition, i);
++ return i;
+ }
++
++ return 0;
++ // CraftBukkit end
+ }
+
+ @Override
+- public RenderShape getRenderShape(BlockState state) {
+- return RenderShape.MODEL;
++ public EnumRenderType getRenderShape(IBlockData state) {
++ return EnumRenderType.MODEL;
+ }
+
+ @Override