Skip to content

Commit

Permalink
More port errors fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
2piradians committed Nov 10, 2017
1 parent fac2f73 commit 1dbf3f9
Show file tree
Hide file tree
Showing 7 changed files with 248 additions and 205 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ public static ImmutableMap<String, TextureAtlasSprite> getTextures(OBJModel mode
for (String materialName : model.getMatLib().getMaterialNames()) {
Material material = model.getMatLib().getMaterial(materialName);
if (material.getTexture().getTextureLocation().getResourcePath().startsWith("#")) {
FMLLog.severe("OBJLoaderMW: Unresolved texture '%s' for obj model '%s'", material.getTexture().getTextureLocation().getResourcePath(), model.toString());
FMLLog.bigWarning("OBJLoaderMW: Unresolved texture '%s' for obj model '%s'", material.getTexture().getTextureLocation().getResourcePath(), model.toString());
builder.put(materialName, missing);
}
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumFacing;
import net.minecraft.world.World;
import net.minecraftforge.client.model.IPerspectiveAwareModel;
import net.minecraftforge.client.model.obj.OBJModel;
import net.minecraftforge.client.model.obj.OBJModel.OBJBakedModel;
import net.minecraftforge.common.model.IModelState;
Expand All @@ -48,7 +47,7 @@ public ItemOverrideList getOverrides() {
public Pair<? extends IBakedModel, Matrix4f> handlePerspective(TransformType cameraTransformType) {
GlStateManager.shadeModel(GL11.GL_SMOOTH);

Pair<? extends IBakedModel, Matrix4f> ret = IPerspectiveAwareModel.MapWrapper.handlePerspective(this, this.getState(), cameraTransformType);
Pair<? extends IBakedModel, Matrix4f> ret = super.handlePerspective(cameraTransformType);

if (stack != null && stack.getItem() instanceof ItemMWWeapon)
ret = ((ItemMWWeapon)stack.getItem()).preRenderWeapon(entity, stack, cameraTransformType, ret);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ protected ResourceLocation[] getEntityModels() {
protected IModel retexture(int i, IModel model) {
HashMap<String, String> map = Maps.newHashMap();
map.put("#None", new ResourceLocation(Minewatch.MODID, "entity/reinhardt_strike_"+i).toString());
return ModelProcessingHelper.retexture(model, ImmutableMap.copyOf(map));
return model.retexture(ImmutableMap.copyOf(map));
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.Vec3i;
import net.minecraftforge.client.model.IModel;
import net.minecraftforge.client.model.ModelProcessingHelper;
import twopiradians.minewatch.common.Minewatch;
import twopiradians.minewatch.common.entity.EntityWidowmakerMine;
import twopiradians.minewatch.common.util.EntityHelper;
Expand All @@ -37,7 +36,7 @@ protected IModel retexture(int i, IModel model) {
if (i == 2) {
HashMap<String, String> map = Maps.newHashMap();
map.put("#material", new ResourceLocation(Minewatch.MODID, "entity/widowmaker_mine_red").toString());
return ModelProcessingHelper.retexture(model, ImmutableMap.copyOf(map));
return model.retexture(ImmutableMap.copyOf(map));
}
else
return model;
Expand Down
2 changes: 0 additions & 2 deletions src/main/java/twopiradians/minewatch/common/CommonProxy.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import net.minecraft.util.SoundEvent;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.math.Vec3d;
import net.minecraft.world.Explosion;
import net.minecraft.world.World;
import net.minecraftforge.common.MinecraftForge;
Expand Down Expand Up @@ -214,7 +213,6 @@ public void createExplosion(World world, Entity exploder, double x, double y, do
int j1 = MathHelper.floor(z + (double)f3 + 1.0D);
List<Entity> list = world.getEntitiesWithinAABBExcludingEntity(null, new AxisAlignedBB((double)k1, (double)i2, (double)j2, (double)l1, (double)i1, (double)j1));
net.minecraftforge.event.ForgeEventFactory.onExplosionDetonate(world, explosion, list, f3);
Vec3d vec3d = new Vec3d(x, y, z);

for (int k2 = 0; k2 < list.size(); ++k2) {
Entity entity = (Entity)list.get(k2);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ else if (hero.getEquipment(slot) != null)
return true;
}
else if (sender instanceof EntityPlayerMP && args.length == 2 && args[0].equalsIgnoreCase("display")) {
if (NumberUtils.isNumber(args[1]))
if (NumberUtils.isCreatable(args[1]))
Minewatch.network.sendTo(new SPacketSimple(7, (EntityPlayer) sender, Integer.parseInt(args[1]), 0, 0), (EntityPlayerMP) sender);
}
return false;
Expand Down
Loading

0 comments on commit 1dbf3f9

Please sign in to comment.