mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-26 15:03:04 +00:00
Regenerate patches with relative headers. This should lower conflicts in future PRs.
Convert Forge to use Official mappings. Mojang released their obfuscation mappings but we have not used them up until now due to wanting to get their license to be more explicitly permissive. It is clear that their intent is to allow us to use their names for developing mods like this. See the full wording, and our interpretation here: https://github.com/MinecraftForge/MCPConfig/blob/master/Mojang.md
This commit is contained in:
1 parent
802298d99d
commit
a95b968c13
832 files changed
+4464
-4373
No files matched your search
@@ -55,7 +55,7 @@ public interface IForgeBakedModel
|
||||
return getBakedModel().getQuads(state, side, rand);
|
||||
}
|
||||
|
||||
default boolean isAmbientOcclusion(BlockState state) { return getBakedModel().isAmbientOcclusion(); }
|
||||
default boolean isAmbientOcclusion(BlockState state) { return getBakedModel().useAmbientOcclusion(); }
|
||||
|
||||
/**
|
||||
* Override to tell the new model loader that it shouldn't wrap this model
|
||||
@@ -78,7 +78,7 @@ public interface IForgeBakedModel
|
||||
|
||||
default TextureAtlasSprite getParticleTexture(@Nonnull IModelData data)
|
||||
{
|
||||
return getBakedModel().getParticleTexture();
|
||||
return getBakedModel().getParticleIcon();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -94,6 +94,6 @@ public interface IForgeBakedModel
|
||||
*/
|
||||
default List<Pair<IBakedModel, RenderType>> getLayerModels(ItemStack itemStack, boolean fabulous)
|
||||
{
|
||||
return Collections.singletonList(Pair.of(getBakedModel(), RenderTypeLookup.func_239219_a_(itemStack, fabulous)));
|
||||
return Collections.singletonList(Pair.of(getBakedModel(), RenderTypeLookup.getRenderType(itemStack, fabulous)));
|
||||
}
|
||||
}
|
||||
@@ -37,12 +37,12 @@ public interface IForgeKeybinding
|
||||
*/
|
||||
default boolean isActiveAndMatches(InputMappings.Input keyCode)
|
||||
{
|
||||
return keyCode != InputMappings.INPUT_INVALID && keyCode.equals(getKey()) && getKeyConflictContext().isActive() && getKeyModifier().isActive(getKeyConflictContext());
|
||||
return keyCode != InputMappings.UNKNOWN && keyCode.equals(getKey()) && getKeyConflictContext().isActive() && getKeyModifier().isActive(getKeyConflictContext());
|
||||
}
|
||||
|
||||
default void setToDefault()
|
||||
{
|
||||
setKeyModifierAndCode(getKeyModifierDefault(), getKeyBinding().getDefault());
|
||||
setKeyModifierAndCode(getKeyModifierDefault(), getKeyBinding().getDefaultKey());
|
||||
}
|
||||
|
||||
void setKeyConflictContext(IKeyConflictContext keyConflictContext);
|
||||
|
||||
@@ -40,6 +40,6 @@ public interface IForgeRenderChunk
|
||||
*/
|
||||
default ChunkRenderCache createRegionRenderCache(World world, BlockPos from, BlockPos to, int subtract)
|
||||
{
|
||||
return ChunkRenderCache.generateCache(world, from, to, subtract);
|
||||
return ChunkRenderCache.createIfNotEmpty(world, from, to, subtract);
|
||||
}
|
||||
}
|
||||
+10
-10
@@ -41,17 +41,17 @@ public interface IForgeTransformationMatrix
|
||||
|
||||
default void push(MatrixStack stack)
|
||||
{
|
||||
stack.push();
|
||||
stack.pushPose();
|
||||
|
||||
Vector3f trans = getTransformaion().getTranslation();
|
||||
stack.translate(trans.getX(), trans.getY(), trans.getZ());
|
||||
stack.translate(trans.x(), trans.y(), trans.z());
|
||||
|
||||
stack.rotate(getTransformaion().getRotationLeft());
|
||||
stack.mulPose(getTransformaion().getLeftRotation());
|
||||
|
||||
Vector3f scale = getTransformaion().getScale();
|
||||
stack.scale(scale.getX(), scale.getY(), scale.getZ());
|
||||
stack.scale(scale.x(), scale.y(), scale.z());
|
||||
|
||||
stack.rotate(getTransformaion().getRightRot());
|
||||
stack.mulPose(getTransformaion().getRightRot());
|
||||
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ public interface IForgeTransformationMatrix
|
||||
if (getTransformaion().isIdentity()) return other;
|
||||
if (other.isIdentity()) return getTransformaion();
|
||||
Matrix4f m = getTransformaion().getMatrix();
|
||||
m.mul(other.getMatrix());
|
||||
m.multiply(other.getMatrix());
|
||||
return new TransformationMatrix(m);
|
||||
}
|
||||
|
||||
@@ -85,7 +85,7 @@ public interface IForgeTransformationMatrix
|
||||
|
||||
default Direction rotateTransform(Direction facing)
|
||||
{
|
||||
return Direction.rotateFace(getTransformaion().getMatrix(), facing);
|
||||
return Direction.rotate(getTransformaion().getMatrix(), facing);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -114,11 +114,11 @@ public interface IForgeTransformationMatrix
|
||||
if (transform.isIdentity()) return TransformationMatrix.identity();
|
||||
|
||||
Matrix4f ret = transform.getMatrix();
|
||||
Matrix4f tmp = Matrix4f.makeTranslate(origin.getX(), origin.getY(), origin.getZ());
|
||||
Matrix4f tmp = Matrix4f.createTranslateMatrix(origin.x(), origin.y(), origin.z());
|
||||
ret.multiplyBackward(tmp);
|
||||
tmp.setIdentity();
|
||||
tmp.setTranslation(-origin.getX(), -origin.getY(), -origin.getZ());
|
||||
ret.mul(tmp);
|
||||
tmp.setTranslation(-origin.x(), -origin.y(), -origin.z());
|
||||
ret.multiply(tmp);
|
||||
return new TransformationMatrix(ret);
|
||||
}
|
||||
}
|
||||
@@ -55,16 +55,16 @@ public interface IForgeVertexBuilder
|
||||
|
||||
// Copy of addQuad with alpha support
|
||||
default void addVertexData(MatrixStack.Entry matrixEntry, BakedQuad bakedQuad, float[] baseBrightness, float red, float green, float blue, float alpha, int[] lightmapCoords, int overlayCoords, boolean readExistingColor) {
|
||||
int[] aint = bakedQuad.getVertexData();
|
||||
Vector3i faceNormal = bakedQuad.getFace().getDirectionVec();
|
||||
int[] aint = bakedQuad.getVertices();
|
||||
Vector3i faceNormal = bakedQuad.getDirection().getNormal();
|
||||
Vector3f normal = new Vector3f((float)faceNormal.getX(), (float)faceNormal.getY(), (float)faceNormal.getZ());
|
||||
Matrix4f matrix4f = matrixEntry.getMatrix();
|
||||
normal.transform(matrixEntry.getNormal());
|
||||
Matrix4f matrix4f = matrixEntry.pose();
|
||||
normal.transform(matrixEntry.normal());
|
||||
int intSize = DefaultVertexFormats.BLOCK.getIntegerSize();
|
||||
int vertexCount = aint.length / intSize;
|
||||
|
||||
try (MemoryStack memorystack = MemoryStack.stackPush()) {
|
||||
ByteBuffer bytebuffer = memorystack.malloc(DefaultVertexFormats.BLOCK.getSize());
|
||||
ByteBuffer bytebuffer = memorystack.malloc(DefaultVertexFormats.BLOCK.getVertexSize());
|
||||
IntBuffer intbuffer = bytebuffer.asIntBuffer();
|
||||
|
||||
for(int v = 0; v < vertexCount; ++v) {
|
||||
@@ -98,8 +98,8 @@ public interface IForgeVertexBuilder
|
||||
float f10 = bytebuffer.getFloat(20);
|
||||
Vector4f pos = new Vector4f(f, f1, f2, 1.0F);
|
||||
pos.transform(matrix4f);
|
||||
applyBakedNormals(normal, bytebuffer, matrixEntry.getNormal());
|
||||
((IVertexBuilder)this).addVertex(pos.getX(), pos.getY(), pos.getZ(), cr, cg, cb, ca, f9, f10, overlayCoords, lightmapCoord, normal.getX(), normal.getY(), normal.getZ());
|
||||
applyBakedNormals(normal, bytebuffer, matrixEntry.normal());
|
||||
((IVertexBuilder)this).vertex(pos.x(), pos.y(), pos.z(), cr, cg, cb, ca, f9, f10, overlayCoords, lightmapCoord, normal.x(), normal.y(), normal.z());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user