Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void m()
- {
- if (getItemStack() == null)
- {
- die();
- }
- else
- {
- super.m();
- int elapsedTicks = MinecraftServer.currentTick - this.lastTick;
- if (this.pickupDelay != 32767) {
- this.pickupDelay -= elapsedTicks;
- }
- if (this.age != 32768) {
- this.age += elapsedTicks;
- }
- this.lastTick = MinecraftServer.currentTick;
- this.lastX = this.locX;
- this.lastY = this.locY;
- this.lastZ = this.locZ;
- this.motY -= 0.03999999910593033D;
- this.noclip = j(this.locX, (getBoundingBox().b + getBoundingBox().e) / 2.0D, this.locZ);
- move(this.motX, this.motY, this.motZ);
- boolean flag = ((int)this.lastX != (int)this.locX) || ((int)this.lastY != (int)this.locY) || ((int)this.lastZ != (int)this.locZ);
- if ((flag) || (this.ticksLived % 25 == 0))
- {
- if (this.world.getType(new BlockPosition(this)).getMaterial() == Material.LAVA)
- {
- this.motY = 0.20000000298023224D;
- this.motX = ((this.random.nextFloat() - this.random.nextFloat()) * 0.2F);
- this.motZ = ((this.random.nextFloat() - this.random.nextFloat()) * 0.2F);
- a(SoundEffects.bA, 0.4F, 2.0F + this.random.nextFloat() * 0.4F);
- }
- if (!this.world.isClientSide) {
- x();
- }
- }
- float f = 0.98F;
- if (this.onGround) {
- f = this.world.getType(new BlockPosition(MathHelper.floor(this.locX), MathHelper.floor(getBoundingBox().b) - 1, MathHelper.floor(this.locZ))).getBlock().frictionFactor * 0.98F;
- }
- this.motX *= f;
- this.motY *= 0.9800000190734863D;
- this.motZ *= f;
- if (this.onGround) {
- this.motY *= -0.5D;
- }
- aj();
- if ((!this.world.isClientSide) && (this.age >= this.world.spigotConfig.itemDespawnRate))
- {
- if (CraftEventFactory.callItemDespawnEvent(this).isCancelled())
- {
- this.age = 0;
- return;
- }
- die();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement