Some more forge code fixes

This commit is contained in:
cpw committed 2016-03-08 16:23:54 -05:00
1 parent befbb45522
commit fffbc0f078
4 files changed
+14 -6

No files matched your search

@@ -142,7 +142,7 @@ public class MultiModel implements IModel
{
quads.addAll(bakedPart.func_188616_a(null, null, 0));
}
builder.put(Optional.absent(), quads.build());
builder.put(Optional.<EnumFacing>absent(), quads.build());
this.quads = builder.build();
}
return quads.get(Optional.fromNullable(side));
@@ -1,5 +1,7 @@
package net.minecraftforge.common;
import com.google.common.base.Optional;
import net.minecraft.network.datasync.DataSerializers;
import net.minecraftforge.fml.common.FMLLog;
import net.minecraftforge.fml.common.eventhandler.EventPriority;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
@@ -25,7 +27,7 @@ public class ForgeInternalHandler
Entity entity = event.entity;
if (entity.getClass().equals(EntityItem.class))
{
ItemStack stack = entity.getDataWatcher().getWatchableObjectItemStack(10);
ItemStack stack = ((EntityItem)entity).getEntityItem();
if (stack == null)
{
@@ -3,6 +3,7 @@ package net.minecraftforge.common;
import java.io.File;
import java.io.IOException;
import net.minecraft.world.gen.structure.template.TemplateManager;
import org.apache.logging.log4j.Level;
import com.google.common.io.Files;
@@ -38,7 +39,6 @@ public class WorldSpecificSaveHandler implements ISaveHandler
@Override public void saveWorldInfo(WorldInfo var1){ parent.saveWorldInfo(var1); }
@Override public IPlayerFileData getPlayerNBTManager() { return parent.getPlayerNBTManager(); }
@Override public void flush() { parent.flush(); }
@Override public String getWorldDirectoryName() { return parent.getWorldDirectoryName(); }
@Override public File getWorldDirectory() { return parent.getWorldDirectory(); }
@Override
@@ -68,4 +68,10 @@ public class WorldSpecificSaveHandler implements ISaveHandler
return file;
}
@Override
public TemplateManager func_186340_h()
{
return parent.func_186340_h();
}
}
@@ -139,7 +139,7 @@ public class BlockSnapshot implements Serializable
public TileEntity getTileEntity()
{
if (nbt != null)
return TileEntity.createAndLoadEntity(nbt);
return TileEntity.func_184246_b(getWorld().getMinecraftServer(), nbt);
else return null;
}
@@ -170,7 +170,7 @@ public class BlockSnapshot implements Serializable
}
world.setBlockState(pos, replaced, applyPhysics ? 3 : 2);
world.markBlockForUpdate(pos);
world.func_184138_a(pos, current, replaced, applyPhysics ? 3 : 2);
TileEntity te = null;
if (nbt != null)
{
@@ -205,7 +205,7 @@ public class BlockSnapshot implements Serializable
}
world.setBlockState(pos, replaced, applyPhysics ? 3 : 2);
world.markBlockForUpdate(pos);
world.func_184138_a(pos, current, replaced, applyPhysics ? 3 : 2);
TileEntity te = null;
if (nbt != null)
{