Compare commits

...
3 Commits
Author SHA1 Message Date
Ruling-0 42b5e4d38c Extend block transformer metadata to int (#25) 2026-08-16 12:26:35 -05:00
UltraProdigy a803845017 Fix Incorrect Annotation on ChunkEvent (#23) 2026-03-16 19:49:10 +00:00
Martin Robertz 7ad4145c0a Auto stash before merge of "master" and "origin/master"
update gradle+bs+deps
2026-03-10 19:41:32 +01:00
11 changed files with 32 additions and 28 deletions

No files matched your search

+2 -2
View File
@@ -1,8 +1,8 @@
dependencies { dependencies {
api("com.github.GTNewHorizons:GTNHLib:0.9.31:dev") api("com.github.GTNewHorizons:GTNHLib:0.9.39:dev")
compileOnly('com.github.GTNewHorizons:NotEnoughIds:2.1.10:dev') compileOnly('com.github.GTNewHorizons:NotEnoughIds:2.1.10:dev')
compileOnly('com.falsepattern:chunkapi-mc1.7.10:0.8.2:dev') compileOnly('com.falsepattern:chunkapi-mc1.7.10:0.8.2:dev')
compileOnly('com.falsepattern:endlessids-mc1.7.10:1.7.1:dev') compileOnly('com.falsepattern:endlessids-mc1.7.10:1.7.1:dev')
compileOnly("com.github.GTNewHorizons:NotEnoughItems:2.8.71-GTNH:dev") { transitive = false } compileOnly("com.github.GTNewHorizons:NotEnoughItems:2.8.75-GTNH:dev") { transitive = false }
} }
+10 -10
View File
@@ -1,12 +1,12 @@
#This file is generated by updateDaemonJvm #This file is generated by updateDaemonJvm
toolchainUrl.FREE_BSD.AARCH64=https\://api.foojay.io/disco/v3.0/ids/4945f00643ec68e7c7a6b66f90124f89/redirect toolchainUrl.FREE_BSD.AARCH64=https\://api.foojay.io/disco/v3.0/ids/c5ee947fbfb70bc347d8d531e3a578c4/redirect
toolchainUrl.FREE_BSD.X86_64=https\://api.foojay.io/disco/v3.0/ids/93aeea858331bd6bb00ba94759830234/redirect toolchainUrl.FREE_BSD.X86_64=https\://api.foojay.io/disco/v3.0/ids/cd495626d2ee49a75447e3fdc6afb287/redirect
toolchainUrl.LINUX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/4945f00643ec68e7c7a6b66f90124f89/redirect toolchainUrl.LINUX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/c5ee947fbfb70bc347d8d531e3a578c4/redirect
toolchainUrl.LINUX.X86_64=https\://api.foojay.io/disco/v3.0/ids/b41931cf1e70bc8e08d7dd19c343ef00/redirect toolchainUrl.LINUX.X86_64=https\://api.foojay.io/disco/v3.0/ids/cd495626d2ee49a75447e3fdc6afb287/redirect
toolchainUrl.MAC_OS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/46949723aaa20c7b64d7ecfed7207034/redirect toolchainUrl.MAC_OS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/d4fd992c9557644e637ebe98263e0ae7/redirect
toolchainUrl.MAC_OS.X86_64=https\://api.foojay.io/disco/v3.0/ids/d6690dfd71c4c91e08577437b5b2beb0/redirect toolchainUrl.MAC_OS.X86_64=https\://api.foojay.io/disco/v3.0/ids/59a9771cad43219260d9aac9a8ec4d6a/redirect
toolchainUrl.UNIX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/4945f00643ec68e7c7a6b66f90124f89/redirect toolchainUrl.UNIX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/c5ee947fbfb70bc347d8d531e3a578c4/redirect
toolchainUrl.UNIX.X86_64=https\://api.foojay.io/disco/v3.0/ids/b41931cf1e70bc8e08d7dd19c343ef00/redirect toolchainUrl.UNIX.X86_64=https\://api.foojay.io/disco/v3.0/ids/cd495626d2ee49a75447e3fdc6afb287/redirect
toolchainUrl.WINDOWS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/1e91f45234d88a64dafb961c93ddc75a/redirect toolchainUrl.WINDOWS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/a4c09dd2e2d7079373d30e524bbc2829/redirect
toolchainUrl.WINDOWS.X86_64=https\://api.foojay.io/disco/v3.0/ids/552c7bffe0370c66410a51c55985b511/redirect toolchainUrl.WINDOWS.X86_64=https\://api.foojay.io/disco/v3.0/ids/8e1d9ee5d0f13e442218f6884a306da1/redirect
toolchainVersion=25 toolchainVersion=25
Binary file not shown.
+1 -1
View File
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-9.3.1-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.0-bin.zip
networkTimeout=10000 networkTimeout=10000
validateDistributionUrl=true validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
Vendored
+1 -1
View File
@@ -57,7 +57,7 @@
# Darwin, MinGW, and NonStop. # Darwin, MinGW, and NonStop.
# #
# (3) This script is generated from the Groovy template # (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # https://github.com/gradle/gradle/blob/b631911858264c0b6e4d6603d677ff5218766cee/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project. # within the Gradle project.
# #
# You can find Gradle at https://github.com/gradle/gradle/. # You can find Gradle at https://github.com/gradle/gradle/.
+1 -1
View File
@@ -17,7 +17,7 @@ pluginManagement {
} }
plugins { plugins {
id 'com.gtnewhorizons.gtnhsettingsconvention' version '2.0.20' id 'com.gtnewhorizons.gtnhsettingsconvention' version '2.0.24'
} }
@@ -1,5 +1,6 @@
package com.gtnewhorizons.postea; package com.gtnewhorizons.postea;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.world.ChunkEvent; import net.minecraftforge.event.world.ChunkEvent;
import com.gtnewhorizons.postea.utility.ChunkFixerUtility; import com.gtnewhorizons.postea.utility.ChunkFixerUtility;
@@ -14,6 +15,7 @@ import cpw.mods.fml.common.event.FMLMissingMappingsEvent;
import cpw.mods.fml.common.event.FMLModIdMappingEvent; import cpw.mods.fml.common.event.FMLModIdMappingEvent;
import cpw.mods.fml.common.event.FMLPostInitializationEvent; import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent; import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
@Mod( @Mod(
modid = Postea.MODID, modid = Postea.MODID,
@@ -28,14 +30,16 @@ public class Postea {
public static final String MODNAME = "Postea"; public static final String MODNAME = "Postea";
@Mod.EventHandler @Mod.EventHandler
public void preInit(FMLPreInitializationEvent event) {} public void preInit(FMLPreInitializationEvent event) {
MinecraftForge.EVENT_BUS.register(this);
}
@Mod.EventHandler @Mod.EventHandler
public void postsLoad(FMLPostInitializationEvent event) { public void postsLoad(FMLPostInitializationEvent event) {
// TestUIEMigrator.postLoad(); // TestUIEMigrator.postLoad();
} }
@Mod.EventHandler @SubscribeEvent
public void chunkLoaded(ChunkEvent.Load event) { public void chunkLoaded(ChunkEvent.Load event) {
ChunkFixerUtility.onChunkLoaded(event.getChunk()); ChunkFixerUtility.onChunkLoaded(event.getChunk());
} }
@@ -56,5 +60,4 @@ public class Postea {
public void onLoadCompleted(FMLLoadCompleteEvent event) { public void onLoadCompleted(FMLLoadCompleteEvent event) {
SimpleTransformationRegistry.onLoadCompleted(); SimpleTransformationRegistry.onLoadCompleted();
} }
} }
@@ -97,7 +97,7 @@ public class ChunkFixerUtility {
BlockConversionInfo output = getBlockReplacement( BlockConversionInfo output = getBlockReplacement(
blockId, blockId,
(byte) metadata, metadata,
world, world,
x + chunkXPos + 1, x + chunkXPos + 1,
y + sectionY, y + sectionY,
@@ -49,13 +49,13 @@ class SimpleTransformationMap<T> {
* The target meta/damage value for the transformation. * The target meta/damage value for the transformation.
* If the value is {@link OreDictionary#WILDCARD_VALUE}, It maintains the old meta/damage value. * If the value is {@link OreDictionary#WILDCARD_VALUE}, It maintains the old meta/damage value.
*/ */
public final short targetMeta; public final int targetMeta;
/** /**
* The numeric id of the target block, updated during the FMLMappingUpdate event * The numeric id of the target block, updated during the FMLMappingUpdate event
*/ */
public int targetRuntimeId; public int targetRuntimeId;
public Value(T target, short targetMeta) { public Value(T target, int targetMeta) {
this.target = target; this.target = target;
this.targetMeta = targetMeta; this.targetMeta = targetMeta;
this.targetRuntimeId = -1; this.targetRuntimeId = -1;
@@ -73,7 +73,7 @@ class SimpleTransformationMap<T> {
* When querying, the value will be replaced, which will * When querying, the value will be replaced, which will
* be used when ever no other specific meta match is found. * be used when ever no other specific meta match is found.
*/ */
public void put(String originalId, int originalMeta, T target, short targetMeta) { public void put(String originalId, int originalMeta, T target, int targetMeta) {
if (originalMeta == -1) originalMeta = OreDictionary.WILDCARD_VALUE; if (originalMeta == -1) originalMeta = OreDictionary.WILDCARD_VALUE;
this.registry.computeIfAbsent(originalId, k -> new Int2ObjectOpenHashMap<>()) this.registry.computeIfAbsent(originalId, k -> new Int2ObjectOpenHashMap<>())
.put(originalMeta, new Value<>(target, targetMeta)); .put(originalMeta, new Value<>(target, targetMeta));
@@ -100,11 +100,11 @@ public class SimpleTransformationRegistry {
public static void addSimpleTransformer(String originalId, int originalMeta, Block newBlock, int newMeta, public static void addSimpleTransformer(String originalId, int originalMeta, Block newBlock, int newMeta,
boolean skipStackRemap) { boolean skipStackRemap) {
if (newMeta == -1) newMeta = OreDictionary.WILDCARD_VALUE; if (newMeta == -1) newMeta = OreDictionary.WILDCARD_VALUE;
SIMPLE_BLOCK_TRANSFORMATION_MAP.put(originalId, originalMeta, newBlock, (short) newMeta); SIMPLE_BLOCK_TRANSFORMATION_MAP.put(originalId, originalMeta, newBlock, newMeta);
if (!skipStackRemap) { if (!skipStackRemap) {
Item item = Item.getItemFromBlock(newBlock); Item item = Item.getItemFromBlock(newBlock);
if (item != null) { if (item != null) {
SIMPLE_ITEM_TRANSFORMATION_MAP.put(originalId, originalMeta, item, (short) newMeta); SIMPLE_ITEM_TRANSFORMATION_MAP.put(originalId, originalMeta, item, newMeta);
} }
} }
} }
@@ -166,9 +166,9 @@ public class SimpleTransformationRegistry {
boolean skipBlockRemap) { boolean skipBlockRemap) {
if (newMeta == -1) newMeta = OreDictionary.WILDCARD_VALUE; if (newMeta == -1) newMeta = OreDictionary.WILDCARD_VALUE;
if (!skipBlockRemap && newItem instanceof ItemBlock ib) { if (!skipBlockRemap && newItem instanceof ItemBlock ib) {
SIMPLE_BLOCK_TRANSFORMATION_MAP.put(originalId, originalMeta, ib.field_150939_a, (short) newMeta); SIMPLE_BLOCK_TRANSFORMATION_MAP.put(originalId, originalMeta, ib.field_150939_a, newMeta);
} }
SIMPLE_ITEM_TRANSFORMATION_MAP.put(originalId, originalMeta, newItem, (short) newMeta); SIMPLE_ITEM_TRANSFORMATION_MAP.put(originalId, originalMeta, newItem, newMeta);
} }
/** /**
@@ -191,7 +191,8 @@ public class SimpleTransformationRegistry {
if (mapping == null || mapping.targetRuntimeId <= -1) return false; if (mapping == null || mapping.targetRuntimeId <= -1) return false;
IDExtenderCompat.setItemStackID(tag, mapping.targetRuntimeId); IDExtenderCompat.setItemStackID(tag, mapping.targetRuntimeId);
if (mapping.targetMeta != OreDictionary.WILDCARD_VALUE) { if (mapping.targetMeta != OreDictionary.WILDCARD_VALUE) {
tag.setShort("Damage", mapping.targetMeta); // Damage is a vanilla short NBT field, unrelated to EndlessIDs block metadata width.
tag.setShort("Damage", (short) mapping.targetMeta);
} }
return true; return true;
} }
@@ -135,7 +135,7 @@ public class TransformerRegistry {
} }
// region transformation handlers // region transformation handlers
public static @Nullable BlockConversionInfo getBlockReplacement(int blockId, byte metadata, World world, int x, public static @Nullable BlockConversionInfo getBlockReplacement(int blockId, int metadata, World world, int x,
int y, int z) { int y, int z) {
Pair<String, List<IBlockTransformationHandler>> data = RUNTIME_BLOCK_REPLACEMENT_MAP.get(blockId); Pair<String, List<IBlockTransformationHandler>> data = RUNTIME_BLOCK_REPLACEMENT_MAP.get(blockId);
if (data == null) return null; if (data == null) return null;