This commit is contained in:
Ellpeck 2015-12-23 01:15:43 +01:00
parent b98e6839e4
commit ed2bbe226a
4 changed files with 2 additions and 20 deletions

View file

@ -30,8 +30,6 @@ import ellpeck.actuallyadditions.util.playerdata.PersistentClientData;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
import net.minecraft.world.World;
import net.minecraftforge.common.DimensionManager;
import java.io.File; import java.io.File;
import java.util.Calendar; import java.util.Calendar;
@ -95,12 +93,6 @@ public class ClientProxy implements IProxy{
SpecialRenderInit.init(); SpecialRenderInit.init();
} }
@Override
public World getWorld(int worldID){
World world = DimensionManager.getWorld(worldID);
return world == null ? Minecraft.getMinecraft().theWorld : world;
}
private static void registerRenderer(Class<? extends TileEntity> tileClass, RenderTileEntity tileRender, int renderID){ private static void registerRenderer(Class<? extends TileEntity> tileClass, RenderTileEntity tileRender, int renderID){
ClientRegistry.bindTileEntitySpecialRenderer(tileClass, tileRender); ClientRegistry.bindTileEntitySpecialRenderer(tileClass, tileRender);
RenderingRegistry.registerBlockHandler(new RenderInventory(tileRender, renderID)); RenderingRegistry.registerBlockHandler(new RenderInventory(tileRender, renderID));

View file

@ -13,7 +13,6 @@ package ellpeck.actuallyadditions.proxy;
import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPostInitializationEvent; import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent; import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import net.minecraft.world.World;
public interface IProxy{ public interface IProxy{
@ -22,6 +21,4 @@ public interface IProxy{
void init(FMLInitializationEvent event); void init(FMLInitializationEvent event);
void postInit(FMLPostInitializationEvent event); void postInit(FMLPostInitializationEvent event);
World getWorld(int worldID);
} }

View file

@ -14,8 +14,6 @@ import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPostInitializationEvent; import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent; import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import ellpeck.actuallyadditions.util.ModUtil; import ellpeck.actuallyadditions.util.ModUtil;
import net.minecraft.world.World;
import net.minecraftforge.common.DimensionManager;
@SuppressWarnings("unused") @SuppressWarnings("unused")
public class ServerProxy implements IProxy{ public class ServerProxy implements IProxy{
@ -34,9 +32,4 @@ public class ServerProxy implements IProxy{
public void postInit(FMLPostInitializationEvent event){ public void postInit(FMLPostInitializationEvent event){
ModUtil.LOGGER.info("PostInitializing ServerProxy..."); ModUtil.LOGGER.info("PostInitializing ServerProxy...");
} }
@Override
public World getWorld(int worldID){
return DimensionManager.getWorld(worldID);
}
} }

View file

@ -10,13 +10,13 @@
package ellpeck.actuallyadditions.util; package ellpeck.actuallyadditions.util;
import ellpeck.actuallyadditions.ActuallyAdditions;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.material.Material; import net.minecraft.block.material.Material;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.Vec3; import net.minecraft.util.Vec3;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.common.DimensionManager;
public class WorldPos{ public class WorldPos{
@ -45,7 +45,7 @@ public class WorldPos{
} }
public World getWorld(){ public World getWorld(){
return ActuallyAdditions.proxy.getWorld(this.worldID); return DimensionManager.getWorld(this.worldID);
} }
public Material getMaterial(){ public Material getMaterial(){