Skip to content

Commit

Permalink
Update to 1.20.4
Browse files Browse the repository at this point in the history
  • Loading branch information
UnRealDinnerbone committed Jan 1, 2024
1 parent 2055bed commit 6f4a96f
Show file tree
Hide file tree
Showing 42 changed files with 324 additions and 148 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,5 @@ run
fabric2/run_client/

fabric/run_client/

logs/
5 changes: 2 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
### 3.4.2
### 4.0.0

- Fix Crash on fabric
- Removed Infested Stone for spawning
- Updated to 1.20.4
77 changes: 43 additions & 34 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,71 +1,68 @@
plugins {
id("dev.nanite.mlp") version("0.0.3")
id("java")
id "me.modmuss50.mod-publish-plugin" version "0.3.0"

id("fabric-loom") version("1.4.2") apply(false)
id 'net.neoforged.gradle' version '[6.0.18,6.2)' apply(false)
id("dev.nanite.mlp") version("0.1.1")
id("java-library")
id("maven-publish")
id("me.modmuss50.mod-publish-plugin") version "0.3.0"
}


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

multiLoader.root() {
minecraftVersion.set(project.property("minecraft_version"))
modID.set(project.property("mod_id"))
splitSources.set(true)
convertAccessWidener.set(true)
accessWidenerFile.set(project(":common").file("src/main/resources/${mod_id}.accesswidener"))

dataGen {
useFabric.set(project(":common").file("src/generated/resources"))
useForge.set(project(":forge").file("src/generated/resources"))
}

}

allprojects {
def isSnapshot = providers.environmentVariable('SNAPSHOT').is("true")
def isSnapshot = providers.environmentVariable("SNAPSHOT").map {it == "true"}.getOrElse(false)
version = "${mod_version}+mc${minecraft_version}${isSnapshot ? '-SNAPSHOT' : ''}"
setArchivesBaseName("${mod_name}-${project.name}".toLowerCase())
group = project.property("maven_group")
group = "com.unrealdinnerbone"


}

