Compare commits

..

No commits in common. "265d71ae6747b575a7bef3d90a2747fb5f24b70b" and "bd537bbe25a3584419fce0a363921eac5e16722b" have entirely different histories.

12 changed files with 32 additions and 59 deletions

View File

@ -91,7 +91,7 @@ dependencies {
exclude(group: "net.fabricmc.fabric-api") exclude(group: "net.fabricmc.fabric-api")
} }
modCompileOnly "maven.modrinth:sodium:mc${project.minecraft_version_major}-${project.sodium_version}" modImplementation "maven.modrinth:sodium:mc${project.minecraft_version}-${project.sodium_version}"
} }
configurations.include.transitive = true configurations.include.transitive = true

View File

@ -4,21 +4,21 @@ org.gradle.parallel=true
# Fabric Properties # Fabric Properties
# check these on https://fabricmc.net/develop # check these on https://fabricmc.net/develop
minecraft_version=1.20.1 minecraft_version=1.20
yarn_mappings=1.20.1+build.8 yarn_mappings=1.20+build.1
loader_version=0.14.21 loader_version=0.14.21
minecraft_version_major=1.20 minecraft_version_major=1.20
# Mod Properties # Mod Properties
mod_version=0.9.3 mod_version=0.9.2
maven_group=quimufu.colourful-portals maven_group=quimufu.colourful-portals
archives_base_name=colourful-portals archives_base_name=colourful-portals
# Dependencies # Dependencies
fabric_version=0.84.0+1.20.1 fabric_version=0.83.0+1.20
cardinal_components_version=5.2.1 cardinal_components_version=5.2.1
immersive_portals_version_short=3.1.0 immersive_portals_version_short=3.0.1
immersive_portals_version=v3.1.0-mc1.20.1 immersive_portals_version=v3.0.1-mc1.20
tweed_version=1.3.0+mc1.20-pre1 tweed_version=1.3.0+mc1.20-pre1
sodium_version=0.4.10 sodium_version=0.4.10
cloth_config_version=11.0.99 cloth_config_version=11.0.99

View File

@ -1,12 +1,16 @@
package quimufu.colourful_portals; package quimufu.colourful_portals;
import net.fabricmc.api.ClientModInitializer;
import net.fabricmc.api.ModInitializer; import net.fabricmc.api.ModInitializer;
import net.fabricmc.fabric.api.blockrenderlayer.v1.BlockRenderLayerMap;
import net.fabricmc.fabric.api.client.render.fluid.v1.FluidRenderHandlerRegistry;
import net.fabricmc.fabric.api.item.v1.FabricItemSettings; import net.fabricmc.fabric.api.item.v1.FabricItemSettings;
import net.fabricmc.fabric.api.itemgroup.v1.FabricItemGroupEntries; import net.fabricmc.fabric.api.itemgroup.v1.FabricItemGroupEntries;
import net.fabricmc.fabric.api.itemgroup.v1.ItemGroupEvents; import net.fabricmc.fabric.api.itemgroup.v1.ItemGroupEvents;
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings; import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
import net.minecraft.block.BlockState; import net.minecraft.block.BlockState;
import net.minecraft.block.enums.Instrument; import net.minecraft.block.enums.Instrument;
import net.minecraft.client.render.RenderLayer;
import net.minecraft.entity.EntityType; import net.minecraft.entity.EntityType;
import net.minecraft.item.*; import net.minecraft.item.*;
import net.minecraft.registry.Registries; import net.minecraft.registry.Registries;
@ -18,6 +22,7 @@ import net.minecraft.util.math.BlockPos;
import net.minecraft.world.BlockView; import net.minecraft.world.BlockView;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import quimufu.colourful_portals.client.PortalFluidRenderHandler;
import quimufu.colourful_portals.config.ColourfulPortalConfig; import quimufu.colourful_portals.config.ColourfulPortalConfig;
import quimufu.colourful_portals.portal_fluid.PortalFluid; import quimufu.colourful_portals.portal_fluid.PortalFluid;
import quimufu.colourful_portals.portal_fluid.PortalFluidBlock; import quimufu.colourful_portals.portal_fluid.PortalFluidBlock;
@ -25,7 +30,7 @@ import quimufu.colourful_portals.portal_fluid.PortalFluidBucketItem;
import java.util.HashSet; import java.util.HashSet;
public class ColourfulPortalsMod implements ModInitializer { public class ColourfulPortalsMod implements ModInitializer, ClientModInitializer {
public static final String MOD_ID = "colourful_portals"; public static final String MOD_ID = "colourful_portals";
public static final Logger LOGGER = LoggerFactory.getLogger(MOD_ID); public static final Logger LOGGER = LoggerFactory.getLogger(MOD_ID);
@ -86,4 +91,10 @@ public class ColourfulPortalsMod implements ModInitializer {
content.add(BLOB_DARK); content.add(BLOB_DARK);
} }
public void onInitializeClient() {
BlockRenderLayerMap.INSTANCE.putBlock(PORTAL_BLOCK, RenderLayer.getTranslucent());
BlockRenderLayerMap.INSTANCE.putFluid(PORTAL_FLUID, RenderLayer.getTranslucent());
FluidRenderHandlerRegistry.INSTANCE.register(PORTAL_FLUID, new PortalFluidRenderHandler());
}
} }

