diff --git a/build.gradle b/build.gradle index 374122be5..a05b115c3 100644 --- a/build.gradle +++ b/build.gradle @@ -78,7 +78,9 @@ minecraft { sourceSets.main.resources { srcDir 'src/generated/resources' } repositories { - + /** JEI */ + maven { name = "Progwml6 maven"; url = "https://dvs1.progwml6.com/files/maven/" } + maven { name = "ModMaven"; url = "https://modmaven.dev" } } mixin { @@ -88,13 +90,14 @@ mixin { dependencies { minecraft "net.minecraftforge:forge:${mc_version}-${forge_version}" - //Mixin + /** MIXIN */ if (System.getProperty("idea.sync.active") != "true") { annotationProcessor "org.spongepowered:mixin:${mixin_version}:processor" } - //JEI - compileOnly fg.deobf("mezz.jei:jei-1.19-common-api:11.0.0.203") + /** JEI */ + compileOnly fg.deobf("mezz.jei:jei-${mc_version}-common-api:${jei_version}") + runtimeOnly fg.deobf("mezz.jei:jei-${mc_version}-common:${jei_version}") } jar { diff --git a/settings.gradle b/settings.gradle index ead6decaf..dab77a523 100644 --- a/settings.gradle +++ b/settings.gradle @@ -6,10 +6,6 @@ pluginManagement { /** MIXIN */ maven { url = "https://repo.spongepowered.org/repository/maven-public/" } - - /** JEI */ - maven { name = "JEI" url = "https://dvs1.progwml6.com/files/maven/" } - maven { name = "ModMaven" url = "https://modmaven.dev" } } resolutionStrategy { eachPlugin { diff --git a/src/main/java/net/mrscauthd/beyond_earth/BeyondEarth.java b/src/main/java/net/mrscauthd/beyond_earth/BeyondEarth.java index c06f58c3b..374aaf73f 100644 --- a/src/main/java/net/mrscauthd/beyond_earth/BeyondEarth.java +++ b/src/main/java/net/mrscauthd/beyond_earth/BeyondEarth.java @@ -44,7 +44,5 @@ public BeyondEarth() { ScreensRegistry.SCREENS.register(bus); StructuresRegistry.STRUCTURES.register(bus); FeatureRegistry.FEATURES.register(bus); - FeatureRegistry.CONFIGURED_FEATURES.register(bus); - FeatureRegistry.PLACED_FEATURES.register(bus); } } diff --git a/src/main/java/net/mrscauthd/beyond_earth/entities/IRocketEntity.java b/src/main/java/net/mrscauthd/beyond_earth/entities/IRocketEntity.java index fc513039f..d6621257a 100644 --- a/src/main/java/net/mrscauthd/beyond_earth/entities/IRocketEntity.java +++ b/src/main/java/net/mrscauthd/beyond_earth/entities/IRocketEntity.java @@ -37,7 +37,7 @@ import net.mrscauthd.beyond_earth.BeyondEarth; import net.mrscauthd.beyond_earth.blocks.RocketLaunchPad; import net.mrscauthd.beyond_earth.events.Methods; -import net.mrscauthd.beyond_earth.events.forge.PlayerEnterPlanetSelectionGuiEvent; +import net.mrscauthd.beyond_earth.events.forge.PlayerEnterPlanetSelectionMenuEvent; import net.mrscauthd.beyond_earth.registries.SoundsRegistry; import javax.annotation.Nonnull; @@ -280,7 +280,7 @@ public void openPlanetSelectionGui() { Methods.stopSounds((ServerPlayer) pass, SoundsRegistry.ROCKET_SOUND.getId(), SoundSource.AMBIENT); } - MinecraftForge.EVENT_BUS.post(new PlayerEnterPlanetSelectionGuiEvent(pass, this)); + MinecraftForge.EVENT_BUS.post(new PlayerEnterPlanetSelectionMenuEvent(pass, this)); if (!this.level.isClientSide) { this.remove(RemovalReason.DISCARDED); diff --git a/src/main/java/net/mrscauthd/beyond_earth/events/Methods.java b/src/main/java/net/mrscauthd/beyond_earth/events/Methods.java index bbf9fe613..d32f64acc 100644 --- a/src/main/java/net/mrscauthd/beyond_earth/events/Methods.java +++ b/src/main/java/net/mrscauthd/beyond_earth/events/Methods.java @@ -391,7 +391,7 @@ public static void cleanUpPlayerNBT(Player player) { player.getPersistentData().putString(BeyondEarth.MODID + ":rocket_type", ""); player.getPersistentData().putString(BeyondEarth.MODID + ":slot0", ""); - MinecraftForge.EVENT_BUS.post(new PlayerExitPlanetSelectionGuiEvent(player)); + MinecraftForge.EVENT_BUS.post(new PlayerExitPlanetSelectionMenuEvent(player)); } public static void openPlanetGui(Player player) { diff --git a/src/main/java/net/mrscauthd/beyond_earth/events/forge/PlanetSelectionGuiBackgroundRenderEvent.java b/src/main/java/net/mrscauthd/beyond_earth/events/forge/PlanetSelectionScreenBackgroundRenderEvent.java similarity index 75% rename from src/main/java/net/mrscauthd/beyond_earth/events/forge/PlanetSelectionGuiBackgroundRenderEvent.java rename to src/main/java/net/mrscauthd/beyond_earth/events/forge/PlanetSelectionScreenBackgroundRenderEvent.java index d9460bd5d..e395c71cb 100644 --- a/src/main/java/net/mrscauthd/beyond_earth/events/forge/PlanetSelectionGuiBackgroundRenderEvent.java +++ b/src/main/java/net/mrscauthd/beyond_earth/events/forge/PlanetSelectionScreenBackgroundRenderEvent.java @@ -5,13 +5,13 @@ import net.minecraftforge.client.event.ScreenEvent; import net.minecraftforge.eventbus.api.Cancelable; -public class PlanetSelectionGuiBackgroundRenderEvent extends ScreenEvent { +public class PlanetSelectionScreenBackgroundRenderEvent extends ScreenEvent { private PoseStack poseStack; private float partialTicks; private int mouseX; private int mouseY; - public PlanetSelectionGuiBackgroundRenderEvent(Screen screen, PoseStack poseStack, float partialTicks, int mouseX, int mouseY) { + public PlanetSelectionScreenBackgroundRenderEvent(Screen screen, PoseStack poseStack, float partialTicks, int mouseX, int mouseY) { super(screen); this.poseStack = poseStack; this.partialTicks = partialTicks; @@ -36,13 +36,13 @@ public int getMouseY() { } @Cancelable - public static class Pre extends PlanetSelectionGuiBackgroundRenderEvent { + public static class Pre extends PlanetSelectionScreenBackgroundRenderEvent { public Pre(Screen screen, PoseStack poseStack, float partialTicks, int mouseX, int mouseY) { super(screen, poseStack, partialTicks, mouseX, mouseY); } } - public static class Post extends PlanetSelectionGuiBackgroundRenderEvent { + public static class Post extends PlanetSelectionScreenBackgroundRenderEvent { public Post(Screen screen, PoseStack poseStack, float partialTicks, int mouseX, int mouseY) { super(screen, poseStack, partialTicks, mouseX, mouseY); } diff --git a/src/main/java/net/mrscauthd/beyond_earth/events/forge/PlanetSelectionGuiButtonVisibilityEvent.java b/src/main/java/net/mrscauthd/beyond_earth/events/forge/PlanetSelectionScreenButtonVisibilityEvent.java similarity index 56% rename from src/main/java/net/mrscauthd/beyond_earth/events/forge/PlanetSelectionGuiButtonVisibilityEvent.java rename to src/main/java/net/mrscauthd/beyond_earth/events/forge/PlanetSelectionScreenButtonVisibilityEvent.java index c6cfeef3e..44fe82ace 100644 --- a/src/main/java/net/mrscauthd/beyond_earth/events/forge/PlanetSelectionGuiButtonVisibilityEvent.java +++ b/src/main/java/net/mrscauthd/beyond_earth/events/forge/PlanetSelectionScreenButtonVisibilityEvent.java @@ -4,20 +4,20 @@ import net.minecraftforge.client.event.ScreenEvent; import net.minecraftforge.eventbus.api.Cancelable; -public class PlanetSelectionGuiButtonVisibilityEvent extends ScreenEvent { +public class PlanetSelectionScreenButtonVisibilityEvent extends ScreenEvent { - public PlanetSelectionGuiButtonVisibilityEvent(Screen screen) { + public PlanetSelectionScreenButtonVisibilityEvent(Screen screen) { super(screen); } @Cancelable - public static class Pre extends PlanetSelectionGuiButtonVisibilityEvent { + public static class Pre extends PlanetSelectionScreenButtonVisibilityEvent { public Pre(Screen screen) { super(screen); } } - public static class Post extends PlanetSelectionGuiButtonVisibilityEvent { + public static class Post extends PlanetSelectionScreenButtonVisibilityEvent { public Post(Screen screen) { super(screen); } diff --git a/src/main/java/net/mrscauthd/beyond_earth/events/forge/PlanetSelectionGuiInitEvent.java b/src/main/java/net/mrscauthd/beyond_earth/events/forge/PlanetSelectionScreenInitEvent.java similarity index 61% rename from src/main/java/net/mrscauthd/beyond_earth/events/forge/PlanetSelectionGuiInitEvent.java rename to src/main/java/net/mrscauthd/beyond_earth/events/forge/PlanetSelectionScreenInitEvent.java index 7456d7a8e..5a45d0969 100644 --- a/src/main/java/net/mrscauthd/beyond_earth/events/forge/PlanetSelectionGuiInitEvent.java +++ b/src/main/java/net/mrscauthd/beyond_earth/events/forge/PlanetSelectionScreenInitEvent.java @@ -4,20 +4,20 @@ import net.minecraftforge.client.event.ScreenEvent; import net.minecraftforge.eventbus.api.Cancelable; -public class PlanetSelectionGuiInitEvent extends ScreenEvent { +public class PlanetSelectionScreenInitEvent extends ScreenEvent { - public PlanetSelectionGuiInitEvent(Screen screen) { + public PlanetSelectionScreenInitEvent(Screen screen) { super(screen); } @Cancelable - public static class Pre extends PlanetSelectionGuiInitEvent { + public static class Pre extends PlanetSelectionScreenInitEvent { public Pre(Screen screen) { super(screen); } } - public static class Post extends PlanetSelectionGuiInitEvent { + public static class Post extends PlanetSelectionScreenInitEvent { public Post(Screen screen) { super(screen); } diff --git a/src/main/java/net/mrscauthd/beyond_earth/events/forge/PlanetSelectionGuiRenderEvent.java b/src/main/java/net/mrscauthd/beyond_earth/events/forge/PlanetSelectionScreenRenderEvent.java similarity index 78% rename from src/main/java/net/mrscauthd/beyond_earth/events/forge/PlanetSelectionGuiRenderEvent.java rename to src/main/java/net/mrscauthd/beyond_earth/events/forge/PlanetSelectionScreenRenderEvent.java index 397839bc4..2eb5db707 100644 --- a/src/main/java/net/mrscauthd/beyond_earth/events/forge/PlanetSelectionGuiRenderEvent.java +++ b/src/main/java/net/mrscauthd/beyond_earth/events/forge/PlanetSelectionScreenRenderEvent.java @@ -5,14 +5,14 @@ import net.minecraftforge.client.event.ScreenEvent; import net.minecraftforge.eventbus.api.Cancelable; -public class PlanetSelectionGuiRenderEvent extends ScreenEvent { +public class PlanetSelectionScreenRenderEvent extends ScreenEvent { private PoseStack poseStack; private float partialTicks; private int mouseX; private int mouseY; - public PlanetSelectionGuiRenderEvent(Screen screen, PoseStack poseStack, float partialTicks, int mouseX, int mouseY) { + public PlanetSelectionScreenRenderEvent(Screen screen, PoseStack poseStack, float partialTicks, int mouseX, int mouseY) { super(screen); this.poseStack = poseStack; this.partialTicks = partialTicks; @@ -37,13 +37,13 @@ public int getMouseY() { } @Cancelable - public static class Pre extends PlanetSelectionGuiRenderEvent { + public static class Pre extends PlanetSelectionScreenRenderEvent { public Pre(Screen screen, PoseStack poseStack, float partialTicks, int mouseX, int mouseY) { super(screen, poseStack, partialTicks, mouseX, mouseY); } } - public static class Post extends PlanetSelectionGuiRenderEvent { + public static class Post extends PlanetSelectionScreenRenderEvent { public Post(Screen screen, PoseStack poseStack, float partialTicks, int mouseX, int mouseY) { super(screen, poseStack, partialTicks, mouseX, mouseY); } diff --git a/src/main/java/net/mrscauthd/beyond_earth/events/forge/PlayerEnterPlanetSelectionGuiEvent.java b/src/main/java/net/mrscauthd/beyond_earth/events/forge/PlayerEnterPlanetSelectionMenuEvent.java similarity index 70% rename from src/main/java/net/mrscauthd/beyond_earth/events/forge/PlayerEnterPlanetSelectionGuiEvent.java rename to src/main/java/net/mrscauthd/beyond_earth/events/forge/PlayerEnterPlanetSelectionMenuEvent.java index 73140c3b6..809ea548c 100644 --- a/src/main/java/net/mrscauthd/beyond_earth/events/forge/PlayerEnterPlanetSelectionGuiEvent.java +++ b/src/main/java/net/mrscauthd/beyond_earth/events/forge/PlayerEnterPlanetSelectionMenuEvent.java @@ -4,11 +4,11 @@ import net.minecraftforge.event.entity.player.PlayerEvent; import net.mrscauthd.beyond_earth.entities.IRocketEntity; -public class PlayerEnterPlanetSelectionGuiEvent extends PlayerEvent { +public class PlayerEnterPlanetSelectionMenuEvent extends PlayerEvent { private IRocketEntity rocket; - public PlayerEnterPlanetSelectionGuiEvent(Player player, IRocketEntity rocket) { + public PlayerEnterPlanetSelectionMenuEvent(Player player, IRocketEntity rocket) { super(player); this.rocket = rocket; } diff --git a/src/main/java/net/mrscauthd/beyond_earth/events/forge/PlayerExitPlanetSelectionGuiEvent.java b/src/main/java/net/mrscauthd/beyond_earth/events/forge/PlayerExitPlanetSelectionMenuEvent.java similarity index 58% rename from src/main/java/net/mrscauthd/beyond_earth/events/forge/PlayerExitPlanetSelectionGuiEvent.java rename to src/main/java/net/mrscauthd/beyond_earth/events/forge/PlayerExitPlanetSelectionMenuEvent.java index 8d717ab44..c032df9a1 100644 --- a/src/main/java/net/mrscauthd/beyond_earth/events/forge/PlayerExitPlanetSelectionGuiEvent.java +++ b/src/main/java/net/mrscauthd/beyond_earth/events/forge/PlayerExitPlanetSelectionMenuEvent.java @@ -3,9 +3,9 @@ import net.minecraft.world.entity.player.Player; import net.minecraftforge.event.entity.player.PlayerEvent; -public class PlayerExitPlanetSelectionGuiEvent extends PlayerEvent { +public class PlayerExitPlanetSelectionMenuEvent extends PlayerEvent { - public PlayerExitPlanetSelectionGuiEvent(Player player) { + public PlayerExitPlanetSelectionMenuEvent(Player player) { super(player); } } \ No newline at end of file diff --git a/src/main/java/net/mrscauthd/beyond_earth/features/VenusDeltas.java b/src/main/java/net/mrscauthd/beyond_earth/features/InfernalSpireColumn.java similarity index 94% rename from src/main/java/net/mrscauthd/beyond_earth/features/VenusDeltas.java rename to src/main/java/net/mrscauthd/beyond_earth/features/InfernalSpireColumn.java index 7dde5ad62..ae3c46ef4 100644 --- a/src/main/java/net/mrscauthd/beyond_earth/features/VenusDeltas.java +++ b/src/main/java/net/mrscauthd/beyond_earth/features/InfernalSpireColumn.java @@ -17,14 +17,10 @@ import javax.annotation.Nullable; -public class VenusDeltas extends Feature { +public class InfernalSpireColumn extends Feature { private static final ImmutableList CANNOT_PLACE_ON = ImmutableList.of(Blocks.LAVA, Blocks.BEDROCK, Blocks.MAGMA_BLOCK, Blocks.SOUL_SAND, Blocks.NETHER_BRICKS, Blocks.NETHER_BRICK_FENCE, Blocks.NETHER_BRICK_STAIRS, Blocks.NETHER_WART, Blocks.CHEST, Blocks.SPAWNER); - private static final int CLUSTERED_REACH = 5; - private static final int CLUSTERED_SIZE = 50; - private static final int UNCLUSTERED_REACH = 8; - private static final int UNCLUSTERED_SIZE = 15; - public VenusDeltas(Codec p_65153_) { + public InfernalSpireColumn(Codec p_65153_) { super(p_65153_); } diff --git a/src/main/java/net/mrscauthd/beyond_earth/features/MarsBlockBlobFeature.java b/src/main/java/net/mrscauthd/beyond_earth/features/MarsBlockBlobFeature.java deleted file mode 100644 index c970ddbe3..000000000 --- a/src/main/java/net/mrscauthd/beyond_earth/features/MarsBlockBlobFeature.java +++ /dev/null @@ -1,54 +0,0 @@ -package net.mrscauthd.beyond_earth.features; - -import com.mojang.serialization.Codec; -import net.minecraft.core.BlockPos; -import net.minecraft.util.RandomSource; -import net.minecraft.world.level.WorldGenLevel; -import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.levelgen.feature.Feature; -import net.minecraft.world.level.levelgen.feature.FeaturePlaceContext; -import net.minecraft.world.level.levelgen.feature.configurations.BlockStateConfiguration; -import net.mrscauthd.beyond_earth.registries.BlocksRegistry; - -public class MarsBlockBlobFeature extends Feature { - public MarsBlockBlobFeature(Codec p_65248_) { - super(p_65248_); - } - - public boolean place(FeaturePlaceContext p_159471_) { - BlockPos blockpos = p_159471_.origin(); - WorldGenLevel worldgenlevel = p_159471_.level(); - RandomSource random = p_159471_.random(); - - BlockStateConfiguration blockstateconfiguration; - for(blockstateconfiguration = p_159471_.config(); blockpos.getY() > worldgenlevel.getMinBuildHeight() + 3; blockpos = blockpos.below()) { - if (!worldgenlevel.isEmptyBlock(blockpos.below())) { - BlockState blockstate = worldgenlevel.getBlockState(blockpos.below()); - if (isDirt(blockstate) || isStone(blockstate) || blockstate.is(BlocksRegistry.MARS_SAND.get())) { - break; - } - } - } - - if (blockpos.getY() <= worldgenlevel.getMinBuildHeight() + 3) { - return false; - } else { - for(int l = 0; l < 3; ++l) { - int i = random.nextInt(2); - int j = random.nextInt(2); - int k = random.nextInt(2); - float f = (float)(i + j + k) * 0.333F + 0.5F; - - for(BlockPos blockpos1 : BlockPos.betweenClosed(blockpos.offset(-i, -j, -k), blockpos.offset(i, j, k))) { - if (blockpos1.distSqr(blockpos) <= (double)(f * f)) { - worldgenlevel.setBlock(blockpos1, blockstateconfiguration.state, 4); - } - } - - blockpos = blockpos.offset(-1 + random.nextInt(2), -random.nextInt(2), -1 + random.nextInt(2)); - } - - return true; - } - } -} \ No newline at end of file diff --git a/src/main/java/net/mrscauthd/beyond_earth/guis/screens/planetselection/PlanetSelectionScreen.java b/src/main/java/net/mrscauthd/beyond_earth/guis/screens/planetselection/PlanetSelectionScreen.java index c6947bb50..dc933015f 100644 --- a/src/main/java/net/mrscauthd/beyond_earth/guis/screens/planetselection/PlanetSelectionScreen.java +++ b/src/main/java/net/mrscauthd/beyond_earth/guis/screens/planetselection/PlanetSelectionScreen.java @@ -13,10 +13,10 @@ import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.common.MinecraftForge; import net.mrscauthd.beyond_earth.BeyondEarth; -import net.mrscauthd.beyond_earth.events.forge.PlanetSelectionGuiBackgroundRenderEvent; -import net.mrscauthd.beyond_earth.events.forge.PlanetSelectionGuiButtonVisibilityEvent; -import net.mrscauthd.beyond_earth.events.forge.PlanetSelectionGuiInitEvent; -import net.mrscauthd.beyond_earth.events.forge.PlanetSelectionGuiRenderEvent; +import net.mrscauthd.beyond_earth.events.forge.PlanetSelectionScreenBackgroundRenderEvent; +import net.mrscauthd.beyond_earth.events.forge.PlanetSelectionScreenButtonVisibilityEvent; +import net.mrscauthd.beyond_earth.events.forge.PlanetSelectionScreenInitEvent; +import net.mrscauthd.beyond_earth.events.forge.PlanetSelectionScreenRenderEvent; import net.mrscauthd.beyond_earth.guis.buttons.ImageButtonPlacer; import net.mrscauthd.beyond_earth.guis.helper.ScreenHelper; import net.mrscauthd.beyond_earth.guis.screens.planetselection.helper.CategoryHelper; @@ -199,7 +199,7 @@ public void render(PoseStack poseStack, int mouseX, int mouseY, float partialTic super.render(poseStack, mouseX, mouseY, partialTicks); /** RENDER PRE EVENT FOR ADDONS */ - if (MinecraftForge.EVENT_BUS.post(new PlanetSelectionGuiRenderEvent.Pre(this, poseStack, partialTicks, mouseX, mouseY))) { + if (MinecraftForge.EVENT_BUS.post(new PlanetSelectionScreenRenderEvent.Pre(this, poseStack, partialTicks, mouseX, mouseY))) { return; } @@ -207,13 +207,13 @@ public void render(PoseStack poseStack, int mouseX, int mouseY, float partialTic this.font.draw(poseStack, CATALOG_TEXT, 24, (this.height / 2) - 143 / 2, -1); /** RENDER POST EVENT FOR ADDONS */ - MinecraftForge.EVENT_BUS.post(new PlanetSelectionGuiRenderEvent.Post(this, poseStack, partialTicks, mouseX, mouseY)); + MinecraftForge.EVENT_BUS.post(new PlanetSelectionScreenRenderEvent.Post(this, poseStack, partialTicks, mouseX, mouseY)); } protected void renderBg(PoseStack poseStack, float partialTicks, int mouseX, int mouseY) { /** RENDER BACKGROUND PRE EVENT FOR ADDONS */ - if (MinecraftForge.EVENT_BUS.post(new PlanetSelectionGuiBackgroundRenderEvent.Pre(this, poseStack, partialTicks, mouseX, mouseY))) { + if (MinecraftForge.EVENT_BUS.post(new PlanetSelectionScreenBackgroundRenderEvent.Pre(this, poseStack, partialTicks, mouseX, mouseY))) { return; } @@ -266,7 +266,7 @@ protected void renderBg(PoseStack poseStack, float partialTicks, int mouseX, int PlanetSelectionScreenHelper.disableRenderSystem(); /** RENDER BACKGROUND POST EVENT FOR ADDONS */ - MinecraftForge.EVENT_BUS.post(new PlanetSelectionGuiBackgroundRenderEvent.Post(this, poseStack, partialTicks, mouseX, mouseY)); + MinecraftForge.EVENT_BUS.post(new PlanetSelectionScreenBackgroundRenderEvent.Post(this, poseStack, partialTicks, mouseX, mouseY)); } @Override @@ -274,7 +274,7 @@ protected void init() { super.init(); /** INIT PRE EVENT FOR ADDONS */ - if (MinecraftForge.EVENT_BUS.post(new PlanetSelectionGuiInitEvent.Pre(this))) { + if (MinecraftForge.EVENT_BUS.post(new PlanetSelectionScreenInitEvent.Pre(this))) { return; } @@ -414,7 +414,7 @@ else if (PlanetSelectionScreenHelper.categoryRange(this.category.get(), 7, 7)) { this.visibleButton(glacioSpaceStationButton, false); /** INIT POST EVENT FOR ADDONS */ - MinecraftForge.EVENT_BUS.post(new PlanetSelectionGuiInitEvent.Post(this)); + MinecraftForge.EVENT_BUS.post(new PlanetSelectionScreenInitEvent.Post(this)); /** UPDATE BUTTON VISIBILITY */ this.updateButtonVisibility(); @@ -455,7 +455,7 @@ public boolean mouseScrolled(double p_99314_, double p_99315_, double p_99316_) public void updateButtonVisibility() { /** BUTTON VISIBILITY PRE EVENT FOR ADDONS */ - if (MinecraftForge.EVENT_BUS.post(new PlanetSelectionGuiButtonVisibilityEvent.Pre(this))) { + if (MinecraftForge.EVENT_BUS.post(new PlanetSelectionScreenButtonVisibilityEvent.Pre(this))) { return; } @@ -508,7 +508,7 @@ public void updateButtonVisibility() { this.visibleButton(this.glacioSpaceStationButton, this.category.get() == 7); /** BUTTON VISIBILITY POST EVENT FOR ADDONS */ - MinecraftForge.EVENT_BUS.post(new PlanetSelectionGuiButtonVisibilityEvent.Post(this)); + MinecraftForge.EVENT_BUS.post(new PlanetSelectionScreenButtonVisibilityEvent.Post(this)); } public void rotateObjects(float partialTicks) { diff --git a/src/main/java/net/mrscauthd/beyond_earth/registries/FeatureRegistry.java b/src/main/java/net/mrscauthd/beyond_earth/registries/FeatureRegistry.java index c67f6660b..f1a642513 100644 --- a/src/main/java/net/mrscauthd/beyond_earth/registries/FeatureRegistry.java +++ b/src/main/java/net/mrscauthd/beyond_earth/registries/FeatureRegistry.java @@ -1,34 +1,14 @@ package net.mrscauthd.beyond_earth.registries; -import net.minecraft.core.Holder; -import net.minecraft.core.Registry; -import net.minecraft.util.valueproviders.ConstantInt; -import net.minecraft.util.valueproviders.UniformInt; -import net.minecraft.world.level.levelgen.feature.ConfiguredFeature; import net.minecraft.world.level.levelgen.feature.Feature; import net.minecraft.world.level.levelgen.feature.configurations.ColumnFeatureConfiguration; -import net.minecraft.world.level.levelgen.placement.*; import net.minecraftforge.registries.*; import net.mrscauthd.beyond_earth.BeyondEarth; -import net.mrscauthd.beyond_earth.features.VenusDeltas; - -import java.util.List; +import net.mrscauthd.beyond_earth.features.InfernalSpireColumn; public class FeatureRegistry { - public static final DeferredRegister> FEATURES = DeferredRegister.create(ForgeRegistries.FEATURES, BeyondEarth.MODID); - public static final DeferredRegister> CONFIGURED_FEATURES = DeferredRegister.create(Registry.CONFIGURED_FEATURE_REGISTRY, BeyondEarth.MODID); - public static final DeferredRegister PLACED_FEATURES = DeferredRegister.create(Registry.PLACED_FEATURE_REGISTRY, BeyondEarth.MODID); /** FEATURES */ - public static final RegistryObject VENUS_DELTAS_FEATURE = FEATURES.register("venus_deltas", () -> new VenusDeltas(ColumnFeatureConfiguration.CODEC)); - - /** CONFIGURED FEATURES */ - public static final RegistryObject> VENUS_DELTAS_SMALL_CONFIGURED_FEATURE = CONFIGURED_FEATURES.register("venus_deltas_small", () -> new ConfiguredFeature<>(VENUS_DELTAS_FEATURE.get(), new ColumnFeatureConfiguration(ConstantInt.of(1), UniformInt.of(1, 4)))); - public static final RegistryObject> VENUS_DELTAS_LARGE_CONFIGURED_FEATURE = CONFIGURED_FEATURES.register("venus_deltas_large", () -> new ConfiguredFeature<>(VENUS_DELTAS_FEATURE.get(), new ColumnFeatureConfiguration(UniformInt.of(2, 3), UniformInt.of(5, 10)))); - - /** PLACED FEATURES */ - public static final RegistryObject VENUS_DELTAS_SMALL = PLACED_FEATURES.register("venus_deltas_small", () -> new PlacedFeature(Holder.direct(VENUS_DELTAS_SMALL_CONFIGURED_FEATURE.get()), List.of(CountOnEveryLayerPlacement.of(4), BiomeFilter.biome()))); - public static final RegistryObject VENUS_DELTAS_LARGE = PLACED_FEATURES.register("venus_deltas_large", () -> new PlacedFeature(Holder.direct(VENUS_DELTAS_LARGE_CONFIGURED_FEATURE.get()), List.of(CountOnEveryLayerPlacement.of(2), BiomeFilter.biome()))); - + public static final RegistryObject INFERNAL_SPIRE_COLUMN = FEATURES.register("infernal_spire_column", () -> new InfernalSpireColumn(ColumnFeatureConfiguration.CODEC)); } \ No newline at end of file diff --git a/src/main/resources/data/beyond_earth/worldgen/biome/infernal_venus_barrens.json b/src/main/resources/data/beyond_earth/worldgen/biome/infernal_venus_barrens.json index c9a1d3665..68b3eba47 100644 --- a/src/main/resources/data/beyond_earth/worldgen/biome/infernal_venus_barrens.json +++ b/src/main/resources/data/beyond_earth/worldgen/biome/infernal_venus_barrens.json @@ -36,8 +36,8 @@ "minecraft:patch_soul_fire", "minecraft:ore_magma", "minecraft:spring_closed_double", - "beyond_earth:venus_deltas_large", - "beyond_earth:venus_deltas_small", + "beyond_earth:small_infernal_spire_column", + "beyond_earth:large_infernal_spire_column", "beyond_earth:venus_coal_ore", "beyond_earth:venus_gold_ore", "beyond_earth:venus_diamond_ore", diff --git a/src/main/resources/data/beyond_earth/worldgen/configured_feature/large_infernal_spire_column.json b/src/main/resources/data/beyond_earth/worldgen/configured_feature/large_infernal_spire_column.json new file mode 100644 index 000000000..974f47b6c --- /dev/null +++ b/src/main/resources/data/beyond_earth/worldgen/configured_feature/large_infernal_spire_column.json @@ -0,0 +1,19 @@ +{ + "type": "beyond_earth:infernal_spire_column", + "config": { + "reach": { + "type": "minecraft:uniform", + "value": { + "min_inclusive": 2, + "max_inclusive": 3 + } + }, + "height": { + "type": "minecraft:uniform", + "value": { + "min_inclusive": 5, + "max_inclusive": 10 + } + } + } +} diff --git a/src/main/resources/data/beyond_earth/worldgen/configured_feature/small_infernal_spire_column.json b/src/main/resources/data/beyond_earth/worldgen/configured_feature/small_infernal_spire_column.json new file mode 100644 index 000000000..da1fd0aaf --- /dev/null +++ b/src/main/resources/data/beyond_earth/worldgen/configured_feature/small_infernal_spire_column.json @@ -0,0 +1,13 @@ +{ + "type": "beyond_earth:infernal_spire_column", + "config": { + "reach": 1, + "height": { + "type": "minecraft:uniform", + "value": { + "min_inclusive": 1, + "max_inclusive": 4 + } + } + } +} diff --git a/src/main/resources/data/beyond_earth/worldgen/placed_feature/large_infernal_spire_column.json b/src/main/resources/data/beyond_earth/worldgen/placed_feature/large_infernal_spire_column.json new file mode 100644 index 000000000..f3b7ff37f --- /dev/null +++ b/src/main/resources/data/beyond_earth/worldgen/placed_feature/large_infernal_spire_column.json @@ -0,0 +1,12 @@ +{ + "feature": "beyond_earth:large_infernal_spire_column", + "placement": [ + { + "type": "minecraft:count_on_every_layer", + "count": 2 + }, + { + "type": "minecraft:biome" + } + ] +} diff --git a/src/main/resources/data/beyond_earth/worldgen/placed_feature/small_infernal_spire_column.json b/src/main/resources/data/beyond_earth/worldgen/placed_feature/small_infernal_spire_column.json new file mode 100644 index 000000000..540194f17 --- /dev/null +++ b/src/main/resources/data/beyond_earth/worldgen/placed_feature/small_infernal_spire_column.json @@ -0,0 +1,12 @@ +{ + "feature": "beyond_earth:small_infernal_spire_column", + "placement": [ + { + "type": "minecraft:count_on_every_layer", + "count": 4 + }, + { + "type": "minecraft:biome" + } + ] +}