Skip to content

Commit abe3fbc

Browse files
committed
MCreator 2025.1 Port
1 parent 29137c4 commit abe3fbc

File tree

129 files changed

+1320
-606
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

129 files changed

+1320
-606
lines changed

datapack-1.18.x/generator.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
name: Data Pack for Java Edition @minecraft
22
status: deprecated
3-
buildfileversion: 1.3
3+
buildfileversion: 40.3.10
44

55
# gradle task definitions
66
gradle:
7+
run_client: ":packloader:runClient"
78
export_file: "build/export/export.zip"
89

910
# base generator roots
@@ -22,4 +23,4 @@ base_templates:
2223

2324
tags:
2425
template: tags.json.ftl
25-
name: "@RESROOT/data/@namespace/tags/@folder_pre21/@name.json"
26+
name: "@RESROOT/data/@namespace/tags/@folder_pre21/@name.json"

datapack-1.18.x/mappings/blocksitems.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3532,9 +3532,6 @@ Items.CAULDRON:
35323532
Items.SPECKLED_MELON:
35333533
- Items.GLISTERING_MELON_SLICE
35343534
- "glistering_melon_slice"
3535-
Items.SPAWN_EGG:
3536-
- Items.CREEPER_SPAWN_EGG
3537-
- "#forge:eggs"
35383535
Items.SPAWN_EGG#50:
35393536
- Items.CREEPER_SPAWN_EGG
35403537
- "creeper_spawn_egg"

datapack-1.18.x/mappings/configuredfeatures.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -586,10 +586,6 @@ seagrass_short:
586586
- seagrass_short
587587
- AquaticFeatures.SEAGRASS_SHORT
588588
- ProbabilityFeatureConfiguration
589-
seagrass_simple:
590-
- seagrass_simple
591-
- AquaticFeatures.SEAGRASS_SIMPLE
592-
- SimpleBlockConfiguration
593589
seagrass_slightly_less_short:
594590
- seagrass_slightly_less_short
595591
- AquaticFeatures.SEAGRASS_SLIGHTLY_LESS_SHORT
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
_default: mineshaft
2+
_mcreator_map_template: "@modid:@registryname"
3+
_bypass_prefix: "#"
4+
pillager_outpost: pillager_outpost
5+
mineshaft: mineshaft
6+
mineshaft_mesa: mineshaft_mesa
7+
mansion: mansion
8+
jungle_pyramid: jungle_pyramid
9+
desert_pyramid: desert_pyramid
10+
igloo: igloo
11+
shipwreck: shipwreck
12+
shipwreck_beached: shipwreck_beached
13+
swamp_hut: swamp_hut
14+
stronghold: stronghold
15+
monument: monument
16+
ocean_ruin_cold: ocean_ruin_cold
17+
ocean_ruin_warm: ocean_ruin_warm
18+
fortress: fortress
19+
nether_fossil: nether_fossil
20+
end_city: end_city
21+
buried_treasure: buried_treasure
22+
bastion_remnant: bastion_remnant
23+
village_plains: village_plains
24+
village_desert: village_desert
25+
village_savanna: village_savanna
26+
village_snowy: village_snowy
27+
village_taiga: village_taiga
28+
ruined_portal: ruined_portal
29+
ruined_portal_desert: ruined_portal_desert
30+
ruined_portal_jungle: ruined_portal_jungle
31+
ruined_portal_swamp: ruined_portal_swamp
32+
ruined_portal_mountain: ruined_portal_mountain
33+
ruined_portal_ocean: ruined_portal_ocean
34+
ruined_portal_nether: ruined_portal_nether

datapack-1.18.x/templates/loottable.json.ftl

