resolved warnings. part 2
This commit is contained in:
@@ -14,7 +14,7 @@ import net.minecraft.core.BlockPos;
|
||||
*/
|
||||
public class BlockPosWrapper extends AbstractBlockPosWrapper
|
||||
{
|
||||
private BlockPos.MutableBlockPos blockPos;
|
||||
private final BlockPos.MutableBlockPos blockPos;
|
||||
|
||||
|
||||
public BlockPosWrapper()
|
||||
|
||||
@@ -16,7 +16,7 @@ import net.minecraft.world.level.ChunkPos;
|
||||
*/
|
||||
public class ChunkPosWrapper extends AbstractChunkPosWrapper
|
||||
{
|
||||
private net.minecraft.world.level.ChunkPos chunkPos;
|
||||
private final net.minecraft.world.level.ChunkPos chunkPos;
|
||||
|
||||
public ChunkPosWrapper()
|
||||
{
|
||||
|
||||
@@ -30,8 +30,8 @@ import net.minecraft.world.level.levelgen.Heightmap;
|
||||
*/
|
||||
public class ChunkWrapper implements IChunkWrapper
|
||||
{
|
||||
private ChunkAccess chunk;
|
||||
private BlockAndTintGetter lightSource;
|
||||
private final ChunkAccess chunk;
|
||||
private final BlockAndTintGetter lightSource;
|
||||
private final int CHUNK_SECTION_SHIFT = 4;
|
||||
private final int CHUNK_SECTION_MASK = 0b1111;
|
||||
private final int CHUNK_SIZE_SHIFT = 4;
|
||||
|
||||
@@ -475,7 +475,7 @@ public abstract class ConfigGui
|
||||
|
||||
private final String translationPrefix;
|
||||
private final Screen parent;
|
||||
private String category;
|
||||
private final String category;
|
||||
private ConfigListWidget list;
|
||||
private boolean reload = false;
|
||||
|
||||
@@ -604,7 +604,7 @@ public abstract class ConfigGui
|
||||
String key = translationPrefix + (info.category.isEmpty() ? "" : info.category + ".") + info.field.getName() + ".@tooltip";
|
||||
|
||||
if (info.error != null && text.equals(name)) renderTooltip(matrices, (Component) info.error.getValue(), mouseX, mouseY);
|
||||
else if (I18n.exists(key) && (text == null ? false : text.equals(name))) {
|
||||
else if (I18n.exists(key) && (text != null && text.equals(name))) {
|
||||
List<Component> list = new ArrayList<>();
|
||||
for (String str : I18n.get(key).split("\n"))
|
||||
list.add(new TextComponent(str));
|
||||
|
||||
@@ -36,7 +36,7 @@ public class BiomeWrapper implements IBiomeWrapper
|
||||
{
|
||||
|
||||
public static final ConcurrentMap<Biome, BiomeWrapper> biomeWrapperMap = new ConcurrentHashMap<>();
|
||||
private Biome biome;
|
||||
private final Biome biome;
|
||||
|
||||
public BiomeWrapper(Biome biome)
|
||||
{
|
||||
|
||||
@@ -34,7 +34,7 @@ import net.minecraft.world.level.dimension.DimensionType;
|
||||
public class DimensionTypeWrapper implements IDimensionTypeWrapper
|
||||
{
|
||||
private static final ConcurrentMap<DimensionType, DimensionTypeWrapper> dimensionTypeWrapperMap = new ConcurrentHashMap<>();
|
||||
private DimensionType dimensionType;
|
||||
private final DimensionType dimensionType;
|
||||
|
||||
public DimensionTypeWrapper(DimensionType dimensionType)
|
||||
{
|
||||
|
||||
+28
-29
@@ -99,10 +99,10 @@ public final class WorldGenerationStep {
|
||||
|
||||
public static class Rolling {
|
||||
|
||||
private int size;
|
||||
private final int size;
|
||||
private double total = 0d;
|
||||
private int index = 0;
|
||||
private double[] samples;
|
||||
private final double[] samples;
|
||||
|
||||
public Rolling(int size) {
|
||||
this.size = size;
|
||||
@@ -213,23 +213,23 @@ public final class WorldGenerationStep {
|
||||
this.gridCentreToEdge = gridCentreToEdge;
|
||||
}
|
||||
|
||||
public final T getOffsetOf(int index, int x, int y) {
|
||||
public T getOffsetOf(int index, int x, int y) {
|
||||
return get(index + x + y * gridSize);
|
||||
}
|
||||
|
||||
public final int offsetOf(int index, int x, int y) {
|
||||
public int offsetOf(int index, int x, int y) {
|
||||
return index + x + y * gridSize;
|
||||
}
|
||||
|
||||
public final Pos posOf(int index) {
|
||||
public Pos posOf(int index) {
|
||||
return new Pos(index % gridSize, index / gridSize);
|
||||
}
|
||||
|
||||
public final int calculateOffset(int x, int y) {
|
||||
public int calculateOffset(int x, int y) {
|
||||
return x + y * gridSize;
|
||||
}
|
||||
|
||||
public final GridList<T> subGrid(int gridCentreToEdge) {
|
||||
public GridList<T> subGrid(int gridCentreToEdge) {
|
||||
int centreIndex = size() / 2;
|
||||
GridList<T> subGrid = new GridList<T>(gridCentreToEdge);
|
||||
for (int oy = -gridCentreToEdge; oy <= gridCentreToEdge; oy++) {
|
||||
@@ -298,14 +298,14 @@ public final class WorldGenerationStep {
|
||||
}
|
||||
|
||||
public static final class ThreadedParameters {
|
||||
private static ThreadLocal<ThreadedParameters> localParam = new ThreadLocal<ThreadedParameters>();
|
||||
private static final ThreadLocal<ThreadedParameters> localParam = new ThreadLocal<ThreadedParameters>();
|
||||
final ServerLevel level;
|
||||
final StructureFeatureManager structFeat;
|
||||
final StructureCheck structCheck;
|
||||
boolean isValid = true;
|
||||
public final PerfCalculator perf = new PerfCalculator();
|
||||
|
||||
public static final ThreadedParameters getOrMake(GlobalParameters param) {
|
||||
public static ThreadedParameters getOrMake(GlobalParameters param) {
|
||||
ThreadedParameters tParam = localParam.get();
|
||||
if (tParam != null && tParam.isValid && tParam.level == param.level)
|
||||
return tParam;
|
||||
@@ -354,21 +354,21 @@ public final class WorldGenerationStep {
|
||||
});
|
||||
}
|
||||
|
||||
public final boolean isCompleted() {
|
||||
public boolean isCompleted() {
|
||||
return future.isDone();
|
||||
}
|
||||
|
||||
public final boolean hasTimeout(int duration, TimeUnit unit) {
|
||||
public boolean hasTimeout(int duration, TimeUnit unit) {
|
||||
long currentTime = System.nanoTime();
|
||||
long delta = currentTime - nanotime;
|
||||
return (delta > TimeUnit.NANOSECONDS.convert(duration, unit));
|
||||
}
|
||||
|
||||
public final void terminate() {
|
||||
public void terminate() {
|
||||
future.cancel(true);
|
||||
}
|
||||
|
||||
public final void join() {
|
||||
public void join() {
|
||||
try {
|
||||
future.get();
|
||||
} catch (InterruptedException | ExecutionException e) {
|
||||
@@ -376,7 +376,7 @@ public final class WorldGenerationStep {
|
||||
}
|
||||
}
|
||||
|
||||
public final boolean tooClose(int cx, int cz, int cr) {
|
||||
public boolean tooClose(int cx, int cz, int cr) {
|
||||
int distX = Math.abs(cx - pos.x);
|
||||
int distZ = Math.abs(cz - pos.z);
|
||||
int minRange = cr+range+1; //Need one to account for the center
|
||||
@@ -384,7 +384,7 @@ public final class WorldGenerationStep {
|
||||
return distX < minRange && distZ < minRange;
|
||||
}
|
||||
|
||||
public final void refreshTimeout() {
|
||||
public void refreshTimeout() {
|
||||
nanotime = System.nanoTime();
|
||||
}
|
||||
|
||||
@@ -394,7 +394,7 @@ public final class WorldGenerationStep {
|
||||
}
|
||||
}
|
||||
|
||||
private final static <T> T joinAsync(CompletableFuture<T> f) {
|
||||
private static <T> T joinAsync(CompletableFuture<T> f) {
|
||||
return f.join();
|
||||
}
|
||||
|
||||
@@ -412,7 +412,7 @@ public final class WorldGenerationStep {
|
||||
public final ExecutorService executors = Executors
|
||||
.newCachedThreadPool(new ThreadFactoryBuilder().setNameFormat("Gen-Worker-Thread-%d").build());
|
||||
|
||||
public final boolean tryAddPoint(int px, int pz, int range, Steps target) {
|
||||
public boolean tryAddPoint(int px, int pz, int range, Steps target) {
|
||||
int boxSize = range * 2 + 1;
|
||||
int x = Math.floorDiv(px, boxSize) * boxSize + range;
|
||||
int z = Math.floorDiv(pz, boxSize) * boxSize + range;
|
||||
@@ -426,7 +426,7 @@ public final class WorldGenerationStep {
|
||||
return true;
|
||||
}
|
||||
|
||||
public final void updateAllFutures() {
|
||||
public void updateAllFutures() {
|
||||
// Update all current out standing jobs
|
||||
Iterator<GenerationEvent> iter = events.iterator();
|
||||
while (iter.hasNext()) {
|
||||
@@ -541,7 +541,7 @@ public final class WorldGenerationStep {
|
||||
}
|
||||
}
|
||||
|
||||
public final GridList<ChunkAccess> generateDirect(GenerationEvent e, GridList<ChunkAccess> subRange, Steps step,
|
||||
public GridList<ChunkAccess> generateDirect(GenerationEvent e, GridList<ChunkAccess> subRange, Steps step,
|
||||
LightedWorldGenRegion region) {
|
||||
try {
|
||||
subRange.forEach((chunk) -> {
|
||||
@@ -617,7 +617,7 @@ public final class WorldGenerationStep {
|
||||
}
|
||||
}
|
||||
|
||||
public final void generateGroup(ThreadedParameters tParams, WorldGenRegion worldGenRegion,
|
||||
public void generateGroup(ThreadedParameters tParams, WorldGenRegion worldGenRegion,
|
||||
List<ChunkAccess> chunks) {
|
||||
|
||||
for (ChunkAccess chunk : chunks) {
|
||||
@@ -683,7 +683,7 @@ public final class WorldGenerationStep {
|
||||
}
|
||||
}
|
||||
|
||||
public final void generateGroup(ThreadedParameters tParams, WorldGenRegion worldGenRegion,
|
||||
public void generateGroup(ThreadedParameters tParams, WorldGenRegion worldGenRegion,
|
||||
List<ChunkAccess> chunks) {
|
||||
|
||||
for (ChunkAccess chunk : chunks) {
|
||||
@@ -700,7 +700,7 @@ public final class WorldGenerationStep {
|
||||
public final class StepBiomes {
|
||||
public final ChunkStatus STATUS = ChunkStatus.BIOMES;
|
||||
|
||||
public final void generateGroup(ThreadedParameters tParams, WorldGenRegion worldGenRegion,
|
||||
public void generateGroup(ThreadedParameters tParams, WorldGenRegion worldGenRegion,
|
||||
List<ChunkAccess> chunks) {
|
||||
|
||||
for (ChunkAccess chunk : chunks) {
|
||||
@@ -718,7 +718,7 @@ public final class WorldGenerationStep {
|
||||
public final class StepNoise {
|
||||
public final ChunkStatus STATUS = ChunkStatus.NOISE;
|
||||
|
||||
public final void generateGroup(ThreadedParameters tParams, WorldGenRegion worldGenRegion,
|
||||
public void generateGroup(ThreadedParameters tParams, WorldGenRegion worldGenRegion,
|
||||
List<ChunkAccess> chunks) {
|
||||
|
||||
for (ChunkAccess chunk : chunks) {
|
||||
@@ -735,7 +735,7 @@ public final class WorldGenerationStep {
|
||||
public final class StepSurface {
|
||||
public final ChunkStatus STATUS = ChunkStatus.SURFACE;
|
||||
|
||||
public final void generateGroup(ThreadedParameters tParams, WorldGenRegion worldGenRegion,
|
||||
public void generateGroup(ThreadedParameters tParams, WorldGenRegion worldGenRegion,
|
||||
List<ChunkAccess> chunks) {
|
||||
for (ChunkAccess chunk : chunks) {
|
||||
((ProtoChunk) chunk).setStatus(STATUS);
|
||||
@@ -751,7 +751,7 @@ public final class WorldGenerationStep {
|
||||
public final class StepCarvers {
|
||||
public final ChunkStatus STATUS = ChunkStatus.CARVERS;
|
||||
|
||||
public final void generateGroup(ThreadedParameters tParams, WorldGenRegion worldGenRegion,
|
||||
public void generateGroup(ThreadedParameters tParams, WorldGenRegion worldGenRegion,
|
||||
List<ChunkAccess> chunks) {
|
||||
for (ChunkAccess chunk : chunks) {
|
||||
// DISABLED CURRENTLY!
|
||||
@@ -770,7 +770,7 @@ public final class WorldGenerationStep {
|
||||
public final class StepFeatures {
|
||||
public final ChunkStatus STATUS = ChunkStatus.FEATURES;
|
||||
|
||||
public final void generateGroup(ThreadedParameters tParams, WorldGenRegion worldGenRegion,
|
||||
public void generateGroup(ThreadedParameters tParams, WorldGenRegion worldGenRegion,
|
||||
GridList<ChunkAccess> chunks) {
|
||||
for (ChunkAccess chunk : chunks) {
|
||||
((ProtoChunk) chunk).setStatus(STATUS);
|
||||
@@ -799,7 +799,7 @@ public final class WorldGenerationStep {
|
||||
public final class StepLight {
|
||||
public final ChunkStatus STATUS = ChunkStatus.LIGHT;
|
||||
|
||||
public final void generateGroup(LevelLightEngine lightEngine,
|
||||
public void generateGroup(LevelLightEngine lightEngine,
|
||||
GridList<ChunkAccess> chunks) {
|
||||
for (ChunkAccess chunk : chunks) {
|
||||
((ProtoChunk) chunk).setStatus(STATUS);
|
||||
@@ -868,8 +868,7 @@ public final class WorldGenerationStep {
|
||||
@Override
|
||||
public BlockGetter getChunkForLighting(int chunkX, int chunkZ) {
|
||||
// May be null
|
||||
ChunkAccess chunk = genRegion.getChunk(chunkX, chunkZ, ChunkStatus.EMPTY, false);
|
||||
return chunk;
|
||||
return genRegion.getChunk(chunkX, chunkZ, ChunkStatus.EMPTY, false);
|
||||
}
|
||||
@Override
|
||||
public BlockGetter getLevel() {
|
||||
|
||||
+1
-1
Submodule core updated: 7bf54d20c0...6b6d011cd5
@@ -26,7 +26,7 @@ public class MixinFogRenderer {
|
||||
private static final float A_EVEN_LARGER_VALUE = 42069420694206942069.F;
|
||||
|
||||
@Inject(at = @At("RETURN"), method = "setupFog(Lnet/minecraft/client/Camera;Lnet/minecraft/client/renderer/FogRenderer$FogMode;FZ)V")
|
||||
private static final void disableSetupFog(Camera camera, FogMode fogMode, float f, boolean bl, CallbackInfo callback) {
|
||||
private static void disableSetupFog(Camera camera, FogMode fogMode, float f, boolean bl, CallbackInfo callback) {
|
||||
FogType fogTypes = camera.getFluidInCamera();
|
||||
Entity entity = camera.getEntity();
|
||||
boolean isUnderWater = (entity instanceof LivingEntity) && ((LivingEntity)entity).hasEffect(MobEffects.BLINDNESS);
|
||||
|
||||
@@ -87,7 +87,7 @@ public class ForgeMain implements LodForgeMethodCaller
|
||||
MinecraftForge.EVENT_BUS.register(forgeClientProxy);
|
||||
}
|
||||
|
||||
private ModelDataMap dataMap = new ModelDataMap.Builder().build();
|
||||
private final ModelDataMap dataMap = new ModelDataMap.Builder().build();
|
||||
@Override
|
||||
public List<BakedQuad> getQuads(MinecraftWrapper mc, Block block, BlockState blockState, Direction direction, Random random) {
|
||||
return mc.getModelManager().getBlockModelShaper().getBlockModel(block.defaultBlockState()).getQuads(blockState, direction, random, dataMap);
|
||||
|
||||
@@ -27,7 +27,7 @@ public class MixinFogRenderer {
|
||||
@Inject(at = @At("RETURN"),
|
||||
method = "setupFog(Lnet/minecraft/client/Camera;Lnet/minecraft/client/renderer/FogRenderer$FogMode;FZF)V",
|
||||
remap = false) // Remap = false due to this being added by forge.
|
||||
private static final void disableSetupFog(Camera camera, FogMode fogMode, float f, boolean bl, float partTick, CallbackInfo callback) {
|
||||
private static void disableSetupFog(Camera camera, FogMode fogMode, float f, boolean bl, float partTick, CallbackInfo callback) {
|
||||
ILodConfigWrapperSingleton CONFIG;
|
||||
try {
|
||||
CONFIG = SingletonHandler.get(ILodConfigWrapperSingleton.class);
|
||||
|
||||
Reference in New Issue
Block a user