Skip to content

Commit

Permalink
Move worldgen and some other stuff over
Browse files Browse the repository at this point in the history
  • Loading branch information
Vazkii committed Jan 8, 2024
1 parent c2d40e2 commit fb38a2b
Show file tree
Hide file tree
Showing 32 changed files with 31 additions and 974 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,6 @@ public class QuarkGeneralConfig {
@Config(description = "Should Quark treat anything with 'shulker_box' in its item identifier as a shulker box?")
public static boolean interpretShulkerBoxLikeBlocks = true;

@Config(description = "Set to true to enable a system that debugs quark's worldgen features. This should ONLY be used if you're asked to by a dev.")
public static boolean enableWorldgenWatchdog = false;

@Config(description = "Set to true if you need to find the class name for a screen that's causing problems")
public static boolean printScreenClassnames = false;

Expand All @@ -68,9 +65,6 @@ public class QuarkGeneralConfig {
@Config(description = "If set to true, the 'Allowed Screens' option will work as a Blacklist rather than a Whitelist. WARNING: Use at your own risk as some mods may not support this.")
private static boolean useScreenListBlacklist = false;

@Config(description = "Set to true to make the quark big worldgen features such as stone clusters generate as spheres rather than unique shapes. It's faster, but won't look as cool")
public static boolean useFastWorldgen = false;

@Config(description = "If 'true' and TerraBlender is present, Quark will add a TerraBlender region. The region will contain vanilla biomes and the Glimmering Weald.")
public static boolean terrablenderAddRegion = true;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import net.minecraft.world.item.Items;
import net.minecraftforge.client.gui.widget.ForgeSlider;
import org.jetbrains.annotations.NotNull;
import org.violetmoon.quark.base.config.type.inputtable.ConvulsionMatrixConfig;
import org.violetmoon.quark.base.config.type.ConvulsionMatrixConfig;
import org.violetmoon.zeta.client.ZetaClient;
import org.violetmoon.zeta.client.config.definition.ClientDefinitionExt;
import org.violetmoon.zeta.client.config.screen.AbstractSectionInputScreen;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import net.minecraftforge.client.gui.widget.ForgeSlider;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.violetmoon.quark.base.config.type.inputtable.RGBAColorConfig;
import org.violetmoon.quark.base.config.type.RGBAColorConfig;
import org.violetmoon.zeta.client.ZetaClient;
import org.violetmoon.zeta.client.config.definition.ClientDefinitionExt;
import org.violetmoon.zeta.client.config.screen.AbstractSectionInputScreen;
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.violetmoon.quark.base.config.type.inputtable;
package org.violetmoon.quark.base.config.type;

import java.util.Arrays;
import java.util.LinkedHashMap;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.violetmoon.quark.base.config.type.inputtable;
package org.violetmoon.quark.base.config.type;

import java.util.Objects;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.violetmoon.quark.base.config.type.inputtable;
package org.violetmoon.quark.base.config.type;

import net.minecraft.util.Mth;

Expand Down
24 changes: 0 additions & 24 deletions src/main/java/org/violetmoon/quark/base/proxy/CommonProxy.java
Original file line number Diff line number Diff line change
Expand Up @@ -62,21 +62,15 @@ public void start() {
// GLOBAL EVENT LISTENERS
Quark.ZETA.loadBus
.subscribe(ContributorRewardHandler.class)
.subscribe(EntitySpawnHandler.class)
.subscribe(QuarkSounds.class)
.subscribe(WoodSetHandler.class)
.subscribe(WorldGenHandler.class)
.subscribe(this);

Quark.ZETA.playBus
.subscribe(CapabilityHandler.class)
.subscribe(ContributorRewardHandler.class)
.subscribe(SyncedFlagHandler.class)

IEventBus bus = FMLJavaModLoadingContext.get().getModEventBus();
bus.addListener(this::configChanged);
WorldGenHandler.registerBiomeModifier(bus);

// OTHER RANDOM SHIT
QuarkNetwork.init();

Expand Down Expand Up @@ -114,24 +108,6 @@ public void recipe(ZRegister event) {
event.getRegistry().register(ExclusionRecipe.SERIALIZER, "exclusion", Registries.RECIPE_SERIALIZER);
}

//forge event
public void configChanged(ModConfigEvent event) {
if(!event.getConfig().getModId().equals(Quark.MOD_ID) || Quark.ZETA.configInternals == null)
return;

// https://github.com/VazkiiMods/Quark/commit/b0e00864f74539d8650cb349e88d0302a0fda8e4
// "The Forge config api writes to the config file on every single change
// to the config, which would cause the file watcher to trigger
// a config reload while the config gui is committing changes."
if(System.currentTimeMillis() - Quark.ZETA.configInternals.debounceTime() > 20)
handleQuarkConfigChange();
}

public void handleQuarkConfigChange() {
Quark.ZETA.configManager.onReload();
Quark.ZETA.loadBus.fire(new ZConfigChanged());
}

/**
* Use an item WITHOUT sending the use to the server. This will cause ghost interactions if used incorrectly!
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.violetmoon.quark.base.world;
package org.violetmoon.quark.base.util;

public class WorldGenWeights {
public class QuarkWorldGenWeights {

// UNDERGROUND_ORES
public static final int CLAY = 0;
Expand Down
25 changes: 0 additions & 25 deletions src/main/java/org/violetmoon/quark/base/world/DeferredFeature.java

This file was deleted.

This file was deleted.

Loading

0 comments on commit fb38a2b

Please sign in to comment.