subprojects {
apply plugin: 'dev.nanite.mlp'


apply plugin: 'java-library'
apply plugin: 'maven-publish'
apply plugin: 'dev.nanite.mlp'

afterEvaluate {
project.sourceSets.main.resources.srcDir(project.file('src/generated/resources'))
}

base {
archivesName = "${mod_name}-${project.name}".toLowerCase()
}
sourceSets.main.resources.srcDir project.file('src/generated/resources')

tasks.withType(ProcessResources).configureEach {
outputs.upToDateWhen { false }
}
java.toolchain.languageVersion = JavaLanguageVersion.of(17)


base {
archivesName = "${project.property("mod_name")}-${project.name}".toLowerCase()
}
repositories {
mavenLocal()
maven {
name = "Creeperhost"
url = uri("https://maven.creeperhost.net/")
}
maven {
name = "nanite"
url = uri("https://maven.nanite.dev/snapshots")
}
maven {
name = "UnRealDinnerbone"
url = "https://maven.unreal.codes/releases"
name = "Nanite"
url = "https://maven.nanite.dev/releases"
}
}
tasks.withType(ProcessResources).configureEach {
outputs.upToDateWhen { false }
}

publishing {
repositories {
if (providers.environmentVariable("NANITE_TOKEN").isPresent()) {
maven {
def isSnapshot = providers.environmentVariable('SNAPSHOT').is("true")
def isSnapshot = providers.environmentVariable("SNAPSHOT").map {it == "true"}.getOrElse(false)
url "https://maven.nanite.dev/${isSnapshot ? 'snapshots' : 'releases'}"
credentials {
username = "nanite"
Expand All @@ -75,13 +72,14 @@ subprojects {
}
}
publications {
mavenJava(MavenPublication) {
register("mavenJava", MavenPublication) {
groupId project.group
artifactId project.getArchivesBaseName()
}
}
}


}


Expand All @@ -103,13 +101,17 @@ publishMods {
modLoaders.add("forge")
}

def neoOptions = publishOptions {
file = project.provider { project(":neo").tasks.jar }.flatMap { it.archiveFile }
displayName = "${project.name} Neo ${mod_version}+mc${minecraft_version}"
modLoaders.add("neoforge")
}


def curseForgeOptions = curseforgeOptions {
accessToken = providers.environmentVariable("CURSE_TOKEN")
projectId = project.property("curse_id")
projectId = "${curse_id}"
minecraftVersions.add("${minecraft_version}")
requires {
slug = "trenzalore"
}
}

curseforge("curseforgeFabric") {
Expand All @@ -123,5 +125,12 @@ publishMods {
from(curseForgeOptions, forgeOptions)
}

curseforge("curseforgeNeoForge") {
from(curseForgeOptions, neoOptions)
}

}




2 changes: 1 addition & 1 deletion common/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ multiLoader.common()
publishing.publications.mavenJava.from components.java

dependencies {
implementation("com.unrealdinnerbone:trenzalore-common:${project.property("trenzalore_version")}+mc${project.property("minecraft_version")}-SNAPSHOT")
implementation("com.unrealdinnerbone:trenzalore-common:${project.property("trenzalore_version")}+mc${project.property("minecraft_version")}")
}
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// 1.20.1 2023-08-20T09:33:14.6325483 Just Another Mining Dimension/Language (en_us)
4d0b94d0ebdcaaafe16d0133c0028cf20bec5a5f assets\jamd\lang\en_us.json
// 1.20.4 2023-12-31T21:15:52.9836649 Just Another Mining Dimension/Language (en_us)
d18e932526fabcfa1f61561fb911af2af2e722d2 assets\jamd\lang\en_us.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// 1.20.1 2023-08-20T09:33:14.6340461 Just Another Mining Dimension/Model Definitions
// 1.20.4 2023-12-31T21:15:52.9863671 Just Another Mining Dimension/Model Definitions
bf3a9f8231659d8cbc7ea68a7cdde8e3b029071f assets\jamd\blockstates\end_portal.json
7e626048016ba0c9d3b92a12b89eb0ec4d6fe677 assets\jamd\models\block\nether_portal.json
2d9db6c9191663e8106bc53141670ea054209f9a assets\jamd\models\block\portal_block.json
6b50f23823f194ff35bcec0e1694e77efd20e385 assets\jamd\blockstates\nether_portal.json
c43b79f0a1988c4d812f8e77f1c7506d596430a0 assets\jamd\models\item\end_portal.json
098aa69a37ff6ca1b266436f24e891314007f976 assets\jamd\blockstates\portal_block.json
76633e08f2190391221ca5bc14b6536cda1b87a9 assets\jamd\models\item\nether_portal.json
6048ff3f9c71f641213c1d7aa6d605d9b23fed72 assets\jamd\models\block\end_portal.json
76633e08f2190391221ca5bc14b6536cda1b87a9 assets\jamd\models\item\nether_portal.json
155f13040d10cd90e514a56c4d7338c0db232883 assets\jamd\models\item\portal_block.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// 1.20.1 2023-08-20T09:33:14.633546 Just Another Mining Dimension/JAMD World Data
// 1.20.4 2023-12-31T21:15:52.9851725 Just Another Mining Dimension/JAMD World Data
e022cecafe8e7e93c9e3e503c46197cf1fb33450 data\jamd\dimension_type\mining.json
9493a2c0221f086efbb4263f171937a72c6d6992 data\jamd\worldgen\biome\end.json
ac9e79911103955c5e8d0b82bd377f175796afac data\jamd\worldgen\biome\mining.json
ef6de3478b3faf584bda19d292e42bf38c666765 data\jamd\worldgen\biome\mining.json
5015669d20cfba456749215c51c22bc7ace1d4b3 data\jamd\dimension_type\nether.json
cbc1941a40b6da486531a2010be4e6db0866e4f4 data\jamd\dimension_type\end.json
9eb37f0889d455d2929fd947bb4667057ba1b0fe data\jamd\worldgen\biome\nether.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// 1.20.1 2023-08-20T09:33:14.6345452 Just Another Mining Dimension/Tags for minecraft:block
// 1.20.4 2023-12-31T21:15:52.9866822 Just Another Mining Dimension/Tags for minecraft:block
d21a5dcdd4b5cd0b493217e7e9e4aa477a755db8 data\minecraft\tags\blocks\mineable\pickaxe.json
d21a5dcdd4b5cd0b493217e7e9e4aa477a755db8 data\minecraft\tags\blocks\needs_diamond_tool.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// 1.20.1 2023-08-20T09:33:14.6350463 Just Another Mining Dimension/Recipes
6a1227f9e0b372e3546b782215347c8c76dd6f4f data\jamd\advancements\recipes\transportation\nether_portal_block.json
be575abba95e7f591761941b8ce7b15805dd16f5 data\jamd\advancements\recipes\transportation\end_portal_block.json
64a379634715c9f4ea69b6fc5a330a0008cbb33f data\jamd\recipes\portal_block.json
351ba1cdc449781ef49cc5cdb4bfdd5bc5722a13 data\jamd\recipes\nether_portal_block.json
a202bbb60a616a623a317c3b0902f18436701002 data\jamd\recipes\end_portal_block.json
8be629b04926b089b8c6acc497e9fed86ca0ae1b data\jamd\advancements\recipes\transportation\portal_block.json
// 1.20.4 2023-12-31T21:15:52.9871834 Just Another Mining Dimension/Recipes
4d6b8136d5ff79eb4469ecbc72396d94fd25af20 data\jamd\advancements\recipes\transportation\nether_portal_block.json
20e233e25e1b3488c1d968a1230f04ef41f4e97a data\jamd\advancements\recipes\transportation\end_portal_block.json
f956a1ca3452cba931d99b28820a4e0e73ad2624 data\jamd\recipes\portal_block.json
79a197aae235dfbca7663473a2ad3e7483842e94 data\jamd\recipes\nether_portal_block.json
6893e3a682595a9cf169036ba333467142cab2ff data\jamd\recipes\end_portal_block.json
98ed8e49a380927bcf6b3bf26ccc62a8389b53e6 data\jamd\advancements\recipes\transportation\portal_block.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// 1.20.1 2023-08-20T09:33:14.633546 Just Another Mining Dimension/Block Loot Tables
// 1.20.4 2023-12-31T21:15:52.9846687 Just Another Mining Dimension/Block Loot Tables
d02ea46f3e4060ea18cb73c3b3fe1f1738d4e47c data\jamd\loot_tables\blocks\portal_block.json
8f213054226c115851779a7dd3fb5e0cfb8323f9 data\jamd\loot_tables\blocks\end_portal.json
d4122e44c4d0d50740cfa507d4d05078c7163a7d data\jamd\loot_tables\blocks\nether_portal.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// 1.20.4 2023-12-31T21:15:52.9856762 Just Another Mining Dimension/Advancements
f34c43720484aabd95e66cd03d741a74ddc92be3 data\jamd\advancements\enter_mining_dimension.json
2 changes: 2 additions & 0 deletions common/src/generated/resources/assets/jamd/lang/en_us.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
"advancements.jamd.mining.description": "Enter the Mining Dimension",
"advancements.jamd.mining.title": "To Infinity and Underground",
"biome.jamd.end": "End Mining",
"biome.jamd.mining": "Mining",
"biome.jamd.nether": "Nether Mining",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"criteria": {
"enter_dimension": {
"conditions": {
"to": "jamd:mining"
},
"trigger": "minecraft:changed_dimension"
}
},
"display": {
"description": {
"translate": "advancements.jamd.mining.description"
},
"icon": {
"item": "jamd:portal_block"
},
"title": {
"translate": "advancements.jamd.mining.title"
}
},
"requirements": [
[
"enter_dimension"
]
],
"sends_telemetry_event": true
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,13 @@
},
"requirements": [
[
"has_diamond_pick",
"has_the_recipe"
"has_the_recipe",
"has_diamond_pick"
]
],
"rewards": {
"recipes": [
"jamd:end_portal_block"
]
},
"sends_telemetry_event": false
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,13 @@
},
"requirements": [
[
"has_diamond_pick",
"has_the_recipe"
"has_the_recipe",
"has_diamond_pick"
]
],
"rewards": {
"recipes": [
"jamd:nether_portal_block"
]
},
"sends_telemetry_event": false
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,13 @@
},
"requirements": [
[
"has_diamond_pick",
"has_the_recipe"
"has_the_recipe",
"has_diamond_pick"
]
],
"rewards": {
"recipes": [
"jamd:portal_block"
]
},
"sends_telemetry_event": false
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,5 @@
],
"result": {
"item": "jamd:end_portal"
},
"show_notification": true
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,5 @@
],
"result": {
"item": "jamd:nether_portal"
},
"show_notification": true
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,5 @@
],
"result": {
"item": "jamd:portal_block"
},
"show_notification": true
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"minecraft:ore_redstone",
"minecraft:ore_redstone_lower",
"minecraft:ore_diamond",
"minecraft:ore_diamond_medium",
"minecraft:ore_diamond_large",
"minecraft:ore_diamond_buried",
"minecraft:ore_lapis",
Expand Down
8 changes: 8 additions & 0 deletions common/src/main/java/com/unrealdinnerbone/jamd/WorldType.java
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,14 @@ public void export(MinecraftServer server) throws IllegalStateException, IOExcep
}
}

