mirror of
https://github.com/wisplite/crystalline-sky.git
synced 2026-10-30 13:32:18 -05:00
Multiloader VI
neoforge is working
This commit is contained in:
+11
-9
@@ -30,15 +30,17 @@ public class CrystallineSkyClient {
|
||||
);
|
||||
|
||||
public static void init() {
|
||||
ClientPlatformHelper.registerItemProperty(
|
||||
CrystallineItems.SKY_LIGHT.value(),
|
||||
ResourceLocation.withDefaultNamespace("level"),
|
||||
(stack, world, entity, seed) -> {
|
||||
BlockItemStateProperties state = stack.getOrDefault(DataComponents.BLOCK_STATE, BlockItemStateProperties.EMPTY);
|
||||
Integer level = state.get(LightBlock.LEVEL);
|
||||
return level != null ? level / 16.0F : 1.0F;
|
||||
}
|
||||
);
|
||||
CrystallineItems.SKY_LIGHT.onRegistered(i -> {
|
||||
ClientPlatformHelper.registerItemProperty(
|
||||
i,
|
||||
ResourceLocation.withDefaultNamespace("level"),
|
||||
(stack, world, entity, seed) -> {
|
||||
BlockItemStateProperties state = stack.getOrDefault(DataComponents.BLOCK_STATE, BlockItemStateProperties.EMPTY);
|
||||
Integer level = state.get(LightBlock.LEVEL);
|
||||
return level != null ? level / 16.0F : 1.0F;
|
||||
}
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
public static void registerKeybindings(Consumer<KeyMapping> registrar) {
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
package io.github.slimeistdev.crystalline_sky.foundation.registration;
|
||||
|
||||
import com.google.common.collect.HashMultimap;
|
||||
import com.google.common.collect.ArrayListMultimap;
|
||||
import com.google.common.collect.Multimap;
|
||||
import com.google.common.collect.Multimaps;
|
||||
import io.github.slimeistdev.crystalline_sky.foundation.registration.builder.BlockBuilder;
|
||||
@@ -21,7 +21,7 @@ import java.util.function.Function;
|
||||
public class CatnipRegistry {
|
||||
public final String modId;
|
||||
|
||||
private static final Multimap<Registry<?>, Registration<?, ?, ?>> REGISTRATIONS = HashMultimap.create();
|
||||
private static final Multimap<Registry<?>, Registration<?, ?, ?>> REGISTRATIONS = ArrayListMultimap.create();
|
||||
public static final Multimap<Registry<?>, Registration<?, ?, ?>> REGISTRATIONS_VIEW = Multimaps.unmodifiableMultimap(REGISTRATIONS);
|
||||
|
||||
public CatnipRegistry(String modId) {
|
||||
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
package io.github.slimeistdev.crystalline_sky.multiloader;
|
||||
|
||||
import dev.architectury.injectables.annotations.ExpectPlatform;
|
||||
|
||||
public class PlatformHelper {
|
||||
@ExpectPlatform
|
||||
public static boolean isDevEnv() {
|
||||
throw new AssertionError();
|
||||
}
|
||||
}
|
||||
+2
@@ -48,4 +48,6 @@ public abstract class CrystallineRenderTypes extends RenderType {
|
||||
}, () -> {});
|
||||
}
|
||||
}
|
||||
|
||||
public static void init() {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user