This commit is contained in:
gnembon committed 2020-07-22 17:15:26 -03:00
1 parent 49a88cb27f
commit 4fe6a8d80f
9 files changed
+18 -16

No files matched your search

@@ -29,7 +29,7 @@ public abstract class CoralBlockMixin implements Fertilizable
{
public boolean isFertilizable(BlockView var1, BlockPos var2, BlockState var3, boolean var4)
{
return CarpetSettings.renewableCoral && var3.get(CoralParentBlock.WATERLOGGED) && var1.getFluidState(var2.up()).isIn(FluidTags.WATER);
return CarpetSettings.renewableCoral && var3.get(CoralParentBlock.WATERLOGGED) && var1.getFluidState(var2.method_30931()).isIn(FluidTags.WATER);
}
public boolean canGrow(World var1, Random var2, BlockPos var3, BlockState var4)
@@ -15,7 +15,7 @@ public class PistonBlock_qcMixin
{
@Inject(method = "shouldExtend", cancellable = true, at = @At(
value = "INVOKE",
target = "Lnet/minecraft/util/math/BlockPos;up()Lnet/minecraft/util/math/BlockPos;"
target = "Lnet/minecraft/util/math/BlockPos;method_30931()Lnet/minecraft/util/math/BlockPos;" // up
))
private void cancelUpCheck(World world_1, BlockPos blockPos_1, Direction direction_1, CallbackInfoReturnable<Boolean> cir)
{
@@ -153,9 +153,9 @@ public class SpawnHelperMixin
@Redirect(method = "spawnEntitiesInChunk(Lnet/minecraft/entity/SpawnGroup;Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/world/chunk/Chunk;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/world/SpawnHelper$Checker;Lnet/minecraft/world/SpawnHelper$Runner;)V", at = @At(
value = "INVOKE",
target = "Lnet/minecraft/server/world/ServerWorld;spawnEntity(Lnet/minecraft/entity/Entity;)Z"
target = "Lnet/minecraft/server/world/ServerWorld;method_30771(Lnet/minecraft/entity/Entity;)V"//"Lnet/minecraft/server/world/ServerWorld;spawnEntity(Lnet/minecraft/entity/Entity;)Z"
))
private static boolean spawnEntity(ServerWorld world, Entity entity_1)
private static void spawnEntity(ServerWorld world, Entity entity_1)
{
if (CarpetSettings.lagFreeSpawning)
// we used the mob - next time we will create a new one when needed
@@ -170,8 +170,8 @@ public class SpawnHelperMixin
entity_1.getBlockPos());
}
if (!SpawnReporter.mock_spawns)
return world.spawnEntity(entity_1);
return false;
world.method_30771(entity_1);
//world.spawnEntity(entity_1);
}
@Redirect(method = "spawnEntitiesInChunk(Lnet/minecraft/entity/SpawnGroup;Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/world/chunk/Chunk;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/world/SpawnHelper$Checker;Lnet/minecraft/world/SpawnHelper$Runner;)V", at = @At(