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

+2 -2
View File
@@ -4,8 +4,8 @@ org.gradle.jvmargs=-Xmx1G
# Fabric Properties
# check these on https://fabricmc.net/use
# or better: https://modmuss50.me/fabric.html
minecraft_version=20w29a
yarn_mappings=20w29a+build.13
minecraft_version=20w30a
yarn_mappings=20w30a+build.1
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.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(
@@ -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.up()));
neighbours.add(new BlockValue(null, world, center.method_30931()));
neighbours.add(new BlockValue(null, world, center.down()));
neighbours.add(new BlockValue(null, world, center.north()));
neighbours.add(new BlockValue(null, world, center.south()));
@@ -278,7 +278,7 @@ public class ShapesRenderer
text_x = (float)(-textRenderer.getWidth(shape.value.getString()));
}
VertexConsumerProvider.Immediate immediate = VertexConsumerProvider.immediate(Tessellator.getInstance().getBuffer());
textRenderer.draw(shape.value, text_x, 0.0F, shape.textcolor, false, AffineTransformation.identity().getMatrix(), immediate, false, shape.textbck, 15728880);
textRenderer.method_30882(shape.value, text_x, 0.0F, shape.textcolor, false, AffineTransformation.identity().getMatrix(), immediate, false, shape.textbck, 15728880);
immediate.draw();
RenderSystem.popMatrix();
RenderSystem.enableCull();
@@ -68,8 +68,10 @@ public class ValueConversions
public static Value fromPath(ServerWorld world, Path path)
{
List<Value> nodes = new ArrayList<>();
for (PathNode node: path.getNodes())
//for (PathNode node: path.getNodes())
for (int i = 0, len = path.getLength(); i < len; i++)
{
PathNode node = path.getNode(i);
nodes.add( ListValue.of(
new BlockValue(null, world, node.getPos()),
new StringValue(node.type.name().toLowerCase(Locale.ROOT)),
+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.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()))));
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()))));
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.up(), world));
lst.add(wander_chances(pos.method_30931(), 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.up());
BlockState iblockstate_up = worldserver.getBlockState(pos.method_30931());
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.up(), iblockstate_up, iblockstate_up.getFluidState(), type))
if( flag && SpawnHelper.isClearForSpawn(worldserver, pos, iblockstate, iblockstate.getFluidState(), type) && SpawnHelper.isClearForSpawn(worldserver, pos.method_30931(), iblockstate_up, iblockstate_up.getFluidState(), type))
{
result.ground ++;
if (add_ground && diagnostic.check_entity_spawn(pos))