public String getAdvancementTitleKey() {
return "advancements." + JAMD.MOD_ID + "." + name + ".title";
}

public String getAdvancementDescriptionKey() {
return "advancements." + JAMD.MOD_ID + "." + name + ".description";
}


public List<PlacedFeature> getFeatures(MinecraftServer server) {
List<PlacedFeature> features = new ArrayList<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
import net.minecraft.world.level.levelgen.flat.FlatLayerInfo;
import net.minecraft.world.level.levelgen.flat.FlatLevelGeneratorSettings;
import net.minecraft.world.level.levelgen.placement.PlacedFeature;
import org.jetbrains.annotations.NotNull;

import java.util.List;
import java.util.Optional;

@SuppressWarnings("OptionalUsedAsFieldOrParameterType")
public class CustomFlatLevelGeneratorSettings extends FlatLevelGeneratorSettings {

public static final Codec<CustomFlatLevelGeneratorSettings> CODEC = RecordCodecBuilder.create((instance) ->
Expand All @@ -29,6 +29,7 @@ public static CustomFlatLevelGeneratorSettings create(Holder<Biome> holder, List
}

@Override
@NotNull
public BiomeGenerationSettings adjustGenerationSettings(Holder<Biome> holder) {
if (!holder.equals(this.biome)) {
return holder.value().getGenerationSettings();
Expand Down
Loading

0 comments on commit 6f4a96f

Please sign in to comment.