Skip to content

Commit

Permalink
fix biome colors and rename
Browse files Browse the repository at this point in the history
  • Loading branch information
ferriarnus committed Mar 19, 2024
1 parent 91677b5 commit ec438dc
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 23 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ loader_version=0.15.1
# Mod Properties
mod_version = 0.1.5-alpha
maven_group = me.cortex
archives_base_name = voxy
archives_base_name = mixy

fabric_version=0.91.1+1.20.4

Expand Down
16 changes: 16 additions & 0 deletions src/main/java/me/cortex/voxy/MixyStub.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package me.cortex.voxy;

import me.cortex.voxy.client.config.VoxyConfigScreenFactory;
import net.neoforged.fml.ModContainer;
import net.neoforged.fml.common.Mod;
import net.neoforged.neoforge.client.ConfigScreenHandler;

@Mod(MixyStub.MODID)
public class MixyStub {

public static final String MODID = "mixy";

public MixyStub(ModContainer container) {
container.registerExtensionPoint(ConfigScreenHandler.ConfigScreenFactory.class, () -> new ConfigScreenHandler.ConfigScreenFactory(VoxyConfigScreenFactory.getModConfigScreenFactory()));
}
}
6 changes: 0 additions & 6 deletions src/main/java/me/cortex/voxy/VoxyStub.java
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
package me.cortex.voxy;

import me.cortex.voxy.client.config.VoxyConfigScreenFactory;
import net.neoforged.fml.ModContainer;
import net.neoforged.fml.common.Mod;
import net.neoforged.neoforge.client.ConfigScreenHandler;

@Mod("voxy")
public class VoxyStub {
public VoxyStub(ModContainer container) {
container.registerExtensionPoint(ConfigScreenHandler.ConfigScreenFactory.class, () -> new ConfigScreenHandler.ConfigScreenFactory(VoxyConfigScreenFactory.getModConfigScreenFactory()));
}
}
3 changes: 2 additions & 1 deletion src/main/java/me/cortex/voxy/client/Voxy.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package me.cortex.voxy.client;

import me.cortex.voxy.MixyStub;
import me.cortex.voxy.client.core.VoxelCore;
import me.cortex.voxy.client.saver.ContextSelectionSystem;
import me.cortex.voxy.client.terrain.WorldImportCommand;
Expand All @@ -15,7 +16,7 @@ public class Voxy {
public static final String VERSION;

static {
VERSION = ModList.get().getModFileById("voxy").versionString();
VERSION = ModList.get().getModFileById(MixyStub.MODID).versionString();
}

@SubscribeEvent
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ public int addEntry(int blockId, BlockState blockState) {
this.fluidStateLUT[modelId] = clientFluidStateId;
}

var colourProvider = MinecraftClient.getInstance().getBlockColors().providers.get(Registries.BLOCK.getRawId(blockState.getBlock()));
var colourProvider = MinecraftClient.getInstance().getBlockColors().providers.get(blockState.getBlock());


RenderLayer blockRenderLayer = null;
Expand Down Expand Up @@ -385,7 +385,7 @@ public void addBiome(int id, Biome biome) {

int i = 0;
for (var entry : this.modelsRequiringBiomeColours) {
var colourProvider = MinecraftClient.getInstance().getBlockColors().providers.get(Registries.BLOCK.getRawId(entry.getRight().getBlock()));
var colourProvider = MinecraftClient.getInstance().getBlockColors().providers.get(entry.getRight().getBlock());
if (colourProvider == null) {
throw new IllegalStateException();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import com.google.gson.reflect.TypeToken;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import me.cortex.voxy.MixyStub;
import net.neoforged.fml.loading.LoadingModList;

import java.io.BufferedReader;
Expand Down Expand Up @@ -94,7 +95,7 @@ public T read(JsonReader in) throws IOException {
Map<Class<?>, GsonConfigSerialization<?>> serializers = new HashMap<>();

Set<String> clazzs = new LinkedHashSet<>();
var path = LoadingModList.get().getModFileById("voxy").getFile().getFilePath().getRoot();
var path = LoadingModList.get().getModFileById(MixyStub.MODID).getFile().getFilePath().getRoot();
clazzs.addAll(collectAllClasses(path, BASE_SEARCH_PACKAGE));
clazzs.addAll(collectAllClasses(BASE_SEARCH_PACKAGE));
int count = 0;
Expand Down
23 changes: 11 additions & 12 deletions src/main/resources/META-INF/mods.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ modLoader="javafml"
loaderVersion="[1,)"
license="LGPL-3.0"
[[mods]]
modId="voxy"
modId="mixy"
version="${version}"
displayName="Voxy"
displayName="Mixy"
displayTest = "IGNORE_SERVER_VERSION"
#logoFile="assets/voxy/icon.png"
authors="Cortex, Ferri_Arnus"
Expand Down Expand Up @@ -39,13 +39,12 @@ config = "voxy.mixins.json"
[[accessTransformers]]
file="META-INF/accesstransformer.cfg"

#[[mods]]
#modId="nvidium"
#displayName="Nvidium (Acedium)"
#version="${version}"
#authors="Cortex"
#logoFile="assets/nvidium/nvidium.png"
#description='''
#Experimental port of nvidium, bugs will be present
#Replacement rendering engine for sodium/embeddium
#'''
[[mods]]
modId="voxy"
displayName="Voxy (Mixy)"
version="${version}"
authors="Cortex"
logoFile="assets/voxy/icon.png"
description='''
Far distance rendering mod utilising LoDs
'''

0 comments on commit ec438dc

Please sign in to comment.