mirror of
https://gitlab.bixilon.de/bixilon/pixlyzer.git
synced 2025-09-24 04:21:59 -04:00
fix issues with java 16, support for 21w19a
This commit is contained in:
parent
ee1cb530e1
commit
2f341429af
@ -13,7 +13,7 @@ cache:
|
||||
|
||||
stages:
|
||||
- build
|
||||
- 21w18a
|
||||
- 21w19a
|
||||
- 1.16.5
|
||||
- 1.16.2
|
||||
- 1.15.2
|
||||
@ -22,13 +22,13 @@ stages:
|
||||
build:
|
||||
stage: build
|
||||
script:
|
||||
- "cd wrapper && python3 PixLyzer.py --only-version=21w18a --dont-compile --only-map"
|
||||
- "cd wrapper && python3 PixLyzer.py --only-version=21w19a --dont-compile --only-map"
|
||||
- 'cd ../ && mvn clean $MAVEN_CLI_OPTS verify'
|
||||
|
||||
21w18a:
|
||||
stage: 21w18a
|
||||
21w19a:
|
||||
stage: 21w19a
|
||||
script:
|
||||
- "cd wrapper && python3 PixLyzer.py --only-version=21w18a --dont-compile"
|
||||
- "cd wrapper && python3 PixLyzer.py --only-version=21w19a --dont-compile"
|
||||
|
||||
1.16.5:
|
||||
stage: 1.16.5
|
||||
|
2
pom.xml
2
pom.xml
@ -17,7 +17,7 @@
|
||||
<kotlin.compiler.jvmTarget>1.8</kotlin.compiler.jvmTarget>
|
||||
<maven.compiler.source>1.8</maven.compiler.source>
|
||||
<maven.compiler.target>1.8</maven.compiler.target>
|
||||
<minecraft.version>21w18a</minecraft.version>
|
||||
<minecraft.version>21w19a</minecraft.version>
|
||||
</properties>
|
||||
|
||||
<repositories>
|
||||
|
@ -14,7 +14,9 @@ import net.minecraft.entity.EquipmentSlot
|
||||
import net.minecraft.fluid.Fluid
|
||||
import net.minecraft.item.*
|
||||
import net.minecraft.sound.SoundEvent
|
||||
import net.minecraft.tag.Tag
|
||||
import net.minecraft.util.registry.Registry
|
||||
import java.util.*
|
||||
|
||||
object ItemGenerator : Generator(
|
||||
"items"
|
||||
@ -56,7 +58,15 @@ object ItemGenerator : Generator(
|
||||
}
|
||||
if (item is MiningToolItem) {
|
||||
val blocks = JsonArray()
|
||||
(DIGGER_ITEM_BLOCKS_FIELD.get(item) as Set<Block>?)?.toSortedSet { block: Block, block1: Block -> Registry.BLOCK.getRawId(block) - Registry.BLOCK.getRawId(block1) }?.let {
|
||||
(DIGGER_ITEM_BLOCKS_FIELD.get(item)?.let {
|
||||
val ret = if (it is Tag<*>) {
|
||||
null // ToDo
|
||||
// (it as Tag<Block>).values()
|
||||
} else {
|
||||
(it as Set<Block>)
|
||||
}
|
||||
ret?.toSortedSet { block: Block, block1: Block -> Registry.BLOCK.getRawId(block) - Registry.BLOCK.getRawId(block1) }
|
||||
})?.let {
|
||||
for (block in it) {
|
||||
blocks.add(Registry.BLOCK.getRawId(block))
|
||||
}
|
||||
@ -68,10 +78,10 @@ object ItemGenerator : Generator(
|
||||
itemData.addProperty("attack_damage", DIGGER_ITEM_ATTACK_DAMAGE.getFloat(item))
|
||||
}
|
||||
if (item is ArmorItem) {
|
||||
itemData.addProperty("equipment_slot", (ARMOR_ITEM_EQUIPMENT_SLOT_FIELD.get(item) as EquipmentSlot).name.toLowerCase())
|
||||
itemData.addProperty("equipment_slot", (ARMOR_ITEM_EQUIPMENT_SLOT_FIELD.get(item) as EquipmentSlot).name.lowercase(Locale.getDefault()))
|
||||
itemData.addProperty("defense", item.protection)
|
||||
itemData.addProperty("toughness", ARMOR_ITEM_TOUGHNESS_FIELD.getFloat(item))
|
||||
itemData.addProperty("armor_material", item.material.name.toLowerCase())
|
||||
itemData.addProperty("armor_material", item.material.name.lowercase(Locale.getDefault()))
|
||||
ARMOR_ITEM_KNOCKBACK_RESISTANCE?.getFloat(item)?.let {
|
||||
itemData.addProperty("knockback_resistance", it)
|
||||
}
|
||||
@ -94,7 +104,7 @@ object ItemGenerator : Generator(
|
||||
}
|
||||
}
|
||||
if (item is DyeItem) {
|
||||
itemData.addProperty("dye_color", item.color.name.toLowerCase())
|
||||
itemData.addProperty("dye_color", item.color.name.lowercase(Locale.getDefault()))
|
||||
}
|
||||
if (item::class.java == MOB_BUCKED_ITEM_CLASS) {
|
||||
(MOB_BUCKED_ITEM_TYPE_FIELD?.get(item) as EntityType<*>?)?.let {
|
||||
|
@ -22,8 +22,8 @@ if not os.path.isdir(DATA_FOLDER):
|
||||
os.mkdir(DATA_FOLDER)
|
||||
|
||||
JAVA_PATH = "java"
|
||||
TINY_REMAPPER_DOWNLOAD_PATH = "https://files.player.to/tmp/tiny-remapper-0.3.1-fat-player.jar"
|
||||
TINY_REMAPPER_PATH = DATA_FOLDER + "tiny-remapper-0.3.1-fat-player.jar"
|
||||
TINY_REMAPPER_DOWNLOAD_PATH = "https://dl.bixilon.de/pixlyzer/tiny-remapper-0.3.1-fat-16.jar"
|
||||
TINY_REMAPPER_PATH = DATA_FOLDER + "tiny-remapper-0.3.1-fat-16.jar"
|
||||
|
||||
OBJENSIS_PATH = DATA_FOLDER + "objenesis-tck-3.1.jar"
|
||||
OBJENSIS_DOWNLOAD_PATH = "https://repo1.maven.org/maven2/org/objenesis/objenesis/3.1/objenesis-3.1.jar"
|
||||
@ -38,7 +38,7 @@ YARN_MANIFEST_URL = "https://maven.fabricmc.net/net/fabricmc/yarn/versions.json"
|
||||
TINY_MAPPINGS_BASE_URL = "https://maven.fabricmc.net/net/fabricmc/yarn/"
|
||||
INTERMEDIARY_BASE_URL = "https://maven.fabricmc.net/net/fabricmc/intermediary/"
|
||||
|
||||
COMPILE_VERSION = "21w18a"
|
||||
COMPILE_VERSION = "21w19a"
|
||||
|
||||
failedVersionIds = []
|
||||
partlyFailedVersionIds = []
|
||||
|
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user