code cleanup

This commit is contained in:
Sen 2025-07-23 14:23:06 +02:00
parent 76e018b4ed
commit 9688d1d802
Signed by: sen
GPG key ID: 3AC50A6F47D1B722
102 changed files with 290 additions and 356 deletions

View file

@ -290,30 +290,25 @@ public class Client implements IThreadListener {
this.updatePhysics(); this.updatePhysics();
} }
public boolean spawnEntityInWorld(Entity entityIn) {
boolean flag = super.spawnEntityInWorld(entityIn);
Client.this.spawnEntityInWorld(flag, entityIn);
return flag;
}
public void removeEntity(Entity entityIn) {
super.removeEntity(entityIn);
Client.this.removeEntity(entityIn);
}
protected void onEntityAdded(Entity entityIn) { protected void onEntityAdded(Entity entityIn) {
Client.this.onEntityAdded(entityIn); if(Client.this.spawnQueue.contains(entityIn))
Client.this.spawnQueue.remove(entityIn);
} }
protected void onEntityRemoved(Entity entityIn) { protected void onEntityRemoved(Entity entityIn) {
Client.this.onEntityRemoved(entityIn); if(Client.this.entityList.contains(entityIn)) {
if(entityIn.isEntityAlive())
Client.this.spawnQueue.add(entityIn);
else
Client.this.entityList.remove(entityIn);
}
} }
public Entity getEntityByID(int id) { public Entity getEntityByID(int id) {
return id == Client.this.player.getId() ? Client.this.player : super.getEntityByID(id); return id == Client.this.player.getId() ? Client.this.player : super.getEntityByID(id);
} }
public void playSound(double x, double y, double z, SoundEvent sound, float volume) { public void clientSound(SoundEvent sound, double x, double y, double z, float volume) {
Client.this.getSoundManager().playSound(new PositionedSound(sound, volume, (float)x, (float)y, (float)z)); Client.this.getSoundManager().playSound(new PositionedSound(sound, volume, (float)x, (float)y, (float)z));
} }
@ -336,11 +331,11 @@ public class Client implements IThreadListener {
return allowEmpty || !Client.this.getChunk(x, z).isDummy(); return allowEmpty || !Client.this.getChunk(x, z).isDummy();
} }
public void spawnParticle(ParticleType particle, double xCoord, double yCoord, double zCoord, int data) { public void clientParticle(ParticleType particle, double xCoord, double yCoord, double zCoord, int data) {
Client.this.effectRenderer.spawnParticle(Client.this.getRenderViewEntity(), particle, xCoord, yCoord, zCoord, data); Client.this.effectRenderer.spawnParticle(Client.this.getRenderViewEntity(), particle, xCoord, yCoord, zCoord, data);
} }
public void playAuxSFX(EntityNPC player, int sfxType, BlockPos blockPosIn, int data) { public void playEffect(EntityNPC player, int sfxType, BlockPos blockPosIn, int data) {
if(Client.this.getNetHandler() != null) if(Client.this.getNetHandler() != null)
Client.this.getNetHandler().playAuxSFX(sfxType, blockPosIn, data); Client.this.getNetHandler().playAuxSFX(sfxType, blockPosIn, data);
} }
@ -352,14 +347,14 @@ public class Client implements IThreadListener {
Client.this.renderGlobal.markBlocksForUpdate(x - 1, y - 1, z - 1, x + 1, y + 1, z + 1); Client.this.renderGlobal.markBlocksForUpdate(x - 1, y - 1, z - 1, x + 1, y + 1, z + 1);
} }
public void notifyLightSet(BlockPos pos) { public void clientNotifyLight(BlockPos pos) {
int x = pos.getX(); int x = pos.getX();
int y = pos.getY(); int y = pos.getY();
int z = pos.getZ(); int z = pos.getZ();
Client.this.renderGlobal.markBlocksForUpdate(x - 1, y - 1, z - 1, x + 1, y + 1, z + 1); Client.this.renderGlobal.markBlocksForUpdate(x - 1, y - 1, z - 1, x + 1, y + 1, z + 1);
} }
public void markBlockRangeForRenderUpdate(int x1, int y1, int z1, int x2, int y2, int z2) { public void clientRenderUpdate(int x1, int y1, int z1, int x2, int y2, int z2) {
Client.this.renderGlobal.markBlocksForUpdate(x1 - 1, y1 - 1, z1 - 1, x2 + 1, y2 + 1, z2 + 1); Client.this.renderGlobal.markBlocksForUpdate(x1 - 1, y1 - 1, z1 - 1, x2 + 1, y2 + 1, z2 + 1);
} }
@ -1629,7 +1624,7 @@ public class Client implements IThreadListener {
} }
this.player.preparePlayerToSpawn(); this.player.preparePlayerToSpawn();
world.spawnEntityInWorld(this.player); this.spawnEntity(this.player);
this.viewEntity = this.player; this.viewEntity = this.player;
System.gc(); System.gc();
@ -1645,6 +1640,7 @@ public class Client implements IThreadListener {
{ {
i = this.player.getId(); i = this.player.getId();
this.world.removeEntity(this.player); this.world.removeEntity(this.player);
this.entityList.remove(this.player);
} }
this.viewEntity = null; this.viewEntity = null;
@ -1653,7 +1649,7 @@ public class Client implements IThreadListener {
this.player.getDataWatcher().updateWatchedObjectsFromList(entityplayersp.getDataWatcher().getAllWatched()); this.player.getDataWatcher().updateWatchedObjectsFromList(entityplayersp.getDataWatcher().getAllWatched());
this.viewEntity = this.player; this.viewEntity = this.player;
this.player.preparePlayerToSpawn(); this.player.preparePlayerToSpawn();
this.world.spawnEntityInWorld(this.player); this.spawnEntity(this.player);
this.player.rotYaw = -180.0F; this.player.rotYaw = -180.0F;
this.player.setId(i); this.player.setId(i);
} }
@ -3340,7 +3336,7 @@ public class Client implements IThreadListener {
float y = (posY < -32 ? (float)posY - 32.0f : -64.0f) + rand.floatv() * 65.0f; float y = (posY < -32 ? (float)posY - 32.0f : -64.0f) + rand.floatv() * 65.0f;
float z = ((float)posZ) + (rand.floatv() - rand.floatv() - 0.5f) * 32.0f; float z = ((float)posZ) + (rand.floatv() - rand.floatv() - 0.5f) * 32.0f;
if(y < -64.0f || rand.floatv() >= (64.0f + y) / 64.0f) if(y < -64.0f || rand.floatv() >= (64.0f + y) / 64.0f)
this.world.spawnParticle(ParticleType.DEPTH, (double)x, (double)y, (double)z); this.world.clientParticle(ParticleType.DEPTH, (double)x, (double)y, (double)z);
} }
} }
} }
@ -3519,15 +3515,13 @@ public class Client implements IThreadListener {
if (entity != null) if (entity != null)
{ {
this.world.removeEntity(entity); this.world.removeEntity(entity);
this.entityList.remove(entity);
} }
this.entityList.add(entityToSpawn); this.entityList.add(entityToSpawn);
entityToSpawn.setId(entityID); entityToSpawn.setId(entityID);
if (!this.world.spawnEntityInWorld(entityToSpawn)) this.spawnEntity(entityToSpawn);
{
this.spawnQueue.add(entityToSpawn);
}
this.entityIds.addKey(entityID, entityToSpawn); this.entityIds.addKey(entityID, entityToSpawn);
} }
@ -3540,6 +3534,7 @@ public class Client implements IThreadListener {
{ {
this.entityList.remove(entity); this.entityList.remove(entity);
this.world.removeEntity(entity); this.world.removeEntity(entity);
this.entityList.remove(entity);
} }
return entity; return entity;
@ -3563,7 +3558,13 @@ public class Client implements IThreadListener {
for (int l = 0; l < this.unloaded.size(); ++l) for (int l = 0; l < this.unloaded.size(); ++l)
{ {
this.onEntityRemoved(this.unloaded.get(l)); Entity entity2 = this.unloaded.get(l);
if(this.entityList.contains(entity2)) {
if(entity2.isEntityAlive())
this.spawnQueue.add(entity2);
else
this.entityList.remove(entity2);
}
} }
this.unloaded.clear(); this.unloaded.clear();
@ -3594,54 +3595,20 @@ public class Client implements IThreadListener {
} }
this.entities.remove(i1--); this.entities.remove(i1--);
this.onEntityRemoved(entity1); if(this.entityList.contains(entity1))
Client.this.entityList.remove(entity1);
} }
} }
} }
private void spawnEntityInWorld(boolean flag, Entity entityIn)
{
this.entityList.add(entityIn);
if (!flag)
{
this.spawnQueue.add(entityIn);
}
else if (entityIn instanceof EntityCart)
{
this.soundManager.playSound(new MovingSoundMinecart((EntityCart)entityIn));
}
}
private void removeEntity(Entity entityIn)
{
this.entityList.remove(entityIn);
}
private void onEntityAdded(Entity entityIn) private void spawnEntity(Entity entityIn) {
{ boolean flag = this.world.spawnEntityInWorld(entityIn);
if (this.spawnQueue.contains(entityIn)) this.entityList.add(entityIn);
{ if(!flag)
this.spawnQueue.remove(entityIn); this.spawnQueue.add(entityIn);
} else if(entityIn instanceof EntityCart)
} this.soundManager.playSound(new MovingSoundMinecart((EntityCart)entityIn));
}
private void onEntityRemoved(Entity entityIn)
{
boolean flag = false;
if (this.entityList.contains(entityIn))
{
if (entityIn.isEntityAlive())
{
this.spawnQueue.add(entityIn);
flag = true;
}
else
{
this.entityList.remove(entityIn);
}
}
}
private void ensureAreaLoaded(Entity entity) { private void ensureAreaLoaded(Entity entity) {
int x = ExtMath.floord(entity.posX / 16.0D); int x = ExtMath.floord(entity.posX / 16.0D);

View file

@ -1998,7 +1998,7 @@ public class ClientPlayer implements IClientPlayer
try try
{ {
this.world.spawnParticle(packetIn.getParticleType(), packetIn.getXCoordinate(), packetIn.getYCoordinate(), packetIn.getZCoordinate(), packetIn.getParticleArg()); this.world.clientParticle(packetIn.getParticleType(), packetIn.getXCoordinate(), packetIn.getYCoordinate(), packetIn.getZCoordinate(), packetIn.getParticleArg());
} }
catch (Throwable var17) catch (Throwable var17)
{ {

View file

@ -495,7 +495,7 @@ public class EffectRenderer {
float f = (float)this.age / (float)this.lifetime; float f = (float)this.age / (float)this.lifetime;
if(rng.floatv() > f) { if(rng.floatv() > f) {
world.spawnParticle(ParticleType.SMOKE, this.posX, this.posY, this.posZ); world.clientParticle(ParticleType.SMOKE, this.posX, this.posY, this.posZ);
} }
this.motionY -= 0.03D; this.motionY -= 0.03D;
@ -888,7 +888,7 @@ public class EffectRenderer {
double y = (double)(rng.floatv() * 2.0F - 1.0F); double y = (double)(rng.floatv() * 2.0F - 1.0F);
double z = (double)(rng.floatv() * 2.0F - 1.0F); double z = (double)(rng.floatv() * 2.0F - 1.0F);
if(x * x + y * y + z * z <= 1.0D) if(x * x + y * y + z * z <= 1.0D)
world.spawnParticle(ParticleType.CRIT, this.entity.posX + x * (double)this.entity.width / 4.0D, world.clientParticle(ParticleType.CRIT, this.entity.posX + x * (double)this.entity.width / 4.0D,
this.entity.getEntityBoundingBox().minY + (double)(this.entity.height / 2.0F) + y * (double)this.entity.height / 4.0D, this.entity.getEntityBoundingBox().minY + (double)(this.entity.height / 2.0F) + y * (double)this.entity.height / 4.0D,
this.entity.posZ + z * (double)this.entity.width / 4.0D); this.entity.posZ + z * (double)this.entity.width / 4.0D);
} }
@ -910,7 +910,7 @@ public class EffectRenderer {
double x = this.posX + (rng.doublev() - rng.doublev()) * 4.0D; double x = this.posX + (rng.doublev() - rng.doublev()) * 4.0D;
double y = this.posY + (rng.doublev() - rng.doublev()) * 4.0D; double y = this.posY + (rng.doublev() - rng.doublev()) * 4.0D;
double z = this.posZ + (rng.doublev() - rng.doublev()) * 4.0D; double z = this.posZ + (rng.doublev() - rng.doublev()) * 4.0D;
world.spawnParticle(ParticleType.EXPLOSION_LARGE, x, y, z, (int)(100.0f * (float)this.age / (float)this.lifetime)); world.clientParticle(ParticleType.EXPLOSION_LARGE, x, y, z, (int)(100.0f * (float)this.age / (float)this.lifetime));
} }
} }

View file

@ -1354,7 +1354,7 @@ public class EntityRenderer {
} }
} }
if(temp < 194.0f || this.random.chance(8)) if(temp < 194.0f || this.random.chance(8))
this.gm.world.spawnParticle(temp >= 194.0f && this.random.chance(20) ? ParticleType.LAVA : ParticleType.SMOKE, (double)blockpos1.getX() + d3, (double)((float)blockpos1.getY() + 0.1F) - block.getBlockBoundsMinY(), (double)blockpos1.getZ() + d4); this.gm.world.clientParticle(temp >= 194.0f && this.random.chance(20) ? ParticleType.LAVA : ParticleType.SMOKE, (double)blockpos1.getX() + d3, (double)((float)blockpos1.getY() + 0.1F) - block.getBlockBoundsMinY(), (double)blockpos1.getZ() + d4);
} }
else if (block != Blocks.air) else if (block != Blocks.air)
{ {
@ -1368,7 +1368,7 @@ public class EntityRenderer {
d2 = (double)blockpos2.getZ() + d4; d2 = (double)blockpos2.getZ() + d4;
} }
this.gm.world.spawnParticle(temp <= 5.0f ? ParticleType.HAIL_CORN : ParticleType.WATER_DROP, (double)blockpos2.getX() + d3, (double)((float)blockpos2.getY() + 0.1F) + block.getBlockBoundsMaxY(), (double)blockpos2.getZ() + d4); this.gm.world.clientParticle(temp <= 5.0f ? ParticleType.HAIL_CORN : ParticleType.WATER_DROP, (double)blockpos2.getX() + d3, (double)((float)blockpos2.getY() + 0.1F) + block.getBlockBoundsMaxY(), (double)blockpos2.getZ() + d4);
} }
} }
} }

View file

