mirror of
https://github.com/GTMEGA/EndlessIDs.git
synced 2026-11-24 10:34:29 +00:00
Compare commits
11
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3dd168fc8e | ||
|
|
83bfb89d8b | ||
|
|
5d5a03486f | ||
|
|
6103fe96bb | ||
|
|
d3334c7ca8 | ||
|
|
7fc49578ce | ||
|
|
59862bb5ad | ||
|
|
c052edf912 | ||
|
|
79f0c06fa5 | ||
|
|
53f3cffb59 | ||
|
|
c1d8e273fc |
No files matched your search
@@ -0,0 +1,2 @@
|
||||
patreon: falsepattern
|
||||
ko_fi: falsepattern
|
||||
@@ -1,6 +1,6 @@
|
||||
EndlessIDs
|
||||
|
||||
Copyright (C) 2022 FalsePattern
|
||||
Copyright (C) 2022-2023 FalsePattern
|
||||
All Rights Reserved
|
||||
|
||||
The above copyright notice, this permission notice and the words "MEGA"
|
||||
|
||||
@@ -8,16 +8,16 @@ new limits.
|
||||
|
||||
Comparison of the known limits:
|
||||
|
||||
| | Vanilla | NotEnoughIDs | EndlessIDs |
|
||||
|-----------------|----------------------------------------------------|--------------|----------------------------------|
|
||||
| Block IDs | 4,096 | 32,000 | 16,777,216 since 1.3 |
|
||||
| Block Metadata | 16 | 16 | 65,536 since 1.5 |
|
||||
| Item IDs | 32,000 | 32,000 | 16,777,216 since 1.3 |
|
||||
| Biome IDs | 256 | 256 | 65,536 since 1.4 |
|
||||
| Entity IDs | 256 | 256 | 256 right now, extension planned |
|
||||
| Potion IDs | 32 | 32 | 65,536 since 1.5 |
|
||||
| Enchantment IDs | 256 | 256 | 32,768 since 1.5 |
|
||||
| Dimension IDs | Theoretically unlimited, 4,294,967,295 in practice | Same | Same |
|
||||
| | Vanilla | NotEnoughIDs | EndlessIDs |
|
||||
|-----------------|----------------------------------------------------|--------------|----------------------|
|
||||
| Block IDs | 4,096 | 32,000 | 16,777,216 since 1.3 |
|
||||
| Block Metadata | 16 | 16 | 65,536 since 1.5 |
|
||||
| Item IDs | 32,000 | 32,000 | 16,777,216 since 1.3 |
|
||||
| Biome IDs | 256 | 256 | 65,536 since 1.4 |
|
||||
| Entity IDs | 256 | 256 | 32,768 since 1.5 |
|
||||
| Potion IDs | 32 | 32 | 65,536 since 1.5 |
|
||||
| Enchantment IDs | 256 | 256 | 32,768 since 1.5 |
|
||||
| Dimension IDs | Theoretically unlimited, 4,294,967,295 in practice | Same | Same |
|
||||
|
||||
This mod also contains patches for the following mods:
|
||||
|
||||
|
||||
+80
-45
@@ -1,4 +1,4 @@
|
||||
//version: 1656003793falsepattern67
|
||||
//version: 1656003793falsepattern73
|
||||
/*
|
||||
DO NOT CHANGE THIS FILE!
|
||||
|
||||
@@ -132,6 +132,8 @@ propertyDefaultIfUnset("mixinConfigs", "")
|
||||
propertyDefaultIfUnset("mixinPluginPreInit", "")
|
||||
propertyDefaultIfUnset("mixinPluginMinimumVersion", "0.8.5")
|
||||
propertyDefaultIfUnset("remapStubs", false)
|
||||
propertyDefaultIfUnset("apiPackages", null)
|
||||
propertyDefaultIfUnset("apiPackagesNoRecurse", null)
|
||||
|
||||
propertyDefaultIfUnset("modrinthProjectId", "")
|
||||
propertyDefaultIfUnset("modrinthDependencies", "")
|
||||
@@ -147,20 +149,31 @@ String javaSourceDir = "src/main/java/"
|
||||
String scalaSourceDir = "src/main/scala/"
|
||||
String kotlinSourceDir = "src/main/kotlin/"
|
||||
|
||||
String targetPackageJava = javaSourceDir + modGroup.toString().replaceAll("\\.", "/")
|
||||
String targetPackageScala = scalaSourceDir + modGroup.toString().replaceAll("\\.", "/")
|
||||
String targetPackageKotlin = kotlinSourceDir + modGroup.toString().replaceAll("\\.", "/")
|
||||
if(!(getFile(targetPackageJava).exists() || getFile(targetPackageScala).exists() || getFile(targetPackageKotlin).exists())) {
|
||||
throw new GradleException("Could not resolve \"modGroup\"! Could not find " + targetPackageJava + " or " + targetPackageScala + " or " + targetPackageKotlin)
|
||||
def verifyPackage(thePackage, propName) {
|
||||
String javaSourceDir = "src/main/java/"
|
||||
String scalaSourceDir = "src/main/scala/"
|
||||
String kotlinSourceDir = "src/main/kotlin/"
|
||||
String targetPackageJava = javaSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + thePackage.toString().replaceAll("\\.", "/")
|
||||
String targetPackageScala = scalaSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + thePackage.toString().replaceAll("\\.", "/")
|
||||
String targetPackageKotlin = kotlinSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + thePackage.toString().replaceAll("\\.", "/")
|
||||
if(!(getFile(targetPackageJava).exists() || getFile(targetPackageScala).exists() || getFile(targetPackageKotlin).exists())) {
|
||||
throw new GradleException("Could not resolve \"${propName}\"! Could not find " + targetPackageJava + " or " + targetPackageScala + " or " + targetPackageKotlin)
|
||||
}
|
||||
}
|
||||
|
||||
verifyPackage("", "modGroup")
|
||||
|
||||
if(apiPackage) {
|
||||
targetPackageJava = javaSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + apiPackage.toString().replaceAll("\\.", "/")
|
||||
targetPackageScala = scalaSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + apiPackage.toString().replaceAll("\\.", "/")
|
||||
targetPackageKotlin = kotlinSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + apiPackage.toString().replaceAll("\\.", "/")
|
||||
if(!(getFile(targetPackageJava).exists() || getFile(targetPackageScala).exists() || getFile(targetPackageKotlin).exists())) {
|
||||
throw new GradleException("Could not resolve \"apiPackage\"! Could not find " + targetPackageJava + " or " + targetPackageScala + " or " + targetPackageKotlin)
|
||||
}
|
||||
verifyPackage(apiPackage, "apiPackage")
|
||||
}
|
||||
|
||||
|
||||
if (apiPackages) {
|
||||
apiPackages.tokenize(';').forEach { it -> verifyPackage(it, "apiPackages")}
|
||||
}
|
||||
|
||||
if (apiPackagesNoRecurse) {
|
||||
apiPackagesNoRecurse.tokenize(';').forEach { it -> verifyPackage(it, "apiPackagesNoRecurse")}
|
||||
}
|
||||
|
||||
if(accessTransformersFile) {
|
||||
@@ -175,9 +188,9 @@ if(usesMixins.toBoolean()) {
|
||||
throw new GradleException("\"usesMixins\" requires \"mixinsPackage\" to be set!")
|
||||
}
|
||||
|
||||
targetPackageJava = javaSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + mixinsPackage.toString().replaceAll("\\.", "/")
|
||||
targetPackageScala = scalaSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + mixinsPackage.toString().replaceAll("\\.", "/")
|
||||
targetPackageKotlin = kotlinSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + mixinsPackage.toString().replaceAll("\\.", "/")
|
||||
String targetPackageJava = javaSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + mixinsPackage.toString().replaceAll("\\.", "/")
|
||||
String targetPackageScala = scalaSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + mixinsPackage.toString().replaceAll("\\.", "/")
|
||||
String targetPackageKotlin = kotlinSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + mixinsPackage.toString().replaceAll("\\.", "/")
|
||||
if(!(getFile(targetPackageJava).exists() || getFile(targetPackageScala).exists() || getFile(targetPackageKotlin).exists())) {
|
||||
throw new GradleException("Could not resolve \"mixinsPackage\"! Could not find " + targetPackageJava + " or " + targetPackageScala + " or " + targetPackageKotlin)
|
||||
}
|
||||
@@ -281,6 +294,10 @@ if(file("addon.gradle").exists()) {
|
||||
|
||||
apply from: 'repositories.gradle'
|
||||
|
||||
if(file('repositories_override.gradle').exists()) {
|
||||
apply from: 'repositories_override.gradle'
|
||||
}
|
||||
|
||||
configurations {
|
||||
for (config in [shadowImplementation, shadowCompile, shadeCompile]) {
|
||||
implementation.extendsFrom(shadeCompile)
|
||||
@@ -308,33 +325,45 @@ repositories {
|
||||
}
|
||||
}
|
||||
|
||||
def unimixinsVersion = "0.1.15"
|
||||
|
||||
dependencies {
|
||||
if(usesMixins.toBoolean()) {
|
||||
annotationProcessor("org.ow2.asm:asm-debug-all:5.0.3")
|
||||
annotationProcessor("com.google.guava:guava:24.1.1-jre")
|
||||
annotationProcessor("com.google.code.gson:gson:2.8.6")
|
||||
annotationProcessor("com.llamalad7:MixinExtras:0.1.1-gasstation")
|
||||
annotationProcessor("org.spongepowered:mixin:0.8.5-gasstation_7")
|
||||
compile("org.spongepowered:mixin:0.8.5-gasstation_7")
|
||||
compile("com.llamalad7:MixinExtras:0.1.1-gasstation")
|
||||
compile("com.falsepattern:00gasstation-mc1.7.10:0.5.1:dev")
|
||||
runtimeClasspath('org.jetbrains:intellij-fernflower:1.2.1.16')
|
||||
testRuntimeClasspath('org.jetbrains:intellij-fernflower:1.2.1.16')
|
||||
annotationProcessor("com.github.LegacyModdingMC.UniMixins:unimixins-all-1.7.10:$unimixinsVersion:dev")
|
||||
implementation("com.github.LegacyModdingMC.UniMixins:unimixins-all-1.7.10:$unimixinsVersion:dev")
|
||||
runtimeOnly('org.jetbrains:intellij-fernflower:1.2.1.16')
|
||||
} else if(hasMixinDeps.toBoolean()) {
|
||||
runtime("com.llamalad7:MixinExtras:0.1.1-gasstation")
|
||||
runtime("org.spongepowered:mixin:0.8.5-gasstation_7")
|
||||
runtime("com.falsepattern:00gasstation-mc1.7.10:0.5.1:dev")
|
||||
runtimeOnly("com.github.LegacyModdingMC.UniMixins:unimixins-all-1.7.10:$unimixinsVersion:dev")
|
||||
}
|
||||
// Latest LWJGL
|
||||
compile "org.lwjgl.lwjgl:lwjgl:2.9.4-nightly-20150209"
|
||||
compile "org.lwjgl.lwjgl:lwjgl_util:2.9.4-nightly-20150209"
|
||||
implementation "org.lwjgl.lwjgl:lwjgl:2.9.4-nightly-20150209"
|
||||
implementation "org.lwjgl.lwjgl:lwjgl_util:2.9.4-nightly-20150209"
|
||||
minecraftNatives "org.lwjgl.lwjgl:lwjgl-platform:2.9.4-nightly-20150209"
|
||||
minecraftDeps "org.lwjgl.lwjgl:lwjgl:2.9.4-nightly-20150209"
|
||||
minecraftDeps "org.lwjgl.lwjgl:lwjgl_util:2.9.4-nightly-20150209"
|
||||
}
|
||||
|
||||
|
||||
if(usesMixins.toBoolean()) {
|
||||
configurations.implementation.dependencies.each {
|
||||
if (it instanceof ExternalModuleDependency) {
|
||||
it.exclude module: "SpongeMixins"
|
||||
it.exclude module: "SpongePoweredMixin"
|
||||
it.exclude module: "00gasstation-mc1.7.10"
|
||||
it.exclude module: "gtnhmixins"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
apply from: 'dependencies.gradle'
|
||||
|
||||
if(file('dependencies_override.gradle').exists()) {
|
||||
apply from: 'dependencies_override.gradle'
|
||||
}
|
||||
|
||||
def mixinDir = new File(project.buildDir, 'mixins')
|
||||
if (!mixinDir.exists()) {
|
||||
mixinDir.mkdirs()
|
||||
@@ -425,12 +454,6 @@ runClient {
|
||||
def arguments = []
|
||||
def jvmArguments = []
|
||||
|
||||
if (usesMixins.toBoolean()) {
|
||||
arguments += [
|
||||
"--mods=" + Paths.get("$projectDir").resolve(minecraft.runDir).normalize().relativize(Paths.get("$projectDir/build/libs/$archivesBaseName-${version}.jar"))
|
||||
]
|
||||
}
|
||||
|
||||
if(usesMixins.toBoolean() || hasMixinDeps.toBoolean()) {
|
||||
arguments += [
|
||||
"--tweakClass", "org.spongepowered.asm.launch.MixinTweaker"
|
||||
@@ -455,12 +478,6 @@ runServer {
|
||||
def arguments = []
|
||||
def jvmArguments = []
|
||||
|
||||
if (usesMixins.toBoolean()) {
|
||||
arguments += [
|
||||
"--mods=" + Paths.get("$projectDir").resolve(minecraft.runDir).normalize().relativize(Paths.get("$projectDir/build/libs/$archivesBaseName-${version}.jar"))
|
||||
]
|
||||
}
|
||||
|
||||
if (usesMixins.toBoolean() || hasMixinDeps.toBoolean()) {
|
||||
arguments += [
|
||||
"--tweakClass", "org.spongepowered.asm.launch.MixinTweaker"
|
||||
@@ -602,11 +619,29 @@ task devJar(type: Jar) {
|
||||
|
||||
task apiJar(type: Jar) {
|
||||
from (sourceSets.main.allSource) {
|
||||
include modGroup.toString().replaceAll("\\.", "/") + "/" + apiPackage.toString().replaceAll("\\.", "/") + '/**'
|
||||
if (apiPackage)
|
||||
include modGroup.toString().replaceAll("\\.", "/") + "/" + apiPackage.toString().replaceAll("\\.", "/") + '/**'
|
||||
if (apiPackages)
|
||||
apiPackages.tokenize(';').forEach { pkg ->
|
||||
include modGroup.toString().replaceAll("\\.", "/") + "/" + pkg.toString().replaceAll("\\.", "/") + '/**'
|
||||
}
|
||||
if (apiPackagesNoRecurse)
|
||||
apiPackagesNoRecurse.tokenize(';').forEach { pkg ->
|
||||
include modGroup.toString().replaceAll("\\.", "/") + "/" + pkg.toString().replaceAll("\\.", "/") + '/*'
|
||||
}
|
||||
}
|
||||
|
||||
from (sourceSets.main.output) {
|
||||
include modGroup.toString().replaceAll("\\.", "/") + "/" + apiPackage.toString().replaceAll("\\.", "/") + '/**'
|
||||
if (apiPackage)
|
||||
include modGroup.toString().replaceAll("\\.", "/") + "/" + apiPackage.toString().replaceAll("\\.", "/") + '/**'
|
||||
if (apiPackages)
|
||||
apiPackages.tokenize(';').forEach { pkg ->
|
||||
include modGroup.toString().replaceAll("\\.", "/") + "/" + pkg.toString().replaceAll("\\.", "/") + '/**'
|
||||
}
|
||||
if (apiPackagesNoRecurse)
|
||||
apiPackagesNoRecurse.tokenize(';').forEach { pkg ->
|
||||
include modGroup.toString().replaceAll("\\.", "/") + "/" + pkg.toString().replaceAll("\\.", "/") + '/*'
|
||||
}
|
||||
}
|
||||
|
||||
from (sourceSets.main.resources.srcDirs) {
|
||||
@@ -627,7 +662,7 @@ compileJava.dependsOn(copySrgs)
|
||||
artifacts {
|
||||
archives sourcesJar
|
||||
archives devJar
|
||||
if(apiPackage) {
|
||||
if(apiPackage || apiPackages || apiPackagesNoRecurse) {
|
||||
archives apiJar
|
||||
}
|
||||
}
|
||||
@@ -683,7 +718,7 @@ publishing {
|
||||
artifact source: sourcesJar, classifier: "sources"
|
||||
}
|
||||
artifact source: usesShadowedDependencies.toBoolean() ? shadowDevJar : devJar, classifier: "dev"
|
||||
if (apiPackage) {
|
||||
if (apiPackage || apiPackages || apiPackagesNoRecurse) {
|
||||
artifact source: apiJar, classifier: "api"
|
||||
}
|
||||
|
||||
@@ -777,7 +812,7 @@ if (curseForgeProjectId != "" && System.getenv("CURSEFORGE_TOKEN") != null) {
|
||||
}
|
||||
|
||||
if (usesMixins.toBoolean()) {
|
||||
addCurseForgeRelation("requiredDependency", "gasstation")
|
||||
addCurseForgeRelation("requiredDependency", "unimixins")
|
||||
}
|
||||
tasks.curseforge.dependsOn(build)
|
||||
tasks.publish.dependsOn(tasks.curseforge)
|
||||
@@ -810,7 +845,7 @@ if (modrinthProjectId != "" && System.getenv("MODRINTH_TOKEN") != null) {
|
||||
}
|
||||
}
|
||||
if (usesMixins.toBoolean()) {
|
||||
addModrinthDep("required", "project", "cdeAhgfp")
|
||||
addModrinthDep("required", "project", "ghjoiQAl")
|
||||
}
|
||||
tasks.modrinth.dependsOn(build)
|
||||
tasks.publish.dependsOn(tasks.modrinth)
|
||||
|
||||
+5
-2
@@ -21,9 +21,12 @@ dependencies {
|
||||
}
|
||||
annotationProcessor("org.projectlombok:lombok:1.18.28")
|
||||
|
||||
implementation("com.falsepattern:falsepatternlib-mc1.7.10:0.12.1:dev")
|
||||
implementation("com.falsepattern:falsepatternlib-mc1.7.10:1.0.0:dev")
|
||||
|
||||
implementation("com.falsepattern:chunkapi-mc1.7.10:0.3.2:dev")
|
||||
compileOnly("com.falsepattern:chunkapi-mc1.7.10:0.5.0:api")
|
||||
runtimeOnly("com.falsepattern:chunkapi-mc1.7.10:0.5.0:dev")
|
||||
|
||||
compileOnly("org.jetbrains:annotations:24.0.1")
|
||||
|
||||
////////////////Patched mods////////////////
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.falsepattern.endlessids;
|
||||
|
||||
import com.falsepattern.chunk.api.ChunkDataRegistry;
|
||||
import com.falsepattern.chunk.api.DataRegistry;
|
||||
import com.falsepattern.endlessids.config.GeneralConfig;
|
||||
import com.falsepattern.endlessids.managers.BiomeManager;
|
||||
import com.falsepattern.endlessids.managers.BlockIDManager;
|
||||
@@ -20,7 +20,9 @@ import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
||||
version = Tags.VERSION,
|
||||
name = Tags.MODNAME,
|
||||
acceptedMinecraftVersions = "[1.7.10]",
|
||||
dependencies = "required-after:chunkapi@[0.3.2,);required-after:falsepatternlib@[0.12.1,);required-after:gasstation@[0.5.0,);after:antiidconflict")
|
||||
dependencies = "required-after:chunkapi@[0.5.0,0.6.0);" +
|
||||
"required-after:falsepatternlib@[1.0.0,);" +
|
||||
"after:antiidconflict")
|
||||
public class EndlessIDs {
|
||||
public static final byte[] ZERO_LENGTH_BIOME_ARRAY_PLACEHOLDER = new byte[0];
|
||||
public static final byte[] FAKE_BIOME_ARRAY_PLACEHOLDER = new byte[256];
|
||||
@@ -74,11 +76,11 @@ public class EndlessIDs {
|
||||
public void init(FMLInitializationEvent e) {
|
||||
patchManager.init();
|
||||
if (GeneralConfig.extendBiome) {
|
||||
ChunkDataRegistry.registerDataManager(new BiomeManager());
|
||||
DataRegistry.registerDataManager(new BiomeManager());
|
||||
}
|
||||
if (GeneralConfig.extendBlockItem) {
|
||||
ChunkDataRegistry.registerDataManager(new BlockIDManager());
|
||||
ChunkDataRegistry.registerDataManager(new BlockMetaManager());
|
||||
DataRegistry.registerDataManager(new BlockIDManager());
|
||||
DataRegistry.registerDataManager(new BlockMetaManager());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -86,11 +88,11 @@ public class EndlessIDs {
|
||||
public void postInit(FMLPostInitializationEvent e) {
|
||||
patchManager.postInit();
|
||||
if (GeneralConfig.extendBiome) {
|
||||
ChunkDataRegistry.disableDataManager("minecraft", "biome");
|
||||
DataRegistry.disableDataManager("minecraft", "biome");
|
||||
}
|
||||
if (GeneralConfig.extendBlockItem) {
|
||||
ChunkDataRegistry.disableDataManager("minecraft", "blockid");
|
||||
ChunkDataRegistry.disableDataManager("minecraft", "metadata");
|
||||
DataRegistry.disableDataManager("minecraft", "blockid");
|
||||
DataRegistry.disableDataManager("minecraft", "metadata");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5,6 +5,7 @@ import com.falsepattern.endlessids.config.GeneralConfig;
|
||||
import lombok.SneakyThrows;
|
||||
import lombok.val;
|
||||
|
||||
import net.minecraft.launchwrapper.Launch;
|
||||
import net.minecraft.launchwrapper.LaunchClassLoader;
|
||||
import cpw.mods.fml.relauncher.FMLInjectionData;
|
||||
import cpw.mods.fml.relauncher.IFMLLoadingPlugin;
|
||||
@@ -29,8 +30,8 @@ public class IEPlugin implements IFMLLoadingPlugin {
|
||||
|
||||
@SneakyThrows
|
||||
public String[] getASMTransformerClass() {
|
||||
val cl = ((LaunchClassLoader) this.getClass().getClassLoader());
|
||||
val field = cl.getClass().getDeclaredField("transformerExceptions");
|
||||
val cl = Launch.classLoader;
|
||||
val field = LaunchClassLoader.class.getDeclaredField("transformerExceptions");
|
||||
field.setAccessible(true);
|
||||
val exceptions = (Set<String>) field.get(cl);
|
||||
if (exceptions.contains("code.elix_x.coremods")) {
|
||||
|
||||
@@ -38,6 +38,9 @@ public class GeneralConfig {
|
||||
@Config.Comment("Extend Potion IDs. Vanilla limit is 32, new limit is 65536.")
|
||||
@Config.DefaultBoolean(true)
|
||||
public static boolean extendPotion;
|
||||
@Config.Comment("Extend Entity IDs. Vanilla limit is 256, new limit is 32768.")
|
||||
@Config.DefaultBoolean(true)
|
||||
public static boolean extendEntity;
|
||||
|
||||
@Config.Comment("Improves the speed of the block registry by multiple orders of magnitudes. (not thoroughly tested yet)\n" +
|
||||
"It's highly recommended to leave this enabled, especially when using a lot of IDs.\n" +
|
||||
|
||||
@@ -16,6 +16,9 @@ public class ExtendedConstants {
|
||||
public static final int maximumPotionIDs = 65536;
|
||||
public static final int maximumEnchantmentIDs = 32768;
|
||||
|
||||
//Align with max item metadata for spawn eggs. Will be treated as short in netcode
|
||||
public static final int bitsPerEntity = 15;
|
||||
|
||||
//BlockItemIDs
|
||||
public static final int nibblesPerID = bitsPerID / 4;
|
||||
public static final int bytesPerID = (nibblesPerID + 1) / 2;
|
||||
@@ -31,8 +34,8 @@ public class ExtendedConstants {
|
||||
|
||||
public static final int bitsPerBlock = 8 + bitsPerID + bitsPerMetadata;
|
||||
public static final int nibblesPerBlock = bitsPerBlock / 4;
|
||||
public static final int nibblesPerEBS = nibblesPerBlock * 16 * 16 * 16;
|
||||
public static final int bytesPerEBS = (nibblesPerEBS + 1) / 2;
|
||||
public static final int nibblesPerSubChunk = nibblesPerBlock * 16 * 16 * 16;
|
||||
public static final int bytesPerSubChunk = (nibblesPerSubChunk + 1) / 2;
|
||||
|
||||
//BiomeIDs
|
||||
public static final int biomeIDCount = 1 << bitsPerBiome;
|
||||
@@ -44,4 +47,9 @@ public class ExtendedConstants {
|
||||
public static final int watchableCount = 1 << watchableBits;
|
||||
public static final int maxWatchableID = watchableCount - 1;
|
||||
public static final int watchableMask = (0x7 << watchableBits) | maxWatchableID;
|
||||
|
||||
//EntityIDs
|
||||
public static final int entityIDCount = 1 << bitsPerEntity;
|
||||
public static final int entityIDMask = entityIDCount - 1;
|
||||
public static final int maxEntityID = entityIDMask;
|
||||
}
|
||||
@@ -10,6 +10,8 @@ public class VanillaConstants {
|
||||
public static final int watchableBits = 5;
|
||||
public static final int bitsPerBiome = 8;
|
||||
|
||||
public static final int bitsPerEntity = 8;
|
||||
|
||||
//BlockItemIDs
|
||||
public static final int nibblesPerID = bitsPerID / 4;
|
||||
public static final int bytesPerID = (nibblesPerID + 1) / 2;
|
||||
@@ -25,8 +27,8 @@ public class VanillaConstants {
|
||||
|
||||
public static final int bitsPerBlock = 8 + bitsPerID + bitsPerMetadata;
|
||||
public static final int nibblesPerBlock = bitsPerBlock / 4;
|
||||
public static final int nibblesPerEBS = nibblesPerBlock * 16 * 16 * 16;
|
||||
public static final int bytesPerEBS = (nibblesPerEBS + 1) / 2;
|
||||
public static final int nibblesPerSubChunk = nibblesPerBlock * 16 * 16 * 16;
|
||||
public static final int bytesPerSubChunk = (nibblesPerSubChunk + 1) / 2;
|
||||
|
||||
//BiomeIDs
|
||||
public static final int biomeIDCount = 1 << bitsPerBiome;
|
||||
@@ -38,4 +40,8 @@ public class VanillaConstants {
|
||||
public static final int watchableCount = 1 << watchableBits;
|
||||
public static final int maxWatchableID = watchableCount - 1;
|
||||
public static final int watchableMask = (0x7 << watchableBits) | maxWatchableID;
|
||||
|
||||
//EntityIDs
|
||||
public static final int entityIDCount = 1 << bitsPerEntity;
|
||||
public static final int maxEntityID = entityIDCount - 1;
|
||||
}
|
||||
@@ -1,17 +1,21 @@
|
||||
package com.falsepattern.endlessids.managers;
|
||||
|
||||
import com.falsepattern.chunk.api.ChunkDataManager;
|
||||
import com.falsepattern.chunk.api.ArrayUtil;
|
||||
import com.falsepattern.chunk.api.DataManager;
|
||||
import com.falsepattern.endlessids.Hooks;
|
||||
import com.falsepattern.endlessids.Tags;
|
||||
import com.falsepattern.endlessids.mixin.helpers.IChunkMixin;
|
||||
import com.falsepattern.endlessids.mixin.helpers.ChunkBiomeHook;
|
||||
import lombok.val;
|
||||
import lombok.var;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.world.chunk.Chunk;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
|
||||
public class BiomeManager implements ChunkDataManager, ChunkDataManager.PacketDataManager, ChunkDataManager.ChunkNBTDataManager {
|
||||
public class BiomeManager implements DataManager.PacketDataManager, DataManager.ChunkDataManager {
|
||||
|
||||
@Override
|
||||
public String domain() {
|
||||
@@ -29,17 +33,17 @@ public class BiomeManager implements ChunkDataManager, ChunkDataManager.PacketDa
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToBuffer(Chunk chunk, int ebsMask, boolean forceUpdate, ByteBuffer data) {
|
||||
data.asShortBuffer().put(((IChunkMixin)chunk).getBiomeShortArray());
|
||||
public void writeToBuffer(Chunk chunk, int subChunkMask, boolean forceUpdate, ByteBuffer data) {
|
||||
data.asShortBuffer().put(((ChunkBiomeHook)chunk).getBiomeShortArray());
|
||||
data.position(data.position() + maxPacketSize());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromBuffer(Chunk chunk, int ebsMask, boolean forceUpdate, ByteBuffer buffer) {
|
||||
var arr = ((IChunkMixin)chunk).getBiomeShortArray();
|
||||
public void readFromBuffer(Chunk chunk, int subChunkMask, boolean forceUpdate, ByteBuffer buffer) {
|
||||
var arr = ((ChunkBiomeHook)chunk).getBiomeShortArray();
|
||||
if (arr == null) {
|
||||
arr = new short[16 * 16];
|
||||
((IChunkMixin)chunk).setBiomeShortArray(arr);
|
||||
((ChunkBiomeHook)chunk).setBiomeShortArray(arr);
|
||||
}
|
||||
buffer.asShortBuffer().get(arr);
|
||||
buffer.position(buffer.position() + maxPacketSize());
|
||||
@@ -52,16 +56,16 @@ public class BiomeManager implements ChunkDataManager, ChunkDataManager.PacketDa
|
||||
|
||||
@Override
|
||||
public void writeChunkToNBT(Chunk chunk, NBTTagCompound nbt) {
|
||||
byte[] arr = Hooks.shortToByteArray(((IChunkMixin)chunk).getBiomeShortArray());
|
||||
byte[] arr = Hooks.shortToByteArray(((ChunkBiomeHook)chunk).getBiomeShortArray());
|
||||
nbt.setByteArray("Biomes16v2", arr);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readChunkFromNBT(Chunk chunk, NBTTagCompound nbt) {
|
||||
var data = ((IChunkMixin) chunk).getBiomeShortArray();
|
||||
var data = ((ChunkBiomeHook) chunk).getBiomeShortArray();
|
||||
if (data == null) {
|
||||
data = new short[16 * 16];
|
||||
((IChunkMixin)chunk).setBiomeShortArray(data);
|
||||
((ChunkBiomeHook)chunk).setBiomeShortArray(data);
|
||||
}
|
||||
if (nbt.hasKey("Biomes16v2", 7)) {
|
||||
Hooks.byteToShortArray(nbt.getByteArray("Biomes16v2"), 0, data, 0, data.length * 2);
|
||||
@@ -72,4 +76,33 @@ public class BiomeManager implements ChunkDataManager, ChunkDataManager.PacketDa
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void cloneChunk(Chunk fromVanilla, Chunk toVanilla) {
|
||||
val from = (ChunkBiomeHook) fromVanilla;
|
||||
val to = (ChunkBiomeHook) toVanilla;
|
||||
|
||||
to.setBiomeShortArray(ArrayUtil.copyArray(from.getBiomeShortArray(), to.getBiomeShortArray()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull String version() {
|
||||
return Tags.MODID;
|
||||
}
|
||||
|
||||
@Override
|
||||
public @Nullable String newInstallDescription() {
|
||||
return "EndlessIDs extended biome data. Vanilla biome data is limited to 256 biomes. This allows for 65536 biomes.";
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull String uninstallMessage() {
|
||||
return "EndlessIDs extended biome data has been uninstalled. Biomes are limited to 256,\n" +
|
||||
"and any biomes with IDs above 255 in the save will be corrupted.";
|
||||
}
|
||||
|
||||
@Override
|
||||
public @Nullable String versionChangeMessage(String priorVersion) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,13 @@
|
||||
package com.falsepattern.endlessids.managers;
|
||||
|
||||
import com.falsepattern.chunk.api.ChunkDataManager;
|
||||
import com.falsepattern.chunk.api.ArrayUtil;
|
||||
import com.falsepattern.chunk.api.DataManager;
|
||||
import com.falsepattern.endlessids.Tags;
|
||||
import com.falsepattern.endlessids.mixin.helpers.IExtendedBlockStorageMixin;
|
||||
import com.falsepattern.endlessids.mixin.helpers.SubChunkBlockHook;
|
||||
import lombok.val;
|
||||
import lombok.var;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.world.chunk.Chunk;
|
||||
@@ -13,7 +16,7 @@ import net.minecraft.world.chunk.storage.ExtendedBlockStorage;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
|
||||
public class BlockIDManager implements ChunkDataManager, ChunkDataManager.PacketDataManager, ChunkDataManager.SectionNBTDataManager {
|
||||
public class BlockIDManager implements DataManager.PacketDataManager, DataManager.SubChunkDataManager {
|
||||
|
||||
@Override
|
||||
public String domain() {
|
||||
@@ -31,35 +34,35 @@ public class BlockIDManager implements ChunkDataManager, ChunkDataManager.Packet
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToBuffer(Chunk chunk, int ebsMask, boolean forceUpdate, ByteBuffer data) {
|
||||
val ebsList = chunk.getBlockStorageArray();
|
||||
public void writeToBuffer(Chunk chunk, int subChunkMask, boolean forceUpdate, ByteBuffer data) {
|
||||
val subChunkList = chunk.getBlockStorageArray();
|
||||
int storageFlags = 0;
|
||||
val start = data.position() + 4;
|
||||
data.position(start);
|
||||
for (int i = 0; i < 16; i++) {
|
||||
if ((ebsMask & (1 << i)) == 0 || ebsList[i] == null) {
|
||||
if ((subChunkMask & (1 << i)) == 0 || subChunkList[i] == null) {
|
||||
continue;
|
||||
}
|
||||
val ebs = (IExtendedBlockStorageMixin) ebsList[i];
|
||||
val subChunk = (SubChunkBlockHook) subChunkList[i];
|
||||
|
||||
storageFlags |= ebs.getEBSMSBMask() << (i * 2);
|
||||
storageFlags |= subChunk.getBlockMask() << (i * 2);
|
||||
|
||||
val b1 = ebs.getB1();
|
||||
val b1 = subChunk.getB1();
|
||||
data.put(b1);
|
||||
|
||||
val b2Low = ebs.getB2Low();
|
||||
val b2Low = subChunk.getB2Low();
|
||||
if (b2Low == null) {
|
||||
continue;
|
||||
}
|
||||
data.put(b2Low.data);
|
||||
|
||||
val b2High = ebs.getB2High();
|
||||
val b2High = subChunk.getB2High();
|
||||
if (b2High == null) {
|
||||
continue;
|
||||
}
|
||||
data.put(b2High.data);
|
||||
|
||||
val b3 = ebs.getB3();
|
||||
val b3 = subChunk.getB3();
|
||||
if (b3 != null) {
|
||||
data.put(b3);
|
||||
}
|
||||
@@ -68,77 +71,78 @@ public class BlockIDManager implements ChunkDataManager, ChunkDataManager.Packet
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromBuffer(Chunk chunk, int ebsMask, boolean forceUpdate, ByteBuffer buffer) {
|
||||
val ebsList = chunk.getBlockStorageArray();
|
||||
public void readFromBuffer(Chunk chunk, int subChunkMask, boolean forceUpdate, ByteBuffer buffer) {
|
||||
val subChunkList = chunk.getBlockStorageArray();
|
||||
val storageFlags = buffer.getInt();
|
||||
for (int i = 0; i < 16; i++) {
|
||||
if ((ebsMask & (1 << i)) == 0 || ebsList[i] == null) {
|
||||
if ((subChunkMask & (1 << i)) == 0 || subChunkList[i] == null) {
|
||||
continue;
|
||||
}
|
||||
val ebs = (IExtendedBlockStorageMixin) ebsList[i];
|
||||
val subChunk = (SubChunkBlockHook) subChunkList[i];
|
||||
val storageFlag = (storageFlags >>> (i * 2)) & 3;
|
||||
val b1 = ebs.getB1();
|
||||
val b1 = subChunk.getB1();
|
||||
buffer.get(b1);
|
||||
if (storageFlag == 0b00) {
|
||||
ebs.clearB2Low();
|
||||
ebs.clearB2High();
|
||||
ebs.clearB3();
|
||||
subChunk.setB2Low(null);
|
||||
subChunk.setB2High(null);
|
||||
subChunk.setB3(null);
|
||||
continue;
|
||||
}
|
||||
var b2Low = ebs.getB2Low();
|
||||
var b2Low = subChunk.getB2Low();
|
||||
if (b2Low == null) {
|
||||
b2Low = ebs.createB2Low();
|
||||
b2Low = subChunk.createB2Low();
|
||||
}
|
||||
buffer.get(b2Low.data);
|
||||
if (storageFlag == 0b01) {
|
||||
ebs.clearB2High();
|
||||
ebs.clearB3();
|
||||
subChunk.setB2High(null);
|
||||
subChunk.setB3(null);
|
||||
continue;
|
||||
}
|
||||
var b2High = ebs.getB2High();
|
||||
var b2High = subChunk.getB2High();
|
||||
if (b2High == null) {
|
||||
b2High = ebs.createB2High();
|
||||
b2High = subChunk.createB2High();
|
||||
}
|
||||
buffer.get(b2High.data);
|
||||
if (storageFlag == 0b10) {
|
||||
ebs.clearB3();
|
||||
subChunk.setB3(null);
|
||||
continue;
|
||||
}
|
||||
var b3 = ebs.getB3();
|
||||
var b3 = subChunk.getB3();
|
||||
if (b3 == null) {
|
||||
b3 = ebs.createB3();
|
||||
b3 = subChunk.createB3();
|
||||
}
|
||||
buffer.get(b3);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean sectionPrivilegedAccess() {
|
||||
public boolean subChunkPrivilegedAccess() {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void writeSectionToNBT(Chunk chunk, ExtendedBlockStorage ebsVanilla, NBTTagCompound section) {
|
||||
val ebs = (IExtendedBlockStorageMixin) ebsVanilla;
|
||||
val b1 = ebs.getB1();
|
||||
val b2Low = ebs.getB2Low();
|
||||
val b2High = ebs.getB2High();
|
||||
val b3 = ebs.getB3();
|
||||
section.setByteArray("Blocks", b1);
|
||||
public void writeSubChunkToNBT(Chunk chunk, ExtendedBlockStorage subChunkVanilla, NBTTagCompound nbt) {
|
||||
val subChunk = (SubChunkBlockHook) subChunkVanilla;
|
||||
val b1 = subChunk.getB1();
|
||||
val b2Low = subChunk.getB2Low();
|
||||
val b2High = subChunk.getB2High();
|
||||
val b3 = subChunk.getB3();
|
||||
nbt.setByteArray("Blocks", b1);
|
||||
if (b2Low != null) {
|
||||
section.setByteArray("Add", b2Low.data);
|
||||
nbt.setByteArray("Add", b2Low.data);
|
||||
}
|
||||
if (b2High != null) {
|
||||
section.setByteArray("BlocksB2Hi", b2High.data);
|
||||
nbt.setByteArray("BlocksB2Hi", b2High.data);
|
||||
}
|
||||
if (b3 != null) {
|
||||
section.setByteArray("BlocksB3", b3);
|
||||
nbt.setByteArray("BlocksB3", b3);
|
||||
}
|
||||
}
|
||||
|
||||
//NotEnoughIDs world compatibility
|
||||
public static void readSectionFromNBTNotEnoughIDsDFU(IExtendedBlockStorageMixin ebs, NBTTagCompound section) {
|
||||
val data = section.getByteArray("Blocks16");
|
||||
public static void readSectionFromNBTNotEnoughIDsDFU(SubChunkBlockHook subChunk, NBTTagCompound nbt) {
|
||||
val data = nbt.getByteArray("Blocks16");
|
||||
val dataShort = new short[data.length >>> 1];
|
||||
ByteBuffer.wrap(data).asShortBuffer().get(dataShort);
|
||||
val b1 = new byte[dataShort.length];
|
||||
@@ -152,35 +156,58 @@ public class BlockIDManager implements ChunkDataManager, ChunkDataManager.Packet
|
||||
b2L[nI] |= ((s & 0x0F00) >>> 8) << mI;
|
||||
b2H[nI] |= ((s & 0xF000) >>> 12) << mI;
|
||||
}
|
||||
ebs.setB1(b1);
|
||||
ebs.setB2Low(new NibbleArray(b2L, 4));
|
||||
ebs.setB2High(new NibbleArray(b2H, 4));
|
||||
subChunk.setB1(b1);
|
||||
subChunk.setB2Low(new NibbleArray(b2L, 4));
|
||||
subChunk.setB2High(new NibbleArray(b2H, 4));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readSectionFromNBT(Chunk chunk, ExtendedBlockStorage ebsVanilla, NBTTagCompound section) {
|
||||
val ebs = (IExtendedBlockStorageMixin) ebsVanilla;
|
||||
if (section.hasKey("Blocks16")) {
|
||||
readSectionFromNBTNotEnoughIDsDFU(ebs, section);
|
||||
public void readSubChunkFromNBT(Chunk chunk, ExtendedBlockStorage subChunkVanilla, NBTTagCompound nbt) {
|
||||
val subChunk = (SubChunkBlockHook) subChunkVanilla;
|
||||
if (nbt.hasKey("Blocks16")) {
|
||||
readSectionFromNBTNotEnoughIDsDFU(subChunk, nbt);
|
||||
return;
|
||||
}
|
||||
assert section.hasKey("Blocks");
|
||||
val b1 = section.getByteArray("Blocks");
|
||||
final byte[] b2Low = section.hasKey("Add") ? section.getByteArray("Add") : null;
|
||||
final byte[] b2High = section.hasKey("BlocksB2Hi") ? section.getByteArray("BlocksB2Hi") : null;
|
||||
final byte[] b3 = section.hasKey("BlocksB3") ? section.getByteArray("BlocksB3") : null;
|
||||
assert nbt.hasKey("Blocks");
|
||||
val b1 = nbt.getByteArray("Blocks");
|
||||
final byte[] b2Low = nbt.hasKey("Add") ? nbt.getByteArray("Add") : null;
|
||||
final byte[] b2High = nbt.hasKey("BlocksB2Hi") ? nbt.getByteArray("BlocksB2Hi") : null;
|
||||
final byte[] b3 = nbt.hasKey("BlocksB3") ? nbt.getByteArray("BlocksB3") : null;
|
||||
|
||||
ebs.setB1(b1);
|
||||
if (b2Low == null) {
|
||||
ebs.clearB2Low();
|
||||
} else {
|
||||
ebs.setB2Low(new NibbleArray(b2Low, 4));
|
||||
}
|
||||
if (b2High == null) {
|
||||
ebs.clearB2High();
|
||||
} else {
|
||||
ebs.setB2High(new NibbleArray(b2High, 4));
|
||||
}
|
||||
ebs.setB3(b3);
|
||||
subChunk.setB1(b1);
|
||||
subChunk.setB2Low(b2Low == null ? null : new NibbleArray(b2Low, 4));
|
||||
subChunk.setB2High(b2High == null ? null : new NibbleArray(b2High, 4));
|
||||
subChunk.setB3(b3);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void cloneSubChunk(Chunk fromChunk, ExtendedBlockStorage fromVanilla, ExtendedBlockStorage toVanilla) {
|
||||
val from = (SubChunkBlockHook) fromVanilla;
|
||||
val to = (SubChunkBlockHook) toVanilla;
|
||||
|
||||
to.setB1(ArrayUtil.copyArray(from.getB1(), to.getB1()));
|
||||
to.setB2Low(ArrayUtil.copyArray(from.getB2Low(), to.getB2Low()));
|
||||
to.setB2High(ArrayUtil.copyArray(from.getB2High(), to.getB2High()));
|
||||
to.setB3(ArrayUtil.copyArray(from.getB3(), to.getB3()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull String version() {
|
||||
return Tags.VERSION;
|
||||
}
|
||||
|
||||
@Override
|
||||
public @Nullable String newInstallDescription() {
|
||||
return "EndlessIDs extended block IDs. Vanilla worlds can be converted to EndlessIDs worlds safely.";
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull String uninstallMessage() {
|
||||
return "EndlessIDs extended block IDs removed. Any blocks with IDs above 4095 will get corrupted.";
|
||||
}
|
||||
|
||||
@Override
|
||||
public @Nullable String versionChangeMessage(String priorVersion) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,13 @@
|
||||
package com.falsepattern.endlessids.managers;
|
||||
|
||||
import com.falsepattern.chunk.api.ChunkDataManager;
|
||||
import com.falsepattern.chunk.api.ArrayUtil;
|
||||
import com.falsepattern.chunk.api.DataManager;
|
||||
import com.falsepattern.endlessids.Tags;
|
||||
import com.falsepattern.endlessids.mixin.helpers.IExtendedBlockStorageMixin;
|
||||
import com.falsepattern.endlessids.mixin.helpers.SubChunkBlockHook;
|
||||
import lombok.val;
|
||||
import lombok.var;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.world.chunk.Chunk;
|
||||
@@ -13,7 +16,7 @@ import net.minecraft.world.chunk.storage.ExtendedBlockStorage;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
|
||||
public class BlockMetaManager implements ChunkDataManager, ChunkDataManager.PacketDataManager, ChunkDataManager.SectionNBTDataManager {
|
||||
public class BlockMetaManager implements DataManager.PacketDataManager, DataManager.SubChunkDataManager {
|
||||
|
||||
@Override
|
||||
public String domain() {
|
||||
@@ -31,29 +34,29 @@ public class BlockMetaManager implements ChunkDataManager, ChunkDataManager.Pack
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToBuffer(Chunk chunk, int ebsMask, boolean forceUpdate, ByteBuffer data) {
|
||||
val ebsList = chunk.getBlockStorageArray();
|
||||
public void writeToBuffer(Chunk chunk, int subChunkMask, boolean forceUpdate, ByteBuffer data) {
|
||||
val subChunkList = chunk.getBlockStorageArray();
|
||||
int storageFlags = 0;
|
||||
val start = data.position() + 4;
|
||||
data.position(start);
|
||||
for (int i = 0; i < 16; i++) {
|
||||
if ((ebsMask & (1 << i)) == 0 || ebsList[i] == null) {
|
||||
if ((subChunkMask & (1 << i)) == 0 || subChunkList[i] == null) {
|
||||
continue;
|
||||
}
|
||||
val ebs = (IExtendedBlockStorageMixin) ebsList[i];
|
||||
val subChunk = (SubChunkBlockHook) subChunkList[i];
|
||||
|
||||
storageFlags |= ebs.getEBSMask() << (i * 2);
|
||||
storageFlags |= subChunk.getMetadataMask() << (i * 2);
|
||||
|
||||
val m1Low = ebs.getM1Low();
|
||||
val m1Low = subChunk.getM1Low();
|
||||
data.put(m1Low.data);
|
||||
|
||||
val m1High = ebs.getM1High();
|
||||
val m1High = subChunk.getM1High();
|
||||
if (m1High == null) {
|
||||
continue;
|
||||
}
|
||||
data.put(m1High.data);
|
||||
|
||||
val m2 = ebs.getM2();
|
||||
val m2 = subChunk.getM2();
|
||||
if (m2 != null) {
|
||||
data.put(m2);
|
||||
}
|
||||
@@ -62,73 +65,99 @@ public class BlockMetaManager implements ChunkDataManager, ChunkDataManager.Pack
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromBuffer(Chunk chunk, int ebsMask, boolean forceUpdate, ByteBuffer buffer) {
|
||||
val ebsList = chunk.getBlockStorageArray();
|
||||
public void readFromBuffer(Chunk chunk, int subChunkMask, boolean forceUpdate, ByteBuffer buffer) {
|
||||
val subChunkList = chunk.getBlockStorageArray();
|
||||
val storageFlags = buffer.getInt();
|
||||
for (int i = 0; i < 16; i++) {
|
||||
if ((ebsMask & (1 << i)) == 0 || ebsList[i] == null) {
|
||||
if ((subChunkMask & (1 << i)) == 0 || subChunkList[i] == null) {
|
||||
continue;
|
||||
}
|
||||
val ebs = (IExtendedBlockStorageMixin) ebsList[i];
|
||||
val subChunk = (SubChunkBlockHook) subChunkList[i];
|
||||
val storageFlag = (storageFlags >>> (i * 2)) & 3;
|
||||
val m1Low = ebs.getM1Low();
|
||||
val m1Low = subChunk.getM1Low();
|
||||
buffer.get(m1Low.data);
|
||||
if (storageFlag == 0b01) {
|
||||
ebs.clearM1High();
|
||||
ebs.clearM2();
|
||||
subChunk.setM1High(null);
|
||||
subChunk.setM2(null);
|
||||
continue;
|
||||
}
|
||||
var m1High = ebs.getM1High();
|
||||
var m1High = subChunk.getM1High();
|
||||
if (m1High == null) {
|
||||
m1High = ebs.createM1High();
|
||||
m1High = subChunk.createM1High();
|
||||
}
|
||||
buffer.get(m1High.data);
|
||||
if (storageFlag == 0b10) {
|
||||
ebs.clearM2();
|
||||
subChunk.setM2(null);
|
||||
continue;
|
||||
}
|
||||
var m2 = ebs.getM2();
|
||||
var m2 = subChunk.getM2();
|
||||
if (m2 == null) {
|
||||
m2 = ebs.createM2();
|
||||
m2 = subChunk.createM2();
|
||||
}
|
||||
buffer.get(m2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean sectionPrivilegedAccess() {
|
||||
public boolean subChunkPrivilegedAccess() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeSectionToNBT(Chunk chunk, ExtendedBlockStorage ebsVanilla, NBTTagCompound section) {
|
||||
val ebs = (IExtendedBlockStorageMixin) ebsVanilla;
|
||||
val m1Low = ebs.getM1Low();
|
||||
val m1High = ebs.getM1High();
|
||||
val m2 = ebs.getM2();
|
||||
section.setByteArray("Data", m1Low.data);
|
||||
public void writeSubChunkToNBT(Chunk chunk, ExtendedBlockStorage subChunkVanilla, NBTTagCompound nbt) {
|
||||
val subChunk = (SubChunkBlockHook) subChunkVanilla;
|
||||
val m1Low = subChunk.getM1Low();
|
||||
val m1High = subChunk.getM1High();
|
||||
val m2 = subChunk.getM2();
|
||||
nbt.setByteArray("Data", m1Low.data);
|
||||
if (m1High != null) {
|
||||
section.setByteArray("Data1High", m1High.data);
|
||||
nbt.setByteArray("Data1High", m1High.data);
|
||||
}
|
||||
if (m2 != null) {
|
||||
section.setByteArray("Data2", m2);
|
||||
nbt.setByteArray("Data2", m2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readSectionFromNBT(Chunk chunk, ExtendedBlockStorage ebsVanilla, NBTTagCompound section) {
|
||||
val ebs = (IExtendedBlockStorageMixin) ebsVanilla;
|
||||
assert section.hasKey("Data");
|
||||
val m1Low = section.getByteArray("Data");
|
||||
final byte[] m1High = section.hasKey("Data1High") ? section.getByteArray("Data1High") : null;
|
||||
final byte[] m2 = section.hasKey("Data2") ? section.getByteArray("Data2") : null;
|
||||
public void readSubChunkFromNBT(Chunk chunk, ExtendedBlockStorage subChunkVanilla, NBTTagCompound nbt) {
|
||||
val subChunk = (SubChunkBlockHook) subChunkVanilla;
|
||||
assert nbt.hasKey("Data");
|
||||
val m1Low = nbt.getByteArray("Data");
|
||||
final byte[] m1High = nbt.hasKey("Data1High") ? nbt.getByteArray("Data1High") : null;
|
||||
final byte[] m2 = nbt.hasKey("Data2") ? nbt.getByteArray("Data2") : null;
|
||||
|
||||
ebs.setM1Low(new NibbleArray(m1Low, 4));
|
||||
if (m1High == null) {
|
||||
ebs.clearM1High();
|
||||
} else {
|
||||
ebs.setM1High(new NibbleArray(m1High, 4));
|
||||
}
|
||||
ebs.setM2(m2);
|
||||
subChunk.setM1Low(new NibbleArray(m1Low, 4));
|
||||
subChunk.setM1High(m1High == null ? null : new NibbleArray(m1High, 4));
|
||||
subChunk.setM2(m2);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void cloneSubChunk(Chunk fromChunk, ExtendedBlockStorage fromVanilla, ExtendedBlockStorage toVanilla) {
|
||||
val from = (SubChunkBlockHook) fromVanilla;
|
||||
val to = (SubChunkBlockHook) toVanilla;
|
||||
|
||||
to.setM1Low(ArrayUtil.copyArray(from.getM1Low(), to.getM1Low()));
|
||||
to.setM1High(ArrayUtil.copyArray(from.getM1High(), to.getM1High()));
|
||||
to.setM2(ArrayUtil.copyArray(from.getM2(), to.getM2()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull String version() {
|
||||
return Tags.VERSION;
|
||||
}
|
||||
|
||||
@Override
|
||||
public @Nullable String newInstallDescription() {
|
||||
return "EndlessIDs extended block metadata. Vanilla worlds can be converted to EndlessIDs worlds safely.";
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull String uninstallMessage() {
|
||||
return "EndlessIDs extended block metadata removed. Any blocks with metadata above 15 will get corrupted.";
|
||||
}
|
||||
|
||||
@Override
|
||||
public @Nullable String versionChangeMessage(String priorVersion) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -11,7 +11,7 @@ import static com.falsepattern.endlessids.EndlessIDs.ZERO_LENGTH_BIOME_ARRAY_PLA
|
||||
|
||||
public class BiomePatchHelper {
|
||||
public static byte[] getBiomeArrayTweaked(Chunk chunk, IntFunction<BiomeGenBase> biomesForGeneration) {
|
||||
val chunkBiomes = ((IChunkMixin) chunk).getBiomeShortArray();
|
||||
val chunkBiomes = ((ChunkBiomeHook) chunk).getBiomeShortArray();
|
||||
|
||||
for (int i = 0; i < chunkBiomes.length; ++i) {
|
||||
chunkBiomes[i] = (short) biomesForGeneration.apply(i).biomeID;
|
||||
@@ -20,7 +20,7 @@ public class BiomePatchHelper {
|
||||
}
|
||||
|
||||
public static byte[] getBiomeArrayTweaked(Chunk chunk, BiomeGenBase[] biomesForGeneration) {
|
||||
val chunkBiomes = ((IChunkMixin) chunk).getBiomeShortArray();
|
||||
val chunkBiomes = ((ChunkBiomeHook) chunk).getBiomeShortArray();
|
||||
|
||||
for (int i = 0; i < chunkBiomes.length; ++i) {
|
||||
chunkBiomes[i] = (short) biomesForGeneration[i].biomeID;
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
package com.falsepattern.endlessids.mixin.helpers;
|
||||
|
||||
public interface IChunkMixin {
|
||||
public interface ChunkBiomeHook {
|
||||
short[] getBiomeShortArray();
|
||||
|
||||
void setBiomeShortArray(short[] data);
|
||||
+3
-13
@@ -2,7 +2,7 @@ package com.falsepattern.endlessids.mixin.helpers;
|
||||
|
||||
import net.minecraft.world.chunk.NibbleArray;
|
||||
|
||||
public interface IExtendedBlockStorageMixin {
|
||||
public interface SubChunkBlockHook {
|
||||
byte[] getB1();
|
||||
|
||||
void setB1(byte[] data);
|
||||
@@ -11,29 +11,23 @@ public interface IExtendedBlockStorageMixin {
|
||||
|
||||
void setB2Low(NibbleArray data);
|
||||
|
||||
void clearB2Low();
|
||||
|
||||
NibbleArray createB2Low();
|
||||
|
||||
NibbleArray getB2High();
|
||||
|
||||
void setB2High(NibbleArray data);
|
||||
|
||||
void clearB2High();
|
||||
|
||||
NibbleArray createB2High();
|
||||
|
||||
byte[] getB3();
|
||||
|
||||
void setB3(byte[] data);
|
||||
|
||||
void clearB3();
|
||||
|
||||
byte[] createB3();
|
||||
|
||||
int getEBSMask();
|
||||
int getMetadataMask();
|
||||
|
||||
int getEBSMSBMask();
|
||||
int getBlockMask();
|
||||
|
||||
int getID(int x, int y, int z);
|
||||
|
||||
@@ -45,15 +39,11 @@ public interface IExtendedBlockStorageMixin {
|
||||
|
||||
void setM1High(NibbleArray m1High);
|
||||
|
||||
void clearM1High();
|
||||
|
||||
NibbleArray createM1High();
|
||||
|
||||
byte[] getM2();
|
||||
|
||||
void setM2(byte[] m2);
|
||||
|
||||
void clearM2();
|
||||
|
||||
byte[] createM2();
|
||||
}
|
||||
+2
-2
@@ -2,7 +2,7 @@ package com.falsepattern.endlessids.mixin.mixins.common.biome.antiqueatlas;
|
||||
|
||||
import com.falsepattern.endlessids.constants.ExtendedConstants;
|
||||
import com.falsepattern.endlessids.constants.VanillaConstants;
|
||||
import com.falsepattern.endlessids.mixin.helpers.IChunkMixin;
|
||||
import com.falsepattern.endlessids.mixin.helpers.ChunkBiomeHook;
|
||||
import com.falsepattern.endlessids.mixin.helpers.ShortUtil;
|
||||
import hunternif.mc.atlas.core.BiomeDetectorBase;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
@@ -41,7 +41,7 @@ public abstract class BiomeDetectorBaseMixin {
|
||||
require = 1)
|
||||
private int[] biomeIDs(byte[] i) {
|
||||
try {
|
||||
return ShortUtil.unsignedShortToIntArray(((IChunkMixin) chunk).getBiomeShortArray());
|
||||
return ShortUtil.unsignedShortToIntArray(((ChunkBiomeHook) chunk).getBiomeShortArray());
|
||||
} finally {
|
||||
chunk = null;
|
||||
}
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
package com.falsepattern.endlessids.mixin.mixins.common.biome.antiqueatlas;
|
||||
|
||||
import com.falsepattern.endlessids.mixin.helpers.IChunkMixin;
|
||||
import com.falsepattern.endlessids.mixin.helpers.ChunkBiomeHook;
|
||||
import com.falsepattern.endlessids.mixin.helpers.ShortUtil;
|
||||
import hunternif.mc.atlas.core.BiomeDetectorNether;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
@@ -30,7 +30,7 @@ public abstract class BiomeDetectorNetherMixin {
|
||||
require = 1)
|
||||
private int[] biomeIDs(byte[] i) {
|
||||
try {
|
||||
return ShortUtil.unsignedShortToIntArray(((IChunkMixin) chunk).getBiomeShortArray());
|
||||
return ShortUtil.unsignedShortToIntArray(((ChunkBiomeHook) chunk).getBiomeShortArray());
|
||||
} finally {
|
||||
chunk = null;
|
||||
}
|
||||
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
package com.falsepattern.endlessids.mixin.mixins.common.biome.biomewand;
|
||||
|
||||
import com.falsepattern.endlessids.PlaceholderBiome;
|
||||
import com.falsepattern.endlessids.mixin.helpers.IChunkMixin;
|
||||
import com.falsepattern.endlessids.mixin.helpers.ChunkBiomeHook;
|
||||
import com.spacechase0.minecraft.biomewand.BiomeWandMod;
|
||||
import com.spacechase0.minecraft.biomewand.item.BiomeWandItem;
|
||||
import com.spacechase0.minecraft.spacecore.util.TranslateUtils;
|
||||
@@ -42,7 +42,7 @@ public abstract class BiomeWandItemMixin {
|
||||
int relBlockX = blockX & 15;
|
||||
int relBlockZ = blockZ & 15;
|
||||
Chunk chunk = world.getChunkFromBlockCoords(blockX, blockZ);
|
||||
short biome = ((IChunkMixin) chunk).getBiomeShortArray()[relBlockZ * 16 + relBlockX];
|
||||
short biome = ((ChunkBiomeHook) chunk).getBiomeShortArray()[relBlockZ * 16 + relBlockX];
|
||||
tag.setShort("sampledBiomeS", biome);
|
||||
} else {
|
||||
short biome = tag.getShort("sampledBiomeS");
|
||||
@@ -52,7 +52,7 @@ public abstract class BiomeWandItemMixin {
|
||||
int relBlockX = ix & 15;
|
||||
int relBlockZ = iz & 15;
|
||||
Chunk chunk = world.getChunkFromBlockCoords(blockX, blockZ);
|
||||
((IChunkMixin) chunk).getBiomeShortArray()[relBlockZ << 4 | relBlockX] = biome;
|
||||
((ChunkBiomeHook) chunk).getBiomeShortArray()[relBlockZ << 4 | relBlockX] = biome;
|
||||
chunk.isModified = true;
|
||||
BiomeWandMod.proxy.updateRendererAt(ix, iz);
|
||||
}
|
||||
|
||||
+4
-4
@@ -1,6 +1,6 @@
|
||||
package com.falsepattern.endlessids.mixin.mixins.common.biome.compactmachines;
|
||||
|
||||
import com.falsepattern.endlessids.mixin.helpers.IChunkMixin;
|
||||
import com.falsepattern.endlessids.mixin.helpers.ChunkBiomeHook;
|
||||
import com.falsepattern.endlessids.mixin.stubpackage.org.dave.CompactMachines.tileentity.TileEntityMachine;
|
||||
import org.dave.CompactMachines.handler.ConfigurationHandler;
|
||||
import org.dave.CompactMachines.machines.tools.CubeTools;
|
||||
@@ -27,7 +27,7 @@ public abstract class CubeToolsMixin {
|
||||
WorldServer machineWorld = MinecraftServer.getServer().worldServerForDimension(ConfigurationHandler.dimensionId);
|
||||
Chunk chunk = machineWorld.getChunkFromBlockCoords(coords * ConfigurationHandler.cubeDistance, 0);
|
||||
if (chunk != null && chunk.isChunkLoaded) {
|
||||
short[] biomeArray = ((IChunkMixin) chunk).getBiomeShortArray();
|
||||
short[] biomeArray = ((ChunkBiomeHook) chunk).getBiomeShortArray();
|
||||
for (int x = 0; x < 15; ++x) {
|
||||
for (int z = 0; z < 15; ++z) {
|
||||
biomeArray[z << 4 | x] = (short) biome.biomeID;
|
||||
@@ -43,8 +43,8 @@ public abstract class CubeToolsMixin {
|
||||
*/
|
||||
@Overwrite
|
||||
public static BiomeGenBase getMachineBiome(TileEntityMachine machine) {
|
||||
short[] biomeArray = ((IChunkMixin) machine.getWorldObj()
|
||||
.getChunkFromBlockCoords(machine.xCoord,
|
||||
short[] biomeArray = ((ChunkBiomeHook) machine.getWorldObj()
|
||||
.getChunkFromBlockCoords(machine.xCoord,
|
||||
machine.zCoord)).getBiomeShortArray();
|
||||
int biomeId = biomeArray[(machine.zCoord & 15) << 4 | machine.xCoord & 15];
|
||||
return biomeId > 0 && biomeId < BiomeGenBase.getBiomeGenArray().length &&
|
||||
|
||||
+3
-3
@@ -2,7 +2,7 @@ package com.falsepattern.endlessids.mixin.mixins.common.biome.dragonapi;
|
||||
|
||||
import Reika.DragonAPI.Libraries.World.ReikaChunkHelper;
|
||||
import com.falsepattern.endlessids.EndlessIDs;
|
||||
import com.falsepattern.endlessids.mixin.helpers.IChunkMixin;
|
||||
import com.falsepattern.endlessids.mixin.helpers.ChunkBiomeHook;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Redirect;
|
||||
@@ -20,7 +20,7 @@ public abstract class ReikaChunkHelperMixin {
|
||||
remap = true),
|
||||
require = 1)
|
||||
private static void customSet(Chunk chunk, byte[] p_76616_1_) {
|
||||
((IChunkMixin) chunk).setBiomeShortArray(biomeArray);
|
||||
((ChunkBiomeHook) chunk).setBiomeShortArray(biomeArray);
|
||||
biomeArray = null;
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ public abstract class ReikaChunkHelperMixin {
|
||||
remap = true),
|
||||
require = 1)
|
||||
private static byte[] customGet(Chunk chunk) {
|
||||
biomeArray = ((IChunkMixin) chunk).getBiomeShortArray();
|
||||
biomeArray = ((ChunkBiomeHook) chunk).getBiomeShortArray();
|
||||
return EndlessIDs.ZERO_LENGTH_BIOME_ARRAY_PLACEHOLDER;
|
||||
}
|
||||
}
|
||||
+4
-4
@@ -2,7 +2,7 @@ package com.falsepattern.endlessids.mixin.mixins.common.biome.dragonapi;
|
||||
|
||||
import Reika.DragonAPI.Libraries.World.ReikaWorldHelper;
|
||||
import com.falsepattern.endlessids.EndlessIDs;
|
||||
import com.falsepattern.endlessids.mixin.helpers.IChunkMixin;
|
||||
import com.falsepattern.endlessids.mixin.helpers.ChunkBiomeHook;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
@@ -45,7 +45,7 @@ public abstract class ReikaWorldHelperMixin {
|
||||
locals = LocalCapture.CAPTURE_FAILHARD,
|
||||
require = 1)
|
||||
private static void customLogicSetBiome(World world, int x, int z, BiomeGenBase biome, boolean applyEnvironment, CallbackInfo ci, Chunk ch, int ax, int az, byte[] biomes, int index) {
|
||||
((IChunkMixin) ch).getBiomeShortArray()[index] = (short) biome.biomeID;
|
||||
((ChunkBiomeHook) ch).getBiomeShortArray()[index] = (short) biome.biomeID;
|
||||
}
|
||||
|
||||
@Inject(method = "setBiomeAndBlocksForXZ",
|
||||
@@ -55,7 +55,7 @@ public abstract class ReikaWorldHelperMixin {
|
||||
locals = LocalCapture.CAPTURE_FAILEXCEPTION,
|
||||
require = 1)
|
||||
private static void captureIndexSetBiomeAndBlocks(World world, int x, int z, BiomeGenBase biome, boolean applyEnvironment, CallbackInfo ci, Chunk ch, int ax, int az, byte[] biomes, int index) {
|
||||
fromBiomeID = ((IChunkMixin) ch).getBiomeShortArray()[index];
|
||||
fromBiomeID = ((ChunkBiomeHook) ch).getBiomeShortArray()[index];
|
||||
}
|
||||
|
||||
@ModifyVariable(method = "setBiomeAndBlocksForXZ",
|
||||
@@ -72,6 +72,6 @@ public abstract class ReikaWorldHelperMixin {
|
||||
locals = LocalCapture.CAPTURE_FAILEXCEPTION,
|
||||
require = 1)
|
||||
private static void customLogicSetBiomeAndBlocks(World world, int x, int z, BiomeGenBase biome, boolean applyEnvironment, CallbackInfo ci, Chunk ch, int ax, int az, byte[] biomes, int index, BiomeGenBase from) {
|
||||
((IChunkMixin) ch).getBiomeShortArray()[index] = (short) biome.biomeID;
|
||||
((ChunkBiomeHook) ch).getBiomeShortArray()[index] = (short) biome.biomeID;
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
package com.falsepattern.endlessids.mixin.mixins.common.biome.enderlicious;
|
||||
|
||||
import DelirusCrux.Enderlicious.Dimension.EndChunkProvider;
|
||||
import com.falsepattern.endlessids.mixin.helpers.IChunkMixin;
|
||||
import com.falsepattern.endlessids.mixin.helpers.ChunkBiomeHook;
|
||||
import lombok.val;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Shadow;
|
||||
@@ -39,7 +39,7 @@ public abstract class EndChunkProviderMixin {
|
||||
remap = true,
|
||||
require = 1)
|
||||
private byte[] setBiomesTweaked(Chunk chunk) {
|
||||
val chunkBiomes = ((IChunkMixin) chunk).getBiomeShortArray();
|
||||
val chunkBiomes = ((ChunkBiomeHook) chunk).getBiomeShortArray();
|
||||
for (int k = 0; k < chunkBiomes.length; ++k) {
|
||||
if (Math.abs(xx) < 160 && Math.abs(zz) < 160) {
|
||||
chunkBiomes[k] = 9;
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
package com.falsepattern.endlessids.mixin.mixins.common.biome.extrautilities;
|
||||
|
||||
import com.falsepattern.endlessids.EndlessIDs;
|
||||
import com.falsepattern.endlessids.mixin.helpers.IChunkMixin;
|
||||
import com.falsepattern.endlessids.mixin.helpers.ChunkBiomeHook;
|
||||
import com.rwtema.extrautils.worldgen.endoftime.ChunkProviderEndOfTime;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
@@ -45,7 +45,7 @@ public abstract class ChunkProviderEndOfTimeMixin {
|
||||
require = 1)
|
||||
private void setBiomesTweaked3(byte[] bytes, byte b) {
|
||||
try {
|
||||
Arrays.fill(((IChunkMixin) chunk).getBiomeShortArray(), (short) id);
|
||||
Arrays.fill(((ChunkBiomeHook) chunk).getBiomeShortArray(), (short) id);
|
||||
} finally {
|
||||
chunk = null;
|
||||
id = -1;
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
package com.falsepattern.endlessids.mixin.mixins.common.biome.ir3;
|
||||
|
||||
import com.falsepattern.endlessids.mixin.helpers.IChunkMixin;
|
||||
import com.falsepattern.endlessids.mixin.helpers.ChunkBiomeHook;
|
||||
import jp.plusplus.ir2.IR2;
|
||||
import jp.plusplus.ir2.blocks.BlockCore;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
@@ -62,7 +62,7 @@ public abstract class IR2Mixin {
|
||||
}
|
||||
}
|
||||
|
||||
short[] bIds = ((IChunkMixin)event.world.getChunkFromBlockCoords(event.worldX, event.worldZ)).getBiomeShortArray();
|
||||
short[] bIds = ((ChunkBiomeHook)event.world.getChunkFromBlockCoords(event.worldX, event.worldZ)).getBiomeShortArray();
|
||||
|
||||
for(int k = 0; k < bIds.length; ++k) {
|
||||
if (bIds[k] == BiomeGenBase.ocean.biomeID || bIds[k] == BiomeGenBase.deepOcean.biomeID) {
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
package com.falsepattern.endlessids.mixin.mixins.common.biome.nomadictents;
|
||||
|
||||
import com.falsepattern.endlessids.mixin.helpers.IChunkMixin;
|
||||
import com.falsepattern.endlessids.mixin.helpers.ChunkBiomeHook;
|
||||
import com.yurtmod.dimension.TentChunkProvider;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
@@ -23,6 +23,6 @@ public abstract class TentChunkProviderMixin {
|
||||
private void setBiomesTweaked(Chunk chunk, byte[] p_76616_1_) {
|
||||
short[] biomeMap = new short[256];
|
||||
Arrays.fill(biomeMap, (short) BiomeGenBase.ocean.biomeID);
|
||||
((IChunkMixin) chunk).setBiomeShortArray(biomeMap);
|
||||
((ChunkBiomeHook) chunk).setBiomeShortArray(biomeMap);
|
||||
}
|
||||
}
|
||||
+3
-3
@@ -1,6 +1,6 @@
|
||||
package com.falsepattern.endlessids.mixin.mixins.common.biome.randomthings;
|
||||
|
||||
import com.falsepattern.endlessids.mixin.helpers.IChunkMixin;
|
||||
import com.falsepattern.endlessids.mixin.helpers.ChunkBiomeHook;
|
||||
import lumien.randomthings.Items.ItemBiomeCapsule;
|
||||
import lumien.randomthings.Items.ItemBiomePainter;
|
||||
import lumien.randomthings.Items.ModItems;
|
||||
@@ -40,10 +40,10 @@ public abstract class ItemBiomePainterMixin {
|
||||
if (charges > 0 || par2EntityPlayer.capabilities.isCreativeMode) {
|
||||
Chunk c = par3World.getChunkFromBlockCoords(par4, par6);
|
||||
int biomeID = is.getItemDamage() - 1;
|
||||
short[] biomeArray = ((IChunkMixin) c).getBiomeShortArray(); //changed
|
||||
short[] biomeArray = ((ChunkBiomeHook) c).getBiomeShortArray(); //changed
|
||||
if ((biomeArray[(par6 & 15) << 4 | par4 & 15] & 255) != biomeID) {
|
||||
biomeArray[(par6 & 15) << 4 | par4 & 15] = (short) (biomeID & 0xFFFF); //changed
|
||||
((IChunkMixin) c).setBiomeShortArray(biomeArray); //changed
|
||||
((ChunkBiomeHook) c).setBiomeShortArray(biomeArray); //changed
|
||||
if (!par2EntityPlayer.capabilities.isCreativeMode) {
|
||||
nbt.setInteger("charges", charges - 1);
|
||||
par2EntityPlayer.inventoryContainer.detectAndSendChanges();
|
||||
|
||||
+3
-3
@@ -1,6 +1,6 @@
|
||||
package com.falsepattern.endlessids.mixin.mixins.common.biome.randomthings;
|
||||
|
||||
import com.falsepattern.endlessids.mixin.helpers.IChunkMixin;
|
||||
import com.falsepattern.endlessids.mixin.helpers.ChunkBiomeHook;
|
||||
import lumien.randomthings.Items.ItemBiomeCapsule;
|
||||
import lumien.randomthings.Network.Messages.MessagePaintBiome;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
@@ -49,9 +49,9 @@ public abstract class MessagePaintBiomeMixin {
|
||||
EntityPlayer player = Minecraft.getMinecraft().thePlayer;
|
||||
if (player != null && player.worldObj.provider.dimensionId == this.dimensionID) {
|
||||
Chunk c = player.worldObj.getChunkFromBlockCoords(this.posX, this.posZ);
|
||||
short[] biomeArray = ((IChunkMixin) c).getBiomeShortArray(); //changed
|
||||
short[] biomeArray = ((ChunkBiomeHook) c).getBiomeShortArray(); //changed
|
||||
biomeArray[(this.posZ & 15) << 4 | this.posX & 15] = (short) (this.biomeID & 0xFFFF); //changed
|
||||
((IChunkMixin) c).setBiomeShortArray(biomeArray); //changed
|
||||
((ChunkBiomeHook) c).setBiomeShortArray(biomeArray); //changed
|
||||
Minecraft.getMinecraft().thePlayer.worldObj.markBlocksDirtyVertical(this.posX, this.posZ, 0,
|
||||
player.worldObj.getActualHeight());
|
||||
BiomeGenBase biome = BiomeGenBase.getBiome(this.biomeID);
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
package com.falsepattern.endlessids.mixin.mixins.common.biome.restructured;
|
||||
|
||||
import com.falsepattern.endlessids.mixin.helpers.IChunkMixin;
|
||||
import com.falsepattern.endlessids.mixin.helpers.ChunkBiomeHook;
|
||||
import org.blockartistry.mod.Restructured.world.BiomeHelper;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Overwrite;
|
||||
@@ -21,7 +21,7 @@ public abstract class BiomeHelperMixin {
|
||||
*/
|
||||
@Overwrite
|
||||
public static BiomeGenBase chunkBiomeSurvey(World world, Chunk chunk, Random rand) {
|
||||
short[] biomes = ((IChunkMixin)chunk).getBiomeShortArray();
|
||||
short[] biomes = ((ChunkBiomeHook)chunk).getBiomeShortArray();
|
||||
int[] counts = new int[biomes.length];
|
||||
int highIndex = BiomeGenBase.plains.biomeID;
|
||||
int highCount = -1;
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
package com.falsepattern.endlessids.mixin.mixins.common.biome.thaumcraft;
|
||||
|
||||
import com.falsepattern.endlessids.mixin.helpers.IChunkMixin;
|
||||
import com.falsepattern.endlessids.mixin.helpers.ChunkBiomeHook;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Overwrite;
|
||||
import thaumcraft.common.lib.network.PacketHandler;
|
||||
@@ -24,7 +24,7 @@ public abstract class UtilsMixin {
|
||||
public static void setBiomeAt(World world, int x, int z, BiomeGenBase biome) {
|
||||
if (biome != null) {
|
||||
Chunk chunk = world.getChunkFromBlockCoords(x, z);
|
||||
short[] array = ((IChunkMixin) chunk).getBiomeShortArray();
|
||||
short[] array = ((ChunkBiomeHook) chunk).getBiomeShortArray();
|
||||
array[(z & 15) << 4 | x & 15] = (short) (biome.biomeID);
|
||||
if (!world.isRemote) {
|
||||
PacketHandler.INSTANCE.sendToAllAround(new PacketBiomeChange(x, z, (short) biome.biomeID),
|
||||
|
||||
+2
-2
@@ -3,7 +3,7 @@ package com.falsepattern.endlessids.mixin.mixins.common.biome.vanilla;
|
||||
import com.falsepattern.endlessids.EndlessIDs;
|
||||
import com.falsepattern.endlessids.Tags;
|
||||
import com.falsepattern.endlessids.constants.ExtendedConstants;
|
||||
import com.falsepattern.endlessids.mixin.helpers.IChunkMixin;
|
||||
import com.falsepattern.endlessids.mixin.helpers.ChunkBiomeHook;
|
||||
import lombok.val;
|
||||
import org.spongepowered.asm.mixin.Final;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
@@ -23,7 +23,7 @@ import java.util.Arrays;
|
||||
|
||||
@Mixin(value = Chunk.class,
|
||||
priority = 900)
|
||||
public abstract class ChunkMixin implements IChunkMixin {
|
||||
public abstract class ChunkMixin implements ChunkBiomeHook {
|
||||
@Shadow
|
||||
@Final
|
||||
public int xPosition;
|
||||
|
||||
+8
-8
@@ -1,6 +1,6 @@
|
||||
package com.falsepattern.endlessids.mixin.mixins.common.blockitem.ubc;
|
||||
|
||||
import com.falsepattern.endlessids.mixin.helpers.IExtendedBlockStorageMixin;
|
||||
import com.falsepattern.endlessids.mixin.helpers.SubChunkBlockHook;
|
||||
import exterminatorJeff.undergroundBiomes.worldGen.BiomeUndergroundDecorator;
|
||||
import lombok.val;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
@@ -16,7 +16,7 @@ import java.util.logging.Logger;
|
||||
remap = false)
|
||||
public abstract class BiomeUndergroundDecoratorMixin {
|
||||
private static NibbleArray fakeArray;
|
||||
private IExtendedBlockStorageMixin ebs;
|
||||
private SubChunkBlockHook subChunk;
|
||||
|
||||
@Redirect(method = {"replaceChunkOres(IILnet/minecraft/world/World;)V",
|
||||
"replaceChunkOres(Lnet/minecraft/world/chunk/IChunkProvider;II)V"},
|
||||
@@ -24,10 +24,10 @@ public abstract class BiomeUndergroundDecoratorMixin {
|
||||
target = "Lnet/minecraft/world/chunk/storage/ExtendedBlockStorage;getBlockLSBArray()[B",
|
||||
remap = true),
|
||||
require = 2)
|
||||
private byte[] returnLSB(ExtendedBlockStorage instance) {
|
||||
IExtendedBlockStorageMixin iebs = (IExtendedBlockStorageMixin) instance;
|
||||
ebs = iebs;
|
||||
return iebs.getB1();
|
||||
private byte[] returnLSB(ExtendedBlockStorage subChunkVanilla) {
|
||||
SubChunkBlockHook subChunk = (SubChunkBlockHook) subChunkVanilla;
|
||||
this.subChunk = subChunk;
|
||||
return subChunk.getB1();
|
||||
}
|
||||
|
||||
@Redirect(method = {"replaceChunkOres(IILnet/minecraft/world/World;)V",
|
||||
@@ -47,8 +47,8 @@ public abstract class BiomeUndergroundDecoratorMixin {
|
||||
remap = true),
|
||||
require = 2)
|
||||
private int returnRestOfID(NibbleArray instance, int x, int y, int z) {
|
||||
val id = ebs.getID(x, y, z) >>> 8;
|
||||
ebs = null;
|
||||
val id = subChunk.getID(x, y, z) >>> 8;
|
||||
subChunk = null;
|
||||
return id;
|
||||
}
|
||||
|
||||
|
||||
+4
-29
@@ -4,7 +4,7 @@ import com.falsepattern.endlessids.EndlessIDs;
|
||||
import com.falsepattern.endlessids.Hooks;
|
||||
import com.falsepattern.endlessids.Tags;
|
||||
import com.falsepattern.endlessids.config.GeneralConfig;
|
||||
import com.falsepattern.endlessids.mixin.helpers.IExtendedBlockStorageMixin;
|
||||
import com.falsepattern.endlessids.mixin.helpers.SubChunkBlockHook;
|
||||
import lombok.val;
|
||||
import lombok.var;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
@@ -22,7 +22,7 @@ import net.minecraft.world.chunk.NibbleArray;
|
||||
import net.minecraft.world.chunk.storage.ExtendedBlockStorage;
|
||||
|
||||
@Mixin(ExtendedBlockStorage.class)
|
||||
public abstract class ExtendedBlockStorageMixin implements IExtendedBlockStorageMixin {
|
||||
public abstract class ExtendedBlockStorageMixin implements SubChunkBlockHook {
|
||||
@Shadow
|
||||
private int blockRefCount;
|
||||
@Shadow
|
||||
@@ -196,11 +196,6 @@ public abstract class ExtendedBlockStorageMixin implements IExtendedBlockStorage
|
||||
blockMSBArray = data;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clearB2Low() {
|
||||
blockMSBArray = null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public NibbleArray createB2Low() {
|
||||
return (blockMSBArray = new NibbleArray(blockLSBArray.length, 4));
|
||||
@@ -216,11 +211,6 @@ public abstract class ExtendedBlockStorageMixin implements IExtendedBlockStorage
|
||||
b2High = data;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clearB2High() {
|
||||
b2High = null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public NibbleArray createB2High() {
|
||||
return (b2High = new NibbleArray(blockLSBArray.length, 4));
|
||||
@@ -236,11 +226,6 @@ public abstract class ExtendedBlockStorageMixin implements IExtendedBlockStorage
|
||||
b3 = data;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clearB3() {
|
||||
b3 = null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public byte[] createB3() {
|
||||
return b3 = new byte[blockLSBArray.length];
|
||||
@@ -266,11 +251,6 @@ public abstract class ExtendedBlockStorageMixin implements IExtendedBlockStorage
|
||||
this.m1High = m1High;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clearM1High() {
|
||||
m1High = null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public NibbleArray createM1High() {
|
||||
return (m1High = new NibbleArray(blockLSBArray.length, 4));
|
||||
@@ -286,18 +266,13 @@ public abstract class ExtendedBlockStorageMixin implements IExtendedBlockStorage
|
||||
this.m2 = m2;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clearM2() {
|
||||
m2 = null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public byte[] createM2() {
|
||||
return (m2 = new byte[blockLSBArray.length]);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getEBSMSBMask() {
|
||||
public int getBlockMask() {
|
||||
if (blockMSBArray == null) {
|
||||
return 0b00;
|
||||
}
|
||||
@@ -311,7 +286,7 @@ public abstract class ExtendedBlockStorageMixin implements IExtendedBlockStorage
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getEBSMask() {
|
||||
public int getMetadataMask() {
|
||||
if (m1High == null) {
|
||||
return 0b01;
|
||||
}
|
||||
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
package com.falsepattern.endlessids.mixin.mixins.common.entity.vanilla;
|
||||
|
||||
import com.falsepattern.endlessids.constants.ExtendedConstants;
|
||||
import com.falsepattern.endlessids.constants.VanillaConstants;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Shadow;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Constant;
|
||||
import org.spongepowered.asm.mixin.injection.ModifyConstant;
|
||||
import org.spongepowered.asm.mixin.injection.Redirect;
|
||||
|
||||
import net.minecraft.entity.EntityList;
|
||||
|
||||
|
||||
@Mixin(EntityList.class)
|
||||
public abstract class EntityListMixin {
|
||||
|
||||
@ModifyConstant(method = "addMapping(Ljava/lang/Class;Ljava/lang/String;I)V",
|
||||
constant = @Constant(intValue = VanillaConstants.maxEntityID),
|
||||
require = 1)
|
||||
private static int extendRange(int constant) {
|
||||
return ExtendedConstants.maxEntityID;
|
||||
}
|
||||
}
|
||||
+66
@@ -0,0 +1,66 @@
|
||||
package com.falsepattern.endlessids.mixin.mixins.common.entity.vanilla;
|
||||
|
||||
import com.falsepattern.endlessids.constants.ExtendedConstants;
|
||||
import com.falsepattern.endlessids.constants.VanillaConstants;
|
||||
import org.apache.logging.log4j.Level;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Overwrite;
|
||||
import org.spongepowered.asm.mixin.Shadow;
|
||||
import org.spongepowered.asm.mixin.injection.Constant;
|
||||
import org.spongepowered.asm.mixin.injection.ModifyConstant;
|
||||
|
||||
import cpw.mods.fml.common.FMLLog;
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import cpw.mods.fml.common.registry.EntityRegistry;
|
||||
|
||||
import java.util.BitSet;
|
||||
|
||||
@Mixin(value = EntityRegistry.class,
|
||||
remap = false)
|
||||
public abstract class EntityRegistryMixin {
|
||||
@Shadow private BitSet availableIndicies;
|
||||
|
||||
@ModifyConstant(method = "<init>",
|
||||
constant = @Constant(intValue = VanillaConstants.entityIDCount),
|
||||
require = 1)
|
||||
private int extendIDs1(int constant) {
|
||||
return ExtendedConstants.entityIDCount;
|
||||
}
|
||||
|
||||
@ModifyConstant(method = "<init>",
|
||||
constant = @Constant(intValue = VanillaConstants.maxEntityID),
|
||||
require = 1)
|
||||
private int extendIDs2(int constant) {
|
||||
return ExtendedConstants.maxEntityID;
|
||||
}
|
||||
|
||||
/**
|
||||
* @author FalsePattern
|
||||
* @reason Extended IDs
|
||||
*/
|
||||
@Overwrite
|
||||
private int validateAndClaimId(int id) {
|
||||
//Keeping the legacy sub-0 id workaround here...
|
||||
|
||||
// workaround for broken ML
|
||||
int realId = id;
|
||||
if (id < Byte.MIN_VALUE) {
|
||||
realId += 3000;
|
||||
FMLLog.warning("Compensating for modloader out of range compensation by mod : entityId %d for mod %s is now %d", id, Loader.instance().activeModContainer().getModId(), realId);
|
||||
}
|
||||
|
||||
if (realId < 0) {
|
||||
realId += Byte.MAX_VALUE;
|
||||
}
|
||||
|
||||
if ((realId & ~ExtendedConstants.entityIDMask) != 0) {
|
||||
FMLLog.log(Level.ERROR, "The entity ID %d for mod %s is not in the range 1-" + ExtendedConstants.entityIDMask + " and may not work", id, Loader.instance().activeModContainer().getModId());
|
||||
}
|
||||
|
||||
if (!availableIndicies.get(realId)) {
|
||||
FMLLog.severe("The mod %s has attempted to register an entity ID %d which is already reserved. This could cause severe problems", Loader.instance().activeModContainer().getModId(), id);
|
||||
}
|
||||
availableIndicies.clear(realId);
|
||||
return realId;
|
||||
}
|
||||
}
|
||||
+63
@@ -0,0 +1,63 @@
|
||||
package com.falsepattern.endlessids.mixin.mixins.common.entity.vanilla;
|
||||
|
||||
import com.falsepattern.endlessids.constants.ExtendedConstants;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Shadow;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.Redirect;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
|
||||
import net.minecraft.entity.EntityList;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.network.PacketBuffer;
|
||||
import net.minecraft.network.play.server.S0FPacketSpawnMob;
|
||||
|
||||
@Mixin(S0FPacketSpawnMob.class)
|
||||
public abstract class S0FPacketSpawnMobMixin {
|
||||
@Shadow private int field_149040_b;
|
||||
|
||||
@Inject(method = "<init>(Lnet/minecraft/entity/EntityLivingBase;)V",
|
||||
at = @At("RETURN"),
|
||||
require = 1)
|
||||
private void unClampType(EntityLivingBase entity, CallbackInfo ci) {
|
||||
field_149040_b = EntityList.getEntityID(entity);
|
||||
}
|
||||
|
||||
@Redirect(method = "readPacketData",
|
||||
at = @At(value = "INVOKE",
|
||||
target = "Lnet/minecraft/network/PacketBuffer;readByte()B",
|
||||
ordinal = 0),
|
||||
require = 1)
|
||||
private byte noReadByte(PacketBuffer data) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Inject(method = "readPacketData",
|
||||
at = @At(value = "INVOKE",
|
||||
target = "Lnet/minecraft/network/PacketBuffer;readByte()B",
|
||||
ordinal = 0),
|
||||
require = 1)
|
||||
private void readType(PacketBuffer data, CallbackInfo ci) {
|
||||
field_149040_b = data.readShort() & ExtendedConstants.entityIDMask;
|
||||
}
|
||||
|
||||
@Redirect(method = "writePacketData",
|
||||
at = @At(value = "INVOKE",
|
||||
target = "Lnet/minecraft/network/PacketBuffer;writeByte(I)Lio/netty/buffer/ByteBuf;",
|
||||
ordinal = 0),
|
||||
require = 1)
|
||||
private ByteBuf noWriteByte(PacketBuffer data, int theByte) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Inject(method = "writePacketData",
|
||||
at = @At(value = "INVOKE",
|
||||
target = "Lnet/minecraft/network/PacketBuffer;writeByte(I)Lio/netty/buffer/ByteBuf;",
|
||||
ordinal = 0),
|
||||
require = 1)
|
||||
private void writeType(PacketBuffer data, CallbackInfo ci) {
|
||||
data.writeShort(field_149040_b & ExtendedConstants.entityIDMask);
|
||||
}
|
||||
}
|
||||
@@ -215,6 +215,13 @@ public enum Mixin implements IMixin {
|
||||
S1EPacketRemoveEntityEffectMixin(Side.COMMON, condition(() -> GeneralConfig.extendPotion), "potion.vanilla.network.S1EPacketRemoveEntityEffectMixin"),
|
||||
//endregion vanilla
|
||||
//endregion potion
|
||||
//region entity
|
||||
//region vanilla
|
||||
EntityListMixin(Side.COMMON, condition(() -> GeneralConfig.extendEntity), "entity.vanilla.EntityListMixin"),
|
||||
EntityRegistryMixin(Side.COMMON, condition(() -> GeneralConfig.extendEntity), "entity.vanilla.EntityRegistryMixin"),
|
||||
S0FPacketSpawnMobMixin(Side.COMMON, condition(() -> GeneralConfig.extendEntity), "entity.vanilla.S0FPacketSpawnMobMixin"),
|
||||
//endregion vanilla
|
||||
//endregion entity
|
||||
//endregion common
|
||||
|
||||
//region client
|
||||
|
||||
Reference in new issue
Block a user