本文整理汇总了Java中net.minecraft.network.play.server.S0DPacketCollectItem类的典型用法代码示例。如果您正苦于以下问题:Java S0DPacketCollectItem类的具体用法?Java S0DPacketCollectItem怎么用?Java S0DPacketCollectItem使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
S0DPacketCollectItem类属于net.minecraft.network.play.server包,在下文中一共展示了S0DPacketCollectItem类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: onItemPickup
import net.minecraft.network.play.server.S0DPacketCollectItem; //导入依赖的package包/类
/**
* Called whenever an item is picked up from walking over it. Args: pickedUpEntity, stackSize
*/
public void onItemPickup(Entity p_71001_1_, int p_71001_2_)
{
if (!p_71001_1_.isDead && !this.worldObj.isRemote)
{
EntityTracker entitytracker = ((WorldServer)this.worldObj).getEntityTracker();
if (p_71001_1_ instanceof EntityItem)
{
entitytracker.sendToAllTrackingEntity(p_71001_1_, new S0DPacketCollectItem(p_71001_1_.getEntityId(), this.getEntityId()));
}
if (p_71001_1_ instanceof EntityArrow)
{
entitytracker.sendToAllTrackingEntity(p_71001_1_, new S0DPacketCollectItem(p_71001_1_.getEntityId(), this.getEntityId()));
}
if (p_71001_1_ instanceof EntityXPOrb)
{
entitytracker.sendToAllTrackingEntity(p_71001_1_, new S0DPacketCollectItem(p_71001_1_.getEntityId(), this.getEntityId()));
}
}
}
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:26,代码来源:EntityLivingBase.java
示例2: handleCollectItem
import net.minecraft.network.play.server.S0DPacketCollectItem; //导入依赖的package包/类
public void handleCollectItem(S0DPacketCollectItem packetIn)
{
PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController);
Entity entity = this.clientWorldController.getEntityByID(packetIn.getCollectedItemEntityID());
EntityLivingBase entitylivingbase = (EntityLivingBase)this.clientWorldController.getEntityByID(packetIn.getEntityID());
if (entitylivingbase == null)
{
entitylivingbase = this.gameController.thePlayer;
}
if (entity != null)
{
if (entity instanceof EntityXPOrb)
{
this.clientWorldController.playSoundAtEntity(entity, "random.orb", 0.2F, ((this.avRandomizer.nextFloat() - this.avRandomizer.nextFloat()) * 0.7F + 1.0F) * 2.0F);
}
else
{
this.clientWorldController.playSoundAtEntity(entity, "random.pop", 0.2F, ((this.avRandomizer.nextFloat() - this.avRandomizer.nextFloat()) * 0.7F + 1.0F) * 2.0F);
}
this.gameController.effectRenderer.addEffect(new EntityPickupFX(this.clientWorldController, entity, entitylivingbase, 0.5F));
this.clientWorldController.removeEntityFromWorld(packetIn.getCollectedItemEntityID());
}
}
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:27,代码来源:NetHandlerPlayClient.java
示例3: handleCollectItem
import net.minecraft.network.play.server.S0DPacketCollectItem; //导入依赖的package包/类
public void handleCollectItem(S0DPacketCollectItem packetIn) {
PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController);
Entity entity = this.clientWorldController.getEntityByID(packetIn.getCollectedItemEntityID());
EntityLivingBase entitylivingbase = (EntityLivingBase) this.clientWorldController
.getEntityByID(packetIn.getEntityID());
if (entitylivingbase == null) {
entitylivingbase = this.gameController.thePlayer;
}
if (entity != null) {
if (entity instanceof EntityXPOrb) {
this.clientWorldController.playSoundAtEntity(entity, "random.orb", 0.2F,
((this.avRandomizer.nextFloat() - this.avRandomizer.nextFloat()) * 0.7F + 1.0F) * 2.0F);
} else {
this.clientWorldController.playSoundAtEntity(entity, "random.pop", 0.2F,
((this.avRandomizer.nextFloat() - this.avRandomizer.nextFloat()) * 0.7F + 1.0F) * 2.0F);
}
this.gameController.effectRenderer
.addEffect(new EntityPickupFX(this.clientWorldController, entity, entitylivingbase, 0.5F));
this.clientWorldController.removeEntityFromWorld(packetIn.getCollectedItemEntityID());
}
}
开发者ID:SkidJava,项目名称:BaseClient,代码行数:25,代码来源:NetHandlerPlayClient.java
示例4: onItemPickup
import net.minecraft.network.play.server.S0DPacketCollectItem; //导入依赖的package包/类
public void onItemPickup(Entity p_71001_1_, int p_71001_2_) {
;
;
;
if ((!p_71001_1_.isDead) && (!this.worldObj.isRemote)) {
EntityTracker entitytracker = ((WorldServer) this.worldObj)
.getEntityTracker();
if ((p_71001_1_ instanceof EntityItem)) {
entitytracker.func_151247_a(p_71001_1_,
new S0DPacketCollectItem(p_71001_1_.getEntityId(),
getEntityId()));
}
if ((p_71001_1_ instanceof EntityArrow)) {
entitytracker.func_151247_a(p_71001_1_,
new S0DPacketCollectItem(p_71001_1_.getEntityId(),
getEntityId()));
}
if ((p_71001_1_ instanceof EntityXPOrb)) {
entitytracker.func_151247_a(p_71001_1_,
new S0DPacketCollectItem(p_71001_1_.getEntityId(),
getEntityId()));
}
}
}
开发者ID:4Space,项目名称:4Space-5,代码行数:25,代码来源:EntityLivingBase.java
示例5: onItemPickup
import net.minecraft.network.play.server.S0DPacketCollectItem; //导入依赖的package包/类
/**
* Called whenever an item is picked up from walking over it. Args: pickedUpEntity, stackSize
*/
public void onItemPickup(Entity par1Entity, int par2)
{
if (!par1Entity.isDead && !this.worldObj.isClient)
{
EntityTracker var3 = ((WorldServer)this.worldObj).getEntityTracker();
if (par1Entity instanceof EntityItem)
{
var3.func_151247_a(par1Entity, new S0DPacketCollectItem(par1Entity.getEntityId(), this.getEntityId()));
}
if (par1Entity instanceof EntityArrow)
{
var3.func_151247_a(par1Entity, new S0DPacketCollectItem(par1Entity.getEntityId(), this.getEntityId()));
}
if (par1Entity instanceof EntityXPOrb)
{
var3.func_151247_a(par1Entity, new S0DPacketCollectItem(par1Entity.getEntityId(), this.getEntityId()));
}
}
}
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:26,代码来源:EntityLivingBase.java
示例6: handleCollectItem
import net.minecraft.network.play.server.S0DPacketCollectItem; //导入依赖的package包/类
public void handleCollectItem(S0DPacketCollectItem p_147246_1_)
{
Entity var2 = this.clientWorldController.getEntityByID(p_147246_1_.func_149354_c());
Object var3 = (EntityLivingBase)this.clientWorldController.getEntityByID(p_147246_1_.func_149353_d());
if (var3 == null)
{
var3 = this.gameController.thePlayer;
}
if (var2 != null)
{
if (var2 instanceof EntityXPOrb)
{
this.clientWorldController.playSoundAtEntity(var2, "random.orb", 0.2F, ((this.avRandomizer.nextFloat() - this.avRandomizer.nextFloat()) * 0.7F + 1.0F) * 2.0F);
}
else
{
this.clientWorldController.playSoundAtEntity(var2, "random.pop", 0.2F, ((this.avRandomizer.nextFloat() - this.avRandomizer.nextFloat()) * 0.7F + 1.0F) * 2.0F);
}
this.gameController.effectRenderer.addEffect(new EntityPickupFX(this.gameController.theWorld, var2, (Entity)var3, -0.5F));
this.clientWorldController.removeEntityFromWorld(p_147246_1_.func_149354_c());
}
}
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:26,代码来源:NetHandlerPlayClient.java
示例7: onItemPickup
import net.minecraft.network.play.server.S0DPacketCollectItem; //导入依赖的package包/类
public void onItemPickup(Entity p_71001_1_, int p_71001_2_)
{
if (!p_71001_1_.isDead && !this.worldObj.isRemote)
{
EntityTracker entitytracker = ((WorldServer)this.worldObj).getEntityTracker();
if (p_71001_1_ instanceof EntityItem)
{
entitytracker.func_151247_a(p_71001_1_, new S0DPacketCollectItem(p_71001_1_.getEntityId(), this.getEntityId()));
}
if (p_71001_1_ instanceof EntityArrow)
{
entitytracker.func_151247_a(p_71001_1_, new S0DPacketCollectItem(p_71001_1_.getEntityId(), this.getEntityId()));
}
if (p_71001_1_ instanceof EntityXPOrb)
{
entitytracker.func_151247_a(p_71001_1_, new S0DPacketCollectItem(p_71001_1_.getEntityId(), this.getEntityId()));
}
}
}
开发者ID:xtrafrancyz,项目名称:Cauldron,代码行数:23,代码来源:EntityLivingBase.java
示例8: handleCollectItem
import net.minecraft.network.play.server.S0DPacketCollectItem; //导入依赖的package包/类
public void handleCollectItem(S0DPacketCollectItem p_147246_1_)
{
Entity entity = this.clientWorldController.getEntityByID(p_147246_1_.func_149354_c());
Object object = (EntityLivingBase)this.clientWorldController.getEntityByID(p_147246_1_.func_149353_d());
if (object == null)
{
object = this.gameController.thePlayer;
}
if (entity != null)
{
if (entity instanceof EntityXPOrb)
{
this.clientWorldController.playSoundAtEntity(entity, "random.orb", 0.2F, ((this.avRandomizer.nextFloat() - this.avRandomizer.nextFloat()) * 0.7F + 1.0F) * 2.0F);
}
else
{
this.clientWorldController.playSoundAtEntity(entity, "random.pop", 0.2F, ((this.avRandomizer.nextFloat() - this.avRandomizer.nextFloat()) * 0.7F + 1.0F) * 2.0F);
}
this.gameController.effectRenderer.addEffect(new EntityPickupFX(this.gameController.theWorld, entity, (Entity)object, -0.5F));
this.clientWorldController.removeEntityFromWorld(p_147246_1_.func_149354_c());
}
}
开发者ID:xtrafrancyz,项目名称:Cauldron,代码行数:26,代码来源:NetHandlerPlayClient.java
示例9: collectItem
import net.minecraft.network.play.server.S0DPacketCollectItem; //导入依赖的package包/类
@Override
public Packet collectItem(int entityItemID, int collectorID) {
return (Packet) new S0DPacketCollectItem(entityItemID, collectorID);
}
开发者ID:NeptunePowered,项目名称:NeptuneMod,代码行数:5,代码来源:NeptunePacketFactory.java
示例10: handleCollectItem
import net.minecraft.network.play.server.S0DPacketCollectItem; //导入依赖的package包/类
void handleCollectItem(S0DPacketCollectItem packetIn);
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:2,代码来源:INetHandlerPlayClient.java
示例11: handleCollectItem
import net.minecraft.network.play.server.S0DPacketCollectItem; //导入依赖的package包/类
void handleCollectItem(S0DPacketCollectItem var1);
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:2,代码来源:INetHandlerPlayClient.java
示例12: handleCollectItem
import net.minecraft.network.play.server.S0DPacketCollectItem; //导入依赖的package包/类
void handleCollectItem(S0DPacketCollectItem p_147246_1_);
开发者ID:xtrafrancyz,项目名称:Cauldron,代码行数:2,代码来源:INetHandlerPlayClient.java
注:本文中的net.minecraft.network.play.server.S0DPacketCollectItem类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论