本文整理汇总了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();
}
}
示例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("");
}
}
}
示例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());
}
}
示例4: getCombatTracker
import net.minecraft.util.CombatTracker; //导入依赖的package包/类
@Override
public CombatTracker getCombatTracker() {
if (m_realPlayer == null) {
return super.getCombatTracker();
} else {
return m_realPlayer.getCombatTracker();
}
}
示例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("");
}
}
}
示例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;
}
示例7: getCombatTracker
import net.minecraft.util.CombatTracker; //导入依赖的package包/类
public CombatTracker getCombatTracker()
{
return this._combatTracker;
}
示例8: getCombatTracker
import net.minecraft.util.CombatTracker; //导入依赖的package包/类
/**
* 1.8.9
*/
public CombatTracker getCombatTracker()
{
return this._combatTracker;
}
示例9: func_110142_aN
import net.minecraft.util.CombatTracker; //导入依赖的package包/类
public CombatTracker func_110142_aN() {
return this._combatTracker;
}
示例10: func_110142_aN
import net.minecraft.util.CombatTracker; //导入依赖的package包/类
public CombatTracker func_110142_aN()
{
return this._combatTracker;
}
示例11: func_110142_aN
import net.minecraft.util.CombatTracker; //导入依赖的package包/类
public CombatTracker func_110142_aN() {
return this.field_94063_bt;
}
示例12: getCombatTracker
import net.minecraft.util.CombatTracker; //导入依赖的package包/类
@Shadow public abstract CombatTracker getCombatTracker();