Server and client are seperate.
This commit is contained in:
parent
7554e3fc62
commit
4ce32c9828
3 changed files with 14 additions and 5 deletions
|
@ -24,9 +24,6 @@ public abstract class DDProxyCommon implements IDDProxy {
|
|||
ModBlocks.registerBlocks();
|
||||
ModItems.registerItems();
|
||||
|
||||
ModelManager.registerModelVariants();
|
||||
ModelManager.addCustomStateMappers();
|
||||
|
||||
GameRegistry.registerTileEntity(TileEntityDimDoor.class, "TileEntityDimDoor");
|
||||
GameRegistry.registerTileEntity(TileEntityRift.class, "TileEntityRift");
|
||||
GameRegistry.registerTileEntity(TileEntityTransTrapdoor.class, "TileEntityDimHatch");
|
||||
|
@ -36,7 +33,6 @@ public abstract class DDProxyCommon implements IDDProxy {
|
|||
@Override
|
||||
public void onInitialization(FMLInitializationEvent event) {
|
||||
CraftingManager.registerRecipes();
|
||||
ModelManager.registerModels();
|
||||
}
|
||||
|
||||
public void updateDoorTE(BlockDimDoorBase door, World world, BlockPos pos) {
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
package com.zixiken.dimdoors.client;
|
||||
|
||||
import com.zixiken.dimdoors.CraftingManager;
|
||||
import com.zixiken.dimdoors.DDProxyCommon;
|
||||
import com.zixiken.dimdoors.ModelManager;
|
||||
import com.zixiken.dimdoors.tileentities.TileEntityDimDoor;
|
||||
import com.zixiken.dimdoors.tileentities.TileEntityRift;
|
||||
import com.zixiken.dimdoors.tileentities.TileEntityTransTrapdoor;
|
||||
|
@ -9,6 +11,7 @@ import net.minecraft.entity.player.EntityPlayer;
|
|||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.WorldServer;
|
||||
import net.minecraftforge.fml.client.registry.ClientRegistry;
|
||||
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
|
||||
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
|
||||
|
||||
@SuppressWarnings({"MethodCallSideOnly", "NewExpressionSideOnly"})
|
||||
|
@ -17,9 +20,19 @@ public class DDProxyClient extends DDProxyCommon {
|
|||
@Override
|
||||
public void onPreInitialization(FMLPreInitializationEvent event) {
|
||||
super.onPreInitialization(event);
|
||||
|
||||
ModelManager.registerModelVariants();
|
||||
ModelManager.addCustomStateMappers();
|
||||
|
||||
registerRenderers();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onInitialization(FMLInitializationEvent event) {
|
||||
super.onInitialization(event);
|
||||
ModelManager.registerModels();
|
||||
}
|
||||
|
||||
public void registerRenderers() {
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityDimDoor.class, new RenderDimDoor());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityTransTrapdoor.class, new RenderTransTrapdoor());
|
||||
|
|
|
@ -25,7 +25,7 @@ public class TeleportHelper extends Teleporter {
|
|||
}
|
||||
|
||||
public static boolean teleport(Entity entity, Location newLocation) {
|
||||
if (entity instanceof EntityPlayerSP) {
|
||||
if (DimDoors.isClient()) {
|
||||
//DimDoors.log(TeleportHelper.class, "Not teleporting, because EntityPlayerSP.");
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue