Fix naming conflicts with official names.

This commit is contained in:
LexManos 2019-09-04 22:33:17 -07:00
parent 4dc34b7d5b
commit e1863383ff
24 changed files with 72 additions and 55 deletions

View File

@ -1144,6 +1144,16 @@ project(':forge') {
tasks.eclipse.dependsOn('genEclipseRuns') tasks.eclipse.dependsOn('genEclipseRuns')
if (project.hasProperty('UPDATE_MAPPINGS')) {
extractRangeMap {
sources sourceSets.test.java.srcDirs
}
applyRangeMap {
sources sourceSets.test.java.srcDirs
}
sourceSets.test.java.srcDirs.each { extractMappedNew.addTarget it }
}
publishing { publishing {
publications { publications {
mavenJava(MavenPublication) { mavenJava(MavenPublication) {

View File

@ -10,17 +10,17 @@
public boolean func_178309_b() { public boolean func_178309_b() {
return this.field_178315_d != null ? this.field_178315_d.func_178309_b() : this.field_178322_i; return this.field_178315_d != null ? this.field_178315_d.func_178309_b() : this.field_178322_i;
} }
@@ -90,6 +93,10 @@ @@ -91,6 +94,10 @@
private ItemOverrideList func_217646_a(ModelBakery p_217646_1_, BlockModel p_217646_2_) {
return this.field_187968_k.isEmpty() ? ItemOverrideList.field_188022_a : new ItemOverrideList(p_217646_1_, p_217646_2_, p_217646_1_::func_209597_a, this.field_187968_k); return this.field_187968_k.isEmpty() ? ItemOverrideList.field_188022_a : new ItemOverrideList(p_217646_1_, p_217646_2_, p_217646_1_::func_209597_a, this.field_187968_k);
} }
+
+ public ItemOverrideList getOverrides(ModelBakery p_217646_1_, BlockModel p_217646_2_, Function<ResourceLocation, TextureAtlasSprite> textureGetter, net.minecraft.client.renderer.vertex.VertexFormat format) { + public ItemOverrideList getOverrides(ModelBakery p_217646_1_, BlockModel p_217646_2_, Function<ResourceLocation, TextureAtlasSprite> textureGetter, net.minecraft.client.renderer.vertex.VertexFormat format) {
+ return this.field_187968_k.isEmpty() ? ItemOverrideList.field_188022_a : new ItemOverrideList(p_217646_1_, p_217646_2_, p_217646_1_::func_209597_a, textureGetter, this.field_187968_k, format); + return this.field_187968_k.isEmpty() ? ItemOverrideList.field_188022_a : new ItemOverrideList(p_217646_1_, p_217646_2_, p_217646_1_::func_209597_a, textureGetter, this.field_187968_k, format);
+ } + }
+
public Collection<ResourceLocation> func_187965_e() { public Collection<ResourceLocation> func_187965_e() {
Set<ResourceLocation> set = Sets.newHashSet(); Set<ResourceLocation> set = Sets.newHashSet();
@@ -160,25 +167,33 @@ @@ -160,25 +167,33 @@
return set1; return set1;
} }
@ -38,7 +38,7 @@
public IBakedModel func_217644_a(ModelBakery p_217644_1_, BlockModel p_217644_2_, Function<ResourceLocation, TextureAtlasSprite> p_217644_3_, ISprite p_217644_4_) { public IBakedModel func_217644_a(ModelBakery p_217644_1_, BlockModel p_217644_2_, Function<ResourceLocation, TextureAtlasSprite> p_217644_3_, ISprite p_217644_4_) {
+ return bake(p_217644_1_, p_217644_2_, p_217644_3_, p_217644_4_, net.minecraft.client.renderer.vertex.DefaultVertexFormats.field_176599_b); + return bake(p_217644_1_, p_217644_2_, p_217644_3_, p_217644_4_, net.minecraft.client.renderer.vertex.DefaultVertexFormats.field_176599_b);
+ } + }
+ +
+ public IBakedModel bake(ModelBakery p_217644_1_, BlockModel p_217644_2_, Function<ResourceLocation, TextureAtlasSprite> p_217644_3_, ISprite p_217644_4_, net.minecraft.client.renderer.vertex.VertexFormat format) { + public IBakedModel bake(ModelBakery p_217644_1_, BlockModel p_217644_2_, Function<ResourceLocation, TextureAtlasSprite> p_217644_3_, ISprite p_217644_4_, net.minecraft.client.renderer.vertex.VertexFormat format) {
TextureAtlasSprite textureatlassprite = p_217644_3_.apply(new ResourceLocation(this.func_178308_c("particle"))); TextureAtlasSprite textureatlassprite = p_217644_3_.apply(new ResourceLocation(this.func_178308_c("particle")));
if (this.func_178310_f() == ModelBakery.field_177616_r) { if (this.func_178310_f() == ModelBakery.field_177616_r) {
@ -57,7 +57,7 @@
+ simplebakedmodel$builder.func_177648_a(makeBakedQuad(blockpart, blockpartface, textureatlassprite1, direction, p_217644_4_)); + simplebakedmodel$builder.func_177648_a(makeBakedQuad(blockpart, blockpartface, textureatlassprite1, direction, p_217644_4_));
} else { } else {
- simplebakedmodel$builder.func_177650_a(p_217644_4_.func_188048_b().func_177523_a(blockpartface.field_178244_b), func_217645_a(blockpart, blockpartface, textureatlassprite1, direction, p_217644_4_)); - simplebakedmodel$builder.func_177650_a(p_217644_4_.func_188048_b().func_177523_a(blockpartface.field_178244_b), func_217645_a(blockpart, blockpartface, textureatlassprite1, direction, p_217644_4_));
+ simplebakedmodel$builder.func_177650_a(p_217644_4_.getState().apply(java.util.Optional.empty()).map(trsr -> trsr.rotate(blockpartface.field_178244_b)).orElse(blockpartface.field_178244_b), makeBakedQuad(blockpart, blockpartface, textureatlassprite1, direction, p_217644_4_)); + simplebakedmodel$builder.func_177650_a(p_217644_4_.getState().apply(java.util.Optional.empty()).map(trsr -> trsr.rotateTransform(blockpartface.field_178244_b)).orElse(blockpartface.field_178244_b), makeBakedQuad(blockpart, blockpartface, textureatlassprite1, direction, p_217644_4_));
} }
} }
} }

View File

@ -60,7 +60,7 @@
+ } + }
+ +
+ private void fillVertexData(int[] p_188015_1_, int p_188015_2_, Direction p_188015_3_, BlockFaceUV p_188015_4_, float[] p_188015_5_, TextureAtlasSprite p_188015_6_, net.minecraftforge.common.model.ITransformation p_188015_7_, @Nullable BlockPartRotation p_188015_8_, boolean p_188015_9_) { + private void fillVertexData(int[] p_188015_1_, int p_188015_2_, Direction p_188015_3_, BlockFaceUV p_188015_4_, float[] p_188015_5_, TextureAtlasSprite p_188015_6_, net.minecraftforge.common.model.ITransformation p_188015_7_, @Nullable BlockPartRotation p_188015_8_, boolean p_188015_9_) {
+ Direction direction = p_188015_7_.rotate(p_188015_3_); + Direction direction = p_188015_7_.rotateTransform(p_188015_3_);
int i = p_188015_9_ ? this.func_178413_a(direction) : -1; int i = p_188015_9_ ? this.func_178413_a(direction) : -1;
FaceDirection.VertexInformation facedirection$vertexinformation = FaceDirection.func_179027_a(p_188015_3_).func_179025_a(p_188015_2_); FaceDirection.VertexInformation facedirection$vertexinformation = FaceDirection.func_179027_a(p_188015_3_).func_179025_a(p_188015_2_);
Vector3f vector3f = new Vector3f(p_188015_5_[facedirection$vertexinformation.field_179184_a], p_188015_5_[facedirection$vertexinformation.field_179182_b], p_188015_5_[facedirection$vertexinformation.field_179183_c]); Vector3f vector3f = new Vector3f(p_188015_5_[facedirection$vertexinformation.field_179184_a], p_188015_5_[facedirection$vertexinformation.field_179182_b], p_188015_5_[facedirection$vertexinformation.field_179183_c]);

View File

@ -16,6 +16,6 @@
+ +
+ public java.util.Optional<net.minecraftforge.common.model.TRSRTransformation> apply(java.util.Optional<? extends net.minecraftforge.common.model.IModelPart> part) { return net.minecraftforge.client.ForgeHooksClient.applyTransform(this, part); } + public java.util.Optional<net.minecraftforge.common.model.TRSRTransformation> apply(java.util.Optional<? extends net.minecraftforge.common.model.IModelPart> part) { return net.minecraftforge.client.ForgeHooksClient.applyTransform(this, part); }
+ public javax.vecmath.Matrix4f getMatrixVec() { return net.minecraftforge.common.model.TRSRTransformation.from(this).getMatrixVec(); } + public javax.vecmath.Matrix4f getMatrixVec() { return net.minecraftforge.common.model.TRSRTransformation.from(this).getMatrixVec(); }
+ public Direction rotate(Direction facing) { return func_177523_a(facing); } + public Direction rotateTransform(Direction facing) { return func_177523_a(facing); }
+ public int rotate(Direction facing, int vertexIndex) { return func_177520_a(facing, vertexIndex); } + public int rotate(Direction facing, int vertexIndex) { return func_177520_a(facing, vertexIndex); }
} }

View File

@ -1,5 +1,14 @@
--- a/net/minecraft/client/renderer/texture/TextureManager.java --- a/net/minecraft/client/renderer/texture/TextureManager.java
+++ b/net/minecraft/client/renderer/texture/TextureManager.java +++ b/net/minecraft/client/renderer/texture/TextureManager.java
@@ -49,7 +49,7 @@
}
public boolean func_110580_a(ResourceLocation p_110580_1_, ITickableTextureObject p_110580_2_) {
- if (this.func_110579_a(p_110580_1_, p_110580_2_)) {
+ if (this.func_110579_a(p_110580_1_, (ITextureObject)p_110580_2_)) { //TODO: Move to MCPConfig
this.field_110583_b.add(p_110580_2_);
return true;
} else {
@@ -125,6 +125,7 @@ @@ -125,6 +125,7 @@
public void func_147645_c(ResourceLocation p_147645_1_) { public void func_147645_c(ResourceLocation p_147645_1_) {
ITextureObject itextureobject = this.func_110581_b(p_147645_1_); ITextureObject itextureobject = this.func_110581_b(p_147645_1_);

View File

@ -14,7 +14,7 @@
- for(SheepEntity sheepentity : world.func_217357_a(SheepEntity.class, new AxisAlignedBB(blockpos))) { - for(SheepEntity sheepentity : world.func_217357_a(SheepEntity.class, new AxisAlignedBB(blockpos))) {
- if (sheepentity.func_70089_S() && !sheepentity.func_70892_o() && !sheepentity.func_70631_g_()) { - if (sheepentity.func_70089_S() && !sheepentity.func_70892_o() && !sheepentity.func_70631_g_()) {
- sheepentity.func_213612_dV(); - sheepentity.func_213612_dV();
+ for(net.minecraft.entity.Entity entity : world.func_175674_a(null, new AxisAlignedBB(blockpos), e -> !e.func_175149_v() && e instanceof net.minecraftforge.common.IShearable)) { + for(net.minecraft.entity.Entity entity : world.func_175674_a((net.minecraft.entity.Entity)null, new AxisAlignedBB(blockpos), e -> !e.func_175149_v() && e instanceof net.minecraftforge.common.IShearable)) {
+ net.minecraftforge.common.IShearable target = (net.minecraftforge.common.IShearable)entity; + net.minecraftforge.common.IShearable target = (net.minecraftforge.common.IShearable)entity;
+ if (target.isShearable(p_82487_2_, world, blockpos)) { + if (target.isShearable(p_82487_2_, world, blockpos)) {
+ java.util.List<ItemStack> drops = target.onSheared(p_82487_2_, entity.field_70170_p, blockpos, + java.util.List<ItemStack> drops = target.onSheared(p_82487_2_, entity.field_70170_p, blockpos,

View File

@ -156,7 +156,7 @@
+ CompoundNBT caps = serializeCaps(); + CompoundNBT caps = serializeCaps();
+ if (caps != null) p_189511_1_.func_218657_a("ForgeCaps", caps); + if (caps != null) p_189511_1_.func_218657_a("ForgeCaps", caps);
+ if (entityData != null) p_189511_1_.func_218657_a("ForgeData", entityData); + if (persistantData != null) p_189511_1_.func_218657_a("ForgeData", persistantData);
+ +
this.func_213281_b(p_189511_1_); this.func_213281_b(p_189511_1_);
if (this.func_184207_aI()) { if (this.func_184207_aI()) {
@ -165,7 +165,7 @@
this.func_174810_b(p_70020_1_.func_74767_n("Silent")); this.func_174810_b(p_70020_1_.func_74767_n("Silent"));
this.func_189654_d(p_70020_1_.func_74767_n("NoGravity")); this.func_189654_d(p_70020_1_.func_74767_n("NoGravity"));
this.func_184195_f(p_70020_1_.func_74767_n("Glowing")); this.func_184195_f(p_70020_1_.func_74767_n("Glowing"));
+ if (p_70020_1_.func_150297_b("ForgeData", 10)) entityData = p_70020_1_.func_74775_l("ForgeData"); + if (p_70020_1_.func_150297_b("ForgeData", 10)) persistantData = p_70020_1_.func_74775_l("ForgeData");
+ if (p_70020_1_.func_150297_b("CanUpdate", 99)) this.canUpdate(p_70020_1_.func_74767_n("CanUpdate")); + if (p_70020_1_.func_150297_b("CanUpdate", 99)) this.canUpdate(p_70020_1_.func_74767_n("CanUpdate"));
+ if (p_70020_1_.func_150297_b("ForgeCaps", 10)) deserializeCaps(p_70020_1_.func_74775_l("ForgeCaps")); + if (p_70020_1_.func_150297_b("ForgeCaps", 10)) deserializeCaps(p_70020_1_.func_74775_l("ForgeCaps"));
if (p_70020_1_.func_150297_b("Tags", 9)) { if (p_70020_1_.func_150297_b("Tags", 9)) {
@ -315,12 +315,12 @@
+ this.captureDrops = value; + this.captureDrops = value;
+ return ret; + return ret;
+ } + }
+ private CompoundNBT entityData; + private CompoundNBT persistantData;
+ @Override + @Override
+ public CompoundNBT getEntityData() { + public CompoundNBT getPersistantData() {
+ if (entityData == null) + if (persistantData == null)
+ entityData = new CompoundNBT(); + persistantData = new CompoundNBT();
+ return entityData; + return persistantData;
+ } + }
+ @Override + @Override
+ public boolean canTrample(BlockState state, BlockPos pos, float fallDistance) { + public boolean canTrample(BlockState state, BlockPos pos, float fallDistance) {

View File

@ -226,7 +226,7 @@
+ @Override public double getDragAir() { return dragAir; } + @Override public double getDragAir() { return dragAir; }
+ @Override public void setDragAir(double value) { dragAir = value; } + @Override public void setDragAir(double value) { dragAir = value; }
+ @Override + @Override
+ public double getMaxSpeed() { //Non-default because getMaximumSpeed is protected + public double getMaxSpeedWithRail() { //Non-default because getMaximumSpeed is protected
+ if (!canUseRail()) return func_174898_m(); + if (!canUseRail()) return func_174898_m();
+ BlockPos pos = this.getCurrentRailPosition(); + BlockPos pos = this.getCurrentRailPosition();
+ BlockState state = getMinecart().field_70170_p.func_180495_p(pos); + BlockState state = getMinecart().field_70170_p.func_180495_p(pos);

View File

@ -116,9 +116,9 @@
+ +
+ //Copy over a section of the Entity Data from the old player. + //Copy over a section of the Entity Data from the old player.
+ //Allows mods to specify data that persists after players respawn. + //Allows mods to specify data that persists after players respawn.
+ CompoundNBT old = p_193104_1_.getEntityData(); + CompoundNBT old = p_193104_1_.getPersistantData();
+ if (old.func_74764_b(PERSISTED_NBT_TAG)) + if (old.func_74764_b(PERSISTED_NBT_TAG))
+ getEntityData().func_218657_a(PERSISTED_NBT_TAG, old.func_74781_a(PERSISTED_NBT_TAG)); + getPersistantData().func_218657_a(PERSISTED_NBT_TAG, old.func_74781_a(PERSISTED_NBT_TAG));
+ net.minecraftforge.event.ForgeEventFactory.onPlayerClone(this, p_193104_1_, !p_193104_2_); + net.minecraftforge.event.ForgeEventFactory.onPlayerClone(this, p_193104_1_, !p_193104_2_);
} }

View File

@ -140,7 +140,7 @@
this.field_71304_b.func_76319_b(); this.field_71304_b.func_76319_b();
this.field_71304_b.func_76319_b(); this.field_71304_b.func_76319_b();
} }
+ tickTimes.computeIfAbsent(serverworld.func_201675_m().func_186058_p(), k -> new long[100])[this.field_71315_w % 100] = Util.func_211178_c() - tickStart; + perWorldTickTimes.computeIfAbsent(serverworld.func_201675_m().func_186058_p(), k -> new long[100])[this.field_71315_w % 100] = Util.func_211178_c() - tickStart;
} }
+ this.field_71304_b.func_219895_b("dim_unloading"); + this.field_71304_b.func_219895_b("dim_unloading");
@ -189,10 +189,10 @@
public abstract boolean func_213199_b(GameProfile p_213199_1_); public abstract boolean func_213199_b(GameProfile p_213199_1_);
+ private Map<DimensionType, long[]> tickTimes = Maps.newIdentityHashMap(); + private Map<DimensionType, long[]> perWorldTickTimes = Maps.newIdentityHashMap();
+ @Nullable + @Nullable
+ public long[] getTickTime(DimensionType dim) { + public long[] getTickTime(DimensionType dim) {
+ return tickTimes.get(dim); + return perWorldTickTimes.get(dim);
+ } + }
+ +
+ @Deprecated //Forge Internal use Only, You can screw up a lot of things if you mess with this map. + @Deprecated //Forge Internal use Only, You can screw up a lot of things if you mess with this map.

View File

@ -4,7 +4,7 @@
"#forge:crops/beetroot", "#forge:crops/beetroot",
"#forge:crops/carrot", "#forge:crops/carrot",
"#forge:crops/nether_wart", "#forge:crops/nether_wart",
"#forge:crops/potatoe", "#forge:crops/potato",
"#forge:crops/wheat" "#forge:crops/wheat"
] ]
} }

View File

@ -1,21 +1,21 @@
{ {
"replace": false, "replace": false,
"values": [ "values": [
"#forge:dyes/black", "minecraft:white_dye",
"#forge:dyes/red", "minecraft:orange_dye",
"#forge:dyes/green", "minecraft:magenta_dye",
"#forge:dyes/brown", "minecraft:light_blue_dye",
"#forge:dyes/blue", "minecraft:yellow_dye",
"#forge:dyes/purple", "minecraft:lime_dye",
"#forge:dyes/cyan", "minecraft:pink_dye",
"#forge:dyes/light_gray", "minecraft:gray_dye",
"#forge:dyes/gray", "minecraft:light_gray_dye",
"#forge:dyes/pink", "minecraft:cyan_dye",
"#forge:dyes/lime", "minecraft:purple_dye",
"#forge:dyes/yellow", "minecraft:blue_dye",
"#forge:dyes/light_blue", "minecraft:brown_dye",
"#forge:dyes/magenta", "minecraft:green_dye",
"#forge:dyes/orange", "minecraft:red_dye",
"#forge:dyes/white" "minecraft:black_dye"
] ]
} }

View File

@ -328,7 +328,7 @@ public final class ModelLoader extends ModelBakery
} }
else else
{ {
builder.addFaceQuad(baseState.rotate(e.getValue().cullFace), BlockModel.makeBakedQuad(part, e.getValue(), textureatlassprite1, e.getKey(), new BasicState(transformation, uvLocked))); builder.addFaceQuad(baseState.rotateTransform(e.getValue().cullFace), BlockModel.makeBakedQuad(part, e.getValue(), textureatlassprite1, e.getKey(), new BasicState(transformation, uvLocked)));
} }
} }
} }

View File

@ -132,7 +132,7 @@ public class Tags
public static final Tag<Item> CROPS_BEETROOT = tag("crops/beetroot"); public static final Tag<Item> CROPS_BEETROOT = tag("crops/beetroot");
public static final Tag<Item> CROPS_CARROT = tag("crops/carrot"); public static final Tag<Item> CROPS_CARROT = tag("crops/carrot");
public static final Tag<Item> CROPS_NETHER_WART = tag("crops/nether_wart"); public static final Tag<Item> CROPS_NETHER_WART = tag("crops/nether_wart");
public static final Tag<Item> CROPS_POTATOE = tag("crops/potatoe"); public static final Tag<Item> CROPS_POTATO = tag("crops/potato");
public static final Tag<Item> CROPS_WHEAT = tag("crops/wheat"); public static final Tag<Item> CROPS_WHEAT = tag("crops/wheat");
public static final Tag<Item> DUSTS = tag("dusts"); public static final Tag<Item> DUSTS = tag("dusts");
public static final Tag<Item> DUSTS_PRISMARINE = tag("dusts/prismarine"); public static final Tag<Item> DUSTS_PRISMARINE = tag("dusts/prismarine");

View File

@ -59,11 +59,11 @@ public class ForgeItemTagsProvider extends ItemTagsProvider
copy(Tags.Blocks.CHESTS_TRAPPED, Tags.Items.CHESTS_TRAPPED); copy(Tags.Blocks.CHESTS_TRAPPED, Tags.Items.CHESTS_TRAPPED);
copy(Tags.Blocks.CHESTS_WOODEN, Tags.Items.CHESTS_WOODEN); copy(Tags.Blocks.CHESTS_WOODEN, Tags.Items.CHESTS_WOODEN);
copy(Tags.Blocks.COBBLESTONE, Tags.Items.COBBLESTONE); copy(Tags.Blocks.COBBLESTONE, Tags.Items.COBBLESTONE);
getBuilder(Tags.Items.CROPS).add(Tags.Items.CROPS_BEETROOT, Tags.Items.CROPS_CARROT, Tags.Items.CROPS_NETHER_WART, Tags.Items.CROPS_POTATOE, Tags.Items.CROPS_WHEAT); getBuilder(Tags.Items.CROPS).add(Tags.Items.CROPS_BEETROOT, Tags.Items.CROPS_CARROT, Tags.Items.CROPS_NETHER_WART, Tags.Items.CROPS_POTATO, Tags.Items.CROPS_WHEAT);
getBuilder(Tags.Items.CROPS_BEETROOT).add(Items.BEETROOT); getBuilder(Tags.Items.CROPS_BEETROOT).add(Items.BEETROOT);
getBuilder(Tags.Items.CROPS_CARROT).add(Items.CARROT); getBuilder(Tags.Items.CROPS_CARROT).add(Items.CARROT);
getBuilder(Tags.Items.CROPS_NETHER_WART).add(Items.NETHER_WART); getBuilder(Tags.Items.CROPS_NETHER_WART).add(Items.NETHER_WART);
getBuilder(Tags.Items.CROPS_POTATOE).add(Items.POTATO); getBuilder(Tags.Items.CROPS_POTATO).add(Items.POTATO);
getBuilder(Tags.Items.CROPS_WHEAT).add(Items.WHEAT); getBuilder(Tags.Items.CROPS_WHEAT).add(Items.WHEAT);
getBuilder(Tags.Items.DUSTS).add(Tags.Items.DUSTS_GLOWSTONE, Tags.Items.DUSTS_PRISMARINE, Tags.Items.DUSTS_REDSTONE); getBuilder(Tags.Items.DUSTS).add(Tags.Items.DUSTS_GLOWSTONE, Tags.Items.DUSTS_PRISMARINE, Tags.Items.DUSTS_REDSTONE);
getBuilder(Tags.Items.DUSTS_GLOWSTONE).add(Items.GLOWSTONE_DUST); getBuilder(Tags.Items.DUSTS_GLOWSTONE).add(Items.GLOWSTONE_DUST);

View File

@ -74,7 +74,7 @@ public interface IForgeEntity extends ICapabilitySerializable<CompoundNBT>
* It will be written, and read from disc, so it persists over world saves. * It will be written, and read from disc, so it persists over world saves.
* @return A NBTTagCompound * @return A NBTTagCompound
*/ */
CompoundNBT getEntityData(); CompoundNBT getPersistantData();
/** /**
* Used in model rendering to determine if the entity riding this entity should be in the 'sitting' position. * Used in model rendering to determine if the entity riding this entity should be in the 'sitting' position.

View File

@ -62,7 +62,7 @@ public interface IForgeEntityMinecart
return pos; return pos;
} }
double getMaxSpeed(); double getMaxSpeedWithRail();
/** /**
* Moved to allow overrides. * Moved to allow overrides.

View File

@ -31,7 +31,7 @@ public interface ITransformation
{ {
Matrix4f getMatrixVec(); Matrix4f getMatrixVec();
Direction rotate(Direction facing); Direction rotateTransform(Direction facing);
int rotate(Direction facing, int vertexIndex); int rotate(Direction facing, int vertexIndex);
} }

View File

@ -589,7 +589,7 @@ public final class TRSRTransformation implements IModelState, ITransformation
} }
@Override @Override
public Direction rotate(Direction facing) public Direction rotateTransform(Direction facing)
{ {
return rotate(matrix, facing); return rotate(matrix, facing);
} }
@ -836,7 +836,7 @@ public final class TRSRTransformation implements IModelState, ITransformation
public TRSRTransformation getUVLockTransform(Direction originalSide) public TRSRTransformation getUVLockTransform(Direction originalSide)
{ {
Direction newSide = rotate(originalSide); Direction newSide = rotateTransform(originalSide);
try try
{ {
return blockCenterToCorner(vanillaUvTransformGlobalToLocal.get(originalSide).compose(blockCornerToCenter(this.inverse())).compose(vanillaUvTransformLocalToGlobal.get(newSide))); return blockCenterToCorner(vanillaUvTransformGlobalToLocal.get(originalSide).compose(blockCornerToCenter(this.inverse())).compose(vanillaUvTransformLocalToGlobal.get(newSide)));

View File

@ -19,8 +19,6 @@
package net.minecraftforge.fml.client.gui; package net.minecraftforge.fml.client.gui;
import static net.minecraft.util.StringUtils.stripControlCodes;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import java.util.ArrayList; import java.util.ArrayList;
@ -75,6 +73,7 @@ import net.minecraftforge.forgespi.language.IModInfo;
public class GuiModList extends Screen public class GuiModList extends Screen
{ {
private static String stripControlCodes(String value) { return net.minecraft.util.StringUtils.stripControlCodes(value); }
private static final Logger LOGGER = LogManager.getLogger(); private static final Logger LOGGER = LogManager.getLogger();
private enum SortType implements Comparator<ModInfo> private enum SortType implements Comparator<ModInfo>
{ {
@ -172,7 +171,7 @@ public class GuiModList extends Screen
} }
@Override @Override
public int getContentHeight() public int getContentHeight()
{ {
int height = 50; int height = 50;
height += (lines.size() * font.FONT_HEIGHT); height += (lines.size() * font.FONT_HEIGHT);

View File

@ -29,12 +29,11 @@ import net.minecraftforge.fml.MavenVersionStringHelper;
import net.minecraftforge.fml.VersionChecker; import net.minecraftforge.fml.VersionChecker;
import net.minecraftforge.fml.loading.moddiscovery.ModInfo; import net.minecraftforge.fml.loading.moddiscovery.ModInfo;
import static net.minecraft.util.StringUtils.stripControlCodes;
import com.mojang.blaze3d.platform.GlStateManager; import com.mojang.blaze3d.platform.GlStateManager;
public class GuiSlotModList extends ExtendedList<GuiSlotModList.ModEntry> public class GuiSlotModList extends ExtendedList<GuiSlotModList.ModEntry>
{ {
private static String stripControlCodes(String value) { return net.minecraft.util.StringUtils.stripControlCodes(value); }
private static final ResourceLocation VERSION_CHECK_ICONS = new ResourceLocation(ForgeVersion.MOD_ID, "textures/gui/version_check_icons.png"); private static final ResourceLocation VERSION_CHECK_ICONS = new ResourceLocation(ForgeVersion.MOD_ID, "textures/gui/version_check_icons.png");
private final int listWidth; private final int listWidth;

View File

@ -73,7 +73,7 @@ public interface ICustomPacket<T extends IPacket<?>> {
} }
} }
default PacketBuffer getData() { default PacketBuffer getInternalData() {
return Fields.lookup.get(this.getClass()).data.map(f->UnsafeHacks.<PacketBuffer>getField(f, this)).orElse(null); return Fields.lookup.get(this.getClass()).data.map(f->UnsafeHacks.<PacketBuffer>getField(f, this)).orElse(null);
} }

View File

@ -46,7 +46,7 @@ public class NetworkEvent extends Event
private NetworkEvent(final ICustomPacket<?> payload, final Supplier<Context> source) private NetworkEvent(final ICustomPacket<?> payload, final Supplier<Context> source)
{ {
this.payload = payload.getData(); this.payload = payload.getInternalData();
this.source = source; this.source = source;
this.loginIndex = payload.getIndex(); this.loginIndex = payload.getIndex();
} }