Update mappings + dependencies

This commit is contained in:
Nicholas Ignoffo 2019-01-31 19:10:37 -08:00
parent 1426e49164
commit 83f0eefa15
147 changed files with 224 additions and 223 deletions

View file

@ -46,7 +46,7 @@ public class GhostItemHelper {
NBTTagCompound tag = newStack.getTagCompound();
int amount = getItemGhostAmount(ghostStack);
tag.removeTag(Constants.NBT.GHOST_STACK_SIZE);
if (tag.hasNoTags()) {
if (tag.isEmpty()) {
newStack.setTagCompound(null);
}
newStack.setCount(amount);

View file

@ -56,7 +56,7 @@ public class ItemStackWrapper {
@Override
public String toString() {
return stackSize + "x" + item.getUnlocalizedName() + "@" + this.meta;
return stackSize + "x" + item.getTranslationKey() + "@" + this.meta;
}
public ItemStack toStack(int count) {

View file

@ -41,6 +41,7 @@ import net.minecraftforge.common.IPlantable;
import net.minecraftforge.common.ISpecialArmor;
import net.minecraftforge.common.ISpecialArmor.ArmorProperties;
import net.minecraftforge.fluids.IFluidBlock;
import net.minecraftforge.fml.common.ObfuscationReflectionHelper;
import net.minecraftforge.fml.relauncher.ReflectionHelper;
import net.minecraftforge.items.CapabilityItemHandler;
import net.minecraftforge.items.IItemHandler;
@ -59,7 +60,7 @@ public class Utils {
static {
try {
Field colorValue = ReflectionHelper.findField(EnumDyeColor.class, "field_193351_w", "colorValue");
Field colorValue = ObfuscationReflectionHelper.findField(EnumDyeColor.class, "field_193351_w");
colorValue.setAccessible(true);
for (EnumDyeColor color : EnumDyeColor.values()) {
DYE_COLOR_VALUES.put(color, (int) colorValue.get(color));
@ -130,7 +131,7 @@ public class Utils {
public static boolean canEntitySeeBlock(World world, Entity entity, BlockPos pos) {
Vec3d relativePosition = new Vec3d(entity.posX - pos.getX() - 0.5, entity.posY + (double) entity.getEyeHeight() - pos.getY() - 0.5, entity.posZ - pos.getZ() - 0.5);
EnumFacing dir = EnumFacing.getFacingFromVector((float) relativePosition.x, (float) relativePosition.y, (float) relativePosition.z);
RayTraceResult result = world.rayTraceBlocks(new Vec3d(entity.posX, entity.posY + (double) entity.getEyeHeight(), entity.posZ), new Vec3d(pos.getX() + 0.5 + dir.getFrontOffsetX() * 0.4, pos.getY() + 0.5 + dir.getFrontOffsetY() * 0.4, pos.getZ() + 0.5 + dir.getFrontOffsetZ() * 0.4), false, true, true);
RayTraceResult result = world.rayTraceBlocks(new Vec3d(entity.posX, entity.posY + (double) entity.getEyeHeight(), entity.posZ), new Vec3d(pos.getX() + 0.5 + dir.getXOffset() * 0.4, pos.getY() + 0.5 + dir.getYOffset() * 0.4, pos.getZ() + 0.5 + dir.getZOffset() * 0.4), false, true, true);
return result == null || pos.equals(result.getBlockPos());
}
@ -967,7 +968,7 @@ public class Utils {
if (player instanceof EntityPlayerMP)
reachDistance = ((EntityPlayerMP) player).interactionManager.getBlockReachDistance();
Vec3d reachPosition = eyePosition.addVector((double) f6 * reachDistance, (double) f5 * reachDistance, (double) f7 * reachDistance);
Vec3d reachPosition = eyePosition.add((double) f6 * reachDistance, (double) f5 * reachDistance, (double) f7 * reachDistance);
return player.getEntityWorld().rayTraceBlocks(eyePosition, reachPosition, useLiquids, !useLiquids, false);
}
}

View file

@ -185,13 +185,13 @@ public class ClientHandler {
// Collect all Blood Magic model errors
List<ResourceLocation> errored = new ArrayList<>();
for (ResourceLocation modelError : modelErrors.keySet())
if (modelError.getResourceDomain().equalsIgnoreCase(BloodMagic.MODID))
if (modelError.getNamespace().equalsIgnoreCase(BloodMagic.MODID))
errored.add(modelError);
// Collect all Blood Magic variant errors
List<ModelResourceLocation> missing = new ArrayList<>();
for (ModelResourceLocation missingVariant : missingVariants)
if (missingVariant.getResourceDomain().equalsIgnoreCase(BloodMagic.MODID))
if (missingVariant.getNamespace().equalsIgnoreCase(BloodMagic.MODID))
missing.add(missingVariant);
// Remove discovered model errors
@ -226,7 +226,7 @@ public class ClientHandler {
if (missingTextures.containsKey(mc)) {
Set<ResourceLocation> missingMCTextures = missingTextures.get(mc);
for (ResourceLocation texture : missingMCTextures)
if (texture.getResourcePath().equalsIgnoreCase(String.format(format, "node")) || texture.getResourcePath().equalsIgnoreCase(String.format(format, "crystal")))
if (texture.getPath().equalsIgnoreCase(String.format(format, "node")) || texture.getPath().equalsIgnoreCase(String.format(format, "crystal")))
toRemove.add(texture);
}