Skip to content

Commit

Permalink
shadow correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
rfresh2 committed Oct 7, 2023
1 parent 6020c50 commit b13aeb9
Showing 1 changed file with 1 addition and 43 deletions.
44 changes: 1 addition & 43 deletions src/main/java/xaeroplus/mixin/client/MixinMapWriter.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,12 @@
import net.minecraft.registry.RegistryKey;
import net.minecraft.state.State;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.random.Random;
import net.minecraft.world.LightType;
import net.minecraft.world.World;
import net.minecraft.world.biome.Biome;
import net.minecraft.world.chunk.WorldChunk;
import org.spongepowered.asm.mixin.Final;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Overwrite;
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
Expand All @@ -33,7 +31,6 @@
import xaero.map.biome.BiomeColorCalculator;
import xaero.map.biome.BiomeGetter;
import xaero.map.biome.BlockTintProvider;
import xaero.map.cache.BlockStateShortShapeCache;
import xaero.map.core.XaeroWorldMapCore;
import xaero.map.misc.CachedFunction;
import xaero.map.misc.Misc;
Expand All @@ -42,7 +39,6 @@
import xaeroplus.util.ChunkUtils;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.concurrent.TimeUnit;

import static java.util.Objects.nonNull;
Expand All @@ -62,18 +58,13 @@ public abstract class MixinMapWriter {
.maximumSize(10000)
.expireAfterWrite(5L, TimeUnit.SECONDS)
.<Long, Long>build();
public long writeFreeSinceLastWrite = -1L;
@Shadow
private int X;
@Shadow
private int Z;
public long writeFreeSinceLastWrite = -1L;
@Shadow
private int playerChunkX;
@Shadow
private int playerChunkZ;
@Shadow
private int loadDistance;
@Shadow
private int startTileChunkX;
@Shadow
private int startTileChunkZ;
Expand All @@ -82,22 +73,8 @@ public abstract class MixinMapWriter {
@Shadow
private int endTileChunkZ;
@Shadow
private int insideX;
@Shadow
private int insideZ;
@Shadow
private long updateCounter;
@Shadow
private int caveStart;
@Shadow
private int writingLayer = Integer.MAX_VALUE;
@Shadow
private int writtenCaveStart = Integer.MAX_VALUE;
@Shadow
private boolean clearCachedColours;
@Shadow
private MapBlock loadingObject;
@Shadow
private OverlayBuilder overlayBuilder;
@Final
@Shadow
Expand All @@ -106,8 +83,6 @@ public abstract class MixinMapWriter {
@Shadow
private BlockPos.Mutable mutableGlobalPos;
@Shadow
private Random usedRandom = Random.create(0L);
@Shadow
private long lastWrite = -1L;
@Shadow
private long lastWriteTry = -1L;
Expand All @@ -122,14 +97,7 @@ public abstract class MixinMapWriter {
@Shadow
private MapProcessor mapProcessor;
@Shadow
private ArrayList<BlockState> buggedStates;
@Shadow
private BlockStateShortShapeCache blockStateShortShapeCache;
@Shadow
private int topH;
@Final
@Shadow
private CachedFunction<State<?, ?>, Boolean> transparentCache;
@Shadow
private int firstTransparentStateY;
@Final
Expand All @@ -141,16 +109,6 @@ public abstract class MixinMapWriter {
private BiomeGetter biomeGetter;
@Shadow
private ArrayList<MapRegion> regionBuffer = new ArrayList<>();
@Shadow
private HashMap<String, Integer> textureColours;
@Shadow
private HashMap<BlockState, Integer> blockColours;
@Shadow
private long lastLayerSwitch;
@Shadow
private BlockState lastBlockStateForTextureColor = null;
@Shadow
private int lastBlockStateForTextureColorResult = -1;

@Shadow
public abstract boolean writeMap(
Expand Down

0 comments on commit b13aeb9

Please sign in to comment.