本文整理了Java中net.minecraft.entity.Entity.getEntityId()
方法的一些代码示例,展示了Entity.getEntityId()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Entity.getEntityId()
方法的具体详情如下:
包路径:net.minecraft.entity.Entity
类名称:Entity
方法名:getEntityId
暂无
代码示例来源:origin: Vazkii/Botania
public static void particleBeam(EntityPlayer player, Entity e1, Entity e2) {
if(e1 != null && e2 != null && !e1.world.isRemote) {
PacketHandler.sendTo((EntityPlayerMP) player,
new PacketBotaniaEffect(PacketBotaniaEffect.EffectType.SPARK_NET_INDICATOR, e1.posX, e1.posY, e1.posZ,
e1.getEntityId(), e2.getEntityId()));
}
}
代码示例来源:origin: Vazkii/Botania
private void particlesTowards(Entity e) {
PacketHandler.sendToNearby(world, this,
new PacketBotaniaEffect(PacketBotaniaEffect.EffectType.SPARK_MANA_FLOW, posX, posY, posZ,
getEntityId(), e.getEntityId()));
}
代码示例来源:origin: Vazkii/Botania
private static void moveParticlesAndSound(Entity entity) {
PacketHandler.sendToNearby(entity.world, entity, new PacketBotaniaEffect(PacketBotaniaEffect.EffectType.FLUGEL_EFFECT, entity.posX, entity.posY, entity.posZ, entity.getEntityId()));
entity.world.playSound(null, entity.posX, entity.posY, entity.posZ, SoundEvents.ENTITY_ENDERMEN_TELEPORT, SoundCategory.PLAYERS, 1F, 1F);
}
代码示例来源:origin: Vazkii/Botania
static void spawnExplosionParticles(Entity item, int p) {
PacketHandler.sendToNearby(item.world, new BlockPos(item), new PacketBotaniaEffect(PacketBotaniaEffect.EffectType.ITEM_SMOKE, item.posX, item.posY, item.posZ, item.getEntityId(), p));
}
代码示例来源:origin: JurassiCraftTeam/JurassiCraft2
public AttemptMoveToSeatMessage(Entity entity, int fromSeat, int toSeat){
this.toSeat = toSeat;
this.entityID = entity.getEntityId();
this.fromSeat = fromSeat;
}
代码示例来源:origin: P3pp3rF1y/AncientWarfare2
public PacketNpcCommand(CommandType type, Entity ent) {
this.type = type;
this.blockTarget = false;
this.entityID = ent.getEntityId();
}
代码示例来源:origin: Vazkii/Botania
time += new Random(tEntity.getEntityId()).nextInt();
代码示例来源:origin: Vazkii/Botania
ItemNBTHelper.setInt(stack, TAG_TARGET, item.getEntityId());
ItemNBTHelper.setDouble(stack, TAG_DIST, length);
代码示例来源:origin: AppliedEnergistics/Applied-Energistics-2
final int id = pos.entityHit.getEntityId();
final PlayerColor marker = new PlayerColor( id, col, 20 * 30 );
TickHandler.INSTANCE.getPlayerColors().put( id, marker );
代码示例来源:origin: CyclopsMC/IntegratedDynamics
public ValueTypeListProxyEntityBase(String name, T valueType, World world, Entity entity) {
super(name, valueType);
this.world = world == null ? -1 : world.provider.getDimension();
this.entity = entity == null ? -1 : entity.getEntityId();
}
代码示例来源:origin: JurassiCraftTeam/JurassiCraft2
@Nullable
@Override
public int getSeatForEntity(Entity entity) {
for (int i = 0; i < this.seats.length; i++) {
if (getIfExists(i, true).equals(str(entity.getEntityId()))) {
return i;
}
}
return -1;
}
代码示例来源:origin: SleepyTrousers/EnderIO
public PacketTeleport(Type type, TileTelePad te, Entity entity) {
super(te.getTileEntity());
if (entity instanceof EntityPlayer) {
EntityPlayer ep = (EntityPlayer) entity;
playerName = ep.getName();
this.entityId = -1;
} else {
this.entityId = entity.getEntityId();
playerName = null;
}
this.type = type;
}
代码示例来源:origin: TeamWizardry/Wizardry
@Override
public NBTTagInt serialize(Entity object) {
if (object != null)
return new NBTTagInt(object.getEntityId());
return new NBTTagInt(-1);
}
代码示例来源:origin: OpenMods/OpenModsLib
@SubscribeEvent
public void onEntityCreate(EntityJoinWorldEvent evt) {
final Entity entity = evt.getEntity();
for (IEntityLoadListener callback : delayedLoads.removeAll(entity.getEntityId()))
callback.onEntityLoaded(entity);
}
代码示例来源:origin: TeamLapen/Vampirism
@Nonnull
@Override
public NBTTagCompound createParticleInfo(Object... param) {
NBTTagCompound nbt = new NBTTagCompound();
nbt.setInteger("0", ((Entity) param[0]).getEntityId());
nbt.setBoolean("1", (Boolean) param[1]);
return nbt;
}
代码示例来源:origin: CyclopsMC/EvilCraft
@Override
public void onUpdate(ItemStack itemStack, World world, Entity entity, int par4, boolean par5) {
if(entity instanceof EntityPlayer
&& WorldHelpers.efficientTick(world, TICK_MODULUS, entity.getEntityId())) {
clearBadEffects(itemStack, (EntityPlayer) entity);
}
super.onUpdate(itemStack, world, entity, par4, par5);
}
代码示例来源:origin: OpenMods/OpenModsLib
@Override
public void writeToStream(PacketBuffer output) {
output.writeInt(entity.world.provider.getDimension());
output.writeInt(entity.getEntityId());
}
代码示例来源:origin: Vazkii/Botania
if(e.hasCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null) && !(e instanceof EntityPlayer)) {
if(scanInventory(e.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null), pstack))
entIdBuilder.add(e.getEntityId());
IInventory inv = (IInventory) e;
if(scanInventory(new InvWrapper(inv), pstack))
entIdBuilder.add(e.getEntityId());
代码示例来源:origin: CyclopsMC/EvilCraft
@Override
public void onUpdate(ItemStack itemStack, World world, Entity entity, int par4, boolean par5) {
if(entity instanceof EntityPlayer && !world.isRemote
&& WorldHelpers.efficientTick(world, BONUS_TICK_MODULUS, entity.getEntityId())) {
int area = VengeanceRingConfig.areaOfEffect;
toggleVengeanceArea(world, entity, area, ItemHelpers.isActivated(itemStack), true, false);
if(ItemHelpers.isActivated(itemStack)) {
updateRingPowers((EntityPlayer) entity);
}
}
super.onUpdate(itemStack, world, entity, par4, par5);
}
代码示例来源:origin: SleepyTrousers/EnderIO
@SubscribeEvent
public static void onStartTracking(PlayerEvent.StartTracking event) {
if (event.getTarget() instanceof EntityPlayerMP) {
for (PacketUpgradeState.Type type : PacketUpgradeState.Type.values()) {
PacketHandler.sendTo(new PacketUpgradeState(type, isActive((EntityPlayer) event.getTarget(), type), event.getTarget().getEntityId()),
(EntityPlayerMP) event.getEntityPlayer());
}
}
}
内容来源于网络,如有侵权,请联系作者删除!