Теперь это (почти) универсальная хрень. ServerMods таки мешают, хотя для клиента их просто удалить, для сервера - проблема серверовладельца, там авторизация из полезного только и та жопой сделана.

This commit is contained in:
ZLOFENIX 2013-06-29 19:48:48 +04:00
parent 1543766132
commit 0865baea01
10 changed files with 15 additions and 10 deletions

View file

@ -89,7 +89,6 @@ public class BlockProtocol extends BlockContainer {
* Called upon block activation (right click on the block.)
*/
@Override
@SideOnly(Side.SERVER)
public boolean onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9)
{
if (FMLCommonHandler.instance().getEffectiveSide().isClient())

View file

@ -84,7 +84,6 @@ public class BlockRadar extends BlockContainer {
}
@Override
@SideOnly(Side.SERVER)
public boolean onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9)
{
if (FMLCommonHandler.instance().getEffectiveSide().isClient())

View file

@ -80,7 +80,6 @@ public class BlockReactor extends BlockContainer {
/**
* Called upon block activation (right click on the block.)
*/
@SideOnly(Side.SERVER)
@Override
public boolean onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9)
{

View file

@ -1,5 +1,6 @@
package cr0s.WarpDrive;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import dan200.computer.api.IPeripheral;
@ -118,9 +119,10 @@ public class EntityJump extends Entity {
}
}
@SideOnly(Side.SERVER)
@Override
public void onUpdate() {
if (FMLCommonHandler.instance().getEffectiveSide().isClient())
return;
if (!on || worldObj.getBlockId(xCoord, yCoord, zCoord) != WarpDrive.WARP_CORE_BLOCKID) {
unlockWorlds();
worldObj.removeEntity(this);

View file

@ -1,5 +1,6 @@
package cr0s.WarpDrive;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block;
@ -76,9 +77,10 @@ public final class EntitySphereGen extends Entity {
worldObj.removeEntity(this);
}
@SideOnly(Side.SERVER)
@Override
public void onUpdate() {
if (FMLCommonHandler.instance().getEffectiveSide().isClient())
return;
if (!on)
{
System.out.println("[SGEN] onUpdate(): entity disabled.");

View file

@ -34,7 +34,6 @@ public class SpaceGenerator extends ChunkProviderGenerate implements IChunkProvi
}
@Override
//@SideOnly(Side.SERVER)
public Chunk provideChunk(int par1, int par2) {
this.rand.setSeed((long) par1 * 341873128712L + (long) par2 * 132897987541L);
byte[] var3 = new byte[32768];

View file

@ -4,6 +4,7 @@
*/
package cr0s.WarpDrive;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import dan200.computer.api.IComputerAccess;
@ -57,9 +58,10 @@ public class TileEntityProtocol extends TileEntity implements IPeripheral {
private TileEntity core;
@SideOnly(Side.SERVER)
@Override
public void updateEntity() {
if (FMLCommonHandler.instance().getEffectiveSide().isClient())
return;
if (++ticks >= BLOCK_UPDATE_INTERVAL){
findCoreBlock();

View file

@ -1,5 +1,6 @@
package cr0s.WarpDrive;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import dan200.computer.api.IComputerAccess;
@ -37,9 +38,10 @@ public class TileEntityRadar extends TileEntity implements IPeripheral, IEnergyS
return ((getCurrentEnergyValue() - needEnergy) > 0);
}
@SideOnly(Side.SERVER)
@Override
public void updateEntity() {
if (FMLCommonHandler.instance().getEffectiveSide().isClient())
return;
try {
if (worldObj.getBlockMetadata(xCoord, yCoord, zCoord) == 2) {
if (cooldownTime++ > (20 * ((scanRadius / 1000) + 1))) {

View file

@ -4,6 +4,7 @@
*/
package cr0s.WarpDrive;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import ic2.api.Direction;
@ -93,9 +94,10 @@ public class TileEntityReactor extends TileEntity implements IEnergySink {
public String coreState = "";
public TileEntityProtocol controller;
@SideOnly(Side.SERVER)
@Override
public void updateEntity() {
if (FMLCommonHandler.instance().getEffectiveSide().isClient())
return;
// Update warp core in cores registry
if (++registryUpdateTicks > CORES_REGISTRY_UPDATE_INTERVAL_SECONDS * 20) {
registryUpdateTicks = 0;

View file

@ -117,7 +117,6 @@ public class WarpDrive {
registry = new WarpCoresRegistry();
}
//@SideOnly(Side.SERVER)
private void registerSpaceDimension() {
spaceBiome = (new BiomeSpace(23)).setColor(0).setDisableRain().setBiomeName("Space");
this.spaceProviderID = 14;