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')
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 {
publications {
mavenJava(MavenPublication) {

View file

@ -10,17 +10,17 @@
public boolean func_178309_b() {
return this.field_178315_d != null ? this.field_178315_d.func_178309_b() : this.field_178322_i;
}
@@ -90,6 +93,10 @@
private ItemOverrideList func_217646_a(ModelBakery p_217646_1_, BlockModel p_217646_2_) {
@@ -91,6 +94,10 @@
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) {
+ 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() {
Set<ResourceLocation> set = Sets.newHashSet();
@@ -160,25 +167,33 @@
return set1;
}
@ -57,7 +57,7 @@
+ simplebakedmodel$builder.func_177648_a(makeBakedQuad(blockpart, blockpartface, textureatlassprite1, direction, p_217644_4_));
} 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_.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_) {
+ 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;
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]);

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 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); }
}

View file

@ -1,5 +1,14 @@
--- a/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 @@
public void func_147645_c(ResourceLocation 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))) {
- if (sheepentity.func_70089_S() && !sheepentity.func_70892_o() && !sheepentity.func_70631_g_()) {
- 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;
+ if (target.isShearable(p_82487_2_, world, 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();
+ 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_);
if (this.func_184207_aI()) {
@ -165,7 +165,7 @@
this.func_174810_b(p_70020_1_.func_74767_n("Silent"));
this.func_189654_d(p_70020_1_.func_74767_n("NoGravity"));
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("ForgeCaps", 10)) deserializeCaps(p_70020_1_.func_74775_l("ForgeCaps"));
if (p_70020_1_.func_150297_b("Tags", 9)) {
@ -315,12 +315,12 @@
+ this.captureDrops = value;
+ return ret;
+ }
+ private CompoundNBT entityData;
+ private CompoundNBT persistantData;
+ @Override
+ public CompoundNBT getEntityData() {
+ if (entityData == null)
+ entityData = new CompoundNBT();
+ return entityData;
+ public CompoundNBT getPersistantData() {
+ if (persistantData == null)
+ persistantData = new CompoundNBT();
+ return persistantData;
+ }
+ @Override
+ public boolean canTrample(BlockState state, BlockPos pos, float fallDistance) {

View file

@ -226,7 +226,7 @@
+ @Override public double getDragAir() { return dragAir; }
+ @Override public void setDragAir(double value) { dragAir = value; }
+ @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();
+ BlockPos pos = this.getCurrentRailPosition();
+ 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.
+ //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))
+ 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_);
}

View file

@ -140,7 +140,7 @@
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");
@ -189,10 +189,10 @@
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
+ 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.

View file

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

View file

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

View file

@ -328,7 +328,7 @@ public final class ModelLoader extends ModelBakery
}
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_CARROT = tag("crops/carrot");
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> DUSTS = tag("dusts");
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_WOODEN, Tags.Items.CHESTS_WOODEN);
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_CARROT).add(Items.CARROT);
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.DUSTS).add(Tags.Items.DUSTS_GLOWSTONE, Tags.Items.DUSTS_PRISMARINE, Tags.Items.DUSTS_REDSTONE);
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.
* @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.

View file

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

View file

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

View file

@ -589,7 +589,7 @@ public final class TRSRTransformation implements IModelState, ITransformation
}
@Override
public Direction rotate(Direction facing)
public Direction rotateTransform(Direction facing)
{
return rotate(matrix, facing);
}
@ -836,7 +836,7 @@ public final class TRSRTransformation implements IModelState, ITransformation
public TRSRTransformation getUVLockTransform(Direction originalSide)
{
Direction newSide = rotate(originalSide);
Direction newSide = rotateTransform(originalSide);
try
{
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;
import static net.minecraft.util.StringUtils.stripControlCodes;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
@ -75,6 +73,7 @@ import net.minecraftforge.forgespi.language.IModInfo;
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 enum SortType implements Comparator<ModInfo>
{

View file

@ -29,12 +29,11 @@ import net.minecraftforge.fml.MavenVersionStringHelper;
import net.minecraftforge.fml.VersionChecker;
import net.minecraftforge.fml.loading.moddiscovery.ModInfo;
import static net.minecraft.util.StringUtils.stripControlCodes;
import com.mojang.blaze3d.platform.GlStateManager;
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 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);
}

View file

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