Fixes sidedness issues when starting up the server.
This commit is contained in:
@@ -283,7 +283,7 @@ public enum PartType
|
|||||||
{
|
{
|
||||||
// Only load models if the part is enabled, otherwise we also run into class-loading issues while
|
// Only load models if the part is enabled, otherwise we also run into class-loading issues while
|
||||||
// scanning for annotations
|
// scanning for annotations
|
||||||
if( Platform.isClient() )
|
if( Platform.isClientInstall() )
|
||||||
{
|
{
|
||||||
this.itemModels = createItemModels( itemModel );
|
this.itemModels = createItemModels( itemModel );
|
||||||
}
|
}
|
||||||
@@ -298,7 +298,10 @@ public enum PartType
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
this.itemModels = Collections.emptyList();
|
if( Platform.isClientInstall() )
|
||||||
|
{
|
||||||
|
this.itemModels = Collections.emptyList();
|
||||||
|
}
|
||||||
this.models = Collections.emptySet();
|
this.models = Collections.emptySet();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -150,6 +150,8 @@ public class Platform
|
|||||||
|
|
||||||
public static final int DEF_OFFSET = 16;
|
public static final int DEF_OFFSET = 16;
|
||||||
|
|
||||||
|
private static final boolean CLIENT_INSTALL = FMLCommonHandler.instance().getSide().isClient();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* random source, use it for item drop locations...
|
* random source, use it for item drop locations...
|
||||||
*/
|
*/
|
||||||
@@ -402,6 +404,14 @@ public class Platform
|
|||||||
return FMLCommonHandler.instance().getEffectiveSide().isClient();
|
return FMLCommonHandler.instance().getEffectiveSide().isClient();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* returns true if client classes are available.
|
||||||
|
*/
|
||||||
|
public static boolean isClientInstall()
|
||||||
|
{
|
||||||
|
return CLIENT_INSTALL;
|
||||||
|
}
|
||||||
|
|
||||||
public static boolean hasPermissions( final DimensionalCoord dc, final EntityPlayer player )
|
public static boolean hasPermissions( final DimensionalCoord dc, final EntityPlayer player )
|
||||||
{
|
{
|
||||||
return dc.getWorld().canMineBlockBody( player, dc.getPos() );
|
return dc.getWorld().canMineBlockBody( player, dc.getPos() );
|
||||||
|
|||||||
Reference in New Issue
Block a user