aboutsummaryrefslogtreecommitdiffhomepage
path: root/patch-remap/mache-spigotflower/net/minecraft/world/level/block/WitherRoseBlock.java.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patch-remap/mache-spigotflower/net/minecraft/world/level/block/WitherRoseBlock.java.patch')
-rw-r--r--patch-remap/mache-spigotflower/net/minecraft/world/level/block/WitherRoseBlock.java.patch79
1 files changed, 79 insertions, 0 deletions
diff --git a/patch-remap/mache-spigotflower/net/minecraft/world/level/block/WitherRoseBlock.java.patch b/patch-remap/mache-spigotflower/net/minecraft/world/level/block/WitherRoseBlock.java.patch
new file mode 100644
index 0000000000..1f467e7104
--- /dev/null
+++ b/patch-remap/mache-spigotflower/net/minecraft/world/level/block/WitherRoseBlock.java.patch
@@ -0,0 +1,79 @@
+--- a/net/minecraft/world/level/block/WitherRoseBlock.java
++++ b/net/minecraft/world/level/block/WitherRoseBlock.java
+@@ -15,7 +15,7 @@
+ import net.minecraft.world.level.BlockGetter;
+ import net.minecraft.world.level.Level;
+ import net.minecraft.world.level.block.state.BlockBehaviour;
+-import net.minecraft.world.level.block.state.BlockState;
++import net.minecraft.world.level.block.state.IBlockData;
+ import net.minecraft.world.phys.Vec3;
+ import net.minecraft.world.phys.shapes.CollisionContext;
+ import net.minecraft.world.phys.shapes.VoxelShape;
+@@ -27,50 +27,46 @@
+ });
+
+ @Override
+- @Override
+ public MapCodec<WitherRoseBlock> codec() {
+ return WitherRoseBlock.CODEC;
+ }
+
+- public WitherRoseBlock(MobEffect mobeffect, int i, BlockBehaviour.Properties blockbehaviour_properties) {
+- this(makeEffectList(mobeffect, i), blockbehaviour_properties);
++ public WitherRoseBlock(MobEffect suspiciousStewEffect, int effectDuration, BlockBehaviour.Properties properties) {
++ this(makeEffectList(suspiciousStewEffect, effectDuration), properties);
+ }
+
+- public WitherRoseBlock(List<SuspiciousEffectHolder.EffectEntry> list, BlockBehaviour.Properties blockbehaviour_properties) {
+- super(list, blockbehaviour_properties);
++ public WitherRoseBlock(List<SuspiciousEffectHolder.a> list, BlockBehaviour.Properties blockbase_info) {
++ super(list, blockbase_info);
+ }
+
+ @Override
+- @Override
+- protected boolean mayPlaceOn(BlockState blockstate, BlockGetter blockgetter, BlockPos blockpos) {
+- return super.mayPlaceOn(blockstate, blockgetter, blockpos) || blockstate.is(Blocks.NETHERRACK) || blockstate.is(Blocks.SOUL_SAND) || blockstate.is(Blocks.SOUL_SOIL);
++ protected boolean mayPlaceOn(IBlockData state, BlockGetter level, BlockPos pos) {
++ return super.mayPlaceOn(state, level, pos) || state.is(Blocks.NETHERRACK) || state.is(Blocks.SOUL_SAND) || state.is(Blocks.SOUL_SOIL);
+ }
+
+ @Override
+- @Override
+- public void animateTick(BlockState blockstate, Level level, BlockPos blockpos, RandomSource randomsource) {
+- VoxelShape voxelshape = this.getShape(blockstate, level, blockpos, CollisionContext.empty());
+- Vec3 vec3 = voxelshape.bounds().getCenter();
+- double d0 = (double) blockpos.getX() + vec3.x;
+- double d1 = (double) blockpos.getZ() + vec3.z;
++ public void animateTick(IBlockData state, Level level, BlockPos pos, RandomSource random) {
++ VoxelShape voxelshape = this.getShape(state, level, pos, CollisionContext.empty());
++ Vec3 vec3d = voxelshape.bounds().getCenter();
++ double d0 = (double) pos.getX() + vec3d.x;
++ double d1 = (double) pos.getZ() + vec3d.z;
+
+ for (int i = 0; i < 3; ++i) {
+- if (randomsource.nextBoolean()) {
+- level.addParticle(ParticleTypes.SMOKE, d0 + randomsource.nextDouble() / 5.0D, (double) blockpos.getY() + (0.5D - randomsource.nextDouble()), d1 + randomsource.nextDouble() / 5.0D, 0.0D, 0.0D, 0.0D);
++ if (random.nextBoolean()) {
++ level.addParticle(ParticleTypes.SMOKE, d0 + random.nextDouble() / 5.0D, (double) pos.getY() + (0.5D - random.nextDouble()), d1 + random.nextDouble() / 5.0D, 0.0D, 0.0D, 0.0D);
+ }
+ }
+
+ }
+
+ @Override
+- @Override
+- public void entityInside(BlockState blockstate, Level level, BlockPos blockpos, Entity entity) {
++ public void entityInside(IBlockData state, Level level, BlockPos pos, Entity entity) {
+ if (!level.isClientSide && level.getDifficulty() != Difficulty.PEACEFUL) {
+ if (entity instanceof LivingEntity) {
+- LivingEntity livingentity = (LivingEntity) entity;
++ LivingEntity entityliving = (LivingEntity) entity;
+
+- if (!livingentity.isInvulnerableTo(level.damageSources().wither())) {
+- livingentity.addEffect(new MobEffectInstance(MobEffects.WITHER, 40));
++ if (!entityliving.isInvulnerableTo(level.damageSources().wither())) {
++ entityliving.addEffect(new MobEffectInstance(MobEffects.WITHER, 40), org.bukkit.event.entity.EntityPotionEffectEvent.Cause.WITHER_ROSE); // CraftBukkit
+ }
+ }
+