Skip to content

Commit

Permalink
minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
MBatt1 committed Aug 8, 2024
1 parent d4c68ff commit e49f8cd
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 50 deletions.
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
package net.id.paradiselost.blocks;

import net.fabricmc.fabric.mixin.lookup.BlockEntityTypeAccessor;
import net.id.paradiselost.blocks.natural.ParadiseLostSaplingBlock;
import net.id.paradiselost.blocks.natural.tree.FruitingLeavesBlock;
import net.id.paradiselost.blocks.natural.tree.ParadiseLostLeavesBlock;
import net.id.paradiselost.items.ParadiseLostItems;
import net.id.paradiselost.mixin.util.SignTypeAccessor;
import net.id.paradiselost.util.ParadiseLostSignType;
import net.id.paradiselost.world.feature.tree.generator.MotherAurelSaplingGenerator;
import net.id.paradiselost.world.feature.tree.generator.OrangeSaplingGenerator;
import net.minecraft.block.*;
import net.minecraft.block.entity.BlockEntityType;
import net.minecraft.block.sapling.SaplingGenerator;
import net.minecraft.item.ItemConvertible;
import net.minecraft.registry.Registries;
import net.minecraft.registry.Registry;
import net.minecraft.sound.BlockSoundGroup;
Expand All @@ -22,7 +17,6 @@
import java.util.Iterator;
import java.util.function.Consumer;

import static net.id.paradiselost.ParadiseLost.MOD_ID;
import static net.id.paradiselost.ParadiseLost.locate;
import static net.id.paradiselost.blocks.ParadiseLostBlockActions.*;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import net.minecraft.client.world.ClientWorld;
import net.minecraft.particle.DefaultParticleType;
import net.minecraft.registry.tag.FluidTags;
import net.minecraft.tag.FluidTags;
import net.minecraft.util.math.BlockPos;

import java.util.SplittableRandom;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,24 +1,15 @@
package net.id.paradiselost.mixin.client.render;

import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.id.paradiselost.fluids.DenseCloudFluid;
import net.id.paradiselost.util.RegistryUtil;
import net.id.paradiselost.world.dimension.ParadiseLostDimension;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.render.BackgroundRenderer;
import net.minecraft.client.render.Camera;
import net.minecraft.client.render.CameraSubmersionType;
import net.minecraft.client.world.ClientWorld;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Vec3d;
import org.objectweb.asm.Opcodes;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.Redirect;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;

@Mixin(BackgroundRenderer.class)
public class BackgroundRendererMixin {
Expand All @@ -34,15 +25,4 @@ private static double adjustVoidVector(Vec3d vec3d) {
return RegistryUtil.dimensionMatches(MinecraftClient.getInstance().world, ParadiseLostDimension.DIMENSION_TYPE) ? Double.MAX_VALUE : vec3d.y;
}

@Environment(EnvType.CLIENT)
@Inject(method = "render", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/Camera;getPos()Lnet/minecraft/util/math/Vec3d;"))
private static void denseCloudRenderColor(Camera camera, float tickDelta, ClientWorld world, int i, float f, CallbackInfo ci) {
BlockPos playerPos = new BlockPos(MinecraftClient.getInstance().player.getEyePos());
if (camera.getSubmersionType() == CameraSubmersionType.WATER
&& world.getFluidState(playerPos).getFluid() instanceof DenseCloudFluid) {
red = 0.323F;
green = 0.434F;
blue = 0.485F;
}
}
}
13 changes: 0 additions & 13 deletions src/main/java/net/id/paradiselost/mixin/util/SignTypeAccessor.java

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion src/main/resources/paradise_lost.mixins.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
"world.ExplosionMixin",
"util.DefaultedRegistryMixin",
"util.NbtCompoundAccessor",
"util.SignTypeAccessor",
"util.SlotAccessor",
"brain.MemoryModuleTypeInvoker",
"brain.ActivityInvoker",
Expand Down

0 comments on commit e49f8cd

Please sign in to comment.