Skip to content

Commit

Permalink
1.18 baby
Browse files Browse the repository at this point in the history
  • Loading branch information
EwyBoy committed Jan 4, 2022
1 parent a9da22f commit 944a4af
Show file tree
Hide file tree
Showing 18 changed files with 146 additions and 396 deletions.
60 changes: 0 additions & 60 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,60 +0,0 @@
**v1.17.1 - 2.6.0**
* Bump, patch and fixes

**v1.17.1 - 2.5.1**
* Changed template to use new BiomeDictionary Type `MOUNTAIN` for Emerald Ore and Infested Stone.
* Started working on enhancing performance when generating new chunks and biomes.
* Ore reconstruction from JSON now cashes a lot of stuff to reduce stress on biome loading.
* More performance enhancements coming soon.

**v1.17.1 - 2.5.0**
* Added support for the Forge BiomeDictionary to be used in (black/white)lists.

You can now do:
```
"biomeWhitelist": ["MOUNTAIN", "WET", "HOT", "OCEAN", "minecraft:plains"]
```
this will now whitelist any biome from vanilla or modded that is tagged with these biome types.

You can read more about this at: https://github.com/EwyBoy/OreTweaker/wiki/Biome-Filtering

* Cleaned up parts of the backend
* Cleaned up console spam

**v1.17.1 - 2.4.1**
* Fixed a bug where the white/black lists where not working properly

**v1.17.1 - 2.4.0**
###### Important information
Ore Tweaker 2.4.x and forward now uses the new data structure (**v2**) for ore tweaking.
The new data structure allows multiple ore tweaking files and will make it easier to edit, download, share and use templates.
The mod will now read **ALL** `.json` files in the new `oretweaker/data` folder.
I have written an automated updater that will update and convert your old `OreTweaker.json` from the old (**v1**) format to the new (**v2**) format and move the files inside the new `oretweaker/data` folder for you.
All you have to do is to update the mod, and the next time you launch OreTweaker will change its internal file structure to fit the new standard.
After the update the old `OreTweaker.json` will be automatically **deleted**. I have tested a lot of edge cases with the automated updater, but I can never guarantee it will work 100% if you are doing some wicked stuff.
Backup your OreTweaker `config` folder just in case.

**Changes**:

* Moved over to new data structure (v2) for ore tweaking
* Improved console outputs and debugging
* Added config options to auto generate deepslate variants
* Added new config options to regenerate default data / templates
* Revamped template system to work with the new v2 data structure
* Removed reload command due to CODEC requiring a full restart
* Fixed bug where duplicated names for features - Thanks to lynnpye
* Tons of backend changes


**v1.17.1 - 2.3.1**
* Implemented spawnRate below 1 (Example: 0.2, 0.75, etc.)

**v1.17.1 - 2.3.0**
* Ported to run on 1.17.+
* Updated to official mappings
* Updated to Gradle 7.1
* Updated to ForgeGradle 5.1
* Requires Bibliotheca 1.7.1+
* Built inn support for deepslate variants
* Added copper, deepslate and tuff to default list
* Updated templates
12 changes: 6 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
buildscript {
repositories {
maven { url = 'https://files.minecraftforge.net/maven' }
//maven { url = 'https://repo.spongepowered.org/repository/maven-public/' }
mavenCentral()
}
dependencies {
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '5.1.+', changing: true
//classpath group: 'org.spongepowered', name: 'mixingradle', version: '0.7-SNAPSHOT'
}
}

Expand All @@ -22,7 +20,7 @@ version = "${MC_VERSION}-${VERSION}"
group = "com.ewyboy.${MODID}"
archivesBaseName = MODNAME

java.toolchain.languageVersion = JavaLanguageVersion.of(16)
java.toolchain.languageVersion = JavaLanguageVersion.of(17)

minecraft {
apply plugin: 'idea'
Expand Down Expand Up @@ -66,14 +64,16 @@ repositories {
includeGroup "curse.maven"
}
}
mavenCentral()
}

sourceSets.main.resources { srcDir 'src/generated/resources' }

