This commit is contained in:
gnembon committed 2020-07-27 01:44:42 -03:00
1 parent 42a43ff245
commit 3ec5c209fd
7 files changed
+12 -11

No files matched your search

+1 -1
View File
@@ -5,7 +5,7 @@ org.gradle.jvmargs=-Xmx1G
# check these on https://fabricmc.net/use
# or better: https://modmuss50.me/fabric.html
minecraft_version=20w30a
yarn_mappings=20w30a+build.1
yarn_mappings=20w30a+build.11
loader_version=0.9.0+build.204
# Mod Properties
@@ -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.method_30931()).isIn(FluidTags.WATER);
return CarpetSettings.renewableCoral && var3.get(CoralParentBlock.WATERLOGGED) && var1.getFluidState(var2.up()).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;method_30931()Lnet/minecraft/util/math/BlockPos;" // up
target = "Lnet/minecraft/util/math/BlockPos;up()Lnet/minecraft/util/math/BlockPos;" // up
))
private void cancelUpCheck(World world_1, BlockPos blockPos_1, Direction direction_1, CallbackInfoReturnable<Boolean> cir)
{
@@ -7,8 +7,8 @@ import net.minecraft.world.biome.Biome;
import net.minecraft.world.biome.source.BiomeSource;
import net.minecraft.world.gen.StructureAccessor;
import net.minecraft.world.gen.chunk.ChunkGenerator;
import net.minecraft.world.gen.chunk.NoiseChunkGenerator;
import net.minecraft.world.gen.chunk.StructuresConfig;
import net.minecraft.world.gen.chunk.SurfaceChunkGenerator;
//import net.minecraft.world.gen.feature.Feature;
import net.minecraft.world.gen.feature.StructureFeature;
import org.spongepowered.asm.mixin.Mixin;
@@ -18,7 +18,8 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
import java.util.List;
@Mixin(SurfaceChunkGenerator.class)
@Mixin(NoiseChunkGenerator.class)
// todo rename mixin after 1.15 is gone
public abstract class SurfaceChunkGenerator_husksSpawnMixin extends ChunkGenerator
{
public SurfaceChunkGenerator_husksSpawnMixin(BiomeSource biomeSource, StructuresConfig structuresConfig)
@@ -2368,7 +2368,7 @@ public class CarpetExpression
ServerWorld world = ((CarpetContext) c).s.getWorld();
List<Value> neighbours = new ArrayList<>();
neighbours.add(new BlockValue(null, world, center.method_30931()));
neighbours.add(new BlockValue(null, world, center.up()));
neighbours.add(new BlockValue(null, world, center.down()));
neighbours.add(new BlockValue(null, world, center.north()));
neighbours.add(new BlockValue(null, world, center.south()));
+3 -3
View File
@@ -194,8 +194,8 @@ public class BlockInfo
lst.add(Messenger.s(""));
lst.add(Messenger.s(String.format(" - Light in: %d, above: %d",
Math.max(world.getLightLevel(LightType.BLOCK, pos),world.getLightLevel(LightType.SKY, pos)) ,
Math.max(world.getLightLevel(LightType.BLOCK, pos.method_30931()),world.getLightLevel(LightType.SKY, pos.method_30931())))));
lst.add(Messenger.s(String.format(" - Brightness in: %.2f, above: %.2f", world.getBrightness(pos), world.getBrightness(pos.method_30931()))));
Math.max(world.getLightLevel(LightType.BLOCK, pos.up()),world.getLightLevel(LightType.SKY, pos.up())))));
lst.add(Messenger.s(String.format(" - Brightness in: %.2f, above: %.2f", world.getBrightness(pos), world.getBrightness(pos.up()))));
lst.add(Messenger.s(String.format(" - Is opaque: %s", material.isSolid() )));
//lst.add(Messenger.s(String.format(" - Light opacity: %d", state.getOpacity(world,pos))));
lst.add(Messenger.s(String.format(" - Blocks light: %s", state.getMaterial().blocksLight())));
@@ -216,7 +216,7 @@ public class BlockInfo
lst.add(Messenger.s(String.format(" - Strong power level: %d", world.getReceivedStrongRedstonePower(pos))));
lst.add(Messenger.s(String.format(" - Redstone power level: %d", world.getReceivedRedstonePower(pos))));
lst.add(Messenger.s(""));
lst.add(wander_chances(pos.method_30931(), world));
lst.add(wander_chances(pos.up(), world));
return lst;
}
@@ -111,7 +111,7 @@ public class PerimeterDiagnostics
BlockState iblockstate = worldserver.getBlockState(pos);
BlockState iblockstate_down = worldserver.getBlockState(pos.down());
BlockState iblockstate_up = worldserver.getBlockState(pos.method_30931());
BlockState iblockstate_up = worldserver.getBlockState(pos.up());
if ( iblockstate.getMaterial() == Material.WATER && iblockstate_down.getMaterial() == Material.WATER && !iblockstate_up.isSolidBlock(worldserver, pos)) // isSimpleFUllBLock
{
@@ -131,7 +131,7 @@ public class PerimeterDiagnostics
{
Block block = iblockstate_down.getBlock();
boolean flag = block != Blocks.BEDROCK && block != Blocks.BARRIER;
if( flag && SpawnHelper.isClearForSpawn(worldserver, pos, iblockstate, iblockstate.getFluidState(), type) && SpawnHelper.isClearForSpawn(worldserver, pos.method_30931(), iblockstate_up, iblockstate_up.getFluidState(), type))
if( flag && SpawnHelper.isClearForSpawn(worldserver, pos, iblockstate, iblockstate.getFluidState(), type) && SpawnHelper.isClearForSpawn(worldserver, pos.up(), iblockstate_up, iblockstate_up.getFluidState(), type))
{
result.ground ++;
if (add_ground && diagnostic.check_entity_spawn(pos))