@ -54,7 +54,7 @@ public class PlayerController {
return false; return false;
} }
else { else {
world.playAuxSFX(2001, pos, BlockRegistry.getId(state)); world.playEffect(2001, pos, BlockRegistry.getId(state));
boolean flag = world.setBlockToAir(pos); boolean flag = world.setBlockToAir(pos);
if(flag) { if(flag) {

View file

@ -55,7 +55,7 @@ public class AIFireballAttack extends EntityAIBase
if (this.attackTimer == this.delay) if (this.attackTimer == this.delay)
{ {
world.playAuxSFX(1007, new BlockPos(this.parentEntity), 0); world.playEffect(1007, new BlockPos(this.parentEntity), 0);
this.parentEntity.setItemNoUpdate(0, new ItemStack(Items.orb)); this.parentEntity.setItemNoUpdate(0, new ItemStack(Items.orb));
} }
@ -68,7 +68,7 @@ public class AIFireballAttack extends EntityAIBase
double d2 = target.posX - (this.parentEntity.posX + vec3.xCoord * d1); double d2 = target.posX - (this.parentEntity.posX + vec3.xCoord * d1);
double d3 = target.getEntityBoundingBox().minY + (double)(target.height / 2.0F) - (this.parentEntity.posY + (double)this.parentEntity.getEyeHeight()); double d3 = target.getEntityBoundingBox().minY + (double)(target.height / 2.0F) - (this.parentEntity.posY + (double)this.parentEntity.getEyeHeight());
double d4 = target.posZ - (this.parentEntity.posZ + vec3.zCoord * d1); double d4 = target.posZ - (this.parentEntity.posZ + vec3.zCoord * d1);
world.playAuxSFX(1008, new BlockPos(this.parentEntity), 0); world.playEffect(1008, new BlockPos(this.parentEntity), 0);
EntityFireball fireball = new EntityFireball(world, this.parentEntity, d2, d3, d4, this.velocity); EntityFireball fireball = new EntityFireball(world, this.parentEntity, d2, d3, d4, this.velocity);
// 0.0, 0.0, 0.0); // 0.0, 0.0, 0.0);
// fireball.setAcceleration(d2 + this.parentEntity.getRNG().gaussian() * 0.1D, // fireball.setAcceleration(d2 + this.parentEntity.getRNG().gaussian() * 0.1D,

View file

@ -75,7 +75,7 @@ public class AIFlyingBoxAttack extends EntityAIBase
private void launchBoxToCoords(double x, double y, double z, boolean invulnerable) private void launchBoxToCoords(double x, double y, double z, boolean invulnerable)
{ {
this.entity.swingItem(); this.entity.swingItem();
this.entity.worldObj.playAuxSFX(1014, new BlockPos(this.entity), 0); this.entity.worldObj.playEffect(1014, new BlockPos(this.entity), 0);
double d0 = this.entity.posX; double d0 = this.entity.posX;
double d1 = this.entity.posY + this.entity.height + 0.8; double d1 = this.entity.posY + this.entity.height + 0.8;
double d2 = this.entity.posZ; double d2 = this.entity.posZ;

View file

@ -81,7 +81,7 @@ public class AISmallFireballAttack extends EntityAIBase
{ {
this.entity.swingItem(); this.entity.swingItem();
// float f = MathHelper.sqrt_float(MathHelper.sqrt_double(d0)) * 0.5F; // float f = MathHelper.sqrt_float(MathHelper.sqrt_double(d0)) * 0.5F;
this.entity.worldObj.playAuxSFX(1009, new BlockPos((int)this.entity.posX, (int)this.entity.posY, (int)this.entity.posZ), 0); this.entity.worldObj.playEffect(1009, new BlockPos((int)this.entity.posX, (int)this.entity.posY, (int)this.entity.posZ), 0);
for (int i = 0; i < 1; ++i) for (int i = 0; i < 1; ++i)
{ {

View file

@ -102,7 +102,7 @@ public class EntityAIEatGrass extends EntityAIBase
{ {
if (Vars.mobGrief) if (Vars.mobGrief)
{ {
this.entityWorld.playAuxSFX(2001, blockpos1, BlockRegistry.getId(Blocks.grass.getState())); this.entityWorld.playEffect(2001, blockpos1, BlockRegistry.getId(Blocks.grass.getState()));
this.entityWorld.setState(blockpos1, Blocks.dirt.getState(), 2); this.entityWorld.setState(blockpos1, Blocks.dirt.getState(), 2);
} }

View file

@ -152,7 +152,7 @@ public class EntityAIMate extends EntityAIBase
double d3 = random.doublev() * (double)this.theAnimal.width * 2.0D - (double)this.theAnimal.width; double d3 = random.doublev() * (double)this.theAnimal.width * 2.0D - (double)this.theAnimal.width;
double d4 = 0.5D + random.doublev() * (double)this.theAnimal.height; double d4 = 0.5D + random.doublev() * (double)this.theAnimal.height;
double d5 = random.doublev() * (double)this.theAnimal.width * 2.0D - (double)this.theAnimal.width; double d5 = random.doublev() * (double)this.theAnimal.width * 2.0D - (double)this.theAnimal.width;
this.theWorld.spawnParticle(ParticleType.HEART, this.theAnimal.posX + d3, this.theAnimal.posY + d4, this.theAnimal.posZ + d5); this.theWorld.clientParticle(ParticleType.HEART, this.theAnimal.posX + d3, this.theAnimal.posY + d4, this.theAnimal.posZ + d5);
} }
if (entityplayer != null && Vars.breedingXP) // FIX xp if (entityplayer != null && Vars.breedingXP) // FIX xp

View file

@ -32,6 +32,7 @@ import common.entity.item.EntityXp;
import common.entity.npc.EntityNPC; import common.entity.npc.EntityNPC;
import common.entity.types.EntityLiving; import common.entity.types.EntityLiving;
import common.init.Blocks; import common.init.Blocks;
import common.inventory.IInventory;
import common.item.CheatTab; import common.item.CheatTab;
import common.item.Item; import common.item.Item;
import common.item.ItemStack; import common.item.ItemStack;
@ -334,6 +335,29 @@ public class Block {
} }
} }
public static void dropItems(AWorldServer world, BlockPos pos, IInventory inventory) {
for(int n = 0; n < inventory.getSizeInventory(); n++) {
ItemStack stack = inventory.getStackInSlot(n);
if(stack == null)
continue;
double x = (double)pos.getX() + (double)world.rand.floatv() * 0.8F + 0.1F;
double y = (double)pos.getY() + (double)world.rand.floatv() * 0.8F + 0.1F;
double z = (double)pos.getZ() + (double)world.rand.floatv() * 0.8F + 0.1F;
while(!stack.isEmpty()) {
int amount = stack.getSize() > 64 ? stack.getSize() : (world.rand.zrange(21) + 10);
if(amount > stack.getSize())
amount = stack.getSize();
stack.decrSize(amount);
EntityItem entity = new EntityItem(world, x, y, z, new ItemStack(stack.getItem(), amount));
entity.getEntityItem().copyData(stack);
entity.motionX = world.rand.gaussian() * 0.05;
entity.motionY = world.rand.gaussian() * 0.05 + 0.2;
entity.motionZ = world.rand.gaussian() * 0.05;
world.spawnEntityInWorld(entity);
}
}
}
public Block(Material material) { public Block(Material material) {
this.miningLevel = (material == Material.SOLID || material == Material.HEAVY) ? 0 : -1; this.miningLevel = (material == Material.SOLID || material == Material.HEAVY) ? 0 : -1;
this.axeHarvest = material == Material.WOOD || material == Material.PLANT || material == Material.BUSH || material == Material.SOFT; this.axeHarvest = material == Material.WOOD || material == Material.PLANT || material == Material.BUSH || material == Material.SOFT;
@ -972,7 +996,7 @@ public class Block {
this.onPlace(world, pos, iblockstate1, player); this.onPlace(world, pos, iblockstate1, player);
} }
world.playSound(this.getSound().getPlaceSound(), (double)((float)pos.getX() + 0.5F), (double)((float)pos.getY() + 0.5F), (double)((float)pos.getZ() + 0.5F), 1.0F); world.sendSound(this.getSound().getPlaceSound(), (double)((float)pos.getX() + 0.5F), (double)((float)pos.getY() + 0.5F), (double)((float)pos.getZ() + 0.5F), 1.0F);
stack.decrSize(); stack.decrSize();
} }
@ -990,7 +1014,7 @@ public class Block {
public void onPlace(World world, BlockPos pos, State state, EntityLiving placer) { public void onPlace(World world, BlockPos pos, State state, EntityLiving placer) {
} }
public boolean dispense(World world, TileEntity source, Vec3 position, BlockPos pos, Facing side, ItemStack stack) { public boolean dispense(AWorldServer world, TileEntity source, Vec3 position, BlockPos pos, Facing side, ItemStack stack) {
return false; return false;
} }

View file

@ -35,7 +35,7 @@ public class BlockFalling extends Block {
this.checkFallable(world, pos); this.checkFallable(world, pos);
} }
private void checkFallable(World world, BlockPos pos) { private void checkFallable(AWorldServer world, BlockPos pos) {
if(canFallInto(world, pos.down()) && pos.getY() >= 0) { if(canFallInto(world, pos.down()) && pos.getY() >= 0) {
int range = 32; int range = 32;
if(!fallInstantly && world.isAreaLoaded(pos.add(-range, -range, -range), pos.add(range, range, range))) { if(!fallInstantly && world.isAreaLoaded(pos.add(-range, -range, -range), pos.add(range, range, range))) {

View file

@ -173,7 +173,7 @@ public class BlockDoor extends Block implements Rotatable {
world.setState(lower, bottom.withProperty(OPEN, open), 2); world.setState(lower, bottom.withProperty(OPEN, open), 2);
world.setState(upper, top.withProperty(OPEN, open), 2); world.setState(upper, top.withProperty(OPEN, open), 2);
world.markBlockRangeForRenderUpdate(lower, upper); world.markBlockRangeForRenderUpdate(lower, upper);
world.playAuxSFX(player, open ? 1003 : 1006, pos, 0); world.playEffect(player, open ? 1003 : 1006, pos, 0);
return true; return true;
} }
@ -188,7 +188,7 @@ public class BlockDoor extends Block implements Rotatable {
world.setState(lower, bottom.withProperty(OPEN, open), 2); world.setState(lower, bottom.withProperty(OPEN, open), 2);
world.setState(upper, top.withProperty(OPEN, open), 2); world.setState(upper, top.withProperty(OPEN, open), 2);
world.markBlockRangeForRenderUpdate(lower, upper); world.markBlockRangeForRenderUpdate(lower, upper);
world.playAuxSFX(open ? 1003 : 1006, pos, 0); world.playEffect(open ? 1003 : 1006, pos, 0);
} }
} }
} }

View file

@ -104,7 +104,7 @@ public class BlockDragonEgg extends Block
this.checkFall(worldIn, pos); this.checkFall(worldIn, pos);
} }
private void checkFall(World worldIn, BlockPos pos) private void checkFall(AWorldServer worldIn, BlockPos pos)
{ {
if (BlockFalling.canFallInto(worldIn, pos.down()) && pos.getY() >= 0) if (BlockFalling.canFallInto(worldIn, pos.down()) && pos.getY() >= 0)
{ {
@ -159,7 +159,7 @@ public class BlockDragonEgg extends Block
double d1 = (double)blockpos.getX() + (double)(pos.getX() - blockpos.getX()) * d0 + (worldIn.rand.doublev() - 0.5D) * 1.0D + 0.5D; double d1 = (double)blockpos.getX() + (double)(pos.getX() - blockpos.getX()) * d0 + (worldIn.rand.doublev() - 0.5D) * 1.0D + 0.5D;
double d2 = (double)blockpos.getY() + (double)(pos.getY() - blockpos.getY()) * d0 + worldIn.rand.doublev() * 1.0D - 0.5D; double d2 = (double)blockpos.getY() + (double)(pos.getY() - blockpos.getY()) * d0 + worldIn.rand.doublev() * 1.0D - 0.5D;
double d3 = (double)blockpos.getZ() + (double)(pos.getZ() - blockpos.getZ()) * d0 + (worldIn.rand.doublev() - 0.5D) * 1.0D + 0.5D; double d3 = (double)blockpos.getZ() + (double)(pos.getZ() - blockpos.getZ()) * d0 + (worldIn.rand.doublev() - 0.5D) * 1.0D + 0.5D;
worldIn.spawnParticle(ParticleType.TELEPORT, d1, d2, d3); worldIn.clientParticle(ParticleType.TELEPORT, d1, d2, d3);
} }
} }
else else

View file

@ -132,7 +132,7 @@ public class BlockFenceGate extends Block implements Rotatable
worldIn.setState(pos, state, 2); worldIn.setState(pos, state, 2);
} }
worldIn.playAuxSFX(playerIn, ((Boolean)state.getValue(OPEN)).booleanValue() ? 1003 : 1006, pos, 0); worldIn.playEffect(playerIn, ((Boolean)state.getValue(OPEN)).booleanValue() ? 1003 : 1006, pos, 0);
return true; return true;
} }

View file

@ -96,7 +96,7 @@ public class BlockFloorPortal extends Block
double d0 = (double)((float)pos.getX() + rand.floatv()); double d0 = (double)((float)pos.getX() + rand.floatv());
double d1 = (double)((float)pos.getY() + 0.8F); double d1 = (double)((float)pos.getY() + 0.8F);
double d2 = (double)((float)pos.getZ() + rand.floatv()); double d2 = (double)((float)pos.getZ() + rand.floatv());
worldIn.spawnParticle(ParticleType.SMOKE, d0, d1, d2); worldIn.clientParticle(ParticleType.SMOKE, d0, d1, d2);
} }
// /** // /**

View file

@ -247,7 +247,7 @@ public class BlockPortal extends Block
d2 = (double)pos.getZ() + 0.5D + 0.25D * (double)j; d2 = (double)pos.getZ() + 0.5D + 0.25D * (double)j;
} }
worldIn.spawnParticle(ParticleType.TELEPORT, d0, d1, d2); worldIn.clientParticle(ParticleType.TELEPORT, d0, d1, d2);
} }
} }

View file

@ -165,7 +165,7 @@ public class BlockSlab extends Block implements Directional {
if(worldIn.canBlockBePlaced(this, pos, false, side, null, stack)) { if(worldIn.canBlockBePlaced(this, pos, false, side, null, stack)) {
State place = this.getState().withProperty(BlockSlab.FACING, playerIn.getHorizontalFacing()); State place = this.getState().withProperty(BlockSlab.FACING, playerIn.getHorizontalFacing());
if(worldIn.setState(pos, place, 3)) { if(worldIn.setState(pos, place, 3)) {
worldIn.playSound(this.getSound().getPlaceSound(), (double)((float)pos.getX() + 0.5F), (double)((float)pos.getY() + 0.5F), worldIn.sendSound(this.getSound().getPlaceSound(), (double)((float)pos.getX() + 0.5F), (double)((float)pos.getY() + 0.5F),
(double)((float)pos.getZ() + 0.5F), 1.0F); (double)((float)pos.getZ() + 0.5F), 1.0F);
stack.decrSize(); stack.decrSize();
} }

View file

@ -135,7 +135,7 @@ public class BlockTrapDoor extends Block implements Rotatable
return true; return true;
state = state.cycleProperty(OPEN); state = state.cycleProperty(OPEN);
worldIn.setState(pos, state, 2); worldIn.setState(pos, state, 2);
worldIn.playAuxSFX(player, ((Boolean)state.getValue(OPEN)).booleanValue() ? 1003 : 1006, pos, 0); worldIn.playEffect(player, ((Boolean)state.getValue(OPEN)).booleanValue() ? 1003 : 1006, pos, 0);
return true; return true;
} }

View file

@ -76,7 +76,7 @@ public class BlockMycelium extends Block
if (rand.chance(10)) if (rand.chance(10))
{ {
worldIn.spawnParticle(ParticleType.SPORE, (double)((float)pos.getX() + rand.floatv()), (double)((float)pos.getY() + 1.1F), (double)((float)pos.getZ() + rand.floatv())); worldIn.clientParticle(ParticleType.SPORE, (double)((float)pos.getX() + rand.floatv()), (double)((float)pos.getY() + 1.1F), (double)((float)pos.getZ() + rand.floatv()));
} }
} }

View file

@ -250,7 +250,7 @@ public abstract class BlockLiquid extends Block
{ {
if (rand.chance(64)) if (rand.chance(64))
{ {
worldIn.playSound(d0 + 0.5D, d1 + 0.5D, d2 + 0.5D, SoundEvent.WATER, rand.floatv() * 0.25F + 0.75F); worldIn.clientSound(SoundEvent.WATER, d0 + 0.5D, d1 + 0.5D, d2 + 0.5D, rand.floatv() * 0.25F + 0.75F);
} }
} }
} }
@ -262,13 +262,13 @@ public abstract class BlockLiquid extends Block
double d8 = d0 + (double)rand.floatv(); double d8 = d0 + (double)rand.floatv();
double d4 = d1 + this.maxY; double d4 = d1 + this.maxY;
double d6 = d2 + (double)rand.floatv(); double d6 = d2 + (double)rand.floatv();
worldIn.spawnParticle(ParticleType.LAVA, d8, d4, d6); worldIn.clientParticle(ParticleType.LAVA, d8, d4, d6);
worldIn.playSound(d8, d4, d6, SoundEvent.LAVA_POP, 0.2F + rand.floatv() * 0.2F); worldIn.clientSound(SoundEvent.LAVA_POP, d8, d4, d6, 0.2F + rand.floatv() * 0.2F);
} }
if (rand.chance(200)) if (rand.chance(200))
{ {
worldIn.playSound(d0, d1, d2, SoundEvent.LAVA, 0.2F + rand.floatv() * 0.2F); worldIn.clientSound(SoundEvent.LAVA, d0, d1, d2, 0.2F + rand.floatv() * 0.2F);
} }
} }
} }
@ -337,11 +337,11 @@ public abstract class BlockLiquid extends Block
double d0 = (double)pos.getX(); double d0 = (double)pos.getX();
double d1 = (double)pos.getY(); double d1 = (double)pos.getY();
double d2 = (double)pos.getZ(); double d2 = (double)pos.getZ();
worldIn.playSound(SoundEvent.FIZZ, d0 + 0.5D, d1 + 0.5D, d2 + 0.5D, 0.5F); worldIn.sendSound(SoundEvent.FIZZ, d0 + 0.5D, d1 + 0.5D, d2 + 0.5D, 0.5F);
for (int i = 0; i < 8; ++i) for (int i = 0; i < 8; ++i)
{ {
worldIn.spawnParticle(ParticleType.SMOKE, d0 + Math.random(), d1 + 1.2D, d2 + Math.random()); worldIn.clientParticle(ParticleType.SMOKE, d0 + Math.random(), d1 + 1.2D, d2 + Math.random());
} }
} }

View file

@ -16,7 +16,7 @@ public class BlockBedrock extends Block {
public void displayTick(World worldIn, BlockPos pos, State state, Random rand) public void displayTick(World worldIn, BlockPos pos, State state, Random rand)
{ {
if(/* worldIn.canShowVoidParticles() && */ pos.getY() <= 5 && rand.chance(8)) { if(/* worldIn.canShowVoidParticles() && */ pos.getY() <= 5 && rand.chance(8)) {
worldIn.spawnParticle(ParticleType.DEPTH, (double)pos.getX() + rand.floatv(), (double)(pos.getY()+1) + (rand.floatv() * 0.5f), worldIn.clientParticle(ParticleType.DEPTH, (double)pos.getX() + rand.floatv(), (double)(pos.getY()+1) + (rand.floatv() * 0.5f),
(double)pos.getZ() + rand.floatv()); (double)pos.getZ() + rand.floatv());
} }
} }

View file

@ -349,7 +349,7 @@ public class BlockFire extends Block
{ {
if (rand.chance(24)) if (rand.chance(24))
{ {
worldIn.playSound((double)((float)pos.getX() + 0.5F), (double)((float)pos.getY() + 0.5F), (double)((float)pos.getZ() + 0.5F), SoundEvent.FIRE, 1.0F + rand.floatv()); worldIn.clientSound(SoundEvent.FIRE, (double)((float)pos.getX() + 0.5F), (double)((float)pos.getY() + 0.5F), (double)((float)pos.getZ() + 0.5F), 1.0F + rand.floatv());
} }
if (!worldIn.isBlockSolid(pos.down()) && !this.canCatchFire(worldIn, pos.down())) if (!worldIn.isBlockSolid(pos.down()) && !this.canCatchFire(worldIn, pos.down()))
@ -361,7 +361,7 @@ public class BlockFire extends Block
double d3 = (double)pos.getX() + rand.doublev() * 0.10000000149011612D; double d3 = (double)pos.getX() + rand.doublev() * 0.10000000149011612D;
double d8 = (double)pos.getY() + rand.doublev(); double d8 = (double)pos.getY() + rand.doublev();
double d13 = (double)pos.getZ() + rand.doublev(); double d13 = (double)pos.getZ() + rand.doublev();
worldIn.spawnParticle(ParticleType.SMOKE, d3, d8, d13); worldIn.clientParticle(ParticleType.SMOKE, d3, d8, d13);
} }
} }
@ -372,7 +372,7 @@ public class BlockFire extends Block
double d4 = (double)(pos.getX() + 1) - rand.doublev() * 0.10000000149011612D; double d4 = (double)(pos.getX() + 1) - rand.doublev() * 0.10000000149011612D;
double d9 = (double)pos.getY() + rand.doublev(); double d9 = (double)pos.getY() + rand.doublev();
double d14 = (double)pos.getZ() + rand.doublev(); double d14 = (double)pos.getZ() + rand.doublev();
worldIn.spawnParticle(ParticleType.SMOKE, d4, d9, d14); worldIn.clientParticle(ParticleType.SMOKE, d4, d9, d14);
} }
} }
@ -383,7 +383,7 @@ public class BlockFire extends Block
double d5 = (double)pos.getX() + rand.doublev(); double d5 = (double)pos.getX() + rand.doublev();
double d10 = (double)pos.getY() + rand.doublev(); double d10 = (double)pos.getY() + rand.doublev();
double d15 = (double)pos.getZ() + rand.doublev() * 0.10000000149011612D; double d15 = (double)pos.getZ() + rand.doublev() * 0.10000000149011612D;
worldIn.spawnParticle(ParticleType.SMOKE, d5, d10, d15); worldIn.clientParticle(ParticleType.SMOKE, d5, d10, d15);
} }
} }
@ -394,7 +394,7 @@ public class BlockFire extends Block
double d6 = (double)pos.getX() + rand.doublev(); double d6 = (double)pos.getX() + rand.doublev();
double d11 = (double)pos.getY() + rand.doublev(); double d11 = (double)pos.getY() + rand.doublev();
double d16 = (double)(pos.getZ() + 1) - rand.doublev() * 0.10000000149011612D; double d16 = (double)(pos.getZ() + 1) - rand.doublev() * 0.10000000149011612D;
worldIn.spawnParticle(ParticleType.SMOKE, d6, d11, d16); worldIn.clientParticle(ParticleType.SMOKE, d6, d11, d16);
} }
} }
@ -405,7 +405,7 @@ public class BlockFire extends Block
double d7 = (double)pos.getX() + rand.doublev(); double d7 = (double)pos.getX() + rand.doublev();
double d12 = (double)(pos.getY() + 1) - rand.doublev() * 0.10000000149011612D; double d12 = (double)(pos.getY() + 1) - rand.doublev() * 0.10000000149011612D;
double d17 = (double)pos.getZ() + rand.doublev(); double d17 = (double)pos.getZ() + rand.doublev();
worldIn.spawnParticle(ParticleType.SMOKE, d7, d12, d17); worldIn.clientParticle(ParticleType.SMOKE, d7, d12, d17);
} }
} }
} }
@ -416,7 +416,7 @@ public class BlockFire extends Block
double d0 = (double)pos.getX() + rand.doublev(); double d0 = (double)pos.getX() + rand.doublev();
double d1 = (double)pos.getY() + rand.doublev() * 0.5D + 0.5D; double d1 = (double)pos.getY() + rand.doublev() * 0.5D + 0.5D;
double d2 = (double)pos.getZ() + rand.doublev(); double d2 = (double)pos.getZ() + rand.doublev();
worldIn.spawnParticle(ParticleType.SMOKE, d0, d1, d2); worldIn.clientParticle(ParticleType.SMOKE, d0, d1, d2);
} }
} }
} }

