Skip to content

Commit

Permalink
Ported InvernalSpireColumn
Browse files Browse the repository at this point in the history
  • Loading branch information
MrScautHD committed Jun 16, 2022
1 parent b4fe5eb commit 974378c
Show file tree
Hide file tree
Showing 20 changed files with 104 additions and 129 deletions.
11 changes: 7 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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 {
Expand Down
4 changes: 0 additions & 4 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 0 additions & 2 deletions src/main/java/net/mrscauthd/beyond_earth/BeyondEarth.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,10 @@

import javax.annotation.Nullable;

public class VenusDeltas extends Feature<ColumnFeatureConfiguration> {
public class InfernalSpireColumn extends Feature<ColumnFeatureConfiguration> {
private static final ImmutableList<Block> 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<ColumnFeatureConfiguration> p_65153_) {
public InfernalSpireColumn(Codec<ColumnFeatureConfiguration> p_65153_) {
super(p_65153_);
}

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -199,21 +199,21 @@ 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;
}

/** CATALOG TEXT RENDERER */
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;
}

Expand Down Expand Up @@ -266,15 +266,15 @@ 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
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;
}

Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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;
}

Expand Down Expand Up @@ -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) {
Expand Down
Loading

0 comments on commit 974378c

Please sign in to comment.