dependencies {
implementation 'com.fasterxml.jackson.core:jackson-databind:2.13.0'
implementation 'com.fasterxml.jackson.core:jackson-core:2.13.0'
minecraft "net.minecraftforge:forge:${MC_VERSION}-${FORGE_VERSION}"
implementation fg.deobf("curse.maven:worldstripper-250603:${WORLD_STRIPPER}")
implementation fg.deobf("curse.maven:configured-457570:${CONFIGURED}")
}

jar {
Expand Down Expand Up @@ -102,8 +102,8 @@ curseforge {
changelog = file('CHANGELOG.md')
releaseType = "${RELEASE_TYPE}"
addGameVersion 'Forge'
addGameVersion '1.17.1'
addGameVersion '1.17'
addGameVersion 'Java 17'
addGameVersion '1.18'
mainArtifact(jar) {
displayName = "${MODNAME}-${MC_VERSION}-${VERSION}.jar"
}
Expand Down
12 changes: 5 additions & 7 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,22 @@
org.gradle.jvmargs=-Xmx3G

# Mod Info
VERSION=2.6.0
VERSION=3.0.0
AUTHOR=Ewy
MODNAME=OreTweaker
MODID=oretweaker

# Dependencies
MC_VERSION=1.17.1
FORGE_VERSION=37.0.104
MC_VERSION=1.18.1
FORGE_VERSION=39.0.10

# Mappings
MCP_CHANNEL=official
MCP_MAPPINGS=1.17.1
MCP_MAPPINGS=1.18.1

# Curse Maven
WORLD_STRIPPER=3400494
CONFIGURED=3416891
WORLD_STRIPPER=3542510

# Curse Forge
PROJECT_ID=242436
RELEASE_TYPE=release

2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.1.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
1 change: 1 addition & 0 deletions src/main/java/com/ewyboy/oretweaker/json/JSONHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import com.ewyboy.oretweaker.util.ModLogger;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.mojang.authlib.minecraft.client.ObjectMapper;
import net.minecraftforge.fml.loading.FMLPaths;

import java.io.*;
Expand Down
28 changes: 28 additions & 0 deletions src/main/java/com/ewyboy/oretweaker/json/objects/Filter.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
package com.ewyboy.oretweaker.json.objects;

import java.util.Collections;
import java.util.List;

public class Filter {

private List<String> biomeBlacklist;
private List<String> biomeWhitelist;
private List<String> dimensionBlacklist;
private List<String> dimensionWhitelist;

public Filter() {
this.biomeBlacklist = Collections.emptyList();
this.biomeWhitelist = Collections.emptyList();
this.dimensionBlacklist = Collections.emptyList();
this.dimensionWhitelist =Collections.emptyList();
}

public Filter(List<String> biomeBlacklist, List<String> biomeWhitelist, List<String> dimensionBlacklist, List<String> dimensionWhitelist) {
this.biomeBlacklist = biomeBlacklist;
this.biomeWhitelist = biomeWhitelist;
this.dimensionBlacklist = dimensionBlacklist;
this.dimensionWhitelist = dimensionWhitelist;
}


}
13 changes: 0 additions & 13 deletions src/main/java/com/ewyboy/oretweaker/json/objects/OreConfig.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package com.ewyboy.oretweaker.json.objects;

import com.ewyboy.oretweaker.config.Settings;

import java.util.List;

public class OreConfig {
Expand All @@ -20,15 +18,4 @@ public void setOreConfig(List<OreEntry> oreConfig) {
this.oreConfig = oreConfig;
}

@Override
public String toString() {
if (Settings.SETTINGS.debugMode.get()) {
return "OreConfig {" +
"\n" + "\t" + "oreConfig=" + oreConfig + "\n" +
'}' + "\n";
} else {
return "OreConfig{" + "oreConfig=" + oreConfig + '}';
}
}

}
58 changes: 14 additions & 44 deletions src/main/java/com/ewyboy/oretweaker/json/objects/OreEntry.java
Original file line number Diff line number Diff line change
@@ -1,36 +1,35 @@
package com.ewyboy.oretweaker.json.objects;

import com.ewyboy.oretweaker.config.Settings;

import java.util.Collections;
import java.util.List;

public class OreEntry {

private String ore;
private String filler;
private String replace;
private int minY;
private int maxY;
private int maxVeinSize;
private float spawnRate;
private List<String> biomeBlacklist;
private List<String> biomeWhitelist;

public OreEntry(String oreName, String filler, Integer minY, Integer maxY, Integer maxVeinSize, Float spawnRate, List<String> biomeBlacklist, List<String> biomeWhitelist) { }
public OreEntry() {}

public OreEntry(String ore) {
this.ore = ore;
this.filler = null;
this.replace = null;
this.minY = -1;
this.maxY = -1;
this.maxVeinSize = -1;
this.spawnRate = -1;
this.biomeBlacklist = null;
this.biomeWhitelist = null;
this.biomeBlacklist = Collections.emptyList();
this.biomeWhitelist = Collections.emptyList();
}

public OreEntry(String ore, String filler, int minY, int maxY, int maxVeinSize, float spawnRate, List<String> biomeBlacklist, List<String> biomeWhitelist) {
public OreEntry(String ore, String replace, int minY, int maxY, int maxVeinSize, float spawnRate, List<String> biomeBlacklist, List<String> biomeWhitelist) {
this.ore = ore;
this.filler = filler;
this.replace = replace;
this.minY = minY;
this.maxY = maxY;
this.maxVeinSize = maxVeinSize;
Expand All @@ -39,6 +38,7 @@ public OreEntry(String ore, String filler, int minY, int maxY, int maxVeinSize,
this.biomeWhitelist = biomeWhitelist;
}


public String getOre() {
return ore;
}
Expand All @@ -47,12 +47,13 @@ public void setOre(String ore) {
this.ore = ore;
}

public String getFiller() {
return filler;

public String getReplace() {
return replace;
}

public void setFiller(String filler) {
this.filler = filler;
public void setReplace(String replace) {
this.replace = replace;
}

public int getMinY() {
Expand Down Expand Up @@ -87,10 +88,6 @@ public void setSpawnRate(float spawnRate) {
this.spawnRate = spawnRate;
}

public void setSpawnRate(int spawnRate) {
this.spawnRate = spawnRate;
}

public List<String> getBiomeBlacklist() {
return biomeBlacklist;
}
Expand All @@ -106,31 +103,4 @@ public List<String> getBiomeWhitelist() {
public void setBiomeWhitelist(List<String> biomeWhitelist) {
this.biomeWhitelist = biomeWhitelist;
}

@Override
public String toString() {
if (Settings.SETTINGS.debugMode.get()) {
return "\n" + "OreEntry {" + "\n" +
"\t" + "ore='" + ore + '\'' + "\n" +
"\t" + "filler='" + filler + '\'' + "\n" +
"\t" + "minY=" + minY + "\n" +
"\t" + "maxY=" + maxY + "\n" +
"\t" + "maxVeinSize=" + maxVeinSize + "\n" +
"\t" + "spawnRate=" + spawnRate + "\n" +
"\t" + "biomeBlacklist=" + biomeBlacklist + "\n" +
"\t" + "biomeWhitelist=" + biomeWhitelist + "\n" +
'}';
} else {
return "OreEntry{" +
"ore='" + ore + '\'' +
", filler='" + filler + '\'' +
", minY=" + minY +
", maxY=" + maxY +
", maxVeinSize=" + maxVeinSize +
", spawnRate=" + spawnRate +
", biomeBlacklist=" + biomeBlacklist +
", biomeWhitelist=" + biomeWhitelist +
'}';
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public class OreManager {
public static void setup() {
IEventBus forgeBus = MinecraftForge.EVENT_BUS;
OreDeconstruction.deconstruct(forgeBus);
OreReconstruction.reconstruct(forgeBus);
//OreReconstruction.reconstruct(forgeBus);
}

}
Loading

0 comments on commit 944a4af

Please sign in to comment.