MCPcopy Create free account
hub / github.com/DGVPSH/SlackOpen / onEntityUpdate

Method onEntityUpdate

src/main/java/net/minecraft/entity/Entity.java:420–535  ·  view source on GitHub ↗

Gets called every tick from main Entity class

()

Source from the content-addressed store, hash-verified

418 * Gets called every tick from main Entity class
419 */
420 public void onEntityUpdate()
421 {
422 this.worldObj.theProfiler.startSection("entityBaseTick");
423
424 if (this.ridingEntity != null && this.ridingEntity.isDead)
425 {
426 this.ridingEntity = null;
427 }
428
429 this.prevDistanceWalkedModified = this.distanceWalkedModified;
430 this.prevPosX = this.posX;
431 this.prevPosY = this.posY;
432 this.prevPosZ = this.posZ;
433 this.prevRotationPitch = this.rotationPitch;
434 this.prevRotationYaw = this.rotationYaw;
435
436 if (!this.worldObj.isRemote && this.worldObj instanceof WorldServer)
437 {
438 this.worldObj.theProfiler.startSection("portal");
439 MinecraftServer minecraftserver = ((WorldServer)this.worldObj).getMinecraftServer();
440 int i = this.getMaxInPortalTime();
441
442 if (this.inPortal)
443 {
444 if (minecraftserver.getAllowNether())
445 {
446 if (this.ridingEntity == null && this.portalCounter++ >= i)
447 {
448 this.portalCounter = i;
449 this.timeUntilPortal = this.getPortalCooldown();
450 int j;
451
452 if (this.worldObj.provider.getDimensionId() == -1)
453 {
454 j = 0;
455 }
456 else
457 {
458 j = -1;
459 }
460
461 this.travelToDimension(j);
462 }
463
464 this.inPortal = false;
465 }
466 }
467 else
468 {
469 if (this.portalCounter > 0)
470 {
471 this.portalCounter -= 4;
472 }
473
474 if (this.portalCounter < 0)
475 {
476 this.portalCounter = 0;
477 }

Callers 1

onUpdateMethod · 0.95

Calls 15

getMaxInPortalTimeMethod · 0.95
getAllowNetherMethod · 0.95
getPortalCooldownMethod · 0.95
travelToDimensionMethod · 0.95
spawnRunningParticlesMethod · 0.95
handleWaterMovementMethod · 0.95
attackEntityFromMethod · 0.95
isInLavaMethod · 0.95
setOnFireFromLavaMethod · 0.95
killMethod · 0.95
setFlagMethod · 0.95
startSectionMethod · 0.80

Tested by

no test coverage detected