View file

@ -197,7 +197,7 @@ public class BlockSnow extends Block
if (axisalignedbb != null && worldIn.checkNoEntityCollision(axisalignedbb) && worldIn.setState(blockpos, iblockstate1, 2)) if (axisalignedbb != null && worldIn.checkNoEntityCollision(axisalignedbb) && worldIn.setState(blockpos, iblockstate1, 2))
{ {
worldIn.playSound(this.getSound().getPlaceSound(), (double)((float)blockpos.getX() + 0.5F), (double)((float)blockpos.getY() + 0.5F), (double)((float)blockpos.getZ() + 0.5F), 1.0F); worldIn.sendSound(this.getSound().getPlaceSound(), (double)((float)blockpos.getX() + 0.5F), (double)((float)blockpos.getY() + 0.5F), (double)((float)blockpos.getZ() + 0.5F), 1.0F);
stack.decrSize(); stack.decrSize();
return true; return true;
} }

View file

@ -105,7 +105,7 @@ public class BlockAnvil extends BlockFalling implements Rotatable
public void onEndFalling(World worldIn, BlockPos pos) public void onEndFalling(World worldIn, BlockPos pos)
{ {
worldIn.playAuxSFX(1022, pos, 0); worldIn.playEffect(1022, pos, 0);
} }
public boolean canRender(IWorldAccess worldIn, BlockPos pos, Facing side) public boolean canRender(IWorldAccess worldIn, BlockPos pos, Facing side)

View file

@ -156,11 +156,11 @@ public abstract class BlockBasePressurePlate extends Block
if (!flag1 && flag) if (!flag1 && flag)
{ {
worldIn.playSound(SoundEvent.CLICK, (double)pos.getX() + 0.5D, (double)pos.getY() + 0.1D, (double)pos.getZ() + 0.5D, 0.3F); worldIn.sendSound(SoundEvent.CLICK, (double)pos.getX() + 0.5D, (double)pos.getY() + 0.1D, (double)pos.getZ() + 0.5D, 0.3F);
} }
else if (flag1 && !flag) else if (flag1 && !flag)
{ {
worldIn.playSound(SoundEvent.CLICK, (double)pos.getX() + 0.5D, (double)pos.getY() + 0.1D, (double)pos.getZ() + 0.5D, 0.3F); worldIn.sendSound(SoundEvent.CLICK, (double)pos.getX() + 0.5D, (double)pos.getY() + 0.1D, (double)pos.getZ() + 0.5D, 0.3F);
} }
if (flag1) if (flag1)

View file

@ -7,7 +7,6 @@ import common.block.ITileEntityProvider;
import common.block.Material; import common.block.Material;
import common.entity.Entity; import common.entity.Entity;
import common.entity.npc.EntityNPC; import common.entity.npc.EntityNPC;
import common.inventory.InventoryHelper;
import common.model.BlockLayer; import common.model.BlockLayer;
import common.model.Model; import common.model.Model;
import common.model.ModelProvider; import common.model.ModelProvider;
@ -419,7 +418,7 @@ public class BlockBrewingStand extends Block implements ITileEntityProvider
double d0 = (double)((float)pos.getX() + 0.4F + rand.floatv() * 0.2F); double d0 = (double)((float)pos.getX() + 0.4F + rand.floatv() * 0.2F);
double d1 = (double)((float)pos.getY() + 0.7F + rand.floatv() * 0.3F); double d1 = (double)((float)pos.getY() + 0.7F + rand.floatv() * 0.3F);
double d2 = (double)((float)pos.getZ() + 0.4F + rand.floatv() * 0.2F); double d2 = (double)((float)pos.getZ() + 0.4F + rand.floatv() * 0.2F);
worldIn.spawnParticle(ParticleType.SMOKE, d0, d1, d2); worldIn.clientParticle(ParticleType.SMOKE, d0, d1, d2);
} }
public void onRemoved(AWorldServer worldIn, BlockPos pos, State state) public void onRemoved(AWorldServer worldIn, BlockPos pos, State state)
@ -428,7 +427,7 @@ public class BlockBrewingStand extends Block implements ITileEntityProvider
if (tileentity instanceof TileEntityBrewingStand) if (tileentity instanceof TileEntityBrewingStand)
{ {
InventoryHelper.dropInventoryItems(worldIn, pos, (TileEntityBrewingStand)tileentity); dropItems(worldIn, pos, (TileEntityBrewingStand)tileentity);
} }
super.onRemoved(worldIn, pos, state); super.onRemoved(worldIn, pos, state);

View file

@ -188,7 +188,7 @@ public class BlockButton extends Block implements Directional
{ {
worldIn.setState(pos, state.withProperty(POWERED, Boolean.valueOf(true)), 3); worldIn.setState(pos, state.withProperty(POWERED, Boolean.valueOf(true)), 3);
worldIn.markBlockRangeForRenderUpdate(pos, pos); worldIn.markBlockRangeForRenderUpdate(pos, pos);
worldIn.playSound(SoundEvent.CLICK, (double)pos.getX() + 0.5D, (double)pos.getY() + 0.5D, (double)pos.getZ() + 0.5D, 0.3F); worldIn.sendSound(SoundEvent.CLICK, (double)pos.getX() + 0.5D, (double)pos.getY() + 0.5D, (double)pos.getZ() + 0.5D, 0.3F);
if(!worldIn.client) { if(!worldIn.client) {
this.notifyNeighbors((AWorldServer)worldIn, pos, (Facing)state.getValue(FACING)); this.notifyNeighbors((AWorldServer)worldIn, pos, (Facing)state.getValue(FACING));
((AWorldServer)worldIn).scheduleUpdate(pos, this, this.tickRate(worldIn, null)); ((AWorldServer)worldIn).scheduleUpdate(pos, this, this.tickRate(worldIn, null));
@ -233,7 +233,7 @@ public class BlockButton extends Block implements Directional
{ {
worldIn.setState(pos, state.withProperty(POWERED, Boolean.valueOf(false))); worldIn.setState(pos, state.withProperty(POWERED, Boolean.valueOf(false)));
this.notifyNeighbors(worldIn, pos, (Facing)state.getValue(FACING)); this.notifyNeighbors(worldIn, pos, (Facing)state.getValue(FACING));
worldIn.playSound(SoundEvent.CLICK, (double)pos.getX() + 0.5D, (double)pos.getY() + 0.5D, (double)pos.getZ() + 0.5D, 0.3F); worldIn.sendSound(SoundEvent.CLICK, (double)pos.getX() + 0.5D, (double)pos.getY() + 0.5D, (double)pos.getZ() + 0.5D, 0.3F);
worldIn.markBlockRangeForRenderUpdate(pos, pos); worldIn.markBlockRangeForRenderUpdate(pos, pos);
} }
} }
@ -269,7 +269,7 @@ public class BlockButton extends Block implements Directional
worldIn.setState(pos, state.withProperty(POWERED, Boolean.valueOf(true))); worldIn.setState(pos, state.withProperty(POWERED, Boolean.valueOf(true)));
this.notifyNeighbors(worldIn, pos, (Facing)state.getValue(FACING)); this.notifyNeighbors(worldIn, pos, (Facing)state.getValue(FACING));
worldIn.markBlockRangeForRenderUpdate(pos, pos); worldIn.markBlockRangeForRenderUpdate(pos, pos);
worldIn.playSound(SoundEvent.CLICK, (double)pos.getX() + 0.5D, (double)pos.getY() + 0.5D, (double)pos.getZ() + 0.5D, 0.3F); worldIn.sendSound(SoundEvent.CLICK, (double)pos.getX() + 0.5D, (double)pos.getY() + 0.5D, (double)pos.getZ() + 0.5D, 0.3F);
} }
if (!flag && flag1) if (!flag && flag1)
@ -277,7 +277,7 @@ public class BlockButton extends Block implements Directional
worldIn.setState(pos, state.withProperty(POWERED, Boolean.valueOf(false))); worldIn.setState(pos, state.withProperty(POWERED, Boolean.valueOf(false)));
this.notifyNeighbors(worldIn, pos, (Facing)state.getValue(FACING)); this.notifyNeighbors(worldIn, pos, (Facing)state.getValue(FACING));
worldIn.markBlockRangeForRenderUpdate(pos, pos); worldIn.markBlockRangeForRenderUpdate(pos, pos);
worldIn.playSound(SoundEvent.CLICK, (double)pos.getX() + 0.5D, (double)pos.getY() + 0.5D, (double)pos.getZ() + 0.5D, 0.3F); worldIn.sendSound(SoundEvent.CLICK, (double)pos.getX() + 0.5D, (double)pos.getY() + 0.5D, (double)pos.getZ() + 0.5D, 0.3F);
} }
if (flag) if (flag)

View file

@ -16,7 +16,6 @@ import common.entity.types.EntityLiving;
import common.init.Items; import common.init.Items;
import common.init.SoundEvent; import common.init.SoundEvent;
import common.inventory.IInventory; import common.inventory.IInventory;
import common.inventory.InventoryHelper;
import common.item.CheatTab; import common.item.CheatTab;
import common.item.ItemStack; import common.item.ItemStack;
import common.item.tool.ItemKey; import common.item.tool.ItemKey;
@ -143,7 +142,7 @@ public class BlockChest extends Block implements ITileEntityProvider, Rotatable
if (tileentity instanceof IInventory) if (tileentity instanceof IInventory)
{ {
InventoryHelper.dropInventoryItems(worldIn, pos, (IInventory)tileentity); dropItems(worldIn, pos, (IInventory)tileentity);
} }
super.onRemoved(worldIn, pos, state); super.onRemoved(worldIn, pos, state);

View file

@ -7,7 +7,6 @@ import common.block.Material;
import common.entity.item.EntityItem; import common.entity.item.EntityItem;
import common.entity.npc.EntityNPC; import common.entity.npc.EntityNPC;
import common.entity.types.EntityLiving; import common.entity.types.EntityLiving;
import common.inventory.InventoryHelper;
import common.item.CheatTab; import common.item.CheatTab;
import common.item.ItemStack; import common.item.ItemStack;
import common.model.Model; import common.model.Model;
@ -28,7 +27,7 @@ public class BlockDispenser extends Block implements ITileEntityProvider, Direct
{ {
protected Random rand = new Random(); protected Random rand = new Random();
public static void dispense(World world, double speed, Facing facing, Vec3 position, ItemStack stack) public static void dispense(AWorldServer world, double speed, Facing facing, Vec3 position, ItemStack stack)
{ {
EntityItem entity = new EntityItem(world, position.xCoord, position.yCoord - (facing.getAxis() == Facing.Axis.Y ? 0.125 : 0.15625), position.zCoord, stack); EntityItem entity = new EntityItem(world, position.xCoord, position.yCoord - (facing.getAxis() == Facing.Axis.Y ? 0.125 : 0.15625), position.zCoord, stack);
double velo = world.rand.doublev() * 0.1 + 0.2; double velo = world.rand.doublev() * 0.1 + 0.2;
@ -145,7 +144,7 @@ public class BlockDispenser extends Block implements ITileEntityProvider, Direct
if (tileentity instanceof TileEntityDispenser) if (tileentity instanceof TileEntityDispenser)
{ {
InventoryHelper.dropInventoryItems(worldIn, pos, (TileEntityDispenser)tileentity); dropItems(worldIn, pos, (TileEntityDispenser)tileentity);
} }
super.onRemoved(worldIn, pos, state); super.onRemoved(worldIn, pos, state);

View file

@ -8,7 +8,6 @@ import common.entity.npc.EntityNPC;
import common.entity.types.EntityLiving; import common.entity.types.EntityLiving;
import common.init.Blocks; import common.init.Blocks;
import common.init.Items; import common.init.Items;
import common.inventory.InventoryHelper;
import common.item.Item; import common.item.Item;
import common.model.Model; import common.model.Model;
import common.model.ModelProvider; import common.model.ModelProvider;
@ -87,23 +86,23 @@ public class BlockFurnace extends Block implements ITileEntityProvider, Rotatabl
switch (enumfacing) switch (enumfacing)
{ {
case WEST: case WEST:
worldIn.spawnParticle(ParticleType.SMOKE, d0 - d3, d1, d2 + d4); worldIn.clientParticle(ParticleType.SMOKE, d0 - d3, d1, d2 + d4);
worldIn.spawnParticle(ParticleType.FLAME, d0 - d3, d1, d2 + d4); worldIn.clientParticle(ParticleType.FLAME, d0 - d3, d1, d2 + d4);
break; break;
case EAST: case EAST:
worldIn.spawnParticle(ParticleType.SMOKE, d0 + d3, d1, d2 + d4); worldIn.clientParticle(ParticleType.SMOKE, d0 + d3, d1, d2 + d4);
worldIn.spawnParticle(ParticleType.FLAME, d0 + d3, d1, d2 + d4); worldIn.clientParticle(ParticleType.FLAME, d0 + d3, d1, d2 + d4);
break; break;
case NORTH: case NORTH:
worldIn.spawnParticle(ParticleType.SMOKE, d0 + d4, d1, d2 - d3); worldIn.clientParticle(ParticleType.SMOKE, d0 + d4, d1, d2 - d3);
worldIn.spawnParticle(ParticleType.FLAME, d0 + d4, d1, d2 - d3); worldIn.clientParticle(ParticleType.FLAME, d0 + d4, d1, d2 - d3);
break; break;
case SOUTH: case SOUTH:
worldIn.spawnParticle(ParticleType.SMOKE, d0 + d4, d1, d2 + d3); worldIn.clientParticle(ParticleType.SMOKE, d0 + d4, d1, d2 + d3);
worldIn.spawnParticle(ParticleType.FLAME, d0 + d4, d1, d2 + d3); worldIn.clientParticle(ParticleType.FLAME, d0 + d4, d1, d2 + d3);
} }
} }
} }
@ -179,7 +178,7 @@ public class BlockFurnace extends Block implements ITileEntityProvider, Rotatabl
if (tileentity instanceof TileEntityFurnace) if (tileentity instanceof TileEntityFurnace)
{ {
InventoryHelper.dropInventoryItems(worldIn, pos, (TileEntityFurnace)tileentity); dropItems(worldIn, pos, (TileEntityFurnace)tileentity);
} }
} }

View file

@ -9,7 +9,6 @@ import common.block.Material;
import common.entity.Entity; import common.entity.Entity;
import common.entity.npc.EntityNPC; import common.entity.npc.EntityNPC;
import common.entity.types.EntityLiving; import common.entity.types.EntityLiving;
import common.inventory.InventoryHelper;
import common.item.CheatTab; import common.item.CheatTab;
import common.model.BlockLayer; import common.model.BlockLayer;
import common.model.Model; import common.model.Model;
@ -156,7 +155,7 @@ public class BlockHopper extends Block implements ITileEntityProvider, Direction
if (tileentity instanceof TileEntityHopper) if (tileentity instanceof TileEntityHopper)
{ {
InventoryHelper.dropInventoryItems(worldIn, pos, (TileEntityHopper)tileentity); dropItems(worldIn, pos, (TileEntityHopper)tileentity);
} }
super.onRemoved(worldIn, pos, state); super.onRemoved(worldIn, pos, state);

View file

@ -211,7 +211,7 @@ public class BlockLever extends Block
{ {
state = state.cycleProperty(POWERED); state = state.cycleProperty(POWERED);
worldIn.setState(pos, state, 3); worldIn.setState(pos, state, 3);
worldIn.playSound(SoundEvent.CLICK, (double)pos.getX() + 0.5D, (double)pos.getY() + 0.5D, (double)pos.getZ() + 0.5D, 0.3F); worldIn.sendSound(SoundEvent.CLICK, (double)pos.getX() + 0.5D, (double)pos.getY() + 0.5D, (double)pos.getZ() + 0.5D, 0.3F);
((AWorldServer)worldIn).notifyNeighborsOfStateChange(pos, this); ((AWorldServer)worldIn).notifyNeighborsOfStateChange(pos, this);
Facing enumfacing = ((BlockLever.EnumOrientation)state.getValue(FACING)).getFacing(); Facing enumfacing = ((BlockLever.EnumOrientation)state.getValue(FACING)).getFacing();
((AWorldServer)worldIn).notifyNeighborsOfStateChange(pos.offset(enumfacing.getOpposite()), this); ((AWorldServer)worldIn).notifyNeighborsOfStateChange(pos.offset(enumfacing.getOpposite()), this);

View file

@ -31,7 +31,7 @@ public class BlockLitTorch extends BlockTorch {
public void extinguish(AWorldServer worldIn, BlockPos pos, State state, Random rand) { public void extinguish(AWorldServer worldIn, BlockPos pos, State state, Random rand) {
worldIn.setState(pos, this.unlit.getState().withProperty(FACING, state.getValue(FACING)), 3); worldIn.setState(pos, this.unlit.getState().withProperty(FACING, state.getValue(FACING)), 3);
worldIn.playSound(SoundEvent.FIZZ, (double)((float)pos.getX() + 0.5F), (double)((float)pos.getY() + 0.5F), (double)((float)pos.getZ() + 0.5F), worldIn.sendSound(SoundEvent.FIZZ, (double)((float)pos.getX() + 0.5F), (double)((float)pos.getY() + 0.5F), (double)((float)pos.getZ() + 0.5F),
0.5F); 0.5F);
for(int i = 0; i < 5; ++i) { for(int i = 0; i < 5; ++i) {
double d0 = (double)pos.getX() + rand.doublev() * 0.6D + 0.2D; double d0 = (double)pos.getX() + rand.doublev() * 0.6D + 0.2D;
@ -65,13 +65,13 @@ public class BlockLitTorch extends BlockTorch {
if (enumfacing.getAxis().isHorizontal()) if (enumfacing.getAxis().isHorizontal())
{ {
Facing enumfacing1 = enumfacing.getOpposite(); Facing enumfacing1 = enumfacing.getOpposite();
worldIn.spawnParticle(ParticleType.SMOKE, d0 + d4 * (double)enumfacing1.getFrontOffsetX(), d1 + d3, d2 + d4 * (double)enumfacing1.getFrontOffsetZ()); worldIn.clientParticle(ParticleType.SMOKE, d0 + d4 * (double)enumfacing1.getFrontOffsetX(), d1 + d3, d2 + d4 * (double)enumfacing1.getFrontOffsetZ());
worldIn.spawnParticle(ParticleType.FLAME, d0 + d4 * (double)enumfacing1.getFrontOffsetX(), d1 + d3, d2 + d4 * (double)enumfacing1.getFrontOffsetZ()); worldIn.clientParticle(ParticleType.FLAME, d0 + d4 * (double)enumfacing1.getFrontOffsetX(), d1 + d3, d2 + d4 * (double)enumfacing1.getFrontOffsetZ());
} }
else else
{ {
worldIn.spawnParticle(ParticleType.SMOKE, d0, d1, d2); worldIn.clientParticle(ParticleType.SMOKE, d0, d1, d2);
worldIn.spawnParticle(ParticleType.FLAME, d0, d1, d2); worldIn.clientParticle(ParticleType.FLAME, d0, d1, d2);
} }
} }
else { else {
@ -88,7 +88,7 @@ public class BlockLitTorch extends BlockTorch {
d2 += 0.27D * (double)enumfacing1.getFrontOffsetZ(); d2 += 0.27D * (double)enumfacing1.getFrontOffsetZ();
} }
worldIn.spawnParticle(ParticleType.DUST, d0, d1, d2, this.unlit.getParticleColor()); worldIn.clientParticle(ParticleType.DUST, d0, d1, d2, this.unlit.getParticleColor());
} }
} }

View file

@ -6,7 +6,6 @@ import common.block.ITileEntityProvider;
import common.block.Material; import common.block.Material;
import common.entity.npc.EntityNPC; import common.entity.npc.EntityNPC;
import common.entity.types.EntityLiving; import common.entity.types.EntityLiving;
import common.inventory.InventoryHelper;
import common.item.CheatTab; import common.item.CheatTab;
import common.properties.Property; import common.properties.Property;
import common.tileentity.TileEntity; import common.tileentity.TileEntity;
@ -54,7 +53,7 @@ public abstract class BlockMachine extends Block implements Rotatable, ITileEnti
public void onRemoved(AWorldServer worldIn, BlockPos pos, State state) { public void onRemoved(AWorldServer worldIn, BlockPos pos, State state) {
TileEntity tileentity = worldIn.getTileEntity(pos); TileEntity tileentity = worldIn.getTileEntity(pos);
if(tileentity instanceof Device) { if(tileentity instanceof Device) {
InventoryHelper.dropInventoryItems(worldIn, pos, (Device)tileentity); dropItems(worldIn, pos, (Device)tileentity);
} }
super.onRemoved(worldIn, pos, state); super.onRemoved(worldIn, pos, state);
} }

View file

@ -324,7 +324,7 @@ public class BlockPistonBase extends Block implements Directional
} }
worldIn.setState(pos, state.withProperty(EXTENDED, Boolean.valueOf(true)), 2); worldIn.setState(pos, state.withProperty(EXTENDED, Boolean.valueOf(true)), 2);
worldIn.playSound(SoundEvent.PISTON_OUT, (double)pos.getX() + 0.5D, (double)pos.getY() + 0.5D, (double)pos.getZ() + 0.5D, 0.5F); worldIn.sendSound(SoundEvent.PISTON_OUT, (double)pos.getX() + 0.5D, (double)pos.getY() + 0.5D, (double)pos.getZ() + 0.5D, 0.5F);
} }
} }
else if (!flag && ((Boolean)state.getValue(EXTENDED)).booleanValue()) else if (!flag && ((Boolean)state.getValue(EXTENDED)).booleanValue())
@ -345,7 +345,7 @@ public class BlockPistonBase extends Block implements Directional
worldIn.setBlockToAir(pos.offset(enumfacing)); worldIn.setBlockToAir(pos.offset(enumfacing));
} }
worldIn.playSound(SoundEvent.PISTON_IN, (double)pos.getX() + 0.5D, (double)pos.getY() + 0.5D, (double)pos.getZ() + 0.5D, 0.5F); worldIn.sendSound(SoundEvent.PISTON_IN, (double)pos.getX() + 0.5D, (double)pos.getY() + 0.5D, (double)pos.getZ() + 0.5D, 0.5F);
} }
} }

View file

@ -23,6 +23,7 @@ import common.util.BlockPos;
import common.util.ExtMath; import common.util.ExtMath;
import common.util.Facing; import common.util.Facing;
import common.util.Vec3; import common.util.Vec3;
import common.world.AWorldServer;
import common.world.Explosion; import common.world.Explosion;
import common.world.State; import common.world.State;
import common.world.World; import common.world.World;
@ -165,7 +166,7 @@ public class BlockTNT extends Block
return TextColor.RED; return TextColor.RED;
} }
public boolean dispense(World world, TileEntity source, Vec3 position, BlockPos blockpos, Facing facing, ItemStack stack) { public boolean dispense(AWorldServer world, TileEntity source, Vec3 position, BlockPos blockpos, Facing facing, ItemStack stack) {
blockpos = blockpos.offset(facing); blockpos = blockpos.offset(facing);
EntityTnt entitytntprimed = new EntityTnt(world, (double)blockpos.getX() + 0.5D, (double)blockpos.getY(), (double)blockpos.getZ() + 0.5D, (EntityLiving)null, this.power); EntityTnt entitytntprimed = new EntityTnt(world, (double)blockpos.getX() + 0.5D, (double)blockpos.getY(), (double)blockpos.getZ() + 0.5D, (EntityLiving)null, this.power);
world.spawnEntityInWorld(entitytntprimed); world.spawnEntityInWorld(entitytntprimed);

View file

@ -40,7 +40,7 @@ public class BlockToggleableLight extends Block {
player.getCurrentEquippedItem().decrSize(); player.getCurrentEquippedItem().decrSize();
} }
this.toggle(worldIn, pos); this.toggle(worldIn, pos);
worldIn.playAuxSFX(player, this.isOn ? 1004 : 1007, pos, 0); worldIn.playEffect(player, this.isOn ? 1004 : 1007, pos, 0);
return true; return true;
} }

View file

@ -232,19 +232,19 @@ public class BlockTripWireHook extends Block implements Rotatable
{ {
if (powered && !wasPowered) if (powered && !wasPowered)
{ {
worldIn.playSound(SoundEvent.CLICK, (double)pos.getX() + 0.5D, (double)pos.getY() + 0.1D, (double)pos.getZ() + 0.5D, 0.4F); worldIn.sendSound(SoundEvent.CLICK, (double)pos.getX() + 0.5D, (double)pos.getY() + 0.1D, (double)pos.getZ() + 0.5D, 0.4F);
} }
else if (!powered && wasPowered) else if (!powered && wasPowered)
{ {
worldIn.playSound(SoundEvent.CLICK, (double)pos.getX() + 0.5D, (double)pos.getY() + 0.1D, (double)pos.getZ() + 0.5D, 0.4F); worldIn.sendSound(SoundEvent.CLICK, (double)pos.getX() + 0.5D, (double)pos.getY() + 0.1D, (double)pos.getZ() + 0.5D, 0.4F);
} }
else if (attached && !wasAttached) else if (attached && !wasAttached)
{ {
worldIn.playSound(SoundEvent.CLICK, (double)pos.getX() + 0.5D, (double)pos.getY() + 0.1D, (double)pos.getZ() + 0.5D, 0.4F); worldIn.sendSound(SoundEvent.CLICK, (double)pos.getX() + 0.5D, (double)pos.getY() + 0.1D, (double)pos.getZ() + 0.5D, 0.4F);
} }
else if (!attached && wasAttached) else if (!attached && wasAttached)
{ {
worldIn.playSound(SoundEvent.BOWHIT, (double)pos.getX() + 0.5D, (double)pos.getY() + 0.1D, (double)pos.getZ() + 0.5D, 0.4F); worldIn.sendSound(SoundEvent.BOWHIT, (double)pos.getX() + 0.5D, (double)pos.getY() + 0.1D, (double)pos.getZ() + 0.5D, 0.4F);
} }
} }

View file

@ -33,7 +33,7 @@ public class BlockUnlitTorch extends BlockTorch {
if(item == Items.lighter || item == Items.fireball) { if(item == Items.lighter || item == Items.fireball) {
worldIn.setState(pos, this.lit.getState().withProperty(FACING, state.getValue(FACING)).withProperty(BlockLitTorch.FUEL, 7), 3); worldIn.setState(pos, this.lit.getState().withProperty(FACING, state.getValue(FACING)).withProperty(BlockLitTorch.FUEL, 7), 3);
worldIn.playAuxSFX(playerIn, 1007, pos, 0); worldIn.playEffect(playerIn, 1007, pos, 0);
if(item == Items.lighter) { if(item == Items.lighter) {
playerIn.getCurrentEquippedItem().damage(1, playerIn); playerIn.getCurrentEquippedItem().damage(1, playerIn);

View file

@ -114,7 +114,7 @@ public class BlockWarpChest extends Block implements Rotatable
double d0 = (double)pos.getX() + 0.5D + 0.25D * (double)j; double d0 = (double)pos.getX() + 0.5D + 0.25D * (double)j;
double d1 = (double)((float)pos.getY() + rand.floatv()); double d1 = (double)((float)pos.getY() + rand.floatv());
double d2 = (double)pos.getZ() + 0.5D + 0.25D * (double)k; double d2 = (double)pos.getZ() + 0.5D + 0.25D * (double)k;
worldIn.spawnParticle(ParticleType.TELEPORT, d0, d1, d2); worldIn.clientParticle(ParticleType.TELEPORT, d0, d1, d2);
} }
} }

View file

@ -1007,7 +1007,7 @@ public abstract class Entity
{ {
float f2 = (this.rand.floatv() * 2.0F - 1.0F) * this.width; float f2 = (this.rand.floatv() * 2.0F - 1.0F) * this.width;
float f3 = (this.rand.floatv() * 2.0F - 1.0F) * this.width; float f3 = (this.rand.floatv() * 2.0F - 1.0F) * this.width;
this.worldObj.spawnParticle(ParticleType.SPLASH, this.posX + (double)f2, (double)(f1 + 1.0F), this.posZ + (double)f3); this.worldObj.clientParticle(ParticleType.SPLASH, this.posX + (double)f2, (double)(f1 + 1.0F), this.posZ + (double)f3);
} }
if(this.worldObj.getState(new BlockPos(this.posX, this.posY, this.posZ)).getBlock().getMaterial() == Material.WATER) { if(this.worldObj.getState(new BlockPos(this.posX, this.posY, this.posZ)).getBlock().getMaterial() == Material.WATER) {
@ -1015,7 +1015,7 @@ public abstract class Entity
{ {
float f4 = (this.rand.floatv() * 2.0F - 1.0F) * this.width; float f4 = (this.rand.floatv() * 2.0F - 1.0F) * this.width;
float f5 = (this.rand.floatv() * 2.0F - 1.0F) * this.width; float f5 = (this.rand.floatv() * 2.0F - 1.0F) * this.width;
this.worldObj.spawnParticle(ParticleType.SPLASH, this.posX + (double)f4, (double)(f1 + 1.0F), this.posZ + (double)f5); this.worldObj.clientParticle(ParticleType.SPLASH, this.posX + (double)f4, (double)(f1 + 1.0F), this.posZ + (double)f5);
} }
} }
} }
@ -1042,7 +1042,7 @@ public abstract class Entity
if (block.getRenderType() != -1) if (block.getRenderType() != -1)
{ {
this.worldObj.spawnParticle(ParticleType.BLOCK_CRACK, this.posX + ((double)this.rand.floatv() - 0.5D) * (double)this.width, this.getEntityBoundingBox().minY + 0.1D, this.posZ + ((double)this.rand.floatv() - 0.5D) * (double)this.width, BlockRegistry.getId(iblockstate)); this.worldObj.clientParticle(ParticleType.BLOCK_CRACK, this.posX + ((double)this.rand.floatv() - 0.5D) * (double)this.width, this.getEntityBoundingBox().minY + 0.1D, this.posZ + ((double)this.rand.floatv() - 0.5D) * (double)this.width, BlockRegistry.getId(iblockstate));
} }
} }
@ -1639,7 +1639,7 @@ public abstract class Entity
*/ */
public EntityItem entityDropItem(ItemStack itemStackIn, float offsetY) public EntityItem entityDropItem(ItemStack itemStackIn, float offsetY)
{ {
if (!itemStackIn.isEmpty() && itemStackIn.getItem() != null) if (!this.worldObj.client && !itemStackIn.isEmpty() && itemStackIn.getItem() != null)
{ {
EntityItem entityitem = new EntityItem(this.worldObj, this.posX, this.posY + (double)offsetY, this.posZ, itemStackIn); EntityItem entityitem = new EntityItem(this.worldObj, this.posX, this.posY + (double)offsetY, this.posZ, itemStackIn);
entityitem.setDefaultPickupDelay(); entityitem.setDefaultPickupDelay();

View file

@ -154,7 +154,7 @@ public class EntityBat extends EntityLiving
if (!this.worldObj.getState(blockpos1).getBlock().isNormalCube()) if (!this.worldObj.getState(blockpos1).getBlock().isNormalCube())
{ {
this.setIsBatHanging(false); this.setIsBatHanging(false);
this.worldObj.playAuxSFX(1015, blockpos, 0); this.worldObj.playEffect(1015, blockpos, 0);
} }
else else
{ {
@ -166,7 +166,7 @@ public class EntityBat extends EntityLiving
if (this.worldObj.getClosestPlayerToEntity(this, 4.0D) != null) if (this.worldObj.getClosestPlayerToEntity(this, 4.0D) != null)
{ {
this.setIsBatHanging(false); this.setIsBatHanging(false);
this.worldObj.playAuxSFX(1015, blockpos, 0); this.worldObj.playEffect(1015, blockpos, 0);
} }
} }
} }

View file

@ -109,7 +109,7 @@ public class EntityDragon extends EntityLiving implements IEntityMultiPart
if (f1 <= -0.3F && f >= -0.3F) // && !this.isSilent()) if (f1 <= -0.3F && f >= -0.3F) // && !this.isSilent())
{ {
this.worldObj.playSound(this.posX, this.posY, this.posZ, SoundEvent.DRAGON_WINGS, 5.0F); this.worldObj.clientSound(SoundEvent.DRAGON_WINGS, this.posX, this.posY, this.posZ, 5.0F);
} }
} }
@ -120,7 +120,7 @@ public class EntityDragon extends EntityLiving implements IEntityMultiPart
float f11 = (this.rand.floatv() - 0.5F) * 8.0F; float f11 = (this.rand.floatv() - 0.5F) * 8.0F;
float f13 = (this.rand.floatv() - 0.5F) * 4.0F; float f13 = (this.rand.floatv() - 0.5F) * 4.0F;
float f14 = (this.rand.floatv() - 0.5F) * 8.0F; float f14 = (this.rand.floatv() - 0.5F) * 8.0F;
this.worldObj.spawnParticle(ParticleType.EXPLOSION_LARGE, this.posX + (double)f11, this.posY + 2.0D + (double)f13, this.posZ + (double)f14, 100); this.worldObj.clientParticle(ParticleType.EXPLOSION_LARGE, this.posX + (double)f11, this.posY + 2.0D + (double)f13, this.posZ + (double)f14, 100);
} }
else else
{ {

View file

@ -1637,7 +1637,7 @@ public class EntityHorse extends EntityAnimal implements IInvBasic
for (int i = 0; i < 7; ++i) for (int i = 0; i < 7; ++i)
{ {
this.worldObj.spawnParticle(enumparticletypes, this.posX + (double)(this.rand.floatv() * this.width * 2.0F) - (double)this.width, this.posY + 0.5D + (double)(this.rand.floatv() * this.height), this.posZ + (double)(this.rand.floatv() * this.width * 2.0F) - (double)this.width); this.worldObj.clientParticle(enumparticletypes, this.posX + (double)(this.rand.floatv() * this.width * 2.0F) - (double)this.width, this.posY + 0.5D + (double)(this.rand.floatv() * this.height), this.posZ + (double)(this.rand.floatv() * this.width * 2.0F) - (double)this.width);
} }
} }

View file

@ -329,7 +329,7 @@ public class EntityRabbit extends EntityAnimal {
} }
protected void consumeBlock(BlockPos pos, State state) { protected void consumeBlock(BlockPos pos, State state) {
this.worldObj.playAuxSFX(2001, pos, BlockRegistry.getId(state)); this.worldObj.playEffect(2001, pos, BlockRegistry.getId(state));
this.foodCooldown = this.rand.excl(10, this.isChild() ? 20 : 50); this.foodCooldown = this.rand.excl(10, this.isChild() ? 20 : 50);
if(this.isChild()) if(this.isChild())
this.grow(this.rand.range(250, 350)); this.grow(this.rand.range(250, 350));

View file

@ -249,7 +249,7 @@ public class EntityWolf extends EntityTameable
{ {
float f1 = (this.rand.floatv() * 2.0F - 1.0F) * this.width * 0.5F; float f1 = (this.rand.floatv() * 2.0F - 1.0F) * this.width * 0.5F;
float f2 = (this.rand.floatv() * 2.0F - 1.0F) * this.width * 0.5F; float f2 = (this.rand.floatv() * 2.0F - 1.0F) * this.width * 0.5F;
this.worldObj.spawnParticle(ParticleType.SPLASH, this.posX + (double)f1, (double)(f + 0.8F), this.posZ + (double)f2); this.worldObj.clientParticle(ParticleType.SPLASH, this.posX + (double)f1, (double)(f + 0.8F), this.posZ + (double)f2);
} }
} }
} }

View file

@ -45,8 +45,8 @@ public class EntityLightning extends EntityWeatherEffect
if (this.lightningState == 2) if (this.lightningState == 2)
{ {
this.worldObj.playSound(SoundEvent.THUNDER, this.posX, this.posY, this.posZ, 10000.0F); this.worldObj.sendSound(SoundEvent.THUNDER, this.posX, this.posY, this.posZ, 10000.0F);
this.worldObj.playSound(SoundEvent.EXPLODE, this.posX, this.posY, this.posZ, 2.0F); this.worldObj.sendSound(SoundEvent.EXPLODE, this.posX, this.posY, this.posZ, 2.0F);
} }
--this.lightningState; --this.lightningState;

View file

@ -279,13 +279,13 @@ public class EntityBoat extends Entity
{ {
double d7 = this.posX - d2 * d5 * 0.8D + d4 * d6; double d7 = this.posX - d2 * d5 * 0.8D + d4 * d6;
double d8 = this.posZ - d4 * d5 * 0.8D - d2 * d6; double d8 = this.posZ - d4 * d5 * 0.8D - d2 * d6;
this.worldObj.spawnParticle(ParticleType.SPLASH, d7, this.posY - 0.125D, d8); this.worldObj.clientParticle(ParticleType.SPLASH, d7, this.posY - 0.125D, d8);
} }
else else
{ {
double d24 = this.posX + d2 + d4 * d5 * 0.7D; double d24 = this.posX + d2 + d4 * d5 * 0.7D;
double d25 = this.posZ + d4 - d2 * d5 * 0.7D; double d25 = this.posZ + d4 - d2 * d5 * 0.7D;
this.worldObj.spawnParticle(ParticleType.SPLASH, d24, this.posY - 0.125D, d25); this.worldObj.clientParticle(ParticleType.SPLASH, d24, this.posY - 0.125D, d25);
} }
} }
} }

View file

@ -70,7 +70,7 @@ public class EntityItem extends Entity
((AWorldServer)this.worldObj).spawnParticles(ParticleType.ITEM_CRACK, this.posX + this.rand.drange(-0.15, 0.15), this.posY + 0.15, this.posZ + this.rand.drange(-0.15, 0.15), ((AWorldServer)this.worldObj).spawnParticles(ParticleType.ITEM_CRACK, this.posX + this.rand.drange(-0.15, 0.15), this.posY + 0.15, this.posZ + this.rand.drange(-0.15, 0.15),
ItemRegistry.getId(this.getEntityItem().getItem())); ItemRegistry.getId(this.getEntityItem().getItem()));
} }
this.worldObj.playAuxSFX(1023, this.getPosition(), 0); this.worldObj.playEffect(1023, this.getPosition(), 0);
this.setDead(); this.setDead();
} }
} }

View file

@ -82,7 +82,7 @@ public class EntityNuke extends Entity
{ {
this.handleWaterMovement(); this.handleWaterMovement();
// if(!this.isInvisible()) { // if(!this.isInvisible()) {
this.worldObj.spawnParticle(ParticleType.FLAME, this.posX, this.posY + 1.1D, this.posZ); this.worldObj.clientParticle(ParticleType.FLAME, this.posX, this.posY + 1.1D, this.posZ);
// } // }
} }
} }

View file

@ -64,7 +64,7 @@ public class EntityOrb extends EntityThrowable
for (int i = 0; i < 32; ++i) for (int i = 0; i < 32; ++i)
{ {
this.worldObj.spawnParticle(ParticleType.TELEPORT, this.posX - 0.25 + this.rand.doublev() * 0.5, this.posY + this.rand.doublev() * 2.0D, this.posZ - 0.25 + this.rand.doublev() * 0.5); this.worldObj.clientParticle(ParticleType.TELEPORT, this.posX - 0.25 + this.rand.doublev() * 0.5, this.posY + this.rand.doublev() * 2.0D, this.posZ - 0.25 + this.rand.doublev() * 0.5);
} }
if (!this.worldObj.client) if (!this.worldObj.client)
@ -72,7 +72,7 @@ public class EntityOrb extends EntityThrowable
// if(entitylivingbase != null) // if(entitylivingbase != null)
if (entitylivingbase != null) // && entitylivingbase.isPlayer()) if (entitylivingbase != null) // && entitylivingbase.isPlayer())
{ {
this.worldObj.playAuxSFX(1013, entitylivingbase.getPosition(), 0); this.worldObj.playEffect(1013, entitylivingbase.getPosition(), 0);
// EntityNPCMP entityplayermp = (EntityNPCMP)entitylivingbase; // EntityNPCMP entityplayermp = (EntityNPCMP)entitylivingbase;
if (/* entityplayermp.netHandler.connection.isChannelOpen() && */ entitylivingbase.worldObj == this.worldObj) // && !entityplayermp.isPlayerSleeping()) if (/* entityplayermp.netHandler.connection.isChannelOpen() && */ entitylivingbase.worldObj == this.worldObj) // && !entityplayermp.isPlayerSleeping())
@ -104,7 +104,7 @@ public class EntityOrb extends EntityThrowable
this.setDead(); this.setDead();
if(entitylivingbase != null) if(entitylivingbase != null)
this.worldObj.playAuxSFX(1005, entitylivingbase.getPosition(), 0); this.worldObj.playEffect(1005, entitylivingbase.getPosition(), 0);
} }
if (pos.entity != null) if (pos.entity != null)
@ -112,7 +112,7 @@ public class EntityOrb extends EntityThrowable
if(Vars.telefrag) { if(Vars.telefrag) {
pos.entity.attackEntityFrom(DamageSource.causeTeleFragDamage(this, entitylivingbase), 10000); pos.entity.attackEntityFrom(DamageSource.causeTeleFragDamage(this, entitylivingbase), 10000);
if(!this.worldObj.client) if(!this.worldObj.client)
this.worldObj.playAuxSFX(1017, pos.entity.getPosition(), 0); this.worldObj.playEffect(1017, pos.entity.getPosition(), 0);
} }
else if(Vars.knockOrb) { else if(Vars.knockOrb) {
pos.entity.attackEntityFrom(DamageSource.causeThrownDamage(this, entitylivingbase), Vars.orbDamageOther); pos.entity.attackEntityFrom(DamageSource.causeThrownDamage(this, entitylivingbase), Vars.orbDamageOther);

View file

@ -96,7 +96,7 @@ public class EntityTnt extends Entity implements IObjectData
else else
{ {
this.handleWaterMovement(); this.handleWaterMovement();
this.worldObj.spawnParticle(ParticleType.SMOKE, this.posX, this.posY + 0.5D, this.posZ); this.worldObj.clientParticle(ParticleType.SMOKE, this.posX, this.posY + 0.5D, this.posZ);
} }
} }

View file

@ -52,7 +52,7 @@ public class EntityTntCart extends EntityCart
if (this.minecartTNTFuse > 0) if (this.minecartTNTFuse > 0)
{ {
--this.minecartTNTFuse; --this.minecartTNTFuse;
this.worldObj.spawnParticle(ParticleType.SMOKE, this.posX, this.posY + 0.5D, this.posZ); this.worldObj.clientParticle(ParticleType.SMOKE, this.posX, this.posY + 0.5D, this.posZ);
} }
else if (this.minecartTNTFuse == 0) else if (this.minecartTNTFuse == 0)
{ {

View file

@ -337,7 +337,7 @@ public class EntityXp extends Entity implements IObjectData
this.xpValue = id; this.xpValue = id;
for (int i = 0; i < 2; i++) for (int i = 0; i < 2; i++)
{ {
this.worldObj.spawnParticle(ParticleType.GROW, this.worldObj.clientParticle(ParticleType.GROW,
this.posX + (double)(this.rand.floatv() * this.width) - (double)this.width * 0.5, this.posX + (double)(this.rand.floatv() * this.width) - (double)this.width * 0.5,
this.posY + (double)(this.rand.floatv() * this.height), this.posY + (double)(this.rand.floatv() * this.height),
this.posZ + (double)(this.rand.floatv() * this.width) - (double)this.width * 0.5); this.posZ + (double)(this.rand.floatv() * this.width) - (double)this.width * 0.5);

View file

@ -48,7 +48,7 @@ public class EntityXpBottle extends EntityThrowable
{ {
if (!this.worldObj.client) if (!this.worldObj.client)
{ {
this.worldObj.playAuxSFX(2002, new BlockPos(this), 0); this.worldObj.playEffect(2002, new BlockPos(this), 0);
int i = this.worldObj.rand.rangeBonus(3, 7, 4); int i = this.worldObj.rand.rangeBonus(3, 7, 4);
while (i > 0) while (i > 0)

View file

@ -32,7 +32,7 @@ public class EntityCultivator extends EntityNPC {
if(EntityCultivator.this.rand.chance(100) && EntityCultivator.this.getHeldItem() != null if(EntityCultivator.this.rand.chance(100) && EntityCultivator.this.getHeldItem() != null
&& EntityCultivator.this.getHeldItem().getItem() == Items.camera) { && EntityCultivator.this.getHeldItem().getItem() == Items.camera) {
EntityCultivator.this.swingItem(); EntityCultivator.this.swingItem();
EntityCultivator.this.worldObj.playAuxSFX(1024, new BlockPos(EntityCultivator.this.posX, EntityCultivator.this.worldObj.playEffect(1024, new BlockPos(EntityCultivator.this.posX,
EntityCultivator.this.posY + EntityCultivator.this.getEyeHeight(), EntityCultivator.this.posZ), 0); EntityCultivator.this.posY + EntityCultivator.this.getEyeHeight(), EntityCultivator.this.posZ), 0);
} }
} }

View file

@ -84,11 +84,11 @@ public class EntityDarkMage extends EntityHoveringNPC {
{ {
if(this.worldObj.client && this.isAttacking()) { if(this.worldObj.client && this.isAttacking()) {
if(this.rand.chance(24)) { // && !this.isSilent()) { if(this.rand.chance(24)) { // && !this.isSilent()) {
this.worldObj.playSound(this.posX + 0.5D, this.posY + 0.5D, this.posZ + 0.5D, SoundEvent.FIRE, this.worldObj.clientSound(SoundEvent.FIRE, this.posX + 0.5D, this.posY + 0.5D, this.posZ + 0.5D,
1.0F + this.rand.floatv()); 1.0F + this.rand.floatv());
} }
for(int i = 0; i < 2; ++i) { for(int i = 0; i < 2; ++i) {
this.worldObj.spawnParticle(ParticleType.SMOKE, this.posX + (this.rand.doublev() - 0.5D) * (double)this.width, this.worldObj.clientParticle(ParticleType.SMOKE, this.posX + (this.rand.doublev() - 0.5D) * (double)this.width,
this.posY + this.rand.doublev() * (double)this.height, this.posY + this.rand.doublev() * (double)this.height,
this.posZ + (this.rand.doublev() - 0.5D) * (double)this.width); this.posZ + (this.rand.doublev() - 0.5D) * (double)this.width);
} }

View file

@ -88,14 +88,14 @@ public class EntityGargoyle extends EntityFlyingNPC
for (int l = 0; l < 5; ++l) for (int l = 0; l < 5; ++l)
{ {
this.worldObj.spawnParticle(ParticleType.SMOKE, this.posX + this.rand.gaussian() * 0.30000001192092896D, this.posY + this.height + this.rand.gaussian() * 0.30000001192092896D, this.posZ + this.rand.gaussian() * 0.30000001192092896D); this.worldObj.clientParticle(ParticleType.SMOKE, this.posX + this.rand.gaussian() * 0.30000001192092896D, this.posY + this.height + this.rand.gaussian() * 0.30000001192092896D, this.posZ + this.rand.gaussian() * 0.30000001192092896D);
} }
if (this.getInvulTime() > 0) if (this.getInvulTime() > 0)
{ {
for (int i1 = 0; i1 < 3; ++i1) for (int i1 = 0; i1 < 3; ++i1)
{ {
this.worldObj.spawnParticle(ParticleType.CRIT, this.posX + this.rand.gaussian() * 1.0D, this.posY + (double)(this.rand.floatv() * 3.3F), this.posZ + this.rand.gaussian() * 1.0D); this.worldObj.clientParticle(ParticleType.CRIT, this.posX + this.rand.gaussian() * 1.0D, this.posY + (double)(this.rand.floatv() * 3.3F), this.posZ + this.rand.gaussian() * 1.0D);
} }
} }
} }

View file

@ -231,7 +231,7 @@ public class EntityHaunter extends EntityNPC {
if (itemstack != null && itemstack.getItem() == Items.lighter) if (itemstack != null && itemstack.getItem() == Items.lighter)
{ {
this.worldObj.playSound(SoundEvent.IGNITE, this.posX + 0.5D, this.posY + 0.5D, this.posZ + 0.5D, 1.0F); this.worldObj.sendSound(SoundEvent.IGNITE, this.posX + 0.5D, this.posY + 0.5D, this.posZ + 0.5D, 1.0F);
player.swingItem(); player.swingItem();
if (!this.worldObj.client) if (!this.worldObj.client)

View file

@ -617,7 +617,7 @@ public abstract class EntityNPC extends EntityLiving
if (this.inLove == 10) if (this.inLove == 10)
{ {
this.inLove = 0; this.inLove = 0;
this.worldObj.spawnParticle(ParticleType.HEART, this.posX + (double)(this.rand.floatv() * this.width * 2.0F) - (double)this.width, this.posY + 0.5D + (double)(this.rand.floatv() * this.height), this.posZ + (double)(this.rand.floatv() * this.width * 2.0F) - (double)this.width); this.worldObj.clientParticle(ParticleType.HEART, this.posX + (double)(this.rand.floatv() * this.width * 2.0F) - (double)this.width, this.posY + 0.5D + (double)(this.rand.floatv() * this.height), this.posZ + (double)(this.rand.floatv() * this.width * 2.0F) - (double)this.width);
} }
} }
else { else {
@ -1227,14 +1227,14 @@ public abstract class EntityNPC extends EntityLiving
return false; return false;
} }
else { else {
this.worldObj.playAuxSFX(1013, new BlockPos(ox, oy, oz), 0); this.worldObj.playEffect(1013, new BlockPos(ox, oy, oz), 0);
for(int n = 0; n < 8; n++) { for(int n = 0; n < 8; n++) {
((AWorldServer)this.worldObj).spawnParticles(ParticleType.TELEPORT, ((AWorldServer)this.worldObj).spawnParticles(ParticleType.TELEPORT,
ox + (this.rand.doublev() - 0.5D) * (double)this.width * 2.0D, ox + (this.rand.doublev() - 0.5D) * (double)this.width * 2.0D,
oy + this.rand.doublev() * (double)this.height, oy + this.rand.doublev() * (double)this.height,
oz + (this.rand.doublev() - 0.5D) * (double)this.width * 2.0D); oz + (this.rand.doublev() - 0.5D) * (double)this.width * 2.0D);
} }
this.worldObj.playAuxSFX(1005, this.getPosition(), 0); this.worldObj.playEffect(1005, this.getPosition(), 0);
for(int n = 0; n < 8; n++) { for(int n = 0; n < 8; n++) {
((AWorldServer)this.worldObj).spawnParticles(ParticleType.TELEPORT, ((AWorldServer)this.worldObj).spawnParticles(ParticleType.TELEPORT,
this.posX + (this.rand.doublev() - 0.5D) * (double)this.width * 2.0D, this.posX + (this.rand.doublev() - 0.5D) * (double)this.width * 2.0D,
@ -2074,7 +2074,7 @@ public abstract class EntityNPC extends EntityLiving
if(this.connection != null) if(this.connection != null)
this.connection.playSound(name, volume); this.connection.playSound(name, volume);
else if(this.client != null) else if(this.client != null)
this.worldObj.playSound(this.posX, this.posY, this.posZ, name, volume); this.worldObj.clientSound(name, this.posX, this.posY, this.posZ, volume);
else if(!this.slave) else if(!this.slave)
super.playSound(name, volume); super.playSound(name, volume);
} }

View file

@ -180,7 +180,7 @@ public class EntitySlime extends EntityNPC
World world = this.worldObj; World world = this.worldObj;
double d0 = this.posX + (double)f2; double d0 = this.posX + (double)f2;
double d1 = this.posZ + (double)f3; double d1 = this.posZ + (double)f3;
world.spawnParticle(ParticleType.ITEM_CRACK, d0, this.getEntityBoundingBox().minY, d1, ItemRegistry.getId(Items.slime_ball)); world.clientParticle(ParticleType.ITEM_CRACK, d0, this.getEntityBoundingBox().minY, d1, ItemRegistry.getId(Items.slime_ball));
} }
// if (!this.isChild()) // if (!this.isChild())

View file

@ -53,7 +53,7 @@ public class EntityZombie extends EntityNPC
entitylivingbase = (EntityLiving)source.getEntity(); entitylivingbase = (EntityLiving)source.getEntity();
} }
if (entitylivingbase != null && Vars.mobs && Vars.spawnMoreZombie > 0 && this.rand.chance(Vars.spawnMoreZombie)) if (!this.worldObj.client && entitylivingbase != null && Vars.mobs && Vars.spawnMoreZombie > 0 && this.rand.chance(Vars.spawnMoreZombie))
{ {
int i = ExtMath.floord(this.posX); int i = ExtMath.floord(this.posX);
int j = ExtMath.floord(this.posY); int j = ExtMath.floord(this.posY);
@ -169,7 +169,7 @@ public class EntityZombie extends EntityNPC
} }
this.worldObj.spawnEntityInWorld(entityzombie); this.worldObj.spawnEntityInWorld(entityzombie);
this.worldObj.playAuxSFX(1016, new BlockPos((int)this.posX, (int)this.posY, (int)this.posZ), 0); this.worldObj.playEffect(1016, new BlockPos((int)this.posX, (int)this.posY, (int)this.posZ), 0);
} }
} }

View file

@ -404,7 +404,7 @@ public class EntityArrow extends Entity implements IProjectile, IObjectData
{ {
for (int k = 0; k < 4; ++k) for (int k = 0; k < 4; ++k)
{ {
this.worldObj.spawnParticle(ParticleType.CRIT, this.posX + this.motionX * (double)k / 4.0D, this.posY + this.motionY * (double)k / 4.0D, this.posZ + this.motionZ * (double)k / 4.0D); this.worldObj.clientParticle(ParticleType.CRIT, this.posX + this.motionX * (double)k / 4.0D, this.posY + this.motionY * (double)k / 4.0D, this.posZ + this.motionZ * (double)k / 4.0D);
} }
} }
@ -444,7 +444,7 @@ public class EntityArrow extends Entity implements IProjectile, IObjectData
for (int i1 = 0; i1 < 4; ++i1) for (int i1 = 0; i1 < 4; ++i1)
{ {
float f8 = 0.25F; float f8 = 0.25F;
this.worldObj.spawnParticle(ParticleType.SPLASH, this.posX - this.motionX * (double)f8, this.posY - this.motionY * (double)f8, this.posZ - this.motionZ * (double)f8); this.worldObj.clientParticle(ParticleType.SPLASH, this.posX - this.motionX * (double)f8, this.posY - this.motionY * (double)f8, this.posZ - this.motionZ * (double)f8);
} }
f4 = 0.6F; f4 = 0.6F;

View file

@ -49,7 +49,7 @@ public class EntityDynamite extends EntityThrowable implements IObjectData
for (int k = 0; k < 8; ++k) for (int k = 0; k < 8; ++k)
{ {
this.worldObj.spawnParticle(ParticleType.ITEM_CRACK, this.posX, this.posY, this.posZ, ItemRegistry.getId(ItemRegistry.byName("dynamite" + (this.explosionSize <= 0 || this.explosionSize >= 8 ? "" : "_" + this.explosionSize)))); this.worldObj.clientParticle(ParticleType.ITEM_CRACK, this.posX, this.posY, this.posZ, ItemRegistry.getId(ItemRegistry.byName("dynamite" + (this.explosionSize <= 0 || this.explosionSize >= 8 ? "" : "_" + this.explosionSize))));
} }
if (!this.worldObj.client) if (!this.worldObj.client)

View file

@ -60,7 +60,7 @@ public class EntityEgg extends EntityThrowable
for (int k = 0; k < 8; ++k) for (int k = 0; k < 8; ++k)
{ {
this.worldObj.spawnParticle(ParticleType.ITEM_CRACK, this.posX, this.posY, this.posZ, ItemRegistry.getId(Items.egg)); this.worldObj.clientParticle(ParticleType.ITEM_CRACK, this.posX, this.posY, this.posZ, ItemRegistry.getId(Items.egg));
} }
if (!this.worldObj.client) if (!this.worldObj.client)

View file

@ -39,7 +39,7 @@ public class EntityMissile extends EntityBullet {
public void onUpdate() { public void onUpdate() {
super.onUpdate(); super.onUpdate();
if(this.worldObj.client && this.age % 2 < 2) if(this.worldObj.client && this.age % 2 < 2)
this.worldObj.spawnParticle(ParticleType.SMOKE, this.posX, this.posY, this.posZ); this.worldObj.clientParticle(ParticleType.SMOKE, this.posX, this.posY, this.posZ);
if(!this.worldObj.client && this.age > this.fuse) if(!this.worldObj.client && this.age > this.fuse)
this.explode(); this.explode();
} }

View file

@ -141,7 +141,7 @@ public class EntityPotion extends EntityThrowable implements IObjectData
} }
} }
this.worldObj.playAuxSFX(2002, new BlockPos(this), ItemRegistry.getId(this.getPotionDamage())); this.worldObj.playEffect(2002, new BlockPos(this), ItemRegistry.getId(this.getPotionDamage()));
this.setDead(); this.setDead();
} }
} }

View file

@ -214,7 +214,7 @@ public abstract class EntityProjectile extends Entity
for (int j = 0; j < 4; ++j) for (int j = 0; j < 4; ++j)
{ {
float f3 = 0.25F; float f3 = 0.25F;
this.worldObj.spawnParticle(ParticleType.SPLASH, this.posX - this.motionX * (double)f3, this.posY - this.motionY * (double)f3, this.posZ - this.motionZ * (double)f3); this.worldObj.clientParticle(ParticleType.SPLASH, this.posX - this.motionX * (double)f3, this.posY - this.motionY * (double)f3, this.posZ - this.motionZ * (double)f3);
} }
f2 = 0.8F; f2 = 0.8F;
@ -226,7 +226,7 @@ public abstract class EntityProjectile extends Entity
this.motionX *= (double)f2; this.motionX *= (double)f2;
this.motionY *= (double)f2; this.motionY *= (double)f2;
this.motionZ *= (double)f2; this.motionZ *= (double)f2;
this.worldObj.spawnParticle(ParticleType.SMOKE, this.posX, this.posY + 0.5D, this.posZ); this.worldObj.clientParticle(ParticleType.SMOKE, this.posX, this.posY + 0.5D, this.posZ);
this.setPosition(this.posX, this.posY, this.posZ); this.setPosition(this.posX, this.posY, this.posZ);
} }
else else

View file

@ -47,7 +47,7 @@ public class EntitySnowball extends EntityThrowable
for (int j = 0; j < 8; ++j) for (int j = 0; j < 8; ++j)
{ {
this.worldObj.spawnParticle(ParticleType.ITEM_CRACK, this.posX, this.posY, this.posZ, ItemRegistry.getId(Items.snowball)); this.worldObj.clientParticle(ParticleType.ITEM_CRACK, this.posX, this.posY, this.posZ, ItemRegistry.getId(Items.snowball));
} }
if (!this.worldObj.client) if (!this.worldObj.client)

View file

@ -67,7 +67,7 @@ public abstract class EntityAnimal extends EntityLiving
if (this.inLove == 10) if (this.inLove == 10)
{ {
this.inLove = 0; this.inLove = 0;
this.worldObj.spawnParticle(ParticleType.HEART, this.posX + (double)(this.rand.floatv() * this.width * 2.0F) - (double)this.width, this.posY + 0.5D + (double)(this.rand.floatv() * this.height), this.posZ + (double)(this.rand.floatv() * this.width * 2.0F) - (double)this.width); this.worldObj.clientParticle(ParticleType.HEART, this.posX + (double)(this.rand.floatv() * this.width * 2.0F) - (double)this.width, this.posY + 0.5D + (double)(this.rand.floatv() * this.height), this.posZ + (double)(this.rand.floatv() * this.width * 2.0F) - (double)this.width);
} }
} }
} }
@ -239,7 +239,7 @@ public abstract class EntityAnimal extends EntityLiving
{ {
for (int i = 0; i < 7; ++i) for (int i = 0; i < 7; ++i)
{ {
this.worldObj.spawnParticle(ParticleType.HEART, this.posX + (double)(this.rand.floatv() * this.width * 2.0F) - (double)this.width, this.posY + 0.5D + (double)(this.rand.floatv() * this.height), this.posZ + (double)(this.rand.floatv() * this.width * 2.0F) - (double)this.width); this.worldObj.clientParticle(ParticleType.HEART, this.posX + (double)(this.rand.floatv() * this.width * 2.0F) - (double)this.width, this.posY + 0.5D + (double)(this.rand.floatv() * this.height), this.posZ + (double)(this.rand.floatv() * this.width * 2.0F) - (double)this.width);
} }
} }
else else

View file

@ -434,7 +434,7 @@ public abstract class EntityLiving extends Entity
for (int k = 0; k < 20; ++k) for (int k = 0; k < 20; ++k)
{ {
this.worldObj.spawnParticle(ParticleType.EXPLOSION_NORMAL, this.posX + (double)(this.rand.floatv() * this.width * 2.0F) - (double)this.width, this.posY + (double)(this.rand.floatv() * this.height), this.posZ + (double)(this.rand.floatv() * this.width * 2.0F) - (double)this.width); this.worldObj.clientParticle(ParticleType.EXPLOSION_NORMAL, this.posX + (double)(this.rand.floatv() * this.width * 2.0F) - (double)this.width, this.posY + (double)(this.rand.floatv() * this.height), this.posZ + (double)(this.rand.floatv() * this.width * 2.0F) - (double)this.width);
} }
} }
} }
@ -969,7 +969,7 @@ public abstract class EntityLiving extends Entity
vec31 = vec31.rotatePitch(-this.rotPitch * (float)Math.PI / 180.0F); vec31 = vec31.rotatePitch(-this.rotPitch * (float)Math.PI / 180.0F);
vec31 = vec31.rotateYaw(-this.rotYaw * (float)Math.PI / 180.0F); vec31 = vec31.rotateYaw(-this.rotYaw * (float)Math.PI / 180.0F);
vec31 = vec31.addVector(this.posX, this.posY + (double)this.getEyeHeight(), this.posZ); vec31 = vec31.addVector(this.posX, this.posY + (double)this.getEyeHeight(), this.posZ);
this.worldObj.spawnParticle(ParticleType.ITEM_CRACK, vec31.xCoord, vec31.yCoord, vec31.zCoord, ItemRegistry.getId(stack.getItem())); this.worldObj.clientParticle(ParticleType.ITEM_CRACK, vec31.xCoord, vec31.yCoord, vec31.zCoord, ItemRegistry.getId(stack.getItem()));
} }
} }
@ -985,7 +985,7 @@ public abstract class EntityLiving extends Entity
} }
Entity entity = cause.getEntity(); Entity entity = cause.getEntity();
if (entity != null) if (entity != null && !this.worldObj.client)
{ {
entity.onKillEntity(this); entity.onKillEntity(this);
} }
@ -1971,7 +1971,7 @@ public abstract class EntityLiving extends Entity
{ {
if (this.particleTimer % 4 == 0) if (this.particleTimer % 4 == 0)
{ {
this.worldObj.spawnParticle(ParticleType.GROW, this.posX + (double)(this.rand.floatv() * this.width * 2.0F) - (double)this.width, this.posY + 0.5D + (double)(this.rand.floatv() * this.height), this.posZ + (double)(this.rand.floatv() * this.width * 2.0F) - (double)this.width); this.worldObj.clientParticle(ParticleType.GROW, this.posX + (double)(this.rand.floatv() * this.width * 2.0F) - (double)this.width, this.posY + 0.5D + (double)(this.rand.floatv() * this.height), this.posZ + (double)(this.rand.floatv() * this.width * 2.0F) - (double)this.width);
} }
--this.particleTimer; --this.particleTimer;
@ -2476,7 +2476,7 @@ public abstract class EntityLiving extends Entity
double d1 = this.rand.gaussian() * 0.02D; double d1 = this.rand.gaussian() * 0.02D;
double d2 = this.rand.gaussian() * 0.02D; double d2 = this.rand.gaussian() * 0.02D;
double d3 = 10.0D; double d3 = 10.0D;
this.worldObj.spawnParticle(ParticleType.EXPLOSION_NORMAL, this.worldObj.clientParticle(ParticleType.EXPLOSION_NORMAL,
this.posX + (double)(this.rand.floatv() * this.width * 2.0F) - (double)this.width - d0 * d3, this.posX + (double)(this.rand.floatv() * this.width * 2.0F) - (double)this.width - d0 * d3,
this.posY + (double)(this.rand.floatv() * this.height) - d1 * d3, this.posY + (double)(this.rand.floatv() * this.height) - d1 * d3,
this.posZ + (double)(this.rand.floatv() * this.width * 2.0F) - (double)this.width - d2 * d3); this.posZ + (double)(this.rand.floatv() * this.width * 2.0F) - (double)this.width - d2 * d3);
@ -3033,7 +3033,7 @@ public abstract class EntityLiving extends Entity
{ {
for (int i = 0; i < 5; ++i) for (int i = 0; i < 5; ++i)
{ {
this.worldObj.spawnParticle(particleType, this.posX + (double)(this.rand.floatv() * this.width * 2.0F) - (double)this.width, this.posY + 1.0D + (double)(this.rand.floatv() * this.height), this.posZ + (double)(this.rand.floatv() * this.width * 2.0F) - (double)this.width); this.worldObj.clientParticle(particleType, this.posX + (double)(this.rand.floatv() * this.width * 2.0F) - (double)this.width, this.posY + 1.0D + (double)(this.rand.floatv() * this.height), this.posZ + (double)(this.rand.floatv() * this.width * 2.0F) - (double)this.width);
} }
} }

View file

@ -74,7 +74,7 @@ public abstract class EntityTameable extends EntityAnimal implements IEntityOwna
for (int i = 0; i < 7; ++i) for (int i = 0; i < 7; ++i)
{ {
this.worldObj.spawnParticle(enumparticletypes, this.posX + (double)(this.rand.floatv() * this.width * 2.0F) - (double)this.width, this.posY + 0.5D + (double)(this.rand.floatv() * this.height), this.posZ + (double)(this.rand.floatv() * this.width * 2.0F) - (double)this.width); this.worldObj.clientParticle(enumparticletypes, this.posX + (double)(this.rand.floatv() * this.width * 2.0F) - (double)this.width, this.posY + 0.5D + (double)(this.rand.floatv() * this.height), this.posZ + (double)(this.rand.floatv() * this.width * 2.0F) - (double)this.width);
} }
} }

View file

@ -275,7 +275,7 @@ public abstract class EntityThrowable extends Entity implements IProjectile
for (int i = 0; i < 4; ++i) for (int i = 0; i < 4; ++i)
{ {
float f4 = 0.25F; float f4 = 0.25F;
this.worldObj.spawnParticle(ParticleType.SPLASH, this.posX - this.motionX * (double)f4, this.posY - this.motionY * (double)f4, this.posZ - this.motionZ * (double)f4); this.worldObj.clientParticle(ParticleType.SPLASH, this.posX - this.motionX * (double)f4, this.posY - this.motionY * (double)f4, this.posZ - this.motionZ * (double)f4);
} }
f2 = 0.8F; f2 = 0.8F;

View file

@ -102,17 +102,17 @@ public class ContainerRepair extends Container
if (l >= BlockAnvil.ANVILS.length) if (l >= BlockAnvil.ANVILS.length)
{ {
worldIn.setBlockToAir(blockPosIn); worldIn.setBlockToAir(blockPosIn);
worldIn.playAuxSFX(1020, blockPosIn, 0); worldIn.playEffect(1020, blockPosIn, 0);
} }
else else
{ {
worldIn.setState(blockPosIn, BlockAnvil.getByDamage(l).getState().withProperty(BlockAnvil.FACING, iblockstate.getValue(BlockAnvil.FACING)), 2); worldIn.setState(blockPosIn, BlockAnvil.getByDamage(l).getState().withProperty(BlockAnvil.FACING, iblockstate.getValue(BlockAnvil.FACING)), 2);
worldIn.playAuxSFX(1021, blockPosIn, 0); worldIn.playEffect(1021, blockPosIn, 0);
} }
} }
else if (!worldIn.client) else if (!worldIn.client)
{ {
worldIn.playAuxSFX(1021, blockPosIn, 0); worldIn.playEffect(1021, blockPosIn, 0);
} }
} }

View file

@ -1,64 +0,0 @@
package common.inventory;
import common.entity.Entity;
import common.entity.item.EntityItem;
import common.item.ItemStack;
import common.rng.Random;
import common.util.BlockPos;
import common.world.World;
public class InventoryHelper
{
private static final Random RANDOM = new Random();
public static void dropInventoryItems(World worldIn, BlockPos pos, IInventory inventory)
{
dropInventoryItems(worldIn, (double)pos.getX(), (double)pos.getY(), (double)pos.getZ(), inventory);
}
public static void dropInventoryItems(World worldIn, Entity entityAt, IInventory inventory)
{
dropInventoryItems(worldIn, entityAt.posX, entityAt.posY, entityAt.posZ, inventory);
}
private static void dropInventoryItems(World worldIn, double x, double y, double z, IInventory inventory)
{
for (int i = 0; i < inventory.getSizeInventory(); ++i)
{
ItemStack itemstack = inventory.getStackInSlot(i);
if (itemstack != null)
{
spawnItemStack(worldIn, x, y, z, itemstack);
}
}
}
private static void spawnItemStack(World worldIn, double x, double y, double z, ItemStack stack) // fixed: large sizes
{
float f = RANDOM.floatv() * 0.8F + 0.1F;
float f1 = RANDOM.floatv() * 0.8F + 0.1F;
float f2 = RANDOM.floatv() * 0.8F + 0.1F;
while (!stack.isEmpty())
{
int i = stack.getSize() > 64 ? stack.getSize() : (RANDOM.zrange(21) + 10);
if (i > stack.getSize())
{
i = stack.getSize();
}
stack.decrSize(i);
EntityItem entityitem = new EntityItem(worldIn, x + (double)f, y + (double)f1, z + (double)f2, new ItemStack(stack.getItem(), i));
entityitem.getEntityItem().copyData(stack);
float f3 = 0.05F;
entityitem.motionX = RANDOM.gaussian() * (double)f3;
entityitem.motionY = RANDOM.gaussian() * (double)f3 + 0.20000000298023224D;
entityitem.motionZ = RANDOM.gaussian() * (double)f3;
worldIn.spawnEntityInWorld(entityitem);
}
}
}

View file

@ -20,6 +20,7 @@ import common.util.ExtMath;
import common.util.Facing; import common.util.Facing;
import common.util.HitPosition; import common.util.HitPosition;
import common.util.Vec3; import common.util.Vec3;
import common.world.AWorldServer;
import common.world.World; import common.world.World;
public class Item { public class Item {
@ -171,11 +172,11 @@ public class Item {
return worldIn.rayTraceBlocks(vec3, vec31, useLiquids, !useLiquids, false); return worldIn.rayTraceBlocks(vec3, vec31, useLiquids, !useLiquids, false);
} }
protected final ItemStack dispenseProjectile(World world, Facing facing, ItemStack stack, IProjectile entity) { protected final ItemStack dispenseProjectile(AWorldServer world, Facing facing, ItemStack stack, IProjectile entity) {
return this.dispenseProjectile(world, facing, stack, entity, 1.1f, 6.0f); return this.dispenseProjectile(world, facing, stack, entity, 1.1f, 6.0f);
} }
protected final ItemStack dispenseProjectile(World world, Facing facing, ItemStack stack, IProjectile entity, float velocity, float inaccuracy) { protected final ItemStack dispenseProjectile(AWorldServer world, Facing facing, ItemStack stack, IProjectile entity, float velocity, float inaccuracy) {
entity.setThrowableHeading((double)facing.getFrontOffsetX(), (double)((float)facing.getFrontOffsetY() + 0.1F), entity.setThrowableHeading((double)facing.getFrontOffsetX(), (double)((float)facing.getFrontOffsetY() + 0.1F),
(double)facing.getFrontOffsetZ(), velocity, inaccuracy); (double)facing.getFrontOffsetZ(), velocity, inaccuracy);
world.spawnEntityInWorld((Entity)entity); world.spawnEntityInWorld((Entity)entity);
@ -317,7 +318,7 @@ public class Item {
return null; return null;
} }
public ItemStack dispenseStack(World world, TileEntity source, Vec3 position, BlockPos blockpos, Facing facing, ItemStack stack) { public ItemStack dispenseStack(AWorldServer world, TileEntity source, Vec3 position, BlockPos blockpos, Facing facing, ItemStack stack) {
if(this.block == null || !this.block.dispense(world, source, position, blockpos, facing, stack)) if(this.block == null || !this.block.dispense(world, source, position, blockpos, facing, stack))
BlockDispenser.dispense(world, 6.0, facing, position, stack.split(1)); BlockDispenser.dispense(world, 6.0, facing, position, stack.split(1));
return stack; return stack;

View file

@ -24,6 +24,7 @@ import common.util.BlockPos;
import common.util.Facing; import common.util.Facing;
import common.util.Pair; import common.util.Pair;
import common.util.Vec3; import common.util.Vec3;
import common.world.AWorldServer;
import common.world.World; import common.world.World;
public class ItemPotion extends Item public class ItemPotion extends Item
@ -254,7 +255,7 @@ public class ItemPotion extends Item
return new String[] {"potion_overlay", "bottle"}; return new String[] {"potion_overlay", "bottle"};
} }
public ItemStack dispenseStack(World world, TileEntity source, Vec3 position, BlockPos blockpos, Facing facing, ItemStack stack) { public ItemStack dispenseStack(AWorldServer world, TileEntity source, Vec3 position, BlockPos blockpos, Facing facing, ItemStack stack) {
return this.dispenseProjectile(world, facing, stack, new EntityPotion(world, position.xCoord, position.yCoord, position.zCoord, stack.copy()), 1.375f, 3.0f); return this.dispenseProjectile(world, facing, stack, new EntityPotion(world, position.xCoord, position.yCoord, position.zCoord, stack.copy()), 1.375f, 3.0f);
} }

View file

@ -19,6 +19,7 @@ import common.util.BlockPos;
import common.util.BoundingBox; import common.util.BoundingBox;
import common.util.Facing; import common.util.Facing;
import common.util.Vec3; import common.util.Vec3;
import common.world.AWorldServer;
import common.world.World; import common.world.World;
public class ItemArmor extends Item public class ItemArmor extends Item
@ -131,7 +132,7 @@ public class ItemArmor extends Item
// } // }
} }
public ItemStack dispenseStack(World world, TileEntity source, Vec3 position, BlockPos blockpos, Facing facing, ItemStack stack) { public ItemStack dispenseStack(AWorldServer world, TileEntity source, Vec3 position, BlockPos blockpos, Facing facing, ItemStack stack) {
BlockPos pos = blockpos.offset(facing); BlockPos pos = blockpos.offset(facing);
int i = pos.getX(); int i = pos.getX();
int j = pos.getY(); int j = pos.getY();

View file

@ -274,11 +274,11 @@ public class ItemBucket extends Item
int i = pos.getX(); int i = pos.getX();
int j = pos.getY(); int j = pos.getY();
int k = pos.getZ(); int k = pos.getZ();
worldIn.playSound(SoundEvent.FIZZ, (double)((float)i + 0.5F), (double)((float)j + 0.5F), (double)((float)k + 0.5F), 0.5F); worldIn.sendSound(SoundEvent.FIZZ, (double)((float)i + 0.5F), (double)((float)j + 0.5F), (double)((float)k + 0.5F), 0.5F);
for (int l = 0; l < 8; ++l) for (int l = 0; l < 8; ++l)
{ {
worldIn.spawnParticle(ParticleType.SMOKE, (double)i + Math.random(), (double)j + Math.random(), (double)k + Math.random()); worldIn.clientParticle(ParticleType.SMOKE, (double)i + Math.random(), (double)j + Math.random(), (double)k + Math.random());
} }
} }
else else
@ -323,7 +323,7 @@ public class ItemBucket extends Item
return super.getTextures(this.recursive ? name.substring("recursive_".length()) : name); return super.getTextures(this.recursive ? name.substring("recursive_".length()) : name);
} }
public ItemStack dispenseStack(World world, TileEntity source, Vec3 position, BlockPos blockpos, Facing facing, ItemStack stack) { public ItemStack dispenseStack(AWorldServer world, TileEntity source, Vec3 position, BlockPos blockpos, Facing facing, ItemStack stack) {
if(this.recursive) if(this.recursive)
return super.dispenseStack(world, source, position, blockpos, facing, stack); return super.dispenseStack(world, source, position, blockpos, facing, stack);
if(this.liquid == null) { if(this.liquid == null) {

View file

@ -61,7 +61,7 @@ public class ItemDye extends Item {
{ {
if (!worldIn.client) if (!worldIn.client)
{ {
worldIn.playAuxSFX(2005, pos, 0); worldIn.playEffect(2005, pos, 0);
} }
return true; return true;
@ -144,7 +144,7 @@ public class ItemDye extends Item {
for (int i = 0; i < amount; ++i) for (int i = 0; i < amount; ++i)
{ {
worldIn.spawnParticle(ParticleType.GROW, (double)((float)pos.getX() + worldIn.rand.floatv()), (double)pos.getY() + (double)worldIn.rand.floatv() * block.getBlockBoundsMaxY(), (double)((float)pos.getZ() + worldIn.rand.floatv())); worldIn.clientParticle(ParticleType.GROW, (double)((float)pos.getX() + worldIn.rand.floatv()), (double)pos.getY() + (double)worldIn.rand.floatv() * block.getBlockBoundsMaxY(), (double)((float)pos.getZ() + worldIn.rand.floatv()));
} }
} }
} }
@ -172,7 +172,7 @@ public class ItemDye extends Item {
} }
} }
public ItemStack dispenseStack(World world, TileEntity source, Vec3 position, BlockPos blockpos, Facing facing, ItemStack stack) { public ItemStack dispenseStack(AWorldServer world, TileEntity source, Vec3 position, BlockPos blockpos, Facing facing, ItemStack stack) {
if(this.color != DyeColor.WHITE) if(this.color != DyeColor.WHITE)
return super.dispenseStack(world, source, position, blockpos, facing, stack); return super.dispenseStack(world, source, position, blockpos, facing, stack);
BlockPos pos = blockpos = blockpos.offset(facing); BlockPos pos = blockpos = blockpos.offset(facing);
@ -181,13 +181,13 @@ public class ItemDye extends Item {
{ {
if (!world.client) if (!world.client)
{ {
world.playAuxSFX(2005, pos, 0); world.playEffect(2005, pos, 0);
} }
world.playAuxSFX(1000, blockpos, 0); world.playEffect(1000, blockpos, 0);
} }
else else
{ {
world.playAuxSFX(1001, blockpos, 0); world.playEffect(1001, blockpos, 0);
} }
return stack; return stack;

View file

@ -66,7 +66,7 @@ public class ItemChargedOrb extends Item
double d0 = (double)((float)pos.getX() + (5.0F + worldIn.rand.floatv() * 6.0F) / 16.0F); double d0 = (double)((float)pos.getX() + (5.0F + worldIn.rand.floatv() * 6.0F) / 16.0F);
double d1 = (double)((float)pos.getY() + 0.8125F); double d1 = (double)((float)pos.getY() + 0.8125F);
double d2 = (double)((float)pos.getZ() + (5.0F + worldIn.rand.floatv() * 6.0F) / 16.0F); double d2 = (double)((float)pos.getZ() + (5.0F + worldIn.rand.floatv() * 6.0F) / 16.0F);
worldIn.spawnParticle(ParticleType.SMOKE, d0, d1, d2); worldIn.clientParticle(ParticleType.SMOKE, d0, d1, d2);
} }
Facing enumfacing = (Facing)iblockstate.getValue(BlockPortalFrame.FACING); Facing enumfacing = (Facing)iblockstate.getValue(BlockPortalFrame.FACING);

View file

@ -19,6 +19,7 @@ import common.util.BlockPos;
import common.util.Facing; import common.util.Facing;
import common.util.Pair; import common.util.Pair;
import common.util.Vec3; import common.util.Vec3;
import common.world.AWorldServer;
import common.world.World; import common.world.World;
public class ItemDie extends Item public class ItemDie extends Item
@ -89,7 +90,7 @@ public class ItemDie extends Item
return GuiPosition.DICE; return GuiPosition.DICE;
} }
public ItemStack dispenseStack(World world, TileEntity source, Vec3 position, BlockPos blockpos, Facing facing, ItemStack stack) { public ItemStack dispenseStack(AWorldServer world, TileEntity source, Vec3 position, BlockPos blockpos, Facing facing, ItemStack stack) {
return this.dispenseProjectile(world, facing, stack, new EntityDie(world, position.xCoord, position.yCoord, position.zCoord, this.sides), 0.275f, 30.0f); return this.dispenseProjectile(world, facing, stack, new EntityDie(world, position.xCoord, position.yCoord, position.zCoord, this.sides), 0.275f, 30.0f);
} }

View file

@ -11,6 +11,7 @@ import common.util.BlockPos;
import common.util.ExtMath; import common.util.ExtMath;
import common.util.Facing; import common.util.Facing;
import common.util.Vec3; import common.util.Vec3;
import common.world.AWorldServer;
import common.world.World; import common.world.World;
public class ItemDynamite extends Item { public class ItemDynamite extends Item {
@ -40,7 +41,7 @@ public class ItemDynamite extends Item {
return stack; return stack;
} }
public ItemStack dispenseStack(World world, TileEntity source, Vec3 position, BlockPos blockpos, Facing facing, ItemStack stack) { public ItemStack dispenseStack(AWorldServer world, TileEntity source, Vec3 position, BlockPos blockpos, Facing facing, ItemStack stack) {
return this.dispenseProjectile(world, facing, stack, new EntityDynamite(world, position.xCoord, position.yCoord, position.zCoord, this.power)); return this.dispenseProjectile(world, facing, stack, new EntityDynamite(world, position.xCoord, position.yCoord, position.zCoord, this.power));
} }

View file

@ -10,6 +10,7 @@ import common.tileentity.TileEntity;
import common.util.BlockPos; import common.util.BlockPos;
import common.util.Facing; import common.util.Facing;
import common.util.Vec3; import common.util.Vec3;
import common.world.AWorldServer;
import common.world.World; import common.world.World;
public class ItemEgg extends Item public class ItemEgg extends Item
@ -40,7 +41,7 @@ public class ItemEgg extends Item
return itemStackIn; return itemStackIn;
} }
public ItemStack dispenseStack(World world, TileEntity source, Vec3 position, BlockPos blockpos, Facing facing, ItemStack stack) { public ItemStack dispenseStack(AWorldServer world, TileEntity source, Vec3 position, BlockPos blockpos, Facing facing, ItemStack stack) {
return this.dispenseProjectile(world, facing, stack, new EntityEgg(world, position.xCoord, position.yCoord, position.zCoord)); return this.dispenseProjectile(world, facing, stack, new EntityEgg(world, position.xCoord, position.yCoord, position.zCoord));
} }

View file

@ -10,6 +10,7 @@ import common.tileentity.TileEntity;
import common.util.BlockPos; import common.util.BlockPos;
import common.util.Facing; import common.util.Facing;
import common.util.Vec3; import common.util.Vec3;
import common.world.AWorldServer;
import common.world.World; import common.world.World;
public class ItemExpBottle extends Item public class ItemExpBottle extends Item
@ -41,7 +42,7 @@ public class ItemExpBottle extends Item
return itemStackIn; return itemStackIn;
} }
public ItemStack dispenseStack(World world, TileEntity source, Vec3 position, BlockPos blockpos, Facing facing, ItemStack stack) { public ItemStack dispenseStack(AWorldServer world, TileEntity source, Vec3 position, BlockPos blockpos, Facing facing, ItemStack stack) {
return this.dispenseProjectile(world, facing, stack, new EntityXpBottle(world, position.xCoord, position.yCoord, position.zCoord), 1.375f, 3.0f); return this.dispenseProjectile(world, facing, stack, new EntityXpBottle(world, position.xCoord, position.yCoord, position.zCoord), 1.375f, 3.0f);
} }

View file

@ -11,6 +11,7 @@ import common.tileentity.TileEntity;
import common.util.BlockPos; import common.util.BlockPos;
import common.util.Facing; import common.util.Facing;
import common.util.Vec3; import common.util.Vec3;
import common.world.AWorldServer;
import common.world.World; import common.world.World;
public class ItemFireball extends Item public class ItemFireball extends Item
@ -41,7 +42,7 @@ public class ItemFireball extends Item
{ {
if (worldIn.getState(pos).getBlock() == Blocks.air) if (worldIn.getState(pos).getBlock() == Blocks.air)
{ {
worldIn.playSound(SoundEvent.FIREBALL, (double)pos.getX() + 0.5D, (double)pos.getY() + 0.5D, (double)pos.getZ() + 0.5D, 1.0F); worldIn.sendSound(SoundEvent.FIREBALL, (double)pos.getX() + 0.5D, (double)pos.getY() + 0.5D, (double)pos.getZ() + 0.5D, 1.0F);
worldIn.setState(pos, Blocks.fire.getState()); worldIn.setState(pos, Blocks.fire.getState());
} }
@ -55,7 +56,7 @@ public class ItemFireball extends Item
} }
} }
public ItemStack dispenseStack(World world, TileEntity source, Vec3 position, BlockPos blockpos, Facing facing, ItemStack stack) { public ItemStack dispenseStack(AWorldServer world, TileEntity source, Vec3 position, BlockPos blockpos, Facing facing, ItemStack stack) {
double d0 = position.xCoord + (double)((float)facing.getFrontOffsetX() * 0.3F); double d0 = position.xCoord + (double)((float)facing.getFrontOffsetX() * 0.3F);
double d1 = position.yCoord + (double)((float)facing.getFrontOffsetY() * 0.3F); double d1 = position.yCoord + (double)((float)facing.getFrontOffsetY() * 0.3F);
double d2 = position.zCoord + (double)((float)facing.getFrontOffsetZ() * 0.3F); double d2 = position.zCoord + (double)((float)facing.getFrontOffsetZ() * 0.3F);

View file

@ -10,6 +10,7 @@ import common.tileentity.TileEntity;
import common.util.BlockPos; import common.util.BlockPos;
import common.util.Facing; import common.util.Facing;
import common.util.Vec3; import common.util.Vec3;
import common.world.AWorldServer;
import common.world.World; import common.world.World;
public class ItemSnowball extends Item public class ItemSnowball extends Item
@ -40,7 +41,7 @@ public class ItemSnowball extends Item
return itemStackIn; return itemStackIn;
} }
public ItemStack dispenseStack(World world, TileEntity source, Vec3 position, BlockPos blockpos, Facing facing, ItemStack stack) { public ItemStack dispenseStack(AWorldServer world, TileEntity source, Vec3 position, BlockPos blockpos, Facing facing, ItemStack stack) {
return this.dispenseProjectile(world, facing, stack, new EntitySnowball(world, position.xCoord, position.yCoord, position.zCoord)); return this.dispenseProjectile(world, facing, stack, new EntitySnowball(world, position.xCoord, position.yCoord, position.zCoord));
} }

View file

