Skip to content

Commit

Permalink
1.21.4 Porting (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
IThundxr authored Jan 10, 2025
1 parent 0a3092b commit 8a5640d
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
import java.util.List;
import java.util.Objects;

import net.fabricmc.fabric.api.networking.v1.PlayerLookup;

import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.quiltmc.loader.api.minecraft.ClientOnly;
import org.quiltmc.qsl.networking.api.PlayerLookup;

import io.github.fusionflux.portalcubed.data.tags.PortalCubedBlockTags;
import io.github.fusionflux.portalcubed.framework.construct.ConfiguredConstruct;
Expand Down Expand Up @@ -38,7 +38,6 @@
import net.minecraft.tags.TagKey;
import net.minecraft.world.InteractionHand;
import net.minecraft.world.InteractionResult;
import net.minecraft.world.InteractionResultHolder;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.ItemStack;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package io.github.fusionflux.portalcubed.framework.extension;

import net.fabricmc.fabric.api.networking.v1.ServerPlayConnectionEvents;

import org.jetbrains.annotations.Nullable;

import io.github.fusionflux.portalcubed.PortalCubed;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
import java.util.Optional;

import io.github.fusionflux.portalcubed.data.tags.PortalCubedBlockTags;
import net.minecraft.core.component.DataComponents;
import net.minecraft.core.registries.BuiltInRegistries;
import net.minecraft.util.RandomSource;
import net.minecraft.world.item.DyeableLeatherItem;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.level.block.Block;

Expand All @@ -15,6 +15,6 @@ public static Optional<Block> randomConfettiBlock(RandomSource random) {
}

public static int getDyedColor(ItemStack stack) {
return stack.getItem() instanceof DyeableLeatherItem dyeable ? dyeable.getColor(stack) : -1;
return stack.has(DataComponents.DYED_COLOR) ? stack.get(DataComponents.DYED_COLOR).rgb() : -1;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@

import io.github.fusionflux.portalcubed.content.portal.renderer.PortalRenderer;
import io.github.fusionflux.portalcubed.framework.util.ShaderPatcher;
import me.jellysquid.mods.sodium.client.gl.shader.uniform.GlUniformFloat4v;
import me.jellysquid.mods.sodium.client.render.chunk.shader.ChunkShaderInterface;
import me.jellysquid.mods.sodium.client.render.chunk.shader.ChunkShaderOptions;
import me.jellysquid.mods.sodium.client.render.chunk.shader.ShaderBindingContext;
import net.caffeinemc.mods.sodium.client.gl.shader.uniform.GlUniformFloat4v;
import net.caffeinemc.mods.sodium.client.render.chunk.shader.ChunkShaderOptions;
import net.caffeinemc.mods.sodium.client.render.chunk.shader.DefaultShaderInterface;
import net.caffeinemc.mods.sodium.client.render.chunk.shader.ShaderBindingContext;

@Mixin(value = ChunkShaderInterface.class, remap = false)
public class ChunkShaderInterfaceMixin {
@Mixin(value = DefaultShaderInterface.class, remap = false)
public class DefaultShaderInterfaceMixin {
@Unique
private GlUniformFloat4v uniformClippingPlane;

Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/portalcubed.mixins.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"client.BlockModelMixin",
"client.CameraAccessor",
"client.CameraMixin",
"client.ChunkShaderInterfaceMixin",
"client.DefaultShaderInterfaceMixin",
"client.ClientLevelMixin",
"client.ClientPacketListenerMixin",
"client.ClientSuggestionProviderMixin",
Expand Down

0 comments on commit 8a5640d

Please sign in to comment.