[Change] Removed old Sodium compatibility Code (#317)
This commit is contained in:
parent
bb601d9246
commit
c95e5eac06
1 changed files with 1 additions and 5 deletions
|
@ -27,18 +27,16 @@ public class BiomeColorsMixin {
|
|||
private static final int POISON_COLOR = ColorUtil.color(92, 160, 78);
|
||||
private static final int STREAM_COLOR = ColorUtil.color(105, 213, 244);
|
||||
private static final Point[] OFFSETS;
|
||||
private static final boolean HAS_SODIUM;
|
||||
|
||||
@Inject(method = "getAverageWaterColor", at = @At("RETURN"), cancellable = true)
|
||||
private static void be_getWaterColor(BlockAndTintGetter world, BlockPos pos, CallbackInfoReturnable<Integer> info) {
|
||||
if (ClientOptions.useSulfurWaterColor()) {
|
||||
BlockAndTintGetter view = HAS_SODIUM ? Minecraft.getInstance().level : world;
|
||||
MutableBlockPos mut = new MutableBlockPos();
|
||||
mut.setY(pos.getY());
|
||||
for (int i = 0; i < OFFSETS.length; i++) {
|
||||
mut.setX(pos.getX() + OFFSETS[i].x);
|
||||
mut.setZ(pos.getZ() + OFFSETS[i].y);
|
||||
if ((view.getBlockState(mut).is(EndBlocks.BRIMSTONE))) {
|
||||
if ((world.getBlockState(mut).is(EndBlocks.BRIMSTONE))) {
|
||||
info.setReturnValue(i < 4 ? POISON_COLOR : STREAM_COLOR);
|
||||
return;
|
||||
}
|
||||
|
@ -47,8 +45,6 @@ public class BiomeColorsMixin {
|
|||
}
|
||||
|
||||
static {
|
||||
HAS_SODIUM = FabricLoader.getInstance().isModLoaded("sodium");
|
||||
|
||||
int index = 0;
|
||||
OFFSETS = new Point[20];
|
||||
for (int x = -2; x < 3; x++) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue