本文整理了Java中net.minecraft.entity.Entity.setDead()
方法的一些代码示例,展示了Entity.setDead()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Entity.setDead()
方法的具体详情如下:
包路径:net.minecraft.entity.Entity
类名称:Entity
方法名:setDead
暂无
代码示例来源:origin: EngineHub/WorldEdit
@Override
public boolean remove() {
net.minecraft.entity.Entity entity = entityRef.get();
if (entity != null) {
entity.setDead();
}
return true;
}
代码示例来源:origin: Vazkii/Botania
@Override
public void setDead() {
super.setDead();
connections.remove(this);
restartNetwork();
}
代码示例来源:origin: AppliedEnergistics/Applied-Energistics-2
pos.entityHit.setDead();
代码示例来源:origin: Vazkii/Botania
item.world.spawnEntity(thrown);
item.setDead();
} else {
item.motionX = moveVector.x * 3.0F;
代码示例来源:origin: SleepyTrousers/EnderIO
private void cleanupUnspawnedEntity(Entity entity) {
if (entity != null) {
final Entity ridingEntity = entity.getRidingEntity();
if (ridingEntity != null) {
ridingEntity.setDead();
}
for (Entity passenger : entity.getPassengers()) {
passenger.setDead();
}
}
}
代码示例来源:origin: PenguinSquad/Harvest-Festival
@Override
public boolean onLeftClickEntity(ItemStack stack, EntityPlayer player, Entity entity) {
if (getEnumFromStack(stack) == NPC_KILLER) {
entity.setDead();
return true;
}
return false;
}
代码示例来源:origin: CoFH/ThermalDynamics
@Override
public void setDead() {
if (rider != null && !rider.isDead) {
rider.height = originalHeight;
rider.width = originalWidth;
if (rider instanceof EntityPlayer) {
((EntityPlayer) rider).eyeHeight = originalEyeHeight;
}
rider.setPosition(rider.posX, rider.posY, rider.posZ);
}
super.setDead();
}
代码示例来源:origin: AppliedEnergistics/Applied-Energistics-2
e.setDead();
代码示例来源:origin: PenguinSquad/Harvest-Festival
@Override
public void remove(World world, BlockPos pos, Rotation rotation, ConstructionStage stage, IBlockState replacement) {
NPC inpc = NPC.REGISTRY.get(new ResourceLocation(npc)); if (inpc == null) return;
Entity entity = NPCHelper.getNPCIfExists((WorldServer)world, pos, inpc);
if (entity != null) {
entity.setDead();
}
}
代码示例来源:origin: SleepyTrousers/EnderIO
@Override
protected void despawnEntity() {
Entity mount = getRidingEntity();
super.despawnEntity();
if (isDead && mount != null) {
mount.setDead();
}
}
代码示例来源:origin: TeamLapen/Vampirism
public static Entity spawnEntityInWorld(World world, AxisAlignedBB box, ResourceLocation id, int maxTry) {
Entity e = EntityList.createEntityByIDFromName(id, world);
if (spawnEntityInWorld(world, box, e, maxTry)) {
return e;
} else {
e.setDead();
return null;
}
}
代码示例来源:origin: AppliedEnergistics/Applied-Energistics-2
e.setDead();
代码示例来源:origin: P3pp3rF1y/AncientWarfare2
@Override
public void setDead() {
super.setDead();
if (!this.world.isRemote) {
//catch gates that have proxy blocks still in the world
gateType.onGateStartOpen(this);
gateType.onGateStartClose(this);
}
}
代码示例来源:origin: MightyPirates/TIS-3D
@Override
public void setDead() {
super.setDead();
if (!getEntityWorld().isRemote) {
TickHandlerInfraredPacket.INSTANCE.unwatchPacket(this);
}
}
代码示例来源:origin: Vazkii/Quark
@Override
public void setDead() {
if(!world.isRemote) {
InventoryHelper.dropInventoryItems(world, this, this);
InventoryHelper.spawnItemStack(world, posX, posY, posZ, getChestType());
}
super.setDead();
}
代码示例来源:origin: P3pp3rF1y/AncientWarfare2
@Override
protected void onRepack() {
if (getRidingEntity() instanceof EntityHorse) {
getRidingEntity().setDead();
dismountRidingEntity();
}
}
代码示例来源:origin: P3pp3rF1y/AncientWarfare2
@Override
protected void despawnEntity() {
super.despawnEntity();
if (isDead && getRidingEntity() instanceof EntityHorse) {
getRidingEntity().setDead();
dismountRidingEntity();
}
}
代码示例来源:origin: P3pp3rF1y/AncientWarfare2
@Override
public void setDead() {
if (!this.world.isRemote && !this.isDead && this.getHealth() <= 0) {
InventoryTools.dropItemsInWorld(world, inventory.ammoInventory, posX, posY, posZ);
InventoryTools.dropItemsInWorld(world, inventory.armorInventory, posX, posY, posZ);
InventoryTools.dropItemsInWorld(world, inventory.upgradeInventory, posX, posY, posZ);
InventoryTools.dropItemsInWorld(world, inventory.storageInventory, posX, posY, posZ);
}
super.setDead();
}
代码示例来源:origin: FTBTeam/FTB-Utilities
@SubscribeEvent
public static void onMobSpawned(EntityJoinWorldEvent event) //FIXME: LivingSpawnEvent.CheckSpawn
{
if (!event.getWorld().isRemote && !isEntityAllowed(event.getEntity()))
{
event.getEntity().setDead();
event.setCanceled(true);
}
}
代码示例来源:origin: AppliedEnergistics/Applied-Energistics-2
result.setDead();
worked = false;
内容来源于网络,如有侵权,请联系作者删除!