Skip to content

Commit

Permalink
Ayo server thingy fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
northernlimit committed Sep 4, 2024
1 parent fbf8abb commit f1b61f2
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 115 deletions.
1 change: 0 additions & 1 deletion src/main/java/net/limit/cubliminal/Cubliminal.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ public void onInitialize() {
CubliminalSounds.init();
CubliminalEntities.init();
CubliminalEffects.init();
CubliminalModelRenderers.init();
FabricDefaultAttributeRegistry.register(CubliminalEntities.BACTERIA, BacteriaEntity.createBacteriaAttributes());
CubliminalBlockEntities.init();
CubliminalPackets.registerC2SPackets();
Expand Down
6 changes: 2 additions & 4 deletions src/main/java/net/limit/cubliminal/CubliminalClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,7 @@
import net.limit.cubliminal.entity.client.BacteriaRenderer;
import net.limit.cubliminal.entity.client.SeatRenderer;
import net.limit.cubliminal.event.KeyInputHandler;
import net.limit.cubliminal.init.CubliminalBlocks;
import net.limit.cubliminal.init.CubliminalEntities;
import net.limit.cubliminal.init.CubliminalModelLayers;
import net.limit.cubliminal.init.CubliminalPackets;
import net.limit.cubliminal.init.*;
import net.minecraft.client.render.RenderLayer;

@Environment(EnvType.CLIENT)
Expand All @@ -27,6 +24,7 @@ public void onInitializeClient() {
BlockRenderLayerMap.INSTANCE.putBlocks(RenderLayer.getTranslucent(), CubliminalBlocks.EMERGENCY_EXIT_DOOR_0, CubliminalBlocks.MOLD);

KeyInputHandler.register();
CubliminalModelRenderers.init();

EntityRendererRegistry
.register(CubliminalEntities.BACTERIA, BacteriaRenderer::new);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import net.minecraft.util.math.Vec2f;
import org.joml.Matrix4f;

@Environment(EnvType.CLIENT)
public class SkyboxRenderer extends SpecialModelRenderer {

private final String id;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public class CubliminalBiomes {

public static void init() {
getChunkGenerator("the_lobby_chunk_generator", LevelZeroChunkGenerator.CODEC);
//getBiomeSource("the_lobby_biome_source", LevelZeroBiomeSource.CODEC);
getBiomeSource("the_lobby_biome_source", LevelZeroBiomeSource.CODEC);
}

public static <C extends ChunkGenerator, D extends Codec<C>> D getChunkGenerator(String id, D chunkGeneratorCodec) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
package net.limit.cubliminal.init;

import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.limit.cubliminal.Cubliminal;
import net.limit.cubliminal.client.render.SkyboxRenderer;
import net.ludocrypt.specialmodels.api.SpecialModelRenderer;
import net.minecraft.registry.Registry;

@Environment(EnvType.CLIENT)
public class CubliminalModelRenderers {

public static final SpecialModelRenderer MANILA_SKYBOX_RENDERER =
Expand Down
97 changes: 0 additions & 97 deletions src/main/java/net/limit/cubliminal/init/CubliminalRegistrar.java

This file was deleted.

15 changes: 4 additions & 11 deletions src/main/java/net/limit/cubliminal/init/CubliminalWorlds.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,9 @@
import net.minecraft.registry.RegistryEntryLookup;
import net.minecraft.registry.RegistryKey;
import net.minecraft.registry.RegistryKeys;
import net.minecraft.registry.SimpleRegistry;
import net.minecraft.registry.tag.TagKey;
import net.minecraft.util.math.intprovider.ConstantIntProvider;
import net.minecraft.world.World;
import net.minecraft.world.biome.source.FixedBiomeSource;
import net.minecraft.world.dimension.DimensionOptions;
import net.minecraft.world.dimension.DimensionType;
import net.minecraft.world.dimension.DimensionType.MonsterSettings;
Expand Down Expand Up @@ -68,14 +66,10 @@ public void registerHooks() {
.getOptional(RegistryKey.of(RegistryKeys.DIMENSION_TYPE, Cubliminal.id(THE_LOBBY)))
.get(),
new LevelZeroChunkGenerator(
new FixedBiomeSource(registry.get(RegistryKeys.BIOME).getOptional(CubliminalBiomes.THE_LOBBY_BIOME).get())
/*
new LevelZeroBiomeSource(
registry.get(RegistryKeys.BIOME).getOptional(CubliminalBiomes.THE_LOBBY_BIOME).get(),
registry.get(RegistryKeys.BIOME).getOptional(CubliminalBiomes.PILLAR_BIOME).get(),
registry.get(RegistryKeys.BIOME).getOptional(CubliminalBiomes.REDROOMS_BIOME).get())
*/
,
registry.get(RegistryKeys.BIOME).getOptional(CubliminalBiomes.REDROOMS_BIOME).get()),
LevelZeroChunkGenerator.createGroup(), 3))));


Expand All @@ -85,21 +79,20 @@ public void registerHooks() {
LimlibRegistryHooks
.hook(SoundEffects.SOUND_EFFECTS_KEY, (infoLookup, registryKey, registry) -> SOUND_EFFECTS
.forEach((pair) -> registry.add(pair.getFirst(), pair.getSecond(), Lifecycle.stable())));
/*

LimlibRegistryHooks
.hook(Skybox.SKYBOX_KEY, (infoLookup, registryKey, registry) -> SKYBOXES
.forEach((pair) -> registry.add(pair.getFirst(), pair.getSecond(), Lifecycle.stable())));

*/
LimlibRegistryHooks
.hook(LDimensionEffects.DIMENSION_EFFECTS_KEY, (infoLookup, registryKey, registry) -> DIMENSION_EFFECTS
.forEach((pair) -> registry.add(pair.getFirst(), pair.getSecond(), Lifecycle.stable())));
/*

LimlibRegistryHooks
.hook(PostEffect.POST_EFFECT_KEY, (infoLookup, registryKey, registry) -> POST_EFFECTS
.forEach((pair) -> registry.add(pair.getFirst(), pair.getSecond(), Lifecycle.stable())));

*/

LimlibRegistryHooks.hook(RegistryKeys.BIOME, (infoLookup, registryKey, registry) -> {
RegistryEntryLookup<PlacedFeature> features = infoLookup.getRegistryInfo(RegistryKeys.PLACED_FEATURE).get().entryLookup();
RegistryEntryLookup<ConfiguredCarver<?>> carvers = infoLookup.getRegistryInfo(RegistryKeys.CONFIGURED_CARVER).get().entryLookup();
Expand Down
4 changes: 3 additions & 1 deletion src/main/java/net/limit/cubliminal/mixin/EntityMixin.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,11 @@ private void onTryTickInVoid(CallbackInfo ci) {
private void isImmuneToFire(CallbackInfoReturnable<Boolean> cir) {
if (NoClipEngine.isNoClipping(this)) cir.setReturnValue(true);
}

/*
@Inject(method = "move", at = @At("HEAD"), cancellable = true)
private void suppressMovement(MovementType movementType, Vec3d movement, CallbackInfo ci) {
if (!ParalyzingEntries.PARALYZING_ENTRIES.isEmpty()) ci.cancel();
}
*/
}

0 comments on commit f1b61f2

Please sign in to comment.