meteor-client icon indicating copy to clipboard operation
meteor-client copied to clipboard

[Bug] Spawn Proofer and soul sand

Open rumpelchita opened this issue 3 years ago • 4 comments

Describe the bug

Hello! Spawn Proofer does not work with soul sand. Stone slabs are not placed. Can this be realizable? Thanks!

Steps to reproduce

Everything is described in the bug

Meteor Version

0.4.7+

Minecraft Version

1.18.1

Operating System

Windows

Before submitting a bug report

  • [X] This bug wasn't already reported. (I have checked every bug report on github)

  • [X] This is a valid bug. (I am able to reproduce this on the latest dev build)

rumpelchita avatar Feb 15 '22 06:02 rumpelchita

I fixed this by adding this last line into the middle of this blockutils command.

public static MobSpawn isValidMobSpawn(BlockPos blockPos, boolean newMobSpawnLightLevel) { int spawnLightLimit = newMobSpawnLightLevel ? 0 : 7; if (!(mc.world.getBlockState(blockPos).getBlock() instanceof AirBlock) || mc.world.getBockState(blockPos.down()).getBlock() == Blocks.BEDROCK) return MobSpawn.Never;

    if (mc.world.getBlockState(blockPos.down()).getBlock() == Blocks.SOUL_SAND) return MobSpawn.Potential;

miassassin avatar Apr 30 '22 01:04 miassassin

it's because soul sand isn't a full block

gigglingbed avatar Apr 30 '22 18:04 gigglingbed

I fixed this by adding this last line into the middle of this blockutils command.

public static MobSpawn isValidMobSpawn(BlockPos blockPos, boolean newMobSpawnLightLevel) { int spawnLightLimit = newMobSpawnLightLevel ? 0 : 7; if (!(mc.world.getBlockState(blockPos).getBlock() instanceof AirBlock) || mc.world.getBockState(blockPos.down()).getBlock() == Blocks.BEDROCK) return MobSpawn.Never;

    if (mc.world.getBlockState(blockPos.down()).getBlock() == Blocks.SOUL_SAND) return MobSpawn.Potential;

could you describe where to put this code please?

sussyboiiii avatar Jun 10 '22 20:06 sussyboiiii

@sussyboiiii Sorry for the delay. Actually my previous fix wasn't the best as it was laying the spawn proof block regardless of the light level on the soul sand. I've fixed this again with the following edit and it now considers the light level. This edit needs to be made to blockutils.java. This edit is under the public function "static mobspawn" This edit is within the second if statement.

Soul sand should be excluded from the fullcube check as it is spawnable despite being a partial cube and that is how I handled the fix.

if (!topSurface(mc.world.getBlockState(blockPos.down()))) { if (mc.world.getBlockState(blockPos.down()).getCollisionShape(mc.world, blockPos.down()) != VoxelShapes.fullCube() && mc.world.getBlockState(blockPos.down()).getBlock() != Blocks.SOUL_SAND) return MobSpawn.Never; if (mc.world.getBlockState(blockPos.down()).isTranslucent(mc.world, blockPos.down())) return MobSpawn.Never; }

The key edit is "&& mc.world.getBlockState(blockPos.down()).getBlock() != Blocks.SOUL_SAND"

I've tested it and it is working. It also fixes the same issue inside light overlay.

miassassin avatar Jun 28 '22 02:06 miassassin