当前位置: 首页>>代码示例>>Java>>正文


Java CombatTracker类代码示例

本文整理汇总了Java中net.minecraft.util.CombatTracker的典型用法代码示例。如果您正苦于以下问题:Java CombatTracker类的具体用法?Java CombatTracker怎么用?Java CombatTracker使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


CombatTracker类属于net.minecraft.util包,在下文中一共展示了CombatTracker类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: S42PacketCombatEvent

import net.minecraft.util.CombatTracker; //导入依赖的package包/类
@SuppressWarnings("incomplete-switch")
public S42PacketCombatEvent(CombatTracker combatTrackerIn, S42PacketCombatEvent.Event combatEventType)
{
    this.eventType = combatEventType;
    EntityLivingBase entitylivingbase = combatTrackerIn.func_94550_c();

    switch (combatEventType)
    {
        case END_COMBAT:
            this.field_179772_d = combatTrackerIn.func_180134_f();
            this.field_179775_c = entitylivingbase == null ? -1 : entitylivingbase.getEntityId();
            break;

        case ENTITY_DIED:
            this.field_179774_b = combatTrackerIn.getFighter().getEntityId();
            this.field_179775_c = entitylivingbase == null ? -1 : entitylivingbase.getEntityId();
            this.deathMessage = combatTrackerIn.getDeathMessage().getUnformattedText();
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:20,代码来源:S42PacketCombatEvent.java

示例2: SPacketCombatEvent

import net.minecraft.util.CombatTracker; //导入依赖的package包/类
@SuppressWarnings("incomplete-switch")
public SPacketCombatEvent(CombatTracker tracker, SPacketCombatEvent.Event eventIn, boolean p_i46932_3_)
{
    this.eventType = eventIn;
    EntityLivingBase entitylivingbase = tracker.getBestAttacker();

    switch (eventIn)
    {
        case END_COMBAT:
            this.duration = tracker.getCombatDuration();
            this.entityId = entitylivingbase == null ? -1 : entitylivingbase.getEntityId();
            break;
        case ENTITY_DIED:
            this.playerId = tracker.getFighter().getEntityId();
            this.entityId = entitylivingbase == null ? -1 : entitylivingbase.getEntityId();

            if (p_i46932_3_)
            {
                this.deathMessage = tracker.getDeathMessage();
            }
            else
            {
                this.deathMessage = new TextComponentString("");
            }
    }
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:27,代码来源:SPacketCombatEvent.java

示例3: getCombatTracker

import net.minecraft.util.CombatTracker; //导入依赖的package包/类
@Override
public CombatTracker getCombatTracker() {
	if (m_realPlayer == null) {
		return super.getCombatTracker();
	} else {
		syncToRealPlayer();
		return syncPublicFieldsFromRealAndReturn(m_realPlayer.getCombatTracker());
	}
}
 
开发者ID:orbwoi,项目名称:UniversalRemote,代码行数:10,代码来源:EntityPlayerMPProxy.java

示例4: getCombatTracker

import net.minecraft.util.CombatTracker; //导入依赖的package包/类
@Override
public CombatTracker getCombatTracker() {
	if (m_realPlayer == null) {
		return super.getCombatTracker();
	} else {
		return m_realPlayer.getCombatTracker();
	}
}
 
开发者ID:orbwoi,项目名称:UniversalRemote,代码行数:9,代码来源:EntityPlayerProxy.java

示例5: SPacketCombatEvent

import net.minecraft.util.CombatTracker; //导入依赖的package包/类
@SuppressWarnings("incomplete-switch")
public SPacketCombatEvent(CombatTracker tracker, SPacketCombatEvent.Event eventIn, boolean p_i46932_3_)
{
    this.eventType = eventIn;
    EntityLivingBase entitylivingbase = tracker.getBestAttacker();

    switch (eventIn)
    {
        case END_COMBAT:
            this.duration = tracker.getCombatDuration();
            this.entityId = entitylivingbase == null ? -1 : entitylivingbase.getEntityId();
            break;

        case ENTITY_DIED:
            this.playerId = tracker.getFighter().getEntityId();
            this.entityId = entitylivingbase == null ? -1 : entitylivingbase.getEntityId();

            if (p_i46932_3_)
            {
                this.deathMessage = tracker.getDeathMessage();
            }
            else
            {
                this.deathMessage = new TextComponentString("");
            }
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:28,代码来源:SPacketCombatEvent.java

示例6: reset

import net.minecraft.util.CombatTracker; //导入依赖的package包/类
public void reset()
{
    float exp = 0;
    boolean keepInventory = this.worldObj.getGameRules().getGameRuleBooleanValue("keepInventory");

    if (this.keepLevel || keepInventory)
    {
        exp = this.experience;
        this.newTotalExp = this.experienceTotal;
        this.newLevel = this.experienceLevel;
    }

    this.setHealth(this.getMaxHealth());
    this.fire = 0;
    this.fallDistance = 0;
    this.foodStats = new FoodStats(this);
    this.experienceLevel = this.newLevel;
    this.experienceTotal = this.newTotalExp;
    this.experience = 0;
    this.deathTime = 0;
    this.clearActivePotions(); // Should be remapped: removeAllEffects should be remapped to this.
    super.potionsNeedUpdate = true; // Cauldron - change to super to temporarily workaround remapping bug with SpecialSource
    this.openContainer = this.inventoryContainer;
    this.attackingPlayer = null;
    this.entityLivingToAttack = null;
    this._combatTracker = new CombatTracker(this);
    this.lastExperience = -1;

    if (this.keepLevel || keepInventory)
    {
        this.experience = exp;
    }
    else
    {
        this.addExperience(this.newExp);
    }

    this.keepLevel = false;
}
 
开发者ID:xtrafrancyz,项目名称:Cauldron,代码行数:40,代码来源:EntityPlayerMP.java

示例7: getCombatTracker

import net.minecraft.util.CombatTracker; //导入依赖的package包/类
public CombatTracker getCombatTracker()
{
    return this._combatTracker;
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:5,代码来源:EntityLivingBase.java

示例8: getCombatTracker

import net.minecraft.util.CombatTracker; //导入依赖的package包/类
/**
 * 1.8.9
 */
public CombatTracker getCombatTracker()
{
    return this._combatTracker;
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:8,代码来源:EntityLivingBase.java

示例9: func_110142_aN

import net.minecraft.util.CombatTracker; //导入依赖的package包/类
public CombatTracker func_110142_aN() {
	return this._combatTracker;
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:4,代码来源:EntityLivingBase.java

示例10: func_110142_aN

import net.minecraft.util.CombatTracker; //导入依赖的package包/类
public CombatTracker func_110142_aN()
{
    return this._combatTracker;
}
 
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:5,代码来源:EntityLivingBase.java

示例11: func_110142_aN

import net.minecraft.util.CombatTracker; //导入依赖的package包/类
public CombatTracker func_110142_aN() {
   return this.field_94063_bt;
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:4,代码来源:EntityLivingBase.java

示例12: getCombatTracker

import net.minecraft.util.CombatTracker; //导入依赖的package包/类
@Shadow public abstract CombatTracker getCombatTracker(); 
开发者ID:NeptunePowered,项目名称:NeptuneMod,代码行数:2,代码来源:MixinEntityLivingBase.java


注:本文中的net.minecraft.util.CombatTracker类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。