當前位置: 首頁>>代碼示例>>Java>>正文


Java Side.SERVER屬性代碼示例

本文整理匯總了Java中cpw.mods.fml.relauncher.Side.SERVER屬性的典型用法代碼示例。如果您正苦於以下問題:Java Side.SERVER屬性的具體用法?Java Side.SERVER怎麽用?Java Side.SERVER使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在cpw.mods.fml.relauncher.Side的用法示例。


在下文中一共展示了Side.SERVER屬性的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: preInit

@Mod.EventHandler
public void preInit(FMLPreInitializationEvent event){
    if (event.getSide() == Side.SERVER) {
        logger.info("Client side only mod - not doing anything on the server!");
        return;
    }
}
 
開發者ID:Cloudhunter,項目名稱:LetsEncryptRoot,代碼行數:7,代碼來源:LetsEncryptRoot.java

示例2: s_perform

@Listener(channel=MSG_PERFORM, side=Side.SERVER)
public void s_perform()  {
	if(consume()) {
		tick_shot();		
		ctx.addSkillExp(getExpIncr());
	}
}
 
開發者ID:Kanbe-Kotori,項目名稱:ExtraAcC,代碼行數:7,代碼來源:SandStorm.java

示例3: s_perform2

@Listener(channel=MSG_PERFORM2, side=Side.SERVER)
public void s_perform2()  {
	if (this.getStatus() == Status.TERMINATED) {
		return;
	}
	end();
}
 
開發者ID:Kanbe-Kotori,項目名稱:ExtraAcC,代碼行數:7,代碼來源:SandStorm.java

示例4: s_perform

@Listener(channel=MSG_PERFORM, side=Side.SERVER)
public void s_perform()  {
	if(consume()) {
		//System.out.println("caonima2");
		World world = player.worldObj;
		
		EntityBasicAirGun gun = new EntityBasicAirGun(world, player, ctx.getSkillExp(), player.getLookVec());
		world.spawnEntityInWorld(gun);
		
		ctx.addSkillExp(getExpIncr());
		ctx.setCooldown((int)MathUtils.lerpf(45, 15, ctx.getSkillExp()));
	}
    terminate();
}
 
開發者ID:Kanbe-Kotori,項目名稱:ExtraAcC,代碼行數:14,代碼來源:BasicAirGun.java

示例5: s_perform

@Listener(channel=MSG_PERFORM, side=Side.SERVER)
public void s_perform()  {
	if(consume()) {
		World world = player.worldObj;
		entity = new EntityTurbulentStorm(world, player, ctx.getSkillExp());
		world.spawnEntityInWorld(entity);
	}
	initialized = true;
}
 
開發者ID:Kanbe-Kotori,項目名稱:ExtraAcC,代碼行數:9,代碼來源:TurbulentStorm.java

示例6: s_perform

@Listener(channel=MSG_PERFORM, side=Side.SERVER)
public void s_perform()  {
	if(consume()) {
		World world = player.worldObj;
		
		EntityWindBlade gun = new EntityWindBlade(world, player, ctx.getSkillExp(), player.getLookVec());
		world.spawnEntityInWorld(gun);
		
		ctx.addSkillExp(getExpIncr());
		ctx.setCooldown((int)MathUtils.lerpf(60, 30, ctx.getSkillExp()));
	}
    terminate();
}
 
開發者ID:Kanbe-Kotori,項目名稱:ExtraAcC,代碼行數:13,代碼來源:WindBlade.java

示例7: s_perform

@Listener(channel=MSG_PERFORM, side=Side.SERVER)
public void s_perform()  {
	if(consume()) {
		sendToClient(MSG_PERFORM2);
		player.fallDistance = 0;
		ctx.addSkillExp(getExpIncr());
		ctx.setCooldown((int)MathUtils.lerpf(40, 10, ctx.getSkillExp()));
	}
    terminate();
}
 
開發者ID:Kanbe-Kotori,項目名稱:ExtraAcC,代碼行數:10,代碼來源:WindAssault.java

示例8: s_tick

@Listener(channel=MSG_TICK, side=Side.SERVER)
public void s_tick()  {
	if (this.getStatus() == Status.TERMINATED) {
		return;
	}
	if(tick()) {
		tick_shot();
		ctx.addSkillExp(getExpIncr());
	} else {
		end();
	}
}
 
開發者ID:Kanbe-Kotori,項目名稱:ExtraAcC,代碼行數:12,代碼來源:SandStorm.java

示例9: getDatabaseTable

@SideOnly(Side.SERVER)
public abstract String getDatabaseTable ( ) ;
 
開發者ID:Pishka,項目名稱:MineDonate,代碼行數:2,代碼來源:MerchCategory.java

示例10: loadCategory

@SideOnly(Side.SERVER)
public abstract void loadCategory ( ) throws Exception ;
 
開發者ID:Pishka,項目名稱:MineDonate,代碼行數:2,代碼來源:MerchCategory.java

示例11: loadCategoryFromObject

@SideOnly(Side.SERVER)
public abstract void loadCategoryFromObject(Object o);
 
開發者ID:Pishka,項目名稱:MineDonate,代碼行數:2,代碼來源:MerchCategory.java

示例12: giveMerch

@SideOnly(Side.SERVER)
public abstract void giveMerch ( EntityPlayerMP player, Merch merch, int amount ) ;
 
開發者ID:Pishka,項目名稱:MineDonate,代碼行數:2,代碼來源:MerchCategory.java

示例13: getNextMerchId

@SideOnly(Side.SERVER)
public int getNextMerchId ( ) {
	
	Statement stat = null ;
	
       try {
       	
       	stat = ModDataBase . getNewStatement ( getDatabaseLinkName ( ) ) ;
           ResultSet rs = stat . executeQuery ( "SHOW TABLE STATUS LIKE '" + getDatabaseTable ( ) + "'" ) ;

           int r = -1 ;
           while ( rs . next ( ) ) {

               r = rs . getInt ( "Auto_increment" ) ;

           }
           
           rs . close ( ) ;
   		ModDataBase . closeStatementAndConnection ( stat ) ;

           return r ;
           
       } catch ( Exception ex ) {
           
       	ex . printStackTrace ( ) ;
           
       }

	ModDataBase . closeStatementAndConnection ( stat ) ;

       return -1 ;
       
}
 
開發者ID:Pishka,項目名稱:MineDonate,代碼行數:33,代碼來源:MerchCategory.java

示例14: updateMerch

@SideOnly ( Side . SERVER )
@Override
public void updateMerch ( int id, Merch info ) {
    
	super . updateMerch ( id, info ) ;
    
	updateEntityInfo ( ( EntityInfo ) info ) ;
	
}
 
開發者ID:Pishka,項目名稱:MineDonate,代碼行數:9,代碼來源:Entities.java

示例15: updateMerch

@SideOnly ( Side . SERVER )
@Override
public void updateMerch ( int id, Merch info ) {
    
	super . updateMerch ( id, info ) ;
    
	updateItemInfo ( ( ItemInfo ) info ) ;
	
}
 
開發者ID:Pishka,項目名稱:MineDonate,代碼行數:9,代碼來源:ItemNBlocks.java


注:本文中的cpw.mods.fml.relauncher.Side.SERVER屬性示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。