Skip to content

Commit

Permalink
Nice
Browse files Browse the repository at this point in the history
  • Loading branch information
enjarai committed May 4, 2024
1 parent a80c318 commit e1dfbbb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ org.gradle.jvmargs=-Xmx1G
org.gradle.parallel=true

# Mod Information
mod.version=0.7.1
mod.version=0.7.2
mod.name=cicada-lib
mod.maven_group = nl.enjarai
mod.target=[VERSIONED]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package nl.enjarai.cicada.api.cursed;

import com.mojang.serialization.Lifecycle;
import net.minecraft.block.entity.BannerPattern;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.gui.hud.ChatHud;
import net.minecraft.client.network.ClientPlayNetworkHandler;
Expand Down Expand Up @@ -68,6 +69,8 @@ public RegistryEntry.Reference<Biome> entryOf(RegistryKey<Biome> key) {
}
};

private static final Registry<BannerPattern> cursedBannerRegistry = new SimpleDefaultedRegistry<>("dummy", RegistryKeys.BANNER_PATTERN, Lifecycle.stable(), true);

private static final DynamicRegistryManager.Immutable cursedRegistryManager = new DynamicRegistryManager.Immutable() {
private final CursedRegistry<DamageType> damageTypes = new CursedRegistry<>(RegistryKeys.DAMAGE_TYPE, Cicada.id("fake_damage"),
new DamageType("", DamageScaling.NEVER, 0));
Expand All @@ -84,6 +87,9 @@ public Optional<Registry> getOptional(RegistryKey key) {
return Optional.of(cursedBiomeRegistry);
} else if (RegistryKeys.DIMENSION_TYPE.equals(key)) {
return Optional.of(CURSED_DIMENSION_TYPE_REGISTRY);
} else if (RegistryKeys.BANNER_PATTERN.equals(key)) {
// This fixes lithium compat post-1.20.5
return Optional.of(cursedBannerRegistry);
}

return Optional.empty();
Expand Down

0 comments on commit e1dfbbb

Please sign in to comment.