mirror of
https://github.com/Wurst-Imperium/Wurst7.git
synced 2024-09-19 17:02:13 +02:00
Merge branch 'master' into 24w36a
This commit is contained in:
commit
061c593067
@ -13,7 +13,7 @@ loader_version=0.16.4
|
|||||||
fabric_version=0.103.2+1.21.2
|
fabric_version=0.103.2+1.21.2
|
||||||
|
|
||||||
# Mod Properties
|
# Mod Properties
|
||||||
mod_version = v7.45-MC24w36a
|
mod_version = v7.45.1-MC24w36a
|
||||||
maven_group = net.wurstclient
|
maven_group = net.wurstclient
|
||||||
archives_base_name = Wurst-Client
|
archives_base_name = Wurst-Client
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ public enum WurstClient
|
|||||||
public static MinecraftClient MC;
|
public static MinecraftClient MC;
|
||||||
public static IMinecraftClient IMC;
|
public static IMinecraftClient IMC;
|
||||||
|
|
||||||
public static final String VERSION = "7.45";
|
public static final String VERSION = "7.45.1";
|
||||||
public static final String MC_VERSION = "24w36a";
|
public static final String MC_VERSION = "24w36a";
|
||||||
|
|
||||||
private WurstAnalytics analytics;
|
private WurstAnalytics analytics;
|
||||||
|
@ -9,32 +9,35 @@ package net.wurstclient.mixin;
|
|||||||
|
|
||||||
import org.spongepowered.asm.mixin.Mixin;
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
import org.spongepowered.asm.mixin.Pseudo;
|
import org.spongepowered.asm.mixin.Pseudo;
|
||||||
|
import org.spongepowered.asm.mixin.injection.At;
|
||||||
|
import org.spongepowered.asm.mixin.injection.Inject;
|
||||||
|
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
||||||
|
|
||||||
|
import net.minecraft.block.BlockState;
|
||||||
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
import net.minecraft.util.math.Direction;
|
||||||
|
import net.minecraft.world.BlockView;
|
||||||
|
import net.wurstclient.event.EventManager;
|
||||||
|
import net.wurstclient.events.ShouldDrawSideListener.ShouldDrawSideEvent;
|
||||||
|
|
||||||
@Pseudo
|
@Pseudo
|
||||||
@Mixin(targets = {
|
@Mixin(targets = {
|
||||||
// current target
|
"net.caffeinemc.mods.sodium.client.render.chunk.compile.pipeline.BlockOcclusionCache"},
|
||||||
"me.jellysquid.mods.sodium.client.render.chunk.compile.pipeline.BlockOcclusionCache",
|
|
||||||
// < Sodium 0.5.0
|
|
||||||
"me.jellysquid.mods.sodium.client.render.occlusion.BlockOcclusionCache"},
|
|
||||||
remap = false)
|
remap = false)
|
||||||
public class SodiumBlockOcclusionCacheMixin
|
public class SodiumBlockOcclusionCacheMixin
|
||||||
{
|
{
|
||||||
// Until Sodium updates to 1.21.2, there is no way to tell what this mixin
|
/**
|
||||||
// needs to look like.
|
* This mixin hides and shows regular full blocks when using X-Ray with
|
||||||
|
* Sodium installed. Last updated for Sodium 0.6.0-beta.1+mc1.21.
|
||||||
// /**
|
*/
|
||||||
// * This mixin hides and shows regular full blocks when using X-Ray with
|
@Inject(at = @At("HEAD"), method = "shouldDrawSide", cancellable = true)
|
||||||
// * Sodium installed.
|
public void shouldDrawSide(BlockState state, BlockView world, BlockPos pos,
|
||||||
// */
|
Direction side, CallbackInfoReturnable<Boolean> cir)
|
||||||
// @Inject(at = @At("HEAD"), method = "shouldDrawSide", cancellable = true)
|
{
|
||||||
// public void shouldDrawSide(BlockState state, BlockView world, BlockPos
|
ShouldDrawSideEvent event = new ShouldDrawSideEvent(state, pos);
|
||||||
// pos,
|
EventManager.fire(event);
|
||||||
// Direction side, CallbackInfoReturnable<Boolean> cir)
|
|
||||||
// {
|
if(event.isRendered() != null)
|
||||||
// ShouldDrawSideEvent event = new ShouldDrawSideEvent(state, pos);
|
cir.setReturnValue(event.isRendered());
|
||||||
// EventManager.fire(event);
|
}
|
||||||
//
|
|
||||||
// if(event.isRendered() != null)
|
|
||||||
// cir.setReturnValue(event.isRendered());
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
@ -9,33 +9,44 @@ package net.wurstclient.mixin;
|
|||||||
|
|
||||||
import org.spongepowered.asm.mixin.Mixin;
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
import org.spongepowered.asm.mixin.Pseudo;
|
import org.spongepowered.asm.mixin.Pseudo;
|
||||||
|
import org.spongepowered.asm.mixin.Unique;
|
||||||
|
import org.spongepowered.asm.mixin.injection.At;
|
||||||
|
import org.spongepowered.asm.mixin.injection.Inject;
|
||||||
|
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
||||||
|
|
||||||
|
import net.minecraft.block.BlockState;
|
||||||
|
import net.minecraft.fluid.Fluid;
|
||||||
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
import net.minecraft.util.math.Direction;
|
||||||
|
import net.minecraft.world.BlockRenderView;
|
||||||
|
import net.wurstclient.event.EventManager;
|
||||||
|
import net.wurstclient.events.ShouldDrawSideListener.ShouldDrawSideEvent;
|
||||||
|
|
||||||
@Pseudo
|
@Pseudo
|
||||||
@Mixin(targets = {
|
@Mixin(targets = {
|
||||||
// current target
|
"net.caffeinemc.mods.sodium.client.render.chunk.compile.pipeline.DefaultFluidRenderer"},
|
||||||
"me.jellysquid.mods.sodium.client.render.chunk.compile.pipeline.FluidRenderer",
|
|
||||||
// < Sodium 0.4.9
|
|
||||||
"me.jellysquid.mods.sodium.client.render.pipeline.FluidRenderer"},
|
|
||||||
remap = false)
|
remap = false)
|
||||||
public class SodiumFluidRendererMixin
|
public class SodiumFluidRendererMixin
|
||||||
{
|
{
|
||||||
// Until Sodium updates to 1.21.2, there is no way to tell what this mixin
|
@Unique
|
||||||
// needs to look like.
|
private ThreadLocal<BlockPos.Mutable> mutablePosForExposedCheck =
|
||||||
|
ThreadLocal.withInitial(BlockPos.Mutable::new);
|
||||||
|
|
||||||
// /**
|
/**
|
||||||
// * This mixin hides and shows fluids when using X-Ray with Sodium
|
* This mixin hides and shows fluids when using X-Ray with Sodium installed.
|
||||||
// installed.
|
* Last updated for Sodium 0.6.0-beta.1+mc1.21.
|
||||||
// */
|
*/
|
||||||
// @Inject(at = @At("HEAD"), method = "isSideExposed", cancellable = true)
|
@Inject(at = @At("HEAD"), method = "isFluidOccluded", cancellable = true)
|
||||||
// private void isSideExposed(BlockRenderView world, int x, int y, int z,
|
private void onIsFluidOccluded(BlockRenderView world, int x, int y, int z,
|
||||||
// Direction dir, float height, CallbackInfoReturnable<Boolean> cir)
|
Direction dir, BlockState state, Fluid fluid,
|
||||||
// {
|
CallbackInfoReturnable<Boolean> cir)
|
||||||
// BlockPos pos = new BlockPos(x, y, z);
|
{
|
||||||
// BlockState state = world.getBlockState(pos);
|
BlockPos.Mutable pos = mutablePosForExposedCheck.get();
|
||||||
// ShouldDrawSideEvent event = new ShouldDrawSideEvent(state, pos);
|
pos.set(x, y, z);
|
||||||
// EventManager.fire(event);
|
ShouldDrawSideEvent event = new ShouldDrawSideEvent(state, pos);
|
||||||
//
|
EventManager.fire(event);
|
||||||
// if(event.isRendered() != null)
|
|
||||||
// cir.setReturnValue(event.isRendered());
|
if(event.isRendered() != null)
|
||||||
// }
|
cir.setReturnValue(!event.isRendered());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -36,7 +36,8 @@
|
|||||||
"breaks": {
|
"breaks": {
|
||||||
"wi_zoom": "*",
|
"wi_zoom": "*",
|
||||||
"wi-zoom": "*",
|
"wi-zoom": "*",
|
||||||
"vulkanmod": "*"
|
"vulkanmod": "*",
|
||||||
|
"sodium": "<0.6.0-beta.1"
|
||||||
},
|
},
|
||||||
"custom": {
|
"custom": {
|
||||||
"modmenu": {
|
"modmenu": {
|
||||||
|
Loading…
Reference in New Issue
Block a user