View File

@ -1,16 +0,0 @@
package quimufu.colourful_portals;
import net.fabricmc.api.ClientModInitializer;
import net.fabricmc.fabric.api.blockrenderlayer.v1.BlockRenderLayerMap;
import net.fabricmc.fabric.api.client.render.fluid.v1.FluidRenderHandlerRegistry;
import net.minecraft.client.render.RenderLayer;
import quimufu.colourful_portals.client.PortalFluidRenderHandler;
public class ColourfulPortalsModClient implements ClientModInitializer {
public void onInitializeClient() {
BlockRenderLayerMap.INSTANCE.putBlock(ColourfulPortalsMod.PORTAL_BLOCK, RenderLayer.getTranslucent());
BlockRenderLayerMap.INSTANCE.putFluid(ColourfulPortalsMod.PORTAL_FLUID, RenderLayer.getTranslucent());
FluidRenderHandlerRegistry.INSTANCE.register(ColourfulPortalsMod.PORTAL_FLUID, new PortalFluidRenderHandler());
}
}

View File

@ -9,11 +9,16 @@ import me.jellysquid.mods.sodium.client.render.chunk.compile.buffers.ChunkModelB
import me.jellysquid.mods.sodium.client.render.vertex.type.ChunkVertexEncoder; import me.jellysquid.mods.sodium.client.render.vertex.type.ChunkVertexEncoder;
import net.fabricmc.api.EnvType; import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment; import net.fabricmc.api.Environment;
import net.fabricmc.fabric.api.client.render.fluid.v1.FluidRenderHandler;
import net.fabricmc.fabric.api.client.render.fluid.v1.FluidRenderHandlerRegistry;
import net.minecraft.block.BlockState;
import net.minecraft.client.texture.Sprite; import net.minecraft.client.texture.Sprite;
import net.minecraft.fluid.FluidState; import net.minecraft.fluid.FluidState;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Direction; import net.minecraft.util.math.Direction;
import net.minecraft.world.BlockRenderView; import net.minecraft.world.BlockRenderView;
import quimufu.colourful_portals.ColourfulPortalsMod;
import quimufu.colourful_portals.portal_fluid.PortalFluid;
@Environment(value = EnvType.CLIENT) @Environment(value = EnvType.CLIENT)
public class SodiumPortalFluidRenderHandler implements CommonPortalFluidRenderer.VertexEater { public class SodiumPortalFluidRenderHandler implements CommonPortalFluidRenderer.VertexEater {

View File

@ -8,7 +8,7 @@ import de.siphalor.tweed4.config.ConfigEnvironment;
import de.siphalor.tweed4.config.ConfigScope; import de.siphalor.tweed4.config.ConfigScope;
//import de.siphalor.tweed4.tailor.cloth.ClothData; //import de.siphalor.tweed4.tailor.cloth.ClothData;
import net.minecraft.util.DyeColor; import net.minecraft.util.DyeColor;
//import quimufu.colourful_portals.ColourfulPortalsMod; import quimufu.colourful_portals.ColourfulPortalsMod;
import java.util.Map; import java.util.Map;

View File

@ -9,6 +9,7 @@ import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import quimufu.colourful_portals.ColourfulPortalsMod;
import quimufu.colourful_portals.portal.PortalManager; import quimufu.colourful_portals.portal.PortalManager;
import static quimufu.colourful_portals.ColourfulPortalsMod.LOGGER; import static quimufu.colourful_portals.ColourfulPortalsMod.LOGGER;

View File

@ -1,5 +1,6 @@
package quimufu.colourful_portals.portal; package quimufu.colourful_portals.portal;
import com.ibm.icu.impl.Pair;
import dev.onyxstudios.cca.api.v3.component.Component; import dev.onyxstudios.cca.api.v3.component.Component;
import net.minecraft.nbt.NbtCompound; import net.minecraft.nbt.NbtCompound;
import net.minecraft.nbt.NbtElement; import net.minecraft.nbt.NbtElement;
@ -9,7 +10,6 @@ import net.minecraft.util.Identifier;
import net.minecraft.util.math.BlockBox; import net.minecraft.util.math.BlockBox;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.world.WorldProperties; import net.minecraft.world.WorldProperties;
import quimufu.colourful_portals.util.Pair;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;

View File

@ -1,5 +1,6 @@
package quimufu.colourful_portals.portal; package quimufu.colourful_portals.portal;
import com.ibm.icu.impl.Pair;
import net.minecraft.block.BlockState; import net.minecraft.block.BlockState;
import net.minecraft.block.Blocks; import net.minecraft.block.Blocks;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
@ -17,7 +18,6 @@ import qouteall.imm_ptl.core.api.PortalAPI;
import qouteall.imm_ptl.core.portal.Portal; import qouteall.imm_ptl.core.portal.Portal;
import qouteall.q_misc_util.my_util.DQuaternion; import qouteall.q_misc_util.my_util.DQuaternion;
import quimufu.colourful_portals.config.ColourfulPortalConfig; import quimufu.colourful_portals.config.ColourfulPortalConfig;
import quimufu.colourful_portals.util.Pair;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;

View File

@ -2,9 +2,11 @@ package quimufu.colourful_portals.portal_fluid;
import net.minecraft.block.*; import net.minecraft.block.*;
import net.minecraft.entity.ai.pathing.NavigationType; import net.minecraft.entity.ai.pathing.NavigationType;
import net.minecraft.fluid.Fluid;
import net.minecraft.fluid.FluidState; import net.minecraft.fluid.FluidState;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.item.Items; import net.minecraft.item.Items;
import net.minecraft.loot.context.LootContext;
import net.minecraft.loot.context.LootContextParameterSet; import net.minecraft.loot.context.LootContextParameterSet;
import net.minecraft.server.world.ServerWorld; import net.minecraft.server.world.ServerWorld;
import net.minecraft.sound.SoundEvent; import net.minecraft.sound.SoundEvent;
@ -18,6 +20,7 @@ import net.minecraft.util.shape.VoxelShapes;
import net.minecraft.world.BlockView; import net.minecraft.world.BlockView;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraft.world.WorldAccess; import net.minecraft.world.WorldAccess;
import quimufu.colourful_portals.ColourfulPortalsMod;
import java.util.Collections; import java.util.Collections;
import java.util.List; import java.util.List;

View File

@ -1,31 +0,0 @@
package quimufu.colourful_portals.util;
import java.util.Objects;
public class Pair<A, B> {
public final A first;
public final B second;
public Pair(A first, B second) {
this.first = first;
this.second = second;
}
public static <A, B> Pair<A, B> of(A first, B second) {
return new Pair<>(first, second);
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
Pair<?, ?> pair = (Pair<?, ?>) o;
return Objects.equals(first, pair.first) && Objects.equals(second, pair.second);
}
@Override
public int hashCode() {
return Objects.hash(first, second);
}
}

View File

@ -19,7 +19,7 @@
"quimufu.colourful_portals.ColourfulPortalsMod" "quimufu.colourful_portals.ColourfulPortalsMod"
], ],
"client": [ "client": [
"quimufu.colourful_portals.ColourfulPortalsModClient" "quimufu.colourful_portals.ColourfulPortalsMod"
], ],
"cardinal-components": [ "cardinal-components": [
"quimufu.colourful_portals.Components" "quimufu.colourful_portals.Components"