@ -17,6 +17,7 @@ import common.util.ExtMath;
import common.util.Facing; import common.util.Facing;
import common.util.HitPosition; import common.util.HitPosition;
import common.util.Vec3; import common.util.Vec3;
import common.world.AWorldServer;
import common.world.World; import common.world.World;
public class ItemBoat extends Item public class ItemBoat extends Item
@ -117,7 +118,7 @@ public class ItemBoat extends Item
} }
} }
public ItemStack dispenseStack(World world, TileEntity source, Vec3 position, BlockPos blockpos, Facing facing, ItemStack stack) { public ItemStack dispenseStack(AWorldServer world, TileEntity source, Vec3 position, BlockPos blockpos, Facing facing, ItemStack stack) {
double d0 = blockpos.getX() + 0.5 + (double)((float)facing.getFrontOffsetX() * 1.125F); double d0 = blockpos.getX() + 0.5 + (double)((float)facing.getFrontOffsetX() * 1.125F);
double d1 = blockpos.getY() + 0.5 + (double)((float)facing.getFrontOffsetY() * 1.125F); double d1 = blockpos.getY() + 0.5 + (double)((float)facing.getFrontOffsetY() * 1.125F);
double d2 = blockpos.getZ() + 0.5 + (double)((float)facing.getFrontOffsetZ() * 1.125F); double d2 = blockpos.getZ() + 0.5 + (double)((float)facing.getFrontOffsetZ() * 1.125F);

View file

@ -13,6 +13,7 @@ import common.tileentity.TileEntity;
import common.util.BlockPos; import common.util.BlockPos;
import common.util.Facing; import common.util.Facing;
import common.util.Vec3; import common.util.Vec3;
import common.world.AWorldServer;
import common.world.State; import common.world.State;
import common.world.World; import common.world.World;
@ -82,7 +83,7 @@ public class ItemMinecart extends Item
} }
} }
public ItemStack dispenseStack(World world, TileEntity source, Vec3 position, BlockPos blockpos, Facing facing, ItemStack stack) { public ItemStack dispenseStack(AWorldServer world, TileEntity source, Vec3 position, BlockPos blockpos, Facing facing, ItemStack stack) {
double d0 = blockpos.getX() + 0.5 + (double)facing.getFrontOffsetX() * 1.125D; double d0 = blockpos.getX() + 0.5 + (double)facing.getFrontOffsetX() * 1.125D;
double d1 = Math.floor(blockpos.getY() + 0.5) + (double)facing.getFrontOffsetY(); double d1 = Math.floor(blockpos.getY() + 0.5) + (double)facing.getFrontOffsetY();
double d2 = blockpos.getZ() + 0.5 + (double)facing.getFrontOffsetZ() * 1.125D; double d2 = blockpos.getZ() + 0.5 + (double)facing.getFrontOffsetZ() * 1.125D;

View file

@ -16,7 +16,7 @@ public class ItemCamera extends Item {
public boolean onAction(ItemStack stack, EntityNPC player, World world, ItemControl control, BlockPos block) { public boolean onAction(ItemStack stack, EntityNPC player, World world, ItemControl control, BlockPos block) {
if(control == ItemControl.SECONDARY) { if(control == ItemControl.SECONDARY) {
if(!world.client) if(!world.client)
world.playAuxSFX(1024, new BlockPos(player.posX, player.posY + player.getEyeHeight(), player.posZ), 0); world.playEffect(1024, new BlockPos(player.posX, player.posY + player.getEyeHeight(), player.posZ), 0);
return true; return true;
} }
return false; return false;

View file

@ -12,6 +12,7 @@ import common.tileentity.TileEntity;
import common.util.BlockPos; import common.util.BlockPos;
import common.util.Facing; import common.util.Facing;
import common.util.Vec3; import common.util.Vec3;
import common.world.AWorldServer;
import common.world.World; import common.world.World;
public class ItemFire extends Item public class ItemFire extends Item
@ -41,7 +42,7 @@ public class ItemFire extends Item
{ {
if (worldIn.getState(pos).getBlock() == Blocks.air) if (worldIn.getState(pos).getBlock() == Blocks.air)
{ {
worldIn.playSound(SoundEvent.IGNITE, (double)pos.getX() + 0.5D, (double)pos.getY() + 0.5D, (double)pos.getZ() + 0.5D, 1.0F); worldIn.sendSound(SoundEvent.IGNITE, (double)pos.getX() + 0.5D, (double)pos.getY() + 0.5D, (double)pos.getZ() + 0.5D, 1.0F);
worldIn.setState(pos, this.fireBlock.getState()); worldIn.setState(pos, this.fireBlock.getState());
} }
@ -50,7 +51,7 @@ public class ItemFire extends Item
} }
} }
public ItemStack dispenseStack(World world, TileEntity source, Vec3 position, BlockPos blockpos, Facing facing, ItemStack stack) { public ItemStack dispenseStack(AWorldServer world, TileEntity source, Vec3 position, BlockPos blockpos, Facing facing, ItemStack stack) {
BlockPos pos = blockpos = blockpos.offset(facing); BlockPos pos = blockpos = blockpos.offset(facing);
if (world.isAirBlock(pos)) if (world.isAirBlock(pos))
@ -58,17 +59,17 @@ public class ItemFire extends Item
world.setState(pos, this.fireBlock.getState()); world.setState(pos, this.fireBlock.getState());
stack.damage(1, null, world.rand); stack.damage(1, null, world.rand);
world.playAuxSFX(1000, blockpos, 0); world.playEffect(1000, blockpos, 0);
} }
else if (world.getState(pos).getBlock() instanceof BlockTNT tnt) else if (world.getState(pos).getBlock() instanceof BlockTNT tnt)
{ {
tnt.onBroken(world, pos, tnt.getState().withProperty(BlockTNT.EXPLODE, true)); tnt.onBroken(world, pos, tnt.getState().withProperty(BlockTNT.EXPLODE, true));
world.setBlockToAir(pos); world.setBlockToAir(pos);
world.playAuxSFX(1000, blockpos, 0); world.playEffect(1000, blockpos, 0);
} }
else else
{ {
world.playAuxSFX(1001, blockpos, 0); world.playEffect(1001, blockpos, 0);
} }
return stack; return stack;

View file

@ -68,7 +68,7 @@ public class ItemHoe extends Item
protected boolean useHoe(ItemStack stack, EntityNPC player, World worldIn, BlockPos target, State newState) protected boolean useHoe(ItemStack stack, EntityNPC player, World worldIn, BlockPos target, State newState)
{ {
if(newState.getBlock().getSound().getStepSound() != null) if(newState.getBlock().getSound().getStepSound() != null)
worldIn.playSound(newState.getBlock().getSound().getStepSound(), (double)((float)target.getX() + 0.5F), (double)((float)target.getY() + 0.5F), (double)((float)target.getZ() + 0.5F), 1.0F); worldIn.sendSound(newState.getBlock().getSound().getStepSound(), (double)((float)target.getX() + 0.5F), (double)((float)target.getY() + 0.5F), (double)((float)target.getZ() + 0.5F), 1.0F);
if (worldIn.client) if (worldIn.client)
{ {

View file

@ -7,10 +7,10 @@ import common.tileentity.TileEntity;
import common.util.BlockPos; import common.util.BlockPos;
import common.util.Facing; import common.util.Facing;
import common.util.Vec3; import common.util.Vec3;
import common.world.World; import common.world.AWorldServer;
public class ItemArrow extends Item { public class ItemArrow extends Item {
public ItemStack dispenseStack(World world, TileEntity source, Vec3 position, BlockPos blockpos, Facing facing, ItemStack stack) { public ItemStack dispenseStack(AWorldServer world, TileEntity source, Vec3 position, BlockPos blockpos, Facing facing, ItemStack stack) {
EntityArrow arrow = new EntityArrow(world, position.xCoord, position.yCoord, position.zCoord); EntityArrow arrow = new EntityArrow(world, position.xCoord, position.yCoord, position.zCoord);
arrow.canBePickedUp = 1; arrow.canBePickedUp = 1;
return this.dispenseProjectile(world, facing, stack, arrow); return this.dispenseProjectile(world, facing, stack, arrow);

View file

@ -220,7 +220,7 @@ public class TileEntityChest extends TileEntity implements ITickable, IInventory
{ {
double d3 = (double)i + 0.5D; double d3 = (double)i + 0.5D;
double d0 = (double)k + 0.5D; double d0 = (double)k + 0.5D;
this.worldObj.playSound((this.wasOpen = this.numPlayersUsing > 0) ? SoundEvent.CHESTOPEN : SoundEvent.CHESTCLOSED, d3, (double)j + 0.5D, d0, 0.5F); this.worldObj.sendSound((this.wasOpen = this.numPlayersUsing > 0) ? SoundEvent.CHESTOPEN : SoundEvent.CHESTCLOSED, d3, (double)j + 0.5D, d0, 0.5F);
} }
} }
@ -239,7 +239,7 @@ public class TileEntityChest extends TileEntity implements ITickable, IInventory
} }
++this.numPlayersUsing; ++this.numPlayersUsing;
this.worldObj.playAuxSFX(2016, this.pos, this.numPlayersUsing); this.worldObj.playEffect(2016, this.pos, this.numPlayersUsing);
if(!this.worldObj.client) { if(!this.worldObj.client) {
((AWorldServer)this.worldObj).notifyNeighborsOfStateChange(this.pos, this.getBlockType()); ((AWorldServer)this.worldObj).notifyNeighborsOfStateChange(this.pos, this.getBlockType());
((AWorldServer)this.worldObj).notifyNeighborsOfStateChange(this.pos.down(), this.getBlockType()); ((AWorldServer)this.worldObj).notifyNeighborsOfStateChange(this.pos.down(), this.getBlockType());
@ -252,7 +252,7 @@ public class TileEntityChest extends TileEntity implements ITickable, IInventory
if (/* !player.isSpectator() && */ this.getBlockType() instanceof BlockChest) if (/* !player.isSpectator() && */ this.getBlockType() instanceof BlockChest)
{ {
--this.numPlayersUsing; --this.numPlayersUsing;
this.worldObj.playAuxSFX(2016, this.pos, this.numPlayersUsing); this.worldObj.playEffect(2016, this.pos, this.numPlayersUsing);
if(!this.worldObj.client) { if(!this.worldObj.client) {
((AWorldServer)this.worldObj).notifyNeighborsOfStateChange(this.pos, this.getBlockType()); ((AWorldServer)this.worldObj).notifyNeighborsOfStateChange(this.pos, this.getBlockType());
((AWorldServer)this.worldObj).notifyNeighborsOfStateChange(this.pos.down(), this.getBlockType()); ((AWorldServer)this.worldObj).notifyNeighborsOfStateChange(this.pos.down(), this.getBlockType());

View file

@ -12,8 +12,8 @@ import common.tags.TagObject;
import common.util.BlockPos; import common.util.BlockPos;
import common.util.Facing; import common.util.Facing;
import common.vars.Vars; import common.vars.Vars;
import common.world.AWorldServer;
import common.world.State; import common.world.State;
import common.world.World;
import java.util.List; import java.util.List;
@ -240,18 +240,18 @@ public class TileEntityDispenser extends TileEntityInventory implements ITickabl
return 0xffbf00; return 0xffbf00;
} }
protected ItemStack dispenseStack(ItemStack stack, World world, BlockPos pos) protected ItemStack dispenseStack(ItemStack stack, AWorldServer world, BlockPos pos)
{ {
Facing facing = world.getState(pos).getValue(BlockDispenser.FACING); Facing facing = world.getState(pos).getValue(BlockDispenser.FACING);
ItemStack nstack = stack.getItem().dispenseStack(world, world.getTileEntity(pos), BlockDispenser.getDispensePosition(pos, facing), pos, facing, stack); ItemStack nstack = stack.getItem().dispenseStack(world, world.getTileEntity(pos), BlockDispenser.getDispensePosition(pos, facing), pos, facing, stack);
int id = stack.getItem().getDispenseSoundId(); int id = stack.getItem().getDispenseSoundId();
if(id != 0) if(id != 0)
world.playAuxSFX(id, pos, 0); world.playEffect(id, pos, 0);
world.playAuxSFX(2000, pos, facing.getFrontOffsetX() + 1 + (facing.getFrontOffsetZ() + 1) * 3); world.playEffect(2000, pos, facing.getFrontOffsetX() + 1 + (facing.getFrontOffsetZ() + 1) * 3);
return nstack; return nstack;
} }
protected void dispense(World worldIn, BlockPos pos) protected void dispense(AWorldServer worldIn, BlockPos pos)
{ {
TileEntity te = worldIn.getTileEntity(pos); TileEntity te = worldIn.getTileEntity(pos);
@ -281,7 +281,7 @@ public class TileEntityDispenser extends TileEntityInventory implements ITickabl
State state = this.getBlockState(); State state = this.getBlockState();
if(!(state.getBlock() instanceof BlockDispenser) || !this.decrPower()) if(!(state.getBlock() instanceof BlockDispenser) || !this.decrPower())
return; return;
this.dispense(this.worldObj, this.pos); this.dispense((AWorldServer)this.worldObj, this.pos);
this.cooldown = Vars.dispenserDelay; this.cooldown = Vars.dispenserDelay;
} }
else { else {

View file

@ -5,20 +5,20 @@ import common.inventory.IInventory;
import common.item.ItemStack; import common.item.ItemStack;
import common.util.BlockPos; import common.util.BlockPos;
import common.util.Facing; import common.util.Facing;
import common.world.World; import common.world.AWorldServer;
public class TileEntityDropper extends TileEntityDispenser public class TileEntityDropper extends TileEntityDispenser
{ {
protected ItemStack dispenseStack(ItemStack stack, World world, BlockPos pos) protected ItemStack dispenseStack(ItemStack stack, AWorldServer world, BlockPos pos)
{ {
Facing facing = world.getState(pos).getValue(BlockDispenser.FACING); Facing facing = world.getState(pos).getValue(BlockDispenser.FACING);
BlockDispenser.dispense(world, 6.0, facing, BlockDispenser.getDispensePosition(pos, facing), stack.split(1)); BlockDispenser.dispense(world, 6.0, facing, BlockDispenser.getDispensePosition(pos, facing), stack.split(1));
world.playAuxSFX(1000, pos, 0); world.playEffect(1000, pos, 0);
world.playAuxSFX(2000, pos, facing.getFrontOffsetX() + 1 + (facing.getFrontOffsetZ() + 1) * 3); world.playEffect(2000, pos, facing.getFrontOffsetX() + 1 + (facing.getFrontOffsetZ() + 1) * 3);
return stack; return stack;
} }
protected void dispense(World worldIn, BlockPos pos) protected void dispense(AWorldServer worldIn, BlockPos pos)
{ {
TileEntity te = worldIn.getTileEntity(pos); TileEntity te = worldIn.getTileEntity(pos);

View file

@ -119,7 +119,7 @@ public abstract class Chunk {
if(stor != null) { if(stor != null) {
stor.setSky(x, y & 15, z, l); stor.setSky(x, y & 15, z, l);
this.world.notifyLightSet(new BlockPos((this.xPos << 4) + x, y, (this.zPos << 4) + z)); this.world.clientNotifyLight(new BlockPos((this.xPos << 4) + x, y, (this.zPos << 4) + z));
} }
} }
@ -221,7 +221,7 @@ public abstract class Chunk {
if(stor != null) { if(stor != null) {
stor.setSky(x, n & 15, z, 15); stor.setSky(x, n & 15, z, 15);
this.world.notifyLightSet(new BlockPos((this.xPos << 4) + x, n, (this.zPos << 4) + z)); this.world.clientNotifyLight(new BlockPos((this.xPos << 4) + x, n, (this.zPos << 4) + z));
} }
} }
} }
@ -231,7 +231,7 @@ public abstract class Chunk {
if(stor != null) { if(stor != null) {
stor.setSky(x, n & 15, z, 0); stor.setSky(x, n & 15, z, 0);
this.world.notifyLightSet(new BlockPos((this.xPos << 4) + x, n, (this.zPos << 4) + z)); this.world.clientNotifyLight(new BlockPos((this.xPos << 4) + x, n, (this.zPos << 4) + z));
} }
} }
} }

View file

@ -202,7 +202,7 @@ public class Explosion
if(iblockstate.getBlock() != Blocks.air && iblockstate.getBlock().getResistance(null) < 60000.0f) { if(iblockstate.getBlock() != Blocks.air && iblockstate.getBlock().getResistance(null) < 60000.0f) {
worldObj.setState(blockpos, Blocks.air.getState(), 3); worldObj.setState(blockpos, Blocks.air.getState(), 3);
if(rand.chance(1000)) { if(rand.chance(1000)) {
worldObj.playSound(SoundEvent.EXPLODE, explosionX + x, explosionY + y, explosionZ + z, 4.0F); worldObj.sendSound(SoundEvent.EXPLODE, explosionX + x, explosionY + y, explosionZ + z, 4.0F);
((AWorldServer)worldObj).spawnParticles(ParticleType.EXPLOSION_HUGE, explosionX + x, explosionY + y, explosionZ + z); ((AWorldServer)worldObj).spawnParticles(ParticleType.EXPLOSION_HUGE, explosionX + x, explosionY + y, explosionZ + z);
} }
} }
@ -299,15 +299,15 @@ public class Explosion
*/ */
public void doExplosionB(boolean spawnParticles, boolean altSound) public void doExplosionB(boolean spawnParticles, boolean altSound)
{ {
this.worldObj.playSound(altSound ? SoundEvent.EXPLODE_ALT : SoundEvent.EXPLODE, this.explosionX, this.explosionY, this.explosionZ, 4.0F); this.worldObj.sendSound(altSound ? SoundEvent.EXPLODE_ALT : SoundEvent.EXPLODE, this.explosionX, this.explosionY, this.explosionZ, 4.0F);
if (this.explosionSize >= 2.0F && this.isSmoking) if (this.explosionSize >= 2.0F && this.isSmoking)
{ {
this.worldObj.spawnParticle(ParticleType.EXPLOSION_HUGE, this.explosionX, this.explosionY, this.explosionZ); this.worldObj.clientParticle(ParticleType.EXPLOSION_HUGE, this.explosionX, this.explosionY, this.explosionZ);
} }
else else
{ {
this.worldObj.spawnParticle(ParticleType.EXPLOSION_LARGE, this.explosionX, this.explosionY, this.explosionZ, 100); this.worldObj.clientParticle(ParticleType.EXPLOSION_LARGE, this.explosionX, this.explosionY, this.explosionZ, 100);
} }
if (this.isSmoking) if (this.isSmoking)
@ -322,8 +322,8 @@ public class Explosion
double d0 = (double)((float)blockpos.getX() + this.worldObj.rand.floatv()); double d0 = (double)((float)blockpos.getX() + this.worldObj.rand.floatv());
double d1 = (double)((float)blockpos.getY() + this.worldObj.rand.floatv()); double d1 = (double)((float)blockpos.getY() + this.worldObj.rand.floatv());
double d2 = (double)((float)blockpos.getZ() + this.worldObj.rand.floatv()); double d2 = (double)((float)blockpos.getZ() + this.worldObj.rand.floatv());
this.worldObj.spawnParticle(ParticleType.EXPLOSION_NORMAL, (d0 + this.explosionX * 1.0D) / 2.0D, (d1 + this.explosionY * 1.0D) / 2.0D, (d2 + this.explosionZ * 1.0D) / 2.0D); this.worldObj.clientParticle(ParticleType.EXPLOSION_NORMAL, (d0 + this.explosionX * 1.0D) / 2.0D, (d1 + this.explosionY * 1.0D) / 2.0D, (d2 + this.explosionZ * 1.0D) / 2.0D);
this.worldObj.spawnParticle(ParticleType.SMOKE, d0, d1, d2); this.worldObj.clientParticle(ParticleType.SMOKE, d0, d1, d2);
} }
if (block != Blocks.air) if (block != Blocks.air)

View file

@ -278,7 +278,7 @@ public abstract class World implements IWorldAccess {
return false; return false;
} }
else { else {
this.playAuxSFX(2001, pos, BlockRegistry.getId(iblockstate)); this.playEffect(2001, pos, BlockRegistry.getId(iblockstate));
if(dropBlock) { if(dropBlock) {
block.drop(this, pos, iblockstate, 0); block.drop(this, pos, iblockstate, 0);
@ -301,11 +301,11 @@ public abstract class World implements IWorldAccess {
} }
} }
this.markBlockRangeForRenderUpdate(x1, x2, z1, x1, z2, z1); this.clientRenderUpdate(x1, x2, z1, x1, z2, z1);
} }
public void markBlockRangeForRenderUpdate(BlockPos rangeMin, BlockPos rangeMax) { public void markBlockRangeForRenderUpdate(BlockPos rangeMin, BlockPos rangeMax) {
this.markBlockRangeForRenderUpdate(rangeMin.getX(), rangeMin.getY(), rangeMin.getZ(), rangeMax.getX(), rangeMax.getY(), rangeMax.getZ()); this.clientRenderUpdate(rangeMin.getX(), rangeMin.getY(), rangeMin.getZ(), rangeMax.getX(), rangeMax.getY(), rangeMax.getZ());
} }
public boolean canSeeSky(BlockPos pos) { public boolean canSeeSky(BlockPos pos) {
@ -475,7 +475,7 @@ public abstract class World implements IWorldAccess {
if(this.isBlockLoaded(pos)) { if(this.isBlockLoaded(pos)) {
Chunk chunk = this.getChunk(pos); Chunk chunk = this.getChunk(pos);
chunk.setLight(type, pos, lightValue); chunk.setLight(type, pos, lightValue);
this.notifyLightSet(pos); this.clientNotifyLight(pos);
} }
} }
} }
@ -701,7 +701,7 @@ public abstract class World implements IWorldAccess {
} }
public void playSoundAtEntity(Entity entityIn, SoundEvent name, float volume) { public void playSoundAtEntity(Entity entityIn, SoundEvent name, float volume) {
this.playSound(name, entityIn.posX, entityIn.posY, entityIn.posZ, volume); this.sendSound(name, entityIn.posX, entityIn.posY, entityIn.posZ, volume);
} }
public boolean spawnEntityInWorld(Entity entityIn) { public boolean spawnEntityInWorld(Entity entityIn) {
@ -1376,7 +1376,7 @@ public abstract class World implements IWorldAccess {
pos = pos.offset(side); pos = pos.offset(side);
if(this.getState(pos).getBlock().canExtinguish()) { if(this.getState(pos).getBlock().canExtinguish()) {
this.playAuxSFX(player, 1004, pos, 0); this.playEffect(player, 1004, pos, 0);
this.setBlockToAir(pos); this.setBlockToAir(pos);
return true; return true;
} }
@ -1962,32 +1962,32 @@ public abstract class World implements IWorldAccess {
return Math.abs(gravity) < 0.075 ? 0.0 : gravity; return Math.abs(gravity) < 0.075 ? 0.0 : gravity;
} }
public final void playAuxSFX(int type, BlockPos pos, int data) { public final void playEffect(int type, BlockPos pos, int data) {
this.playAuxSFX(null, type, pos, data); this.playEffect(null, type, pos, data);
} }
public final void spawnParticle(ParticleType particleType, double xCoord, double yCoord, double zCoord) { public final void clientParticle(ParticleType particleType, double xCoord, double yCoord, double zCoord) {
this.spawnParticle(particleType, xCoord, yCoord, zCoord, 0); this.clientParticle(particleType, xCoord, yCoord, zCoord, 0);
} }
public void playSound(SoundEvent sound, double x, double y, double z, float volume) { public void sendSound(SoundEvent sound, double x, double y, double z, float volume) {
} }
public void playSound(double x, double y, double z, SoundEvent sound, float volume) { public void clientSound(SoundEvent sound, double x, double y, double z, float volume) {
} }
public void setLastLightning(int last, int color) { public void setLastLightning(int last, int color) {
} }
public void spawnParticle(ParticleType particleType, double xCoord, double yCoord, double zCoord, int data) { public void clientParticle(ParticleType particleType, double xCoord, double yCoord, double zCoord, int data) {
} }
public void markBlockRangeForRenderUpdate(int x1, int y1, int z1, int x2, int y2, int z2) { public void clientRenderUpdate(int x1, int y1, int z1, int x2, int y2, int z2) {
} }
protected void notifyLightSet(BlockPos pos) { protected void clientNotifyLight(BlockPos pos) {
} }
protected abstract float getTemperature(BlockPos pos); protected abstract float getTemperature(BlockPos pos);
@ -1996,5 +1996,5 @@ public abstract class World implements IWorldAccess {
public abstract void markBlockForUpdate(BlockPos pos); public abstract void markBlockForUpdate(BlockPos pos);
protected abstract void onEntityAdded(Entity entityIn); protected abstract void onEntityAdded(Entity entityIn);
protected abstract void onEntityRemoved(Entity entityIn); protected abstract void onEntityRemoved(Entity entityIn);
public abstract void playAuxSFX(EntityNPC player, int sfxType, BlockPos blockPosIn, int data); public abstract void playEffect(EntityNPC player, int sfxType, BlockPos blockPosIn, int data);
} }

Some files were not shown because too many files have changed in this diff Show more