Update mappings to stable_39-1.12 (#322)

This commit is contained in:
zeng-git
2023-11-08 05:21:59 +08:00
committed by GitHub
parent ba9b790a02
commit 4484863452
88 changed files with 239 additions and 212 deletions
@@ -47,7 +47,7 @@ public class TesrRenderHelper {
* at the center of a block.
*/
public static void moveToFace(EnumFacing face) {
GlStateManager.translate(face.getFrontOffsetX() * 0.50, face.getFrontOffsetY() * 0.50, face.getFrontOffsetZ() * 0.50);
GlStateManager.translate(face.getXOffset() * 0.50, face.getYOffset() * 0.50, face.getZOffset() * 0.50);
}
/**
@@ -398,7 +398,7 @@ public class CubeBuilder {
builder.put(i, x, y, z);
break;
case NORMAL:
builder.put(i, face.getFrontOffsetX(), face.getFrontOffsetY(), face.getFrontOffsetZ());
builder.put(i, face.getXOffset(), face.getYOffset(), face.getZOffset());
break;
case COLOR:
// Color format is RGBA
@@ -72,7 +72,7 @@ public class QuadRotator {
// Figure out where the position is in the array
VertexFormat format = quad.getFormat();
int posIdx = this.findPositionOffset(format) / 4;
int stride = format.getNextOffset() / 4;
int stride = format.getSize() / 4;
int normalIdx = format.getNormalOffset();
VertexFormatElement.EnumType normalType = null;
// Figure out the type of the normals
@@ -43,16 +43,16 @@ public class BuiltInModelLoader implements ICustomModelLoader {
@Override
public boolean accepts(ResourceLocation modelLocation) {
if (!modelLocation.getResourceDomain().equals(AppEng.MOD_ID)) {
if (!modelLocation.getNamespace().equals(AppEng.MOD_ID)) {
return false;
}
return this.builtInModels.containsKey(modelLocation.getResourcePath());
return this.builtInModels.containsKey(modelLocation.getPath());
}
@Override
public IModel loadModel(ResourceLocation modelLocation) throws Exception {
return this.builtInModels.get(modelLocation.getResourcePath());
return this.builtInModels.get(modelLocation.getPath());
}
@Override
@@ -137,14 +137,14 @@ public enum UVLModelLoader implements ICustomModelLoader {
@Override
public boolean accepts(ResourceLocation modelLocation) {
String modelPath = modelLocation.getResourcePath();
if (modelLocation.getResourcePath().startsWith("models/")) {
String modelPath = modelLocation.getPath();
if (modelLocation.getPath().startsWith("models/")) {
modelPath = modelPath.substring("models/".length());
}
try (InputStreamReader io = new InputStreamReader(Minecraft.getMinecraft()
.getResourceManager()
.getResource(new ResourceLocation(modelLocation.getResourceDomain(), "models/" + modelPath + ".json"))
.getResource(new ResourceLocation(modelLocation.getNamespace(), "models/" + modelPath + ".json"))
.getInputStream())) {
return gson.fromJson(io, UVLMarker.class).ae2_uvl_marker;
} catch (Exception e) {
@@ -174,11 +174,11 @@ public enum UVLModelLoader implements ICustomModelLoader {
private final IModel parent;
public UVLModelWrapper(ResourceLocation modelLocation) {
String modelPath = modelLocation.getResourcePath();
if (modelLocation.getResourcePath().startsWith("models/")) {
String modelPath = modelLocation.getPath();
if (modelLocation.getPath().startsWith("models/")) {
modelPath = modelPath.substring("models/".length());
}
ResourceLocation armatureLocation = new ResourceLocation(modelLocation.getResourceDomain(), "armatures/" + modelPath + ".json");
ResourceLocation armatureLocation = new ResourceLocation(modelLocation.getNamespace(), "armatures/" + modelPath + ".json");
ModelBlockAnimation animation = ModelBlockAnimation.loadVanillaAnimation(UVLModelLoader.this.resourceManager, armatureLocation);
ModelBlock model;
{
@@ -187,12 +187,12 @@ public enum UVLModelLoader implements ICustomModelLoader {
ModelBlock lvt_5_1_ = null;
try {
String s = modelLocation.getResourcePath();
String s = modelLocation.getPath();
iresource = Minecraft.getMinecraft()
.getResourceManager()
.getResource(
new ResourceLocation(modelLocation.getResourceDomain(), "models/" + modelPath + ".json"));
new ResourceLocation(modelLocation.getNamespace(), "models/" + modelPath + ".json"));
reader = new InputStreamReader(iresource.getInputStream(), Charsets.UTF_8);
lvt_5_1_ = JsonUtils.gsonDeserialize(this.UVLSERIALIZER, reader, ModelBlock.class, false);
@@ -41,7 +41,7 @@ public class SpatialPylonRendering extends BlockRenderingCustomizer {
@Override
@SideOnly(Side.CLIENT)
public void customize(IBlockRendering rendering, IItemRendering itemRendering) {
rendering.builtInModel(MODEL_ID.getResourcePath(), new SpatialPylonModel());
rendering.builtInModel(MODEL_ID.getPath(), new SpatialPylonModel());
rendering.stateMapper(this::mapState);
}