Lines changed: 40 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<#include "mcitems.ftl">
22
<#function hasToolContext>
3-
<#return data.type == "Block" || data.type == "Fishing" || data.type == "Generic">
3+
<#return data.type == "Block" || data.type == "Fishing" || data.type == "Generic">
44
</#function>
55
{
66
"type": "minecraft:${data.type?lower_case?replace(" ", "_")}",
@@ -17,19 +17,24 @@
1717
</#if>
1818
<#if pool.hasbonusrolls>
1919
<#if pool.minbonusrolls == pool.maxbonusrolls>
20-
"bonus_rolls": ${pool.minbonusrolls},
20+
"bonus_rolls": ${pool.minbonusrolls},
2121
<#else>
22-
"bonus_rolls": {
23-
"min": ${pool.minbonusrolls},
24-
"max": ${pool.maxbonusrolls}
25-
},
22+
"bonus_rolls": {
23+
"min": ${pool.minbonusrolls},
24+
"max": ${pool.maxbonusrolls}
25+
},
2626
</#if>
2727
</#if>
2828
"entries": [
2929
<#list pool.entries as entry>
3030
{
31+
<#assign item = mappedMCItemToRegistryName(entry.item)>
32+
<#if entry.item.isAir() || item == "minecraft:air">
33+
"type": "minecraft:empty",
34+
<#else>
3135
"type": "minecraft:${entry.type}",
32-
"name": "${mappedMCItemToRegistryName(entry.item)}",
36+
"name": "${item}",
37+
</#if>
3338
"weight": ${entry.weight},
3439
<#if entry.silkTouchMode == 1 && hasToolContext()>
3540
"conditions": [
@@ -68,42 +73,41 @@
6873
],
6974
</#if>
7075
"functions": [
71-
{
72-
"function": "set_count",
73-
"count": {
74-
"min": ${entry.minCount},
75-
"max": ${entry.maxCount}
76-
}
77-
}
78-
<#if entry.minEnchantmentLevel != 0 || entry.maxEnchantmentLevel != 0>
79-
,{
80-
"function": "enchant_with_levels",
81-
"treasure": true,
82-
"levels": {
83-
"min": ${entry.minEnchantmentLevel},
84-
"max": ${entry.maxEnchantmentLevel}
85-
}
86-
}
87-
</#if>
88-
<#if entry.explosionDecay>
89-
,{
90-
"function": "minecraft:explosion_decay"
76+
{
77+
"function": "minecraft:set_count",
78+
"count": {
79+
"min": ${entry.minCount},
80+
"max": ${entry.maxCount}
9181
}
92-
</#if>
93-
<#if entry.affectedByFortune && hasToolContext()>
94-
,{
95-
"function": "minecraft:apply_bonus",
96-
"enchantment": "minecraft:fortune",
97-
"formula": "minecraft:ore_drops"
82+
}
83+
<#if entry.minEnchantmentLevel != 0 || entry.maxEnchantmentLevel != 0>
84+
,{
85+
"function": "minecraft:enchant_with_levels",
86+
"treasure": true,
87+
"levels": {
88+
"min": ${entry.minEnchantmentLevel},
89+
"max": ${entry.maxEnchantmentLevel}
9890
}
99-
</#if>
91+
}
92+
</#if>
93+
<#if entry.explosionDecay>
94+
,{
95+
"function": "minecraft:explosion_decay"
96+
}
97+
</#if>
98+
<#if entry.affectedByFortune && hasToolContext()>
99+
,{
100+
"function": "minecraft:apply_bonus",
101+
"enchantment": "minecraft:fortune",
102+
"formula": "minecraft:ore_drops"
103+
}
104+
</#if>
100105
]
101106
}
102107
<#if entry?has_next>,</#if>
103108
</#list>
104109
]
105-
}
106-
<#if pool?has_next>,</#if>
110+
}<#if pool?has_next>,</#if>
107111
</#list>
108112
]
109113
}

datapack-1.18.x/templates/tags.json.ftl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<#list w.normalizeTagElements(tag.resourcePath(), 2, elements) as value>
1111
"${value.getMappedValue(2)}"<#sep>,
1212
</#list>
13-
<#elseif type == "biomes">
13+
<#elseif type == "biomes" || type == "structures" || type == "game_events">
1414
<#list w.normalizeTagElements(tag.resourcePath(), 0, elements) as value>
1515
"${value}"<#sep>,
1616
</#list>

datapack-1.18.x/workspace.gitignore

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,16 @@ build/
44

55
# Other IDE related folders
66
.idea/
7+
.eclipse/
78
.settings/
9+
.classpath
10+
.project
811

912
# MCreator workspace
1013
.mcreator/
1114

12-
# MacOS system files
13-
.DS_STORE
15+
# Minecraft client/server files
16+
run/
1417

15-
# Other Files (In Eclipse)
16-
.classpath
17-
.project
18+
# MacOS system files
19+
.DS_STORE

datapack-1.18.x/workspacebase/build.gradle

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,16 @@ tasks.register('build', Zip.class) {
44
destinationDirectory = file('build/export/')
55
}
66

7+
tasks.register('syncDataPack', Copy) {
8+
from("build/export/export.zip")
9+
into("run/datapacks/")
10+
dependsOn 'build'
11+
}
12+
13+
project(':packloader') {
14+
afterEvaluate {
15+
tasks.named('runClient') {
16+
dependsOn(rootProject.tasks.named('syncDataPack'))
17+
}
18+
}
19+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
org.gradle.jvmargs=-Xmx1G
2+
org.gradle.daemon=true
3+
org.gradle.parallel=true
4+
org.gradle.caching=true
5+
org.gradle.configuration-cache=true
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
plugins {
2+
id 'eclipse'
3+
id 'net.neoforged.moddev.legacyforge' version '2.0.89'
4+
}
5+
6+
version = '1.0'
7+
base.archivesName = "packloader"
8+
9+
java.toolchain.languageVersion = JavaLanguageVersion.of(17)
10+
11+
legacyForge {
12+
version = "1.18.2-${generator.getGeneratorBuildFileVersion()}"
13+
14+
runs {
15+
client {
16+
client()
17+
gameDirectory = project.file('../run')
18+
19+
def mcreatorJvmOptions = System.getenv('MCREATOR_JVM_OPTIONS')
20+
if (mcreatorJvmOptions) {
21+
mcreatorJvmOptions.split("\\s+").findAll { it.trim() }.each { arg ->
22+
jvmArgument(arg)
23+
}
24+
}
25+
}
26+
}
27+
28+
mods {
29+
packloader {
30+
sourceSet sourceSets.main
31+
}
32+
}
33+
}
34+
35+
tasks.withType(JavaCompile).configureEach {
36+
options.encoding = 'UTF-8'
37+
}

0 commit comments

Comments
 (0)