just mappings

This commit is contained in:
gnembon committed 2021-10-20 22:44:46 -03:00
1 parent 044d191409
commit 0f4c418a0e
5 files changed
+11 -11

No files matched your search

@@ -36,12 +36,12 @@ public abstract class ServerChunkManagerMixin implements ServerChunkManagerInter
@Redirect(method = "tickChunks", at = @At(
value = "INVOKE",
target = "Lnet/minecraft/server/world/ChunkTicketManager;getSpawningChunkCount()I"
target = "Lnet/minecraft/server/world/ChunkTicketManager;getTickedChunkCount()I"
))
//this runs once per world spawning cycle. Allows to grab mob counts and count spawn ticks
private int setupTracking(ChunkTicketManager chunkTicketManager)
{
int j = chunkTicketManager.getSpawningChunkCount();
int j = chunkTicketManager.getTickedChunkCount();
RegistryKey<World> dim = this.world.getRegistryKey(); // getDimensionType;
//((WorldInterface)world).getPrecookedMobs().clear(); not needed because mobs are compared with predefined BBs
SpawnReporter.chunkCounts.put(dim, j);
@@ -1,7 +1,7 @@
package carpet.mixins;
import carpet.CarpetSettings;
import net.minecraft.client.render.SkyProperties;
import net.minecraft.client.render.DimensionEffects;
import net.minecraft.client.render.WorldRenderer;
//import net.minecraft.world.dimension.Dimension;
import org.spongepowered.asm.mixin.Mixin;
@@ -13,9 +13,9 @@ public class WorldRenderer_fogOffMixin
{
@Redirect(method = "render", require = 0, expect = 0, at = @At(
value = "INVOKE",
target = "Lnet/minecraft/client/render/SkyProperties;useThickFog(II)Z"
target = "Lnet/minecraft/client/render/DimensionEffects;useThickFog(II)Z"
))
private boolean isReallyThick(SkyProperties skyProperties, int x, int z)
private boolean isReallyThick(DimensionEffects skyProperties, int x, int z)
{
if (CarpetSettings.fogOff) return false;
return skyProperties.useThickFog(x, z);
@@ -545,7 +545,7 @@ public class WorldAccess {
{
c.host.issueDeprecation("loaded_ep(...)");
BlockPos pos = BlockArgument.findIn((CarpetContext)c, lv, 0).block.getPos();
return BooleanValue.of(((CarpetContext)c).s.getWorld().method_37118(pos));// 1.17pre1 getChunkManager().shouldTickChunk(new ChunkPos(pos)));
return BooleanValue.of(((CarpetContext)c).s.getWorld().shouldTickEntity(pos));// 1.17pre1 getChunkManager().shouldTickChunk(new ChunkPos(pos)));
});
expression.addContextFunction("loaded_status", -1, (c, t, lv) ->
@@ -1187,7 +1187,7 @@ public class WorldAccess {
int j = i + BiomeCoords.fromBlock(chunk.getHeight()) - 1;
int k = MathHelper.clamp(biomeY, i, j);
int l = chunk.getSectionIndex(BiomeCoords.toBlock(k));
chunk.getSection(l).method_38294().set(biomeX & 3, k & 3, biomeZ & 3, biome);
chunk.getSection(l).getBiomeContainer().set(biomeX & 3, k & 3, biomeZ & 3, biome);
} catch (Throwable var8) {
return Value.FALSE;
}
@@ -536,7 +536,7 @@ public class EntityValue extends Value
ValueConversions.of(spe.getSpawnPointPosition()),
ValueConversions.of(spe.getSpawnPointDimension()),
new NumericValue(spe.getSpawnAngle()),
BooleanValue.of(spe.isSpawnPointSet())
BooleanValue.of(spe.isSpawnForced())
);
}
return Value.NULL;