mirror of
https://github.com/GTNewHorizons/ForgeMultipart.git
synced 2026-11-25 14:34:45 +00:00
MultipartHelper, MultipartHelper$ and MultipartHelper$IPartTileConverter are all public-member- and descriptor-identical to the reference, and the full emitted class list is unchanged -- this port neither adds nor removes a class. MultipartHelper gains a private constructor and its companion's class initializer loses ACC_PUBLIC, neither of which is nameable by a caller. MultipartHelper$ was kept deliberately. It is not among the 17 MODULE$ singletons read from bytecode and no jar links against it, but guidenh names it as a reflective string, and removing a companion breaks that invisibly. createTileFromParts now builds one JavaConversions wrapper for both calls instead of one per call site, and convertMulti returns Collections.emptyList or singletonList instead of a Scala Seq wrapper. The declared type was always java.lang.Iterable. 107 plain-JVM tests and 10 Forge server tests pass unchanged.
32 lines
994 B
Java
32 lines
994 B
Java
package codechicken.multipart;
|
|
|
|
import net.minecraft.nbt.NBTTagCompound;
|
|
import net.minecraft.tileentity.TileEntity;
|
|
import net.minecraft.world.World;
|
|
|
|
/**
|
|
* Scala companion singleton, kept because guidenh reflects on this name as well as on MultipartHelper. Pure forwarders.
|
|
*/
|
|
public final class MultipartHelper$ {
|
|
|
|
public static final MultipartHelper$ MODULE$ = new MultipartHelper$();
|
|
|
|
private MultipartHelper$() {}
|
|
|
|
public TileEntity createTileFromNBT(World world, NBTTagCompound tag) {
|
|
return MultipartHelper.createTileFromNBT(world, tag);
|
|
}
|
|
|
|
public void sendDescPacket(World world, TileEntity tile) {
|
|
MultipartHelper.sendDescPacket(world, tile);
|
|
}
|
|
|
|
public void registerTileConverter(MultipartHelper.IPartTileConverter<?> converter) {
|
|
MultipartHelper.registerTileConverter(converter);
|
|
}
|
|
|
|
public TileMultipart createTileFromParts(Iterable<TMultiPart> parts) {
|
|
return MultipartHelper.createTileFromParts(parts);
|
|
}
|
|
}
|