server client split world classes

This commit is contained in:
Sen 2025-05-13 17:02:57 +02:00
parent 66e9f68eee
commit 6e77090c5b
247 changed files with 1309 additions and 1187 deletions

View file

@ -1,34 +0,0 @@
package common;
import common.entity.Entity;
import common.entity.npc.EntityNPC;
import common.entity.types.IEntityFX;
import common.model.ParticleType;
import common.nbt.NBTTagCompound;
import common.sound.Sound;
import common.util.BlockPos;
import common.world.State;
public interface IClient {
int getRenderDistance();
float getGravity();
int getTimeFactor();
boolean hasDayCycle();
void playSound(Sound sound);
EntityNPC getPlayer();
Entity getRenderViewEntity();
void makeFireworks(double x, double y, double z, double motionX, double motionY, double motionZ, NBTTagCompound compund);
IEntityFX spawnEffectParticle(int particleId, double xCoord, double yCoord, double zCoord, double xSpeed, double ySpeed, double zSpeed, int[] parameters);
void addBlockDestroyEffects(BlockPos pos, State state);
void sendBlockBreakProgress(int breakerId, BlockPos pos, int progress);
void markBlocksForUpdate(int x1, int y1, int z1, int x2, int y2, int z2);
void updatePlayerMoveState();
void emitParticleAtEntity(Entity entityIn, ParticleType particleTypes);
boolean isJumping();
boolean isSprinting();
boolean isSneaking();
float getMoveForward();
float getMoveStrafe();
void setMoveForward(float value);
void setMoveStrafe(float value);
}

View file

@ -1,25 +0,0 @@
package common;
import java.util.List;
import java.util.Map;
import common.entity.Entity;
import common.entity.npc.EntityNPC;
import common.network.IPlayer;
import common.network.Packet;
import common.util.BlockPos;
import common.util.PortalType;
import common.util.Position;
import common.world.WorldServer;
public interface IServer {
List<IPlayer> getIPlayers();
void sendPacket(Packet packet);
void sendPacket(Packet packet, int dimension);
void sendNear(double x, double y, double z, double radius, int dimension, Packet packet);
void sendNearExcept(EntityNPC except, double x, double y, double z, double radius, int dimension, Packet packet);
Map<String, Position> getWarps();
List<WorldServer> getWorlds();
WorldServer getWorld(int dimension);
void placeInDimension(Entity entity, WorldServer oldWorld, WorldServer world, BlockPos pos, PortalType portal);
}

View file

@ -5,7 +5,7 @@ import common.rng.Random;
import common.util.BlockPos;
import common.util.Vec3;
import common.world.World;
import common.world.WorldServer;
import common.world.AWorldServer;
public class EntityAIFleeSun extends EntityAIBase
{
@ -29,7 +29,7 @@ public class EntityAIFleeSun extends EntityAIBase
*/
public boolean shouldExecute()
{
if (!((WorldServer)this.theWorld).isDaytime())
if (!((AWorldServer)this.theWorld).isDaytime())
{
return false;
}

View file

@ -5,7 +5,7 @@ import common.util.BlockPos;
import common.util.Vec3;
import common.village.Village;
import common.village.VillageDoorInfo;
import common.world.WorldServer;
import common.world.AWorldServer;
public class EntityAIMoveIndoors extends EntityAIBase
{
@ -27,7 +27,7 @@ public class EntityAIMoveIndoors extends EntityAIBase
{
BlockPos blockpos = new BlockPos(this.entityObj);
if ((!((WorldServer)this.entityObj.worldObj).isDaytime() /* || this.entityObj.worldObj.isRaining() && !this.entityObj.worldObj.getBiomeGenForCoords(blockpos).canRain() */) && !this.entityObj.worldObj.dimension.hasNoLight())
if ((!((AWorldServer)this.entityObj.worldObj).isDaytime() /* || this.entityObj.worldObj.isRaining() && !this.entityObj.worldObj.getBiomeGenForCoords(blockpos).canRain() */) && !this.entityObj.worldObj.dimension.hasNoLight())
{
if (this.entityObj.getRNG().zrange(50) != 0)
{
@ -39,7 +39,7 @@ public class EntityAIMoveIndoors extends EntityAIBase
}
else
{
Village village = ((WorldServer)this.entityObj.worldObj).getNearestVillage(blockpos, 14);
Village village = ((AWorldServer)this.entityObj.worldObj).getNearestVillage(blockpos, 14);
if (village == null)
{

View file

@ -11,7 +11,7 @@ import common.util.ExtMath;
import common.util.Vec3;
import common.village.Village;
import common.village.VillageDoorInfo;
import common.world.WorldServer;
import common.world.AWorldServer;
public class EntityAIMoveThroughVillage extends EntityAIBase
{
@ -44,13 +44,13 @@ public class EntityAIMoveThroughVillage extends EntityAIBase
{
this.resizeDoorList();
if (this.isNocturnal && ((WorldServer)this.theEntity.worldObj).isDaytime())
if (this.isNocturnal && ((AWorldServer)this.theEntity.worldObj).isDaytime())
{
return false;
}
else
{
Village village = ((WorldServer)this.theEntity.worldObj).getNearestVillage(new BlockPos(this.theEntity), 0);
Village village = ((AWorldServer)this.theEntity.worldObj).getNearestVillage(new BlockPos(this.theEntity), 0);
if (village == null)
{

View file

@ -3,7 +3,7 @@ package common.ai;
import common.entity.Entity;
import common.entity.npc.EntityNPC;
import common.world.World;
import common.world.WorldServer;
import common.world.AWorldServer;
public class EntityAINpcMate extends EntityAIBase
{
@ -33,7 +33,7 @@ public class EntityAINpcMate extends EntityAIBase
{
if (this.npc.getIsWillingToMate(true))
{
Entity entity = ((WorldServer)this.worldObj).findNearestEntityWithinAABB(EntityNPC.class, this.npc.getEntityBoundingBox().expand(8.0D, 3.0D, 8.0D), this.npc);
Entity entity = ((AWorldServer)this.worldObj).findNearestEntityWithinAABB(EntityNPC.class, this.npc.getEntityBoundingBox().expand(8.0D, 3.0D, 8.0D), this.npc);
if (entity == null)
{

View file

@ -5,7 +5,7 @@ import common.pathfinding.PathNavigateGround;
import common.util.BlockPos;
import common.village.Village;
import common.village.VillageDoorInfo;
import common.world.WorldServer;
import common.world.AWorldServer;
public class EntityAIRestrictOpenDoor extends EntityAIBase
{
@ -27,14 +27,14 @@ public class EntityAIRestrictOpenDoor extends EntityAIBase
*/
public boolean shouldExecute()
{
if (((WorldServer)this.entityObj.worldObj).isDaytime())
if (((AWorldServer)this.entityObj.worldObj).isDaytime())
{
return false;
}
else
{
BlockPos blockpos = new BlockPos(this.entityObj);
Village village = ((WorldServer)this.entityObj.worldObj).getNearestVillage(blockpos, 16);
Village village = ((AWorldServer)this.entityObj.worldObj).getNearestVillage(blockpos, 16);
if (village == null)
{
@ -53,7 +53,7 @@ public class EntityAIRestrictOpenDoor extends EntityAIBase
*/
public boolean continueExecuting()
{
return ((WorldServer)this.entityObj.worldObj).isDaytime() ? false : !this.frontDoor.getIsDetachedFromVillageFlag() && this.frontDoor.isIndoorSide(new BlockPos(this.entityObj));
return ((AWorldServer)this.entityObj.worldObj).isDaytime() ? false : !this.frontDoor.getIsDetachedFromVillageFlag() && this.frontDoor.isIndoorSide(new BlockPos(this.entityObj));
}
/**

View file

@ -2,7 +2,7 @@ package common.ai;
import common.entity.types.EntityLiving;
import common.pathfinding.PathNavigateGround;
import common.world.WorldServer;
import common.world.AWorldServer;
public class EntityAIRestrictSun extends EntityAIBase
{
@ -18,7 +18,7 @@ public class EntityAIRestrictSun extends EntityAIBase
*/
public boolean shouldExecute()
{
return ((WorldServer)this.theEntity.worldObj).isDaytime();
return ((AWorldServer)this.theEntity.worldObj).isDaytime();
}
/**

View file

@ -2,7 +2,7 @@ package common.ai;
import common.entity.Entity;
import common.entity.types.EntityLiving;
import common.world.WorldServer;
import common.world.AWorldServer;
public class EntityAIWatchClosest extends EntityAIBase
{
@ -57,7 +57,7 @@ public class EntityAIWatchClosest extends EntityAIBase
}
else
{
this.closestEntity = ((WorldServer)this.theWatcher.worldObj).findNearestEntityWithinAABB(this.watchedClass, this.theWatcher.getEntityBoundingBox().expand((double)this.maxDistanceForPlayer, 3.0D, (double)this.maxDistanceForPlayer), this.theWatcher);
this.closestEntity = ((AWorldServer)this.theWatcher.worldObj).findNearestEntityWithinAABB(this.watchedClass, this.theWatcher.getEntityBoundingBox().expand((double)this.maxDistanceForPlayer, 3.0D, (double)this.maxDistanceForPlayer), this.theWatcher);
}
return this.closestEntity != null;

View file

@ -36,7 +36,7 @@ import common.util.BlockPos;
import common.util.ExtMath;
import common.world.State;
import common.world.World;
import common.world.WorldServer;
import common.world.AWorldServer;
import common.worldgen.ChunkPrimer;
import common.worldgen.FeatureGenerator;
import common.worldgen.feature.WorldGenClay;
@ -315,7 +315,7 @@ public abstract class Biome {
}
}
public void decorate(WorldServer world, Random rand, BlockPos pos)
public void decorate(AWorldServer world, Random rand, BlockPos pos)
{
for (int i = 0; i < this.sandPerChunk2; ++i)
{
@ -564,7 +564,7 @@ public abstract class Biome {
return Colorizer.getFoliageColor(d0, d1);
}
public void genTerrainBlocks(WorldServer worldIn, Random rand, ChunkPrimer chunkPrimerIn, int x, int z, double noiseVal)
public void genTerrainBlocks(AWorldServer worldIn, Random rand, ChunkPrimer chunkPrimerIn, int x, int z, double noiseVal)
{
this.generateBiomeTerrain(worldIn, rand, chunkPrimerIn, x, z, noiseVal);
}
@ -579,7 +579,7 @@ public abstract class Biome {
*
* If this.fillerBlock is red sand, we replace some of that with red sandstone.
*/
public final void generateBiomeTerrain(WorldServer worldIn, Random rand, ChunkPrimer chunkPrimerIn, int x, int z, double noiseVal)
public final void generateBiomeTerrain(AWorldServer worldIn, Random rand, ChunkPrimer chunkPrimerIn, int x, int z, double noiseVal)
{
int i = worldIn.getSeaLevel();
State worldState = worldIn.dimension.getFiller();

View file

@ -7,7 +7,7 @@ import common.init.EntityRegistry;
import common.rng.Random;
import common.rng.WeightedList;
import common.util.BlockPos;
import common.world.WorldServer;
import common.world.AWorldServer;
import common.worldgen.FeatureGenerator;
import common.worldgen.foliage.WorldGenMushroom;
@ -29,7 +29,7 @@ public class BiomeChaos extends Biome
}
}
public void decorate(WorldServer worldIn, Random rand, BlockPos pos)
public void decorate(AWorldServer worldIn, Random rand, BlockPos pos)
{
super.decorate(worldIn, rand, pos);

View file

@ -4,7 +4,7 @@ import common.init.Blocks;
import common.rng.Random;
import common.rng.WeightedList;
import common.util.BlockPos;
import common.world.WorldServer;
import common.world.AWorldServer;
import common.worldgen.feature.WorldGenDesertWells;
public class BiomeDesert extends Biome
@ -24,7 +24,7 @@ public class BiomeDesert extends Biome
protected void addMobs(WeightedList<RngSpawn> mobs) {
}
public void decorate(WorldServer worldIn, Random rand, BlockPos pos)
public void decorate(AWorldServer worldIn, Random rand, BlockPos pos)
{
super.decorate(worldIn, rand, pos);

View file

@ -4,7 +4,7 @@ import common.init.Blocks;
import common.rng.Random;
import common.rng.WeightedList;
import common.util.BlockPos;
import common.world.WorldServer;
import common.world.AWorldServer;
public class BiomeExterminated extends Biome {
public BiomeExterminated(int id) {
@ -16,7 +16,7 @@ public class BiomeExterminated extends Biome {
protected void addMobs(WeightedList<RngSpawn> mobs) {
}
public void decorate(WorldServer worldIn, Random rand, BlockPos pos) {
public void decorate(AWorldServer worldIn, Random rand, BlockPos pos) {
}
public int getSkyColor() {

View file

@ -10,7 +10,7 @@ import common.init.Blocks;
import common.rng.Random;
import common.util.BlockPos;
import common.util.ExtMath;
import common.world.WorldServer;
import common.world.AWorldServer;
import common.worldgen.foliage.WorldGenBigMushroom;
import common.worldgen.tree.WorldGenBaseTree;
import common.worldgen.tree.WorldGenBigTree;
@ -120,7 +120,7 @@ public class BiomeForest extends Biome
}
}
public void decorate(WorldServer worldIn, Random rand, BlockPos pos)
public void decorate(AWorldServer worldIn, Random rand, BlockPos pos)
{
// if(worldIn.getLeavesGen() != this.leavesType) {
// this.leavesType = worldIn.getLeavesGen();
@ -229,7 +229,7 @@ public class BiomeForest extends Biome
{
return this.id != Biome.birchForest.id && this.id != Biome.birchForestHills.id ? new BiomeMutated(id, this)
{
public void decorate(WorldServer worldIn, Random rand, BlockPos pos)
public void decorate(AWorldServer worldIn, Random rand, BlockPos pos)
{
this.baseBiome.decorate(worldIn, rand, pos);
}

View file

@ -10,7 +10,7 @@ import common.init.Blocks;
import common.rng.Random;
import common.rng.WeightedList;
import common.util.BlockPos;
import common.world.WorldServer;
import common.world.AWorldServer;
import common.worldgen.FeatureOres;
import common.worldgen.feature.WorldGenFire;
import common.worldgen.feature.WorldGenGlowStone;
@ -73,7 +73,7 @@ public class BiomeHell extends Biome
mobs.add(new RngSpawn(EntityMagma.class, 1, 4, 4));
}
public void decorate(WorldServer worldIn, Random rand, BlockPos pos)
public void decorate(AWorldServer worldIn, Random rand, BlockPos pos)
{
if(this.subtype == 0) {
for (int i = 0; i < 8; ++i)

View file

@ -3,7 +3,7 @@ package common.biome;
import common.init.Blocks;
import common.rng.Random;
import common.util.BlockPos;
import common.world.WorldServer;
import common.world.AWorldServer;
import common.worldgen.ChunkPrimer;
import common.worldgen.FeatureOres;
import common.worldgen.tree.WorldGenTaiga2;
@ -36,7 +36,7 @@ public class BiomeHills extends Biome
return (WorldGenTree)(rand.rarity(3) ? this.field_150634_aD : super.genBigTreeChance(rand));
}
public void decorate(WorldServer worldIn, Random rand, BlockPos pos)
public void decorate(AWorldServer worldIn, Random rand, BlockPos pos)
{
super.decorate(worldIn, rand, pos);
// int i = 3 + rand.nextInt(6);
@ -64,7 +64,7 @@ public class BiomeHills extends Biome
// }
}
public void genTerrainBlocks(WorldServer worldIn, Random rand, ChunkPrimer chunkPrimerIn, int x, int z, double noiseVal)
public void genTerrainBlocks(AWorldServer worldIn, Random rand, ChunkPrimer chunkPrimerIn, int x, int z, double noiseVal)
{
this.topBlock = Blocks.grass.getState();
this.fillerBlock = Blocks.dirt.getState();

View file

@ -7,7 +7,7 @@ import common.init.Blocks;
import common.rng.Random;
import common.util.BlockPos;
import common.world.State;
import common.world.WorldServer;
import common.world.AWorldServer;
import common.worldgen.FeatureGenerator;
import common.worldgen.foliage.WorldGenMelon;
import common.worldgen.foliage.WorldGenShrub;
@ -63,7 +63,7 @@ public class BiomeJungle extends Biome
return rand.chance(4) ? new WorldGenTallGrass(BlockTallGrass.EnumType.FERN) : new WorldGenTallGrass(BlockTallGrass.EnumType.GRASS);
}
public void decorate(WorldServer worldIn, Random rand, BlockPos pos)
public void decorate(AWorldServer worldIn, Random rand, BlockPos pos)
{
super.decorate(worldIn, rand, pos);
int i = rand.chOffset();

View file

@ -14,7 +14,7 @@ import common.rng.Random;
import common.rng.WeightedList;
import common.util.BlockPos;
import common.world.State;
import common.world.WorldServer;
import common.world.AWorldServer;
import common.worldgen.ChunkPrimer;
import common.worldgen.tree.WorldGenTree;
@ -71,12 +71,12 @@ public class BiomeMesa extends Biome
return 9470285;
}
public void decorate(WorldServer worldIn, Random rand, BlockPos pos)
public void decorate(AWorldServer worldIn, Random rand, BlockPos pos)
{
super.decorate(worldIn, rand, pos);
}
public void genTerrainBlocks(WorldServer worldIn, Random rand, ChunkPrimer chunkPrimerIn, int x, int z, double noiseVal)
public void genTerrainBlocks(AWorldServer worldIn, Random rand, ChunkPrimer chunkPrimerIn, int x, int z, double noiseVal)
{
if (this.layers == null || this.layerSeed != worldIn.getSeed())
{

View file

@ -4,7 +4,7 @@ import common.init.Blocks;
import common.rng.Random;
import common.rng.WeightedList;
import common.util.BlockPos;
import common.world.WorldServer;
import common.world.AWorldServer;
import common.worldgen.FeatureOres;
public class BiomeMoon extends Biome {
@ -19,7 +19,7 @@ public class BiomeMoon extends Biome {
protected void addMobs(WeightedList<RngSpawn> mobs) {
}
public void decorate(WorldServer worldIn, Random rand, BlockPos pos) {
public void decorate(AWorldServer worldIn, Random rand, BlockPos pos) {
this.cheeseGenerator.generate(worldIn, rand, pos);
}
}

View file

@ -3,7 +3,7 @@ package common.biome;
import common.rng.Random;
import common.rng.WeightedList;
import common.util.BlockPos;
import common.world.WorldServer;
import common.world.AWorldServer;
import common.worldgen.ChunkPrimer;
import common.worldgen.tree.WorldGenTree;
@ -43,17 +43,17 @@ public class BiomeMutated extends Biome
protected void addMobs(WeightedList<RngSpawn> mobs) {
}
public void decorate(WorldServer worldIn, Random rand, BlockPos pos)
public void decorate(AWorldServer worldIn, Random rand, BlockPos pos)
{
this.baseBiome.decorate(worldIn, rand, pos); // TODO: check
}
public void decorateNormal(WorldServer worldIn, Random rand, BlockPos pos)
public void decorateNormal(AWorldServer worldIn, Random rand, BlockPos pos)
{
super.decorate(worldIn, rand, pos);
}
public void genTerrainBlocks(WorldServer worldIn, Random rand, ChunkPrimer chunkPrimerIn, int x, int z, double noiseVal)
public void genTerrainBlocks(AWorldServer worldIn, Random rand, ChunkPrimer chunkPrimerIn, int x, int z, double noiseVal)
{
this.baseBiome.genTerrainBlocks(worldIn, rand, chunkPrimerIn, x, z, noiseVal);
}

View file

@ -4,7 +4,7 @@ import common.init.Blocks;
import common.rng.Random;
import common.rng.WeightedList;
import common.util.BlockPos;
import common.world.WorldServer;
import common.world.AWorldServer;
import common.worldgen.ChunkPrimer;
public class BiomeNone extends Biome {
@ -17,10 +17,10 @@ public class BiomeNone extends Biome {
protected void addMobs(WeightedList<RngSpawn> mobs) {
}
public void genTerrainBlocks(WorldServer worldIn, Random rand, ChunkPrimer chunkPrimerIn, int x, int z, double noiseVal) {
public void genTerrainBlocks(AWorldServer worldIn, Random rand, ChunkPrimer chunkPrimerIn, int x, int z, double noiseVal) {
}
public void decorate(WorldServer worldIn, Random rand, BlockPos pos) {
public void decorate(AWorldServer worldIn, Random rand, BlockPos pos) {
}
public Temperature getTempCategory() {

View file

@ -5,7 +5,7 @@ import common.block.BlockFlower;
import common.entity.animal.EntityHorse;
import common.rng.Random;
import common.util.BlockPos;
import common.world.WorldServer;
import common.world.AWorldServer;
public class BiomePlains extends Biome
{
@ -68,7 +68,7 @@ public class BiomePlains extends Biome
}
}
public void decorate(WorldServer worldIn, Random rand, BlockPos pos)
public void decorate(AWorldServer worldIn, Random rand, BlockPos pos)
{
double d0 = GRASS_NOISE.generate((double)(pos.getX() + 8) / 200.0D, (double)(pos.getZ() + 8) / 200.0D);

View file

@ -6,7 +6,7 @@ import common.entity.animal.EntityHorse;
import common.init.Blocks;
import common.rng.Random;
import common.util.BlockPos;
import common.world.WorldServer;
import common.world.AWorldServer;
import common.worldgen.ChunkPrimer;
import common.worldgen.tree.WorldGenSavanna;
import common.worldgen.tree.WorldGenTree;
@ -38,7 +38,7 @@ public class BiomeSavanna extends Biome
return biomegenbase;
}
public void decorate(WorldServer worldIn, Random rand, BlockPos pos)
public void decorate(AWorldServer worldIn, Random rand, BlockPos pos)
{
DOUBLE_PLANT_GEN.setPlantType(BlockDoublePlant.EnumPlantType.GRASS);
@ -63,7 +63,7 @@ public class BiomeSavanna extends Biome
this.grassPerChunk = 5;
}
public void genTerrainBlocks(WorldServer worldIn, Random rand, ChunkPrimer chunkPrimerIn, int x, int z, double noiseVal)
public void genTerrainBlocks(AWorldServer worldIn, Random rand, ChunkPrimer chunkPrimerIn, int x, int z, double noiseVal)
{
this.topBlock = Blocks.grass.getState();
this.fillerBlock = Blocks.dirt.getState();
@ -81,7 +81,7 @@ public class BiomeSavanna extends Biome
this.generateBiomeTerrain(worldIn, rand, chunkPrimerIn, x, z, noiseVal);
}
public void decorate(WorldServer worldIn, Random rand, BlockPos pos)
public void decorate(AWorldServer worldIn, Random rand, BlockPos pos)
{
this.decorateNormal(worldIn, rand, pos);
}

View file

@ -4,7 +4,7 @@ import common.init.Blocks;
import common.rng.Random;
import common.rng.WeightedList;
import common.util.BlockPos;
import common.world.WorldServer;
import common.world.AWorldServer;
import common.worldgen.feature.WorldGenIcePath;
import common.worldgen.feature.WorldGenIceSpike;
import common.worldgen.tree.WorldGenTaiga2;
@ -27,7 +27,7 @@ public class BiomeSnow extends Biome
protected void addMobs(WeightedList<RngSpawn> mobs) {
}
public void decorate(WorldServer worldIn, Random rand, BlockPos pos)
public void decorate(AWorldServer worldIn, Random rand, BlockPos pos)
{
if (this.spiky)
{

View file

@ -5,7 +5,7 @@ import common.init.Blocks;
import common.rng.Random;
import common.rng.WeightedList;
import common.util.BlockPos;
import common.world.WorldServer;
import common.world.AWorldServer;
import common.worldgen.FeatureGenerator;
import common.worldgen.feature.WorldGenAsteroid;
@ -26,7 +26,7 @@ public class BiomeSpace extends Biome
protected void addMobs(WeightedList<RngSpawn> mobs) {
}
public void decorate(WorldServer worldIn, Random rand, BlockPos pos)
public void decorate(AWorldServer worldIn, Random rand, BlockPos pos)
{
if(rand.chance(5)) {
int x = rand.chOffset();

View file

@ -8,7 +8,7 @@ import common.material.Material;
import common.rng.Random;
import common.util.BlockPos;
import common.util.Facing;
import common.world.WorldServer;
import common.world.AWorldServer;
import common.worldgen.ChunkPrimer;
import common.worldgen.tree.WorldGenTree;
@ -53,7 +53,7 @@ public class BiomeSwamp extends Biome
return BlockFlower.EnumFlowerType.BLUE_ORCHID;
}
public void genTerrainBlocks(WorldServer worldIn, Random rand, ChunkPrimer chunkPrimerIn, int x, int z, double noiseVal)
public void genTerrainBlocks(AWorldServer worldIn, Random rand, ChunkPrimer chunkPrimerIn, int x, int z, double noiseVal)
{
double d0 = GRASS_NOISE.generate((double)x * 0.25D, (double)z * 0.25D);

View file

@ -7,7 +7,7 @@ import common.entity.animal.EntityWolf;
import common.init.Blocks;
import common.rng.Random;
import common.util.BlockPos;
import common.world.WorldServer;
import common.world.AWorldServer;
import common.worldgen.ChunkPrimer;
import common.worldgen.FeatureGenerator;
import common.worldgen.feature.WorldGenBlockBlob;
@ -59,7 +59,7 @@ public class BiomeTaiga extends Biome
return rand.rarity(5) ? new WorldGenTallGrass(BlockTallGrass.EnumType.FERN) : new WorldGenTallGrass(BlockTallGrass.EnumType.GRASS);
}
public void decorate(WorldServer worldIn, Random rand, BlockPos pos)
public void decorate(AWorldServer worldIn, Random rand, BlockPos pos)
{
if (this.field_150644_aH == 1 || this.field_150644_aH == 2)
{
@ -87,7 +87,7 @@ public class BiomeTaiga extends Biome
super.decorate(worldIn, rand, pos);
}
public void genTerrainBlocks(WorldServer worldIn, Random rand, ChunkPrimer chunkPrimerIn, int x, int z, double noiseVal)
public void genTerrainBlocks(AWorldServer worldIn, Random rand, ChunkPrimer chunkPrimerIn, int x, int z, double noiseVal)
{
if (this.field_150644_aH == 1 || this.field_150644_aH == 2)
{

View file

@ -9,7 +9,7 @@ import common.init.Blocks;
import common.rng.Random;
import common.rng.WeightedList;
import common.util.BlockPos;
import common.world.WorldServer;
import common.world.AWorldServer;
import common.worldgen.FeatureGenerator;
import common.worldgen.feature.WorldGenSpikes;
import common.worldgen.foliage.WorldGenMushroom;
@ -57,7 +57,7 @@ public class BiomeTian extends Biome
return rand.pick(rand.chance(this.treeGen2, this.treeGen1, 4), rand.chance(this.treeGen3, this.treeGen4, 15));
}
public void decorate(WorldServer worldIn, Random rand, BlockPos pos)
public void decorate(AWorldServer worldIn, Random rand, BlockPos pos)
{
super.decorate(worldIn, rand, pos);

View file

@ -46,10 +46,10 @@ import common.util.HitPosition.ObjectType;
import common.world.Explosion;
import common.world.IBlockAccess;
import common.world.IWorldAccess;
import common.world.AWorldClient;
import common.world.State;
import common.world.World;
import common.world.WorldClient;
import common.world.WorldServer;
import common.world.AWorldServer;
public class Block
{
@ -698,14 +698,14 @@ public class Block
/**
* Called randomly when setTickRandomly is set to true (used by e.g. crops to grow, etc.)
*/
public void randomTick(WorldServer worldIn, BlockPos pos, State state, Random random)
public void randomTick(AWorldServer worldIn, BlockPos pos, State state, Random random)
{
this.updateTick(worldIn, pos, state, random);
if(this.radiation > 0.0f && /* worldIn.getTime() % 5L == 0L && */ random.chance(Config.randomTick / 3))
this.affectEntities(worldIn, pos, state, this.radiation * 8.0f * 0.25f);
}
private void affectEntities(WorldServer worldIn, BlockPos pos, State state, float rad)
private void affectEntities(AWorldServer worldIn, BlockPos pos, State state, float rad)
{
float r = ExtMath.clampf(rad * 2.0f, 0.0f, 25.0f);
BoundingBox box = this.getCollisionBoundingBox(worldIn, pos, state);
@ -719,11 +719,11 @@ public class Block
}
}
public void updateTick(WorldServer worldIn, BlockPos pos, State state, Random rand)
public void updateTick(AWorldServer worldIn, BlockPos pos, State state, Random rand)
{
}
public void randomDisplayTick(WorldClient worldIn, BlockPos pos, State state, Random rand)
public void randomDisplayTick(AWorldClient worldIn, BlockPos pos, State state, Random rand)
{
}
@ -749,11 +749,11 @@ public class Block
return 10;
}
public void onBlockAdded(WorldServer world, BlockPos pos, State state)
public void onBlockAdded(AWorldServer world, BlockPos pos, State state)
{
}
public void onBlockRemoved(WorldServer world, BlockPos pos, State state)
public void onBlockRemoved(AWorldServer world, BlockPos pos, State state)
{
}

View file

@ -14,7 +14,7 @@ import common.world.IBlockAccess;
import common.world.IWorldAccess;
import common.world.State;
import common.world.World;
import common.world.WorldServer;
import common.world.AWorldServer;
public abstract class BlockBasePressurePlate extends Block
{
@ -109,11 +109,11 @@ public abstract class BlockBasePressurePlate extends Block
/**
* Called randomly when setTickRandomly is set to true (used by e.g. crops to grow, etc.)
*/
public void randomTick(WorldServer worldIn, BlockPos pos, State state, Random random)
public void randomTick(AWorldServer worldIn, BlockPos pos, State state, Random random)
{
}
public void updateTick(WorldServer worldIn, BlockPos pos, State state, Random rand)
public void updateTick(AWorldServer worldIn, BlockPos pos, State state, Random rand)
{
// if (!worldIn.client)
// {
@ -183,7 +183,7 @@ public abstract class BlockBasePressurePlate extends Block
return new BoundingBox((double)((float)pos.getX() + 0.125F), (double)pos.getY(), (double)((float)pos.getZ() + 0.125F), (double)((float)(pos.getX() + 1) - 0.125F), (double)pos.getY() + 0.25D, (double)((float)(pos.getZ() + 1) - 0.125F));
}
public void onBlockRemoved(WorldServer worldIn, BlockPos pos, State state)
public void onBlockRemoved(AWorldServer worldIn, BlockPos pos, State state)
{
if (this.getRedstoneStrength(state) > 0)
{

View file

@ -4,15 +4,15 @@ import common.material.Material;
import common.model.ParticleType;
import common.rng.Random;
import common.util.BlockPos;
import common.world.AWorldClient;
import common.world.State;
import common.world.WorldClient;
public class BlockBedrock extends Block {
public BlockBedrock() {
super(Material.rock);
}
public void randomDisplayTick(WorldClient worldIn, BlockPos pos, State state, Random rand)
public void randomDisplayTick(AWorldClient worldIn, BlockPos pos, State state, Random rand)
{
if(/* worldIn.canShowVoidParticles() && */ pos.getY() <= 5 && rand.chance(8)) {
worldIn.spawnParticle(ParticleType.SUSPENDED_DEPTH, (double)pos.getX() + rand.floatv(), (double)(pos.getY()+1) + (rand.floatv() * 0.5f),

View file

@ -7,7 +7,7 @@ import common.material.Material;
import common.rng.Random;
import common.util.BlockPos;
import common.world.State;
import common.world.WorldServer;
import common.world.AWorldServer;
public class BlockBlackenedDirt extends Block
{
@ -18,7 +18,7 @@ public class BlockBlackenedDirt extends Block
this.setTab(CheatTab.tabNature);
}
public void updateTick(WorldServer worldIn, BlockPos pos, State state, Random rand)
public void updateTick(AWorldServer worldIn, BlockPos pos, State state, Random rand)
{
if (Config.darkDirtSpread)
{

View file

@ -10,7 +10,7 @@ import common.model.ModelProvider;
import common.rng.Random;
import common.util.BlockPos;
import common.world.State;
import common.world.WorldServer;
import common.world.AWorldServer;
public class BlockBlackenedSoil extends Block
{
@ -21,7 +21,7 @@ public class BlockBlackenedSoil extends Block
this.setTab(CheatTab.tabNature);
}
public void updateTick(WorldServer worldIn, BlockPos pos, State state, Random rand)
public void updateTick(AWorldServer worldIn, BlockPos pos, State state, Random rand)
{
if (worldIn.getLightFromNeighbors(pos.up()) < 2 && worldIn.getState(pos.up()).getBlock().getLightOpacity() > 6)
{

View file

@ -8,7 +8,7 @@ import common.rng.Random;
import common.util.BlockPos;
import common.world.State;
import common.world.World;
import common.world.WorldServer;
import common.world.AWorldServer;
public class BlockBlueShroom extends BlockBush
{
@ -19,7 +19,7 @@ public class BlockBlueShroom extends BlockBush
this.setTickRandomly();
}
public void updateTick(WorldServer worldIn, BlockPos pos, State state, Random rand)
public void updateTick(AWorldServer worldIn, BlockPos pos, State state, Random rand)
{
if (Config.blueShroomGrowth > 0 && rand.chance(Config.blueShroomGrowth))
{

View file

@ -23,10 +23,10 @@ import common.tileentity.TileEntityBrewingStand;
import common.util.BlockPos;
import common.util.BoundingBox;
import common.util.Facing;
import common.world.AWorldClient;
import common.world.State;
import common.world.World;
import common.world.WorldClient;
import common.world.WorldServer;
import common.world.AWorldServer;
public class BlockBrewingStand extends BlockContainer
{
@ -447,7 +447,7 @@ public class BlockBrewingStand extends BlockContainer
}
}
public void randomDisplayTick(WorldClient worldIn, BlockPos pos, State state, Random rand)
public void randomDisplayTick(AWorldClient worldIn, BlockPos pos, State state, Random rand)
{
double d0 = (double)((float)pos.getX() + 0.4F + rand.floatv() * 0.2F);
double d1 = (double)((float)pos.getY() + 0.7F + rand.floatv() * 0.3F);
@ -455,7 +455,7 @@ public class BlockBrewingStand extends BlockContainer
worldIn.spawnParticle(ParticleType.SMOKE_NORMAL, d0, d1, d2, 0.0D, 0.0D, 0.0D);
}
public void onBlockRemoved(WorldServer worldIn, BlockPos pos, State state)
public void onBlockRemoved(AWorldServer worldIn, BlockPos pos, State state)
{
TileEntity tileentity = worldIn.getTileEntity(pos);

View file

@ -9,7 +9,7 @@ import common.util.BlockPos;
import common.util.BoundingBox;
import common.world.State;
import common.world.World;
import common.world.WorldServer;
import common.world.AWorldServer;
public class BlockBush extends Block
{
@ -49,7 +49,7 @@ public class BlockBush extends Block
this.checkAndDropBlock(worldIn, pos, state);
}
public void updateTick(WorldServer worldIn, BlockPos pos, State state, Random rand)
public void updateTick(AWorldServer worldIn, BlockPos pos, State state, Random rand)
{
this.checkAndDropBlock(worldIn, pos, state);
}

View file

@ -24,7 +24,7 @@ import common.util.Facing;
import common.world.IWorldAccess;
import common.world.State;
import common.world.World;
import common.world.WorldServer;
import common.world.AWorldServer;
public class BlockButton extends Block
{
@ -195,7 +195,7 @@ public class BlockButton extends Block
}
}
public void onBlockRemoved(WorldServer worldIn, BlockPos pos, State state)
public void onBlockRemoved(AWorldServer worldIn, BlockPos pos, State state)
{
if (((Boolean)state.getValue(POWERED)).booleanValue())
{
@ -226,11 +226,11 @@ public class BlockButton extends Block
/**
* Called randomly when setTickRandomly is set to true (used by e.g. crops to grow, etc.)
*/
public void randomTick(WorldServer worldIn, BlockPos pos, State state, Random random)
public void randomTick(AWorldServer worldIn, BlockPos pos, State state, Random random)
{
}
public void updateTick(WorldServer worldIn, BlockPos pos, State state, Random rand)
public void updateTick(AWorldServer worldIn, BlockPos pos, State state, Random rand)
{
// if (!worldIn.client)
// {

View file

@ -17,7 +17,7 @@ import common.util.BoundingBox;
import common.util.Facing;
import common.world.State;
import common.world.World;
import common.world.WorldServer;
import common.world.AWorldServer;
public class BlockCactus extends Block
{
@ -43,7 +43,7 @@ public class BlockCactus extends Block
this.setTab(CheatTab.tabPlants);
}
public void updateTick(WorldServer worldIn, BlockPos pos, State state, Random rand)
public void updateTick(AWorldServer worldIn, BlockPos pos, State state, Random rand)
{
BlockPos blockpos = pos.up();

View file

@ -29,7 +29,7 @@ import common.util.Facing;
import common.world.IWorldAccess;
import common.world.State;
import common.world.World;
import common.world.WorldServer;
import common.world.AWorldServer;
public class BlockChest extends BlockContainer
{
@ -92,7 +92,7 @@ public class BlockChest extends BlockContainer
}
}
public void onBlockAdded(WorldServer worldIn, BlockPos pos, State state)
public void onBlockAdded(AWorldServer worldIn, BlockPos pos, State state)
{
this.checkForSurroundingChests(worldIn, pos, state);
@ -416,7 +416,7 @@ public class BlockChest extends BlockContainer
}
}
public void onBlockRemoved(WorldServer worldIn, BlockPos pos, State state)
public void onBlockRemoved(AWorldServer worldIn, BlockPos pos, State state)
{
TileEntity tileentity = worldIn.getTileEntity(pos);

View file

@ -21,7 +21,7 @@ import common.util.Facing;
import common.world.IWorldAccess;
import common.world.State;
import common.world.World;
import common.world.WorldServer;
import common.world.AWorldServer;
public class BlockCocoa extends BlockDirectional implements IGrowable
{
@ -34,7 +34,7 @@ public class BlockCocoa extends BlockDirectional implements IGrowable
this.setTickRandomly();
}
public void updateTick(WorldServer worldIn, BlockPos pos, State state, Random rand)
public void updateTick(AWorldServer worldIn, BlockPos pos, State state, Random rand)
{
if (!this.canBlockStay(worldIn, pos, state))
{
@ -197,7 +197,7 @@ public class BlockCocoa extends BlockDirectional implements IGrowable
return true;
}
public void grow(WorldServer worldIn, Random rand, BlockPos pos, State state)
public void grow(AWorldServer worldIn, Random rand, BlockPos pos, State state)
{
worldIn.setState(pos, state.withProperty(AGE, Integer.valueOf(((Integer)state.getValue(AGE)).intValue() + 1)), 2);
}

View file

@ -6,7 +6,7 @@ import common.util.BlockPos;
import common.util.Facing;
import common.world.State;
import common.world.World;
import common.world.WorldServer;
import common.world.AWorldServer;
public abstract class BlockContainer extends Block implements ITileEntityProvider
{
@ -34,7 +34,7 @@ public abstract class BlockContainer extends Block implements ITileEntityProvide
return -1;
}
public void onBlockRemoved(WorldServer worldIn, BlockPos pos, State state)
public void onBlockRemoved(AWorldServer worldIn, BlockPos pos, State state)
{
super.onBlockRemoved(worldIn, pos, state);
worldIn.removeTileEntity(pos);

View file

@ -5,7 +5,7 @@ import common.item.CheatTab;
import common.material.Material;
import common.util.BlockPos;
import common.world.State;
import common.world.WorldServer;
import common.world.AWorldServer;
public class BlockCore extends Block {
public BlockCore() {
@ -13,13 +13,13 @@ public class BlockCore extends Block {
this.setTab(CheatTab.tabTech);
}
public void onBlockRemoved(WorldServer world, BlockPos pos, State state)
public void onBlockRemoved(AWorldServer world, BlockPos pos, State state)
{
if(Config.loaders)
world.removeLoader(pos);
}
public void onBlockAdded(WorldServer world, BlockPos pos, State state)
public void onBlockAdded(AWorldServer world, BlockPos pos, State state)
{
if(Config.loaders)
world.addLoader(pos);

View file

@ -14,7 +14,7 @@ import common.rng.Random;
import common.util.BlockPos;
import common.world.State;
import common.world.World;
import common.world.WorldServer;
import common.world.AWorldServer;
public class BlockCrops extends BlockBush implements IGrowable
{
@ -40,7 +40,7 @@ public class BlockCrops extends BlockBush implements IGrowable
return ground == Blocks.farmland;
}
public void updateTick(WorldServer worldIn, BlockPos pos, State state, Random rand)
public void updateTick(AWorldServer worldIn, BlockPos pos, State state, Random rand)
{
super.updateTick(worldIn, pos, state, rand);
@ -194,7 +194,7 @@ public class BlockCrops extends BlockBush implements IGrowable
return true;
}
public void grow(WorldServer worldIn, Random rand, BlockPos pos, State state)
public void grow(AWorldServer worldIn, Random rand, BlockPos pos, State state)
{
this.grow(worldIn, pos, state);
}

View file

@ -24,7 +24,7 @@ import common.world.IWorldAccess;
import common.world.LightType;
import common.world.State;
import common.world.World;
import common.world.WorldServer;
import common.world.AWorldServer;
public class BlockDaylightDetector extends BlockContainer
{
@ -53,7 +53,7 @@ public class BlockDaylightDetector extends BlockContainer
return ((Integer)state.getValue(POWER)).intValue();
}
public void updatePower(WorldServer worldIn, BlockPos pos)
public void updatePower(AWorldServer worldIn, BlockPos pos)
{
if (!worldIn.dimension.hasNoLight())
{
@ -90,12 +90,12 @@ public class BlockDaylightDetector extends BlockContainer
if (this.inverted)
{
worldIn.setState(pos, Blocks.daylight_detector.getState().withProperty(POWER, state.getValue(POWER)), 4);
Blocks.daylight_detector.updatePower((WorldServer)worldIn, pos);
Blocks.daylight_detector.updatePower((AWorldServer)worldIn, pos);
}
else
{
worldIn.setState(pos, Blocks.daylight_detector_inverted.getState().withProperty(POWER, state.getValue(POWER)), 4);
Blocks.daylight_detector_inverted.updatePower((WorldServer)worldIn, pos);
Blocks.daylight_detector_inverted.updatePower((AWorldServer)worldIn, pos);
}
return true;

View file

@ -28,7 +28,7 @@ import common.util.BlockPos;
import common.util.Facing;
import common.world.State;
import common.world.World;
import common.world.WorldServer;
import common.world.AWorldServer;
public class BlockDispenser extends BlockContainer
{
@ -52,7 +52,7 @@ public class BlockDispenser extends BlockContainer
return 4;
}
public void onBlockAdded(WorldServer worldIn, BlockPos pos, State state)
public void onBlockAdded(AWorldServer worldIn, BlockPos pos, State state)
{
super.onBlockAdded(worldIn, pos, state);
this.setDefaultDirection(worldIn, pos, state);
@ -172,7 +172,7 @@ public class BlockDispenser extends BlockContainer
}
}
public void updateTick(WorldServer worldIn, BlockPos pos, State state, Random rand)
public void updateTick(AWorldServer worldIn, BlockPos pos, State state, Random rand)
{
// if (!worldIn.client)
// {
@ -215,7 +215,7 @@ public class BlockDispenser extends BlockContainer
}
}
public void onBlockRemoved(WorldServer worldIn, BlockPos pos, State state)
public void onBlockRemoved(AWorldServer worldIn, BlockPos pos, State state)
{
TileEntity tileentity = worldIn.getTileEntity(pos);

View file

@ -27,7 +27,7 @@ import common.util.Facing.Axis;
import common.world.IWorldAccess;
import common.world.State;
import common.world.World;
import common.world.WorldServer;
import common.world.AWorldServer;
public class BlockDoublePlant extends BlockBush implements IGrowable
{
@ -45,7 +45,7 @@ public class BlockDoublePlant extends BlockBush implements IGrowable
// this.setTickRandomly();
}
public void updateTick(WorldServer worldIn, BlockPos pos, State state, Random rand)
public void updateTick(AWorldServer worldIn, BlockPos pos, State state, Random rand)
{
if(Config.plantDry && worldIn.getTemperatureC(pos) >= 50.0f)
{
@ -295,7 +295,7 @@ public class BlockDoublePlant extends BlockBush implements IGrowable
return true;
}
public void grow(WorldServer worldIn, Random rand, BlockPos pos, State state)
public void grow(AWorldServer worldIn, Random rand, BlockPos pos, State state)
{
spawnAsEntity(worldIn, pos, new ItemStack(this, 1, this.getVariant(worldIn, pos).getMeta()));
}

View file

@ -13,7 +13,7 @@ import common.util.Facing;
import common.world.IWorldAccess;
import common.world.State;
import common.world.World;
import common.world.WorldServer;
import common.world.AWorldServer;
public class BlockDragonEgg extends Block
{
@ -82,7 +82,7 @@ public class BlockDragonEgg extends Block
this.setBlockBounds(0.0625F, 0.0F, 0.0625F, 0.9375F, 1.0F, 0.9375F);
}
public void onBlockAdded(WorldServer worldIn, BlockPos pos, State state)
public void onBlockAdded(AWorldServer worldIn, BlockPos pos, State state)
{
worldIn.scheduleUpdate(pos, this, this.tickRate(worldIn, pos));
}
@ -95,7 +95,7 @@ public class BlockDragonEgg extends Block
worldIn.scheduleUpdate(pos, this, this.tickRate(worldIn, pos));
}
public void updateTick(WorldServer worldIn, BlockPos pos, State state, Random rand)
public void updateTick(AWorldServer worldIn, BlockPos pos, State state, Random rand)
{
if(Config.blockGravity)
this.checkFall(worldIn, pos);

View file

@ -11,7 +11,7 @@ import common.util.BlockPos;
import common.util.Facing;
import common.world.State;
import common.world.World;
import common.world.WorldServer;
import common.world.AWorldServer;
public class BlockDynamicLiquid extends BlockLiquid
{
@ -29,7 +29,7 @@ public class BlockDynamicLiquid extends BlockLiquid
worldIn.setState(pos, getStaticBlock(this).getState().withProperty(LEVEL, currentState.getValue(LEVEL)), 2);
}
public void updateTick(WorldServer worldIn, BlockPos pos, State state, Random rand)
public void updateTick(AWorldServer worldIn, BlockPos pos, State state, Random rand)
{
if(!Config.liquidPhysics)
return;
@ -293,7 +293,7 @@ public class BlockDynamicLiquid extends BlockLiquid
return material != this.material && material != Material.lava && !this.isBlocked(worldIn, pos, state);
}
public void onBlockAdded(WorldServer worldIn, BlockPos pos, State state)
public void onBlockAdded(AWorldServer worldIn, BlockPos pos, State state)
{
if (!this.checkForMixing(worldIn, pos, state))
{

View file

@ -14,9 +14,9 @@ import common.tileentity.TileEntity;
import common.tileentity.TileEntityEnchantmentTable;
import common.util.BlockPos;
import common.util.Facing;
import common.world.AWorldClient;
import common.world.State;
import common.world.World;
import common.world.WorldClient;
public class BlockEnchantmentTable extends BlockContainer
{
@ -43,7 +43,7 @@ public class BlockEnchantmentTable extends BlockContainer
return false;
}
public void randomDisplayTick(WorldClient worldIn, BlockPos pos, State state, Random rand)
public void randomDisplayTick(AWorldClient worldIn, BlockPos pos, State state, Random rand)
{
super.randomDisplayTick(worldIn, pos, state, rand);

View file

@ -9,7 +9,7 @@ import common.rng.Random;
import common.util.BlockPos;
import common.world.State;
import common.world.World;
import common.world.WorldServer;
import common.world.AWorldServer;
public class BlockFalling extends Block
{
@ -26,7 +26,7 @@ public class BlockFalling extends Block
super(materialIn);
}
public void onBlockAdded(WorldServer worldIn, BlockPos pos, State state)
public void onBlockAdded(AWorldServer worldIn, BlockPos pos, State state)
{
worldIn.scheduleUpdate(pos, this, this.tickRate(worldIn, pos));
}
@ -39,7 +39,7 @@ public class BlockFalling extends Block
worldIn.scheduleUpdate(pos, this, this.tickRate(worldIn, pos));
}
public void updateTick(WorldServer worldIn, BlockPos pos, State state, Random rand)
public void updateTick(AWorldServer worldIn, BlockPos pos, State state, Random rand)
{
if(/* !worldIn.client && */ Config.blockGravity)
this.checkFallable(worldIn, pos);

View file

@ -18,7 +18,7 @@ import common.util.Facing;
import common.world.IWorldAccess;
import common.world.State;
import common.world.World;
import common.world.WorldServer;
import common.world.AWorldServer;
public class BlockFarmland extends Block
{
@ -51,7 +51,7 @@ public class BlockFarmland extends Block
return false;
}
public void updateTick(WorldServer worldIn, BlockPos pos, State state, Random rand)
public void updateTick(AWorldServer worldIn, BlockPos pos, State state, Random rand)
{
int i = ((Integer)state.getValue(MOISTURE)).intValue();

View file

@ -21,10 +21,10 @@ import common.util.BoundingBox;
import common.util.Facing;
import common.world.IBlockAccess;
import common.world.IWorldAccess;
import common.world.AWorldClient;
import common.world.State;
import common.world.World;
import common.world.WorldClient;
import common.world.WorldServer;
import common.world.AWorldServer;
public class BlockFire extends Block
{
@ -115,7 +115,7 @@ public class BlockFire extends Block
return 30;
}
public void updateTick(WorldServer worldIn, BlockPos pos, State state, Random rand)
public void updateTick(AWorldServer worldIn, BlockPos pos, State state, Random rand)
{
if (Config.fire)
{
@ -350,7 +350,7 @@ public class BlockFire extends Block
}
}
public void onBlockAdded(WorldServer worldIn, BlockPos pos, State state)
public void onBlockAdded(AWorldServer worldIn, BlockPos pos, State state)
{
if ( // (worldIn.dimension.getDimensionId() < -1 || worldIn.dimension.getDimensionId() > 0) ||
!Blocks.portal.tryIgnitePortal(worldIn, pos, worldIn.rand.zrange(8)))
@ -366,7 +366,7 @@ public class BlockFire extends Block
}
}
public void randomDisplayTick(WorldClient worldIn, BlockPos pos, State state, Random rand)
public void randomDisplayTick(AWorldClient worldIn, BlockPos pos, State state, Random rand)
{
if (rand.chance(24))
{

View file

@ -16,9 +16,9 @@ import common.util.BlockPos;
import common.util.BoundingBox;
import common.util.Facing;
import common.world.IWorldAccess;
import common.world.AWorldClient;
import common.world.State;
import common.world.World;
import common.world.WorldClient;
public class BlockFloorPortal extends Block
{
@ -90,7 +90,7 @@ public class BlockFloorPortal extends Block
entityIn.setFlatPortal();
}
public void randomDisplayTick(WorldClient worldIn, BlockPos pos, State state, Random rand)
public void randomDisplayTick(AWorldClient worldIn, BlockPos pos, State state, Random rand)
{
double d0 = (double)((float)pos.getX() + rand.floatv());
double d1 = (double)((float)pos.getY() + 0.8F);

View file

@ -19,7 +19,7 @@ import common.rng.Random;
import common.util.BlockPos;
import common.util.Identifyable;
import common.world.State;
import common.world.WorldServer;
import common.world.AWorldServer;
public abstract class BlockFlower extends BlockBush
{
@ -31,7 +31,7 @@ public abstract class BlockFlower extends BlockBush
// this.setTickRandomly();
}
public void updateTick(WorldServer worldIn, BlockPos pos, State state, Random rand)
public void updateTick(AWorldServer worldIn, BlockPos pos, State state, Random rand)
{
if(Config.flowerDry && worldIn.getTemperatureC(pos) >= 50.0f)
{

View file

@ -18,7 +18,7 @@ import common.util.BlockPos;
import common.util.Facing;
import common.world.State;
import common.world.World;
import common.world.WorldServer;
import common.world.AWorldServer;
public class BlockFlowerPot extends Block // Container
{
@ -242,7 +242,7 @@ public class BlockFlowerPot extends Block // Container
}
}
public void onBlockRemoved(WorldServer worldIn, BlockPos pos, State state)
public void onBlockRemoved(AWorldServer worldIn, BlockPos pos, State state)
{
int type = state.getValue(CONTENTS);
if(type > 0)

View file

@ -20,10 +20,10 @@ import common.tileentity.TileEntity;
import common.tileentity.TileEntityFurnace;
import common.util.BlockPos;
import common.util.Facing;
import common.world.AWorldClient;
import common.world.State;
import common.world.World;
import common.world.WorldClient;
import common.world.WorldServer;
import common.world.AWorldServer;
public class BlockFurnace extends BlockContainer
{
@ -46,7 +46,7 @@ public class BlockFurnace extends BlockContainer
return ItemRegistry.getItemFromBlock(Blocks.furnace);
}
public void onBlockAdded(WorldServer worldIn, BlockPos pos, State state)
public void onBlockAdded(AWorldServer worldIn, BlockPos pos, State state)
{
this.setDefaultFacing(worldIn, pos, state);
}
@ -83,7 +83,7 @@ public class BlockFurnace extends BlockContainer
}
public void randomDisplayTick(WorldClient worldIn, BlockPos pos, State state, Random rand)
public void randomDisplayTick(AWorldClient worldIn, BlockPos pos, State state, Random rand)
{
if (this.isBurning)
{
@ -199,7 +199,7 @@ public class BlockFurnace extends BlockContainer
}
}
public void onBlockRemoved(WorldServer worldIn, BlockPos pos, State state)
public void onBlockRemoved(AWorldServer worldIn, BlockPos pos, State state)
{
if (!keepInventory)
{

View file

@ -16,7 +16,7 @@ import common.util.BlockPos;
import common.world.IWorldAccess;
import common.world.State;
import common.world.World;
import common.world.WorldServer;
import common.world.AWorldServer;
public class BlockGrass extends Block implements IGrowable
{
@ -56,7 +56,7 @@ public class BlockGrass extends Block implements IGrowable
return Colorizer.getGrassColor(worldIn, pos);
}
public void updateTick(WorldServer worldIn, BlockPos pos, State state, Random rand)
public void updateTick(AWorldServer worldIn, BlockPos pos, State state, Random rand)
{
// if (!worldIn.client)
// {
@ -111,7 +111,7 @@ public class BlockGrass extends Block implements IGrowable
return true;
}
public void grow(WorldServer worldIn, Random rand, BlockPos pos, State state)
public void grow(AWorldServer worldIn, Random rand, BlockPos pos, State state)
{
BlockPos blockpos = pos.up();

View file

@ -26,7 +26,7 @@ import common.util.Facing;
import common.world.IWorldAccess;
import common.world.State;
import common.world.World;
import common.world.WorldServer;
import common.world.AWorldServer;
public class BlockHopper extends BlockContainer
{
@ -165,7 +165,7 @@ public class BlockHopper extends BlockContainer
}
}
public void onBlockAdded(WorldServer worldIn, BlockPos pos, State state)
public void onBlockAdded(AWorldServer worldIn, BlockPos pos, State state)
{
this.updateState(worldIn, pos, state);
}
@ -208,7 +208,7 @@ public class BlockHopper extends BlockContainer
}
}
public void onBlockRemoved(WorldServer worldIn, BlockPos pos, State state)
public void onBlockRemoved(AWorldServer worldIn, BlockPos pos, State state)
{
TileEntity tileentity = worldIn.getTileEntity(pos);

View file

@ -14,7 +14,7 @@ import common.util.BlockPos;
import common.world.LightType;
import common.world.State;
import common.world.World;
import common.world.WorldServer;
import common.world.AWorldServer;
public class BlockIce extends BlockBreakable
{
@ -71,7 +71,7 @@ public class BlockIce extends BlockBreakable
return 0;
}
public void updateTick(WorldServer worldIn, BlockPos pos, State state, Random rand)
public void updateTick(AWorldServer worldIn, BlockPos pos, State state, Random rand)
{
if (Config.iceMelt && ((worldIn.getLightFor(LightType.BLOCK, pos) > 11 - this.getLightOpacity()) || !worldIn.canFreezeAt(pos)))
{

View file

@ -24,10 +24,10 @@ import common.rng.Random;
import common.tileentity.TileEntity;
import common.util.BlockPos;
import common.world.IWorldAccess;
import common.world.AWorldClient;
import common.world.State;
import common.world.World;
import common.world.WorldClient;
import common.world.WorldServer;
import common.world.AWorldServer;
public class BlockLeaves extends BlockLeavesBase
{
@ -67,7 +67,7 @@ public class BlockLeaves extends BlockLeavesBase
// return BiomeColorHelper.getFoliageColorAtPos(worldIn, pos);
// }
public void onBlockRemoved(WorldServer worldIn, BlockPos pos, State state)
public void onBlockRemoved(AWorldServer worldIn, BlockPos pos, State state)
{
int i = 1;
int j = i + 1;
@ -96,7 +96,7 @@ public class BlockLeaves extends BlockLeavesBase
}
}
public void updateTick(WorldServer worldIn, BlockPos pos, State state, Random rand)
public void updateTick(AWorldServer worldIn, BlockPos pos, State state, Random rand)
{
if(Config.seasonLeaves && state.getValue(TYPE) != worldIn.getLeavesGen(pos)) {
worldIn.setState(pos, state.withProperty(TYPE, worldIn.getLeavesGen(pos)), 2);
@ -213,7 +213,7 @@ public class BlockLeaves extends BlockLeavesBase
// }
}
public void randomDisplayTick(WorldClient worldIn, BlockPos pos, State state, Random rand)
public void randomDisplayTick(AWorldClient worldIn, BlockPos pos, State state, Random rand)
{
if (worldIn.isRainingAt(pos.up(), true) && !worldIn.isBlockSolid(pos.down()) && rand.chance(15)) // == 1
{

View file

@ -18,7 +18,7 @@ import common.util.Identifyable;
import common.world.IWorldAccess;
import common.world.State;
import common.world.World;
import common.world.WorldServer;
import common.world.AWorldServer;
public class BlockLever extends Block
{
@ -215,7 +215,7 @@ public class BlockLever extends Block
}
}
public void onBlockRemoved(WorldServer worldIn, BlockPos pos, State state)
public void onBlockRemoved(AWorldServer worldIn, BlockPos pos, State state)
{
if (((Boolean)state.getValue(POWERED)).booleanValue())
{

View file

@ -20,10 +20,10 @@ import common.util.Facing;
import common.util.Vec3;
import common.world.IBlockAccess;
import common.world.IWorldAccess;
import common.world.AWorldClient;
import common.world.State;
import common.world.World;
import common.world.WorldClient;
import common.world.WorldServer;
import common.world.AWorldServer;
public abstract class BlockLiquid extends Block
{
@ -234,7 +234,7 @@ public abstract class BlockLiquid extends Block
return this.opaque ? BlockLayer.SOLID : BlockLayer.TRANSLUCENT;
}
public void randomDisplayTick(WorldClient worldIn, BlockPos pos, State state, Random rand)
public void randomDisplayTick(AWorldClient worldIn, BlockPos pos, State state, Random rand)
{
double d0 = (double)pos.getX();
double d1 = (double)pos.getY();
@ -302,7 +302,7 @@ public abstract class BlockLiquid extends Block
return vec3.xCoord == 0.0D && vec3.zCoord == 0.0D ? -1000.0D : ExtMath.atan2(vec3.zCoord, vec3.xCoord) - (Math.PI / 2D);
}
public void onBlockAdded(WorldServer worldIn, BlockPos pos, State state)
public void onBlockAdded(AWorldServer worldIn, BlockPos pos, State state)
{
this.checkForMixing(worldIn, pos, state);
}

View file

@ -13,7 +13,7 @@ import common.util.Facing;
import common.util.Identifyable;
import common.world.State;
import common.world.World;
import common.world.WorldServer;
import common.world.AWorldServer;
public class BlockLog extends BlockRotatedPillar
{
@ -28,7 +28,7 @@ public class BlockLog extends BlockRotatedPillar
this.setStepSound(SoundType.WOOD);
}
public void onBlockRemoved(WorldServer worldIn, BlockPos pos, State state)
public void onBlockRemoved(AWorldServer worldIn, BlockPos pos, State state)
{
int i = 4;
int j = i + 1;

View file

@ -13,7 +13,7 @@ import common.util.BlockPos;
import common.util.Facing;
import common.world.State;
import common.world.World;
import common.world.WorldServer;
import common.world.AWorldServer;
public abstract class BlockMachine extends BlockDirectional implements ITileEntityProvider {
public BlockMachine() {
@ -25,7 +25,7 @@ public abstract class BlockMachine extends BlockDirectional implements ITileEnti
public abstract TileEntity createNewTileEntity(World worldIn, int meta);
public void onBlockAdded(WorldServer worldIn, BlockPos pos, State state) {
public void onBlockAdded(AWorldServer worldIn, BlockPos pos, State state) {
this.updateState(worldIn, pos, state);
}
@ -54,7 +54,7 @@ public abstract class BlockMachine extends BlockDirectional implements ITileEnti
// }
}
public void onBlockRemoved(WorldServer worldIn, BlockPos pos, State state) {
public void onBlockRemoved(AWorldServer worldIn, BlockPos pos, State state) {
TileEntity tileentity = worldIn.getTileEntity(pos);
if(tileentity instanceof TileEntityMachine) {
InventoryHelper.dropInventoryItems(worldIn, pos, (TileEntityMachine)tileentity);

View file

@ -8,7 +8,7 @@ import common.rng.Random;
import common.util.BlockPos;
import common.world.State;
import common.world.World;
import common.world.WorldServer;
import common.world.AWorldServer;
import common.worldgen.FeatureGenerator;
import common.worldgen.foliage.WorldGenBigMushroom;
@ -21,7 +21,7 @@ public class BlockMushroom extends BlockBush implements IGrowable
this.setTickRandomly();
}
public void updateTick(WorldServer worldIn, BlockPos pos, State state, Random rand)
public void updateTick(AWorldServer worldIn, BlockPos pos, State state, Random rand)
{
if (Config.shroomGrowth > 0 && rand.chance(Config.shroomGrowth))
{
@ -86,7 +86,7 @@ public class BlockMushroom extends BlockBush implements IGrowable
}
}
public boolean generateBigMushroom(WorldServer worldIn, BlockPos pos, State state, Random rand)
public boolean generateBigMushroom(AWorldServer worldIn, BlockPos pos, State state, Random rand)
{
worldIn.setBlockToAir(pos);
FeatureGenerator worldgenerator = null;
@ -124,7 +124,7 @@ public class BlockMushroom extends BlockBush implements IGrowable
return (double)rand.floatv() < 0.4D;
}
public void grow(WorldServer worldIn, Random rand, BlockPos pos, State state)
public void grow(AWorldServer worldIn, Random rand, BlockPos pos, State state)
{
this.generateBigMushroom(worldIn, pos, state, rand);
}

View file

@ -13,9 +13,9 @@ import common.properties.PropertyBool;
import common.rng.Random;
import common.util.BlockPos;
import common.world.IWorldAccess;
import common.world.AWorldClient;
import common.world.State;
import common.world.WorldClient;
import common.world.WorldServer;
import common.world.AWorldServer;
public class BlockMycelium extends Block
{
@ -39,7 +39,7 @@ public class BlockMycelium extends Block
return state.withProperty(SNOWY, Boolean.valueOf(block == Blocks.snow || block == Blocks.snow_layer));
}
public void updateTick(WorldServer worldIn, BlockPos pos, State state, Random rand)
public void updateTick(AWorldServer worldIn, BlockPos pos, State state, Random rand)
{
// if (!worldIn.client)
// {
@ -68,7 +68,7 @@ public class BlockMycelium extends Block
// }
}
public void randomDisplayTick(WorldClient worldIn, BlockPos pos, State state, Random rand)
public void randomDisplayTick(AWorldClient worldIn, BlockPos pos, State state, Random rand)
{
super.randomDisplayTick(worldIn, pos, state, rand);

View file

@ -11,7 +11,7 @@ import common.util.BlockPos;
import common.world.Explosion;
import common.world.State;
import common.world.World;
import common.world.WorldServer;
import common.world.AWorldServer;
public class BlockNuke extends Block
{
@ -21,7 +21,7 @@ public class BlockNuke extends Block
this.setTab(CheatTab.tabTech);
}
public void onBlockAdded(WorldServer worldIn, BlockPos pos, State state)
public void onBlockAdded(AWorldServer worldIn, BlockPos pos, State state)
{
super.onBlockAdded(worldIn, pos, state);

View file

@ -26,7 +26,7 @@ import common.util.Facing;
import common.world.IWorldAccess;
import common.world.State;
import common.world.World;
import common.world.WorldServer;
import common.world.AWorldServer;
public class BlockPistonBase extends Block
{
@ -291,7 +291,7 @@ public class BlockPistonBase extends Block
}
}
public void onBlockAdded(WorldServer worldIn, BlockPos pos, State state)
public void onBlockAdded(AWorldServer worldIn, BlockPos pos, State state)
{
if (!worldIn.client && worldIn.getTileEntity(pos) == null)
{

View file

@ -22,7 +22,7 @@ import common.util.Identifyable;
import common.world.IWorldAccess;
import common.world.State;
import common.world.World;
import common.world.WorldServer;
import common.world.AWorldServer;
public class BlockPistonHead extends Block
{
@ -59,7 +59,7 @@ public class BlockPistonHead extends Block
// super.onBlockHarvested(worldIn, pos, state, player);
// }
public void onBlockRemoved(WorldServer worldIn, BlockPos pos, State state)
public void onBlockRemoved(AWorldServer worldIn, BlockPos pos, State state)
{
super.onBlockRemoved(worldIn, pos, state);
Facing enumfacing = ((Facing)state.getValue(FACING)).getOpposite();

View file

@ -18,7 +18,7 @@ import common.util.Vec3;
import common.world.IWorldAccess;
import common.world.State;
import common.world.World;
import common.world.WorldServer;
import common.world.AWorldServer;
public class BlockPistonMoving extends BlockContainer
{
@ -45,7 +45,7 @@ public class BlockPistonMoving extends BlockContainer
return new TileEntityPiston(state, facing, extending, renderHead);
}
public void onBlockRemoved(WorldServer worldIn, BlockPos pos, State state)
public void onBlockRemoved(AWorldServer worldIn, BlockPos pos, State state)
{
TileEntity tileentity = worldIn.getTileEntity(pos);

View file

@ -19,9 +19,9 @@ import common.util.BoundingBox;
import common.util.Facing;
import common.util.Facing.Axis;
import common.world.IWorldAccess;
import common.world.AWorldClient;
import common.world.State;
import common.world.World;
import common.world.WorldClient;
public class BlockPortal extends BlockBreakable
{
@ -37,7 +37,7 @@ public class BlockPortal extends BlockBreakable
// this.setTickRandomly();
}
// public void updateTick(WorldServer worldIn, BlockPos pos, IBlockState state, Random rand)
// public void updateTick(IWorldServer worldIn, BlockPos pos, IBlockState state, Random rand)
// {
//// super.updateTick(worldIn, pos, state, rand);
//
@ -208,7 +208,7 @@ public class BlockPortal extends BlockBreakable
}
}
public void randomDisplayTick(WorldClient worldIn, BlockPos pos, State state, Random rand)
public void randomDisplayTick(AWorldClient worldIn, BlockPos pos, State state, Random rand)
{
// if (rand.chance(100))
// {

View file

@ -34,7 +34,7 @@ public class BlockPumpkin extends BlockDirectional
this.setTab(CheatTab.tabPlants);
}
// public void onBlockAdded(WorldServer worldIn, BlockPos pos, IBlockState state)
// public void onBlockAdded(IWorldServer worldIn, BlockPos pos, IBlockState state)
// {
// super.onBlockAdded(worldIn, pos, state);
// this.trySpawnGolem(worldIn, pos);

View file

@ -20,7 +20,7 @@ import common.util.Vec3;
import common.world.IWorldAccess;
import common.world.State;
import common.world.World;
import common.world.WorldServer;
import common.world.AWorldServer;
public abstract class BlockRailBase extends Block
{
@ -92,7 +92,7 @@ public abstract class BlockRailBase extends Block
return worldIn.isBlockSolid(pos.down());
}
public void onBlockAdded(WorldServer worldIn, BlockPos pos, State state)
public void onBlockAdded(AWorldServer worldIn, BlockPos pos, State state)
{
if (!worldIn.client)
{
@ -168,7 +168,7 @@ public abstract class BlockRailBase extends Block
return BlockLayer.CUTOUT;
}
public void onBlockRemoved(WorldServer worldIn, BlockPos pos, State state)
public void onBlockRemoved(AWorldServer worldIn, BlockPos pos, State state)
{
super.onBlockRemoved(worldIn, pos, state);

View file

@ -19,7 +19,7 @@ import common.util.Facing;
import common.world.IWorldAccess;
import common.world.State;
import common.world.World;
import common.world.WorldServer;
import common.world.AWorldServer;
public class BlockRailDetector extends BlockRailBase
{
@ -72,11 +72,11 @@ public class BlockRailDetector extends BlockRailBase
/**
* Called randomly when setTickRandomly is set to true (used by e.g. crops to grow, etc.)
*/
public void randomTick(WorldServer worldIn, BlockPos pos, State state, Random random)
public void randomTick(AWorldServer worldIn, BlockPos pos, State state, Random random)
{
}
public void updateTick(WorldServer worldIn, BlockPos pos, State state, Random rand)
public void updateTick(AWorldServer worldIn, BlockPos pos, State state, Random rand)
{
if (/* !worldIn.client && */ ((Boolean)state.getValue(POWERED)).booleanValue())
{
@ -129,7 +129,7 @@ public class BlockRailDetector extends BlockRailBase
worldIn.updateComparatorOutputLevel(pos, this);
}
public void onBlockAdded(WorldServer worldIn, BlockPos pos, State state)
public void onBlockAdded(AWorldServer worldIn, BlockPos pos, State state)
{
super.onBlockAdded(worldIn, pos, state);
this.updatePoweredState(worldIn, pos, state);

View file

@ -21,7 +21,7 @@ import common.util.Identifyable;
import common.world.IWorldAccess;
import common.world.State;
import common.world.World;
import common.world.WorldServer;
import common.world.AWorldServer;
public class BlockRedstoneComparator extends BlockRedstoneDiode implements ITileEntityProvider
{
@ -176,7 +176,7 @@ public class BlockRedstoneComparator extends BlockRedstoneDiode implements ITile
protected void updateState(World worldIn, BlockPos pos, State state)
{
if (worldIn.client || !((WorldServer)worldIn).isBlockTickPending(pos, this))
if (worldIn.client || !((AWorldServer)worldIn).isBlockTickPending(pos, this))
{
int i = this.calculateOutput(worldIn, pos, state);
TileEntity tileentity = worldIn.getTileEntity(pos);
@ -187,12 +187,12 @@ public class BlockRedstoneComparator extends BlockRedstoneDiode implements ITile
if (this.isFacingTowardsRepeater(worldIn, pos, state))
{
if(!worldIn.client)
((WorldServer)worldIn).updateBlockTick(pos, this, 2, -1);
((AWorldServer)worldIn).updateBlockTick(pos, this, 2, -1);
}
else
{
if(!worldIn.client)
((WorldServer)worldIn).updateBlockTick(pos, this, 2, 0);
((AWorldServer)worldIn).updateBlockTick(pos, this, 2, 0);
}
}
}
@ -229,7 +229,7 @@ public class BlockRedstoneComparator extends BlockRedstoneDiode implements ITile
}
}
public void updateTick(WorldServer worldIn, BlockPos pos, State state, Random rand)
public void updateTick(AWorldServer worldIn, BlockPos pos, State state, Random rand)
{
if (this.isRepeaterPowered)
{
@ -239,13 +239,13 @@ public class BlockRedstoneComparator extends BlockRedstoneDiode implements ITile
this.onStateChange(worldIn, pos, state);
}
public void onBlockAdded(WorldServer worldIn, BlockPos pos, State state)
public void onBlockAdded(AWorldServer worldIn, BlockPos pos, State state)
{
super.onBlockAdded(worldIn, pos, state);
worldIn.setTileEntity(pos, this.createNewTileEntity(worldIn, 0));
}
public void onBlockRemoved(WorldServer worldIn, BlockPos pos, State state)
public void onBlockRemoved(AWorldServer worldIn, BlockPos pos, State state)
{
super.onBlockRemoved(worldIn, pos, state);
worldIn.removeTileEntity(pos);

View file

@ -11,7 +11,7 @@ import common.util.Facing;
import common.world.IWorldAccess;
import common.world.State;
import common.world.World;
import common.world.WorldServer;
import common.world.AWorldServer;
public abstract class BlockRedstoneDiode extends BlockDirectional
{
@ -43,11 +43,11 @@ public abstract class BlockRedstoneDiode extends BlockDirectional
/**
* Called randomly when setTickRandomly is set to true (used by e.g. crops to grow, etc.)
*/
public void randomTick(WorldServer worldIn, BlockPos pos, State state, Random random)
public void randomTick(AWorldServer worldIn, BlockPos pos, State state, Random random)
{
}
public void updateTick(WorldServer worldIn, BlockPos pos, State state, Random rand)
public void updateTick(AWorldServer worldIn, BlockPos pos, State state, Random rand)
{
if (!this.isLocked(worldIn, pos, state))
{
@ -116,7 +116,7 @@ public abstract class BlockRedstoneDiode extends BlockDirectional
{
boolean flag = this.shouldBePowered(worldIn, pos, state);
if ((this.isRepeaterPowered && !flag || !this.isRepeaterPowered && flag) && (worldIn.client || !((WorldServer)worldIn).isBlockTickPending(pos, this)))
if ((this.isRepeaterPowered && !flag || !this.isRepeaterPowered && flag) && (worldIn.client || !((AWorldServer)worldIn).isBlockTickPending(pos, this)))
{
int i = -1;
@ -130,7 +130,7 @@ public abstract class BlockRedstoneDiode extends BlockDirectional
}
if(!worldIn.client)
((WorldServer)worldIn).updateBlockTick(pos, this, this.getDelay(state), i);
((AWorldServer)worldIn).updateBlockTick(pos, this, this.getDelay(state), i);
}
}
}
@ -205,7 +205,7 @@ public abstract class BlockRedstoneDiode extends BlockDirectional
}
}
public void onBlockAdded(WorldServer worldIn, BlockPos pos, State state)
public void onBlockAdded(AWorldServer worldIn, BlockPos pos, State state)
{
this.notifyNeighbors(worldIn, pos, state);
}

View file

@ -9,7 +9,7 @@ import common.rng.Random;
import common.util.BlockPos;
import common.world.State;
import common.world.World;
import common.world.WorldServer;
import common.world.AWorldServer;
public class BlockRedstoneLight extends Block
{
@ -26,7 +26,7 @@ public class BlockRedstoneLight extends Block
}
}
public void onBlockAdded(WorldServer worldIn, BlockPos pos, State state)
public void onBlockAdded(AWorldServer worldIn, BlockPos pos, State state)
{
if (!worldIn.client)
{
@ -59,7 +59,7 @@ public class BlockRedstoneLight extends Block
}
}
public void updateTick(WorldServer worldIn, BlockPos pos, State state, Random rand)
public void updateTick(AWorldServer worldIn, BlockPos pos, State state, Random rand)
{
// if (!worldIn.client)
// {

View file

@ -14,10 +14,10 @@ import common.model.ParticleType;
import common.rng.Random;
import common.util.BlockPos;
import common.util.Facing;
import common.world.AWorldClient;
import common.world.State;
import common.world.World;
import common.world.WorldClient;
import common.world.WorldServer;
import common.world.AWorldServer;
public class BlockRedstoneOre extends Block
{
@ -74,7 +74,7 @@ public class BlockRedstoneOre extends Block
}
}
public void updateTick(WorldServer worldIn, BlockPos pos, State state, Random rand)
public void updateTick(AWorldServer worldIn, BlockPos pos, State state, Random rand)
{
if (this == Blocks.lit_redstone_ore)
{
@ -120,7 +120,7 @@ public class BlockRedstoneOre extends Block
}
}
public void randomDisplayTick(WorldClient worldIn, BlockPos pos, State state, Random rand)
public void randomDisplayTick(AWorldClient worldIn, BlockPos pos, State state, Random rand)
{
if (this.isOn)
{

View file

@ -15,10 +15,10 @@ import common.rng.Random;
import common.util.BlockPos;
import common.util.Facing;
import common.world.IWorldAccess;
import common.world.AWorldClient;
import common.world.State;
import common.world.World;
import common.world.WorldClient;
import common.world.WorldServer;
import common.world.AWorldServer;
public class BlockRedstoneRepeater extends BlockRedstoneDiode
{
@ -105,7 +105,7 @@ public class BlockRedstoneRepeater extends BlockRedstoneDiode
return isRedstoneRepeaterBlockID(blockIn);
}
public void randomDisplayTick(WorldClient worldIn, BlockPos pos, State state, Random rand)
public void randomDisplayTick(AWorldClient worldIn, BlockPos pos, State state, Random rand)
{
if (this.isRepeaterPowered)
{
@ -127,7 +127,7 @@ public class BlockRedstoneRepeater extends BlockRedstoneDiode
}
}
public void onBlockRemoved(WorldServer worldIn, BlockPos pos, State state)
public void onBlockRemoved(AWorldServer worldIn, BlockPos pos, State state)
{
super.onBlockRemoved(worldIn, pos, state);
this.notifyNeighbors(worldIn, pos, state);

View file

@ -15,17 +15,17 @@ import common.rng.Random;
import common.util.BlockPos;
import common.util.Facing;
import common.world.IWorldAccess;
import common.world.AWorldClient;
import common.world.State;
import common.world.World;
import common.world.WorldClient;
import common.world.WorldServer;
import common.world.AWorldServer;
public class BlockRedstoneTorch extends BlockTorch
{
private static Map<World, List<BlockRedstoneTorch.Toggle>> toggles = Maps.<World, List<BlockRedstoneTorch.Toggle>>newHashMap();
private final boolean isOn;
private boolean isBurnedOut(WorldServer worldIn, BlockPos pos, boolean turnOff)
private boolean isBurnedOut(AWorldServer worldIn, BlockPos pos, boolean turnOff)
{
if (!toggles.containsKey(worldIn))
{
@ -74,7 +74,7 @@ public class BlockRedstoneTorch extends BlockTorch
return 2;
}
public void onBlockAdded(WorldServer worldIn, BlockPos pos, State state)
public void onBlockAdded(AWorldServer worldIn, BlockPos pos, State state)
{
if (this.isOn)
{
@ -85,7 +85,7 @@ public class BlockRedstoneTorch extends BlockTorch
}
}
public void onBlockRemoved(WorldServer worldIn, BlockPos pos, State state)
public void onBlockRemoved(AWorldServer worldIn, BlockPos pos, State state)
{
if (this.isOn)
{
@ -110,11 +110,11 @@ public class BlockRedstoneTorch extends BlockTorch
/**
* Called randomly when setTickRandomly is set to true (used by e.g. crops to grow, etc.)
*/
public void randomTick(WorldServer worldIn, BlockPos pos, State state, Random random)
public void randomTick(AWorldServer worldIn, BlockPos pos, State state, Random random)
{
}
public void updateTick(WorldServer worldIn, BlockPos pos, State state, Random rand)
public void updateTick(AWorldServer worldIn, BlockPos pos, State state, Random rand)
{
boolean flag = this.shouldBeOff(worldIn, pos, state);
List<BlockRedstoneTorch.Toggle> list = (List)toggles.get(worldIn);
@ -187,7 +187,7 @@ public class BlockRedstoneTorch extends BlockTorch
return true;
}
public void randomDisplayTick(WorldClient worldIn, BlockPos pos, State state, Random rand)
public void randomDisplayTick(AWorldClient worldIn, BlockPos pos, State state, Random rand)
{
if (this.isOn)
{

View file

@ -26,10 +26,10 @@ import common.util.Facing;
import common.util.Identifyable;
import common.world.IBlockAccess;
import common.world.IWorldAccess;
import common.world.AWorldClient;
import common.world.State;
import common.world.World;
import common.world.WorldClient;
import common.world.WorldServer;
import common.world.AWorldServer;
public class BlockRedstoneWire extends Block
{
@ -540,7 +540,7 @@ public class BlockRedstoneWire extends Block
}
}
public void onBlockAdded(WorldServer worldIn, BlockPos pos, State state)
public void onBlockAdded(AWorldServer worldIn, BlockPos pos, State state)
{
if (!worldIn.client)
{
@ -572,7 +572,7 @@ public class BlockRedstoneWire extends Block
}
}
public void onBlockRemoved(WorldServer worldIn, BlockPos pos, State state)
public void onBlockRemoved(AWorldServer worldIn, BlockPos pos, State state)
{
super.onBlockRemoved(worldIn, pos, state);
@ -773,7 +773,7 @@ public class BlockRedstoneWire extends Block
return -16777216 | i << 16 | j << 8 | k;
}
public void randomDisplayTick(WorldClient worldIn, BlockPos pos, State state, Random rand)
public void randomDisplayTick(AWorldClient worldIn, BlockPos pos, State state, Random rand)
{
int i = ((Integer)state.getValue(POWER)).intValue();

View file

@ -17,7 +17,7 @@ import common.util.Facing;
import common.world.IWorldAccess;
import common.world.State;
import common.world.World;
import common.world.WorldServer;
import common.world.AWorldServer;
public class BlockReed extends Block
{
@ -32,7 +32,7 @@ public class BlockReed extends Block
this.setTickRandomly();
}
public void updateTick(WorldServer worldIn, BlockPos pos, State state, Random rand)
public void updateTick(AWorldServer worldIn, BlockPos pos, State state, Random rand)
{
if(Config.reedDry && worldIn.getTemperatureC(pos) >= 50.0f)
{

View file

@ -15,7 +15,7 @@ import common.rng.Random;
import common.util.BlockPos;
import common.world.State;
import common.world.World;
import common.world.WorldServer;
import common.world.AWorldServer;
import common.worldgen.FeatureGenerator;
import common.worldgen.tree.WorldGenBaseTree;
import common.worldgen.tree.WorldGenBigTree;
@ -52,7 +52,7 @@ public class BlockSapling extends BlockBush implements IGrowable
// return I18n.translate(this.getUnlocalizedName() + "." + BlockPlanks.EnumType.OAK.getUnlocalizedName() + ".name");
// }
public void updateTick(WorldServer worldIn, BlockPos pos, State state, Random rand)
public void updateTick(AWorldServer worldIn, BlockPos pos, State state, Random rand)
{
if(Config.saplingDry && worldIn.getTemperatureC(pos) >= 50.0f)
{
@ -71,7 +71,7 @@ public class BlockSapling extends BlockBush implements IGrowable
// }
}
public void grow(WorldServer worldIn, BlockPos pos, State state, Random rand)
public void grow(AWorldServer worldIn, BlockPos pos, State state, Random rand)
{
if (((Integer)state.getValue(STAGE)).intValue() == 0)
{
@ -83,7 +83,7 @@ public class BlockSapling extends BlockBush implements IGrowable
}
}
public void generateTree(WorldServer worldIn, BlockPos pos, State state, Random rand)
public void generateTree(AWorldServer worldIn, BlockPos pos, State state, Random rand)
{
WoodType type = state.getBlock() instanceof BlockSapling ? ((BlockSapling)state.getBlock()).type : WoodType.OAK;
State log = type == WoodType.CHERRY ? Blocks.cherry_log.getState() : // .withProperty(BlockNewLog.VARIANT, BlockPlanks.EnumType.CHERRY) :
@ -264,7 +264,7 @@ public class BlockSapling extends BlockBush implements IGrowable
return (double)worldIn.rand.floatv() < 0.45D;
}
public void grow(WorldServer worldIn, Random rand, BlockPos pos, State state)
public void grow(AWorldServer worldIn, Random rand, BlockPos pos, State state)
{
this.grow(worldIn, pos, state, rand);
}

View file

@ -94,7 +94,7 @@ public class BlockSign extends BlockContainer
// return true;
// }
// public void onBlockRemoved(WorldServer worldIn, BlockPos pos, State state)
// public void onBlockRemoved(IWorldServer worldIn, BlockPos pos, State state)
// {
// if(!worldIn.client) {
// TileEntity tileentity = worldIn.getTileEntity(pos);

View file

@ -17,7 +17,7 @@ import common.util.Facing;
import common.world.IWorldAccess;
import common.world.State;
import common.world.World;
import common.world.WorldServer;
import common.world.AWorldServer;
public class BlockSkull extends BlockContainer
{
@ -102,7 +102,7 @@ public class BlockSkull extends BlockContainer
// super.onBlockHarvested(worldIn, pos, state, player);
// }
public void onBlockRemoved(WorldServer worldIn, BlockPos pos, State state)
public void onBlockRemoved(AWorldServer worldIn, BlockPos pos, State state)
{
if (!worldIn.client)
{

View file

@ -23,7 +23,7 @@ import common.world.IWorldAccess;
import common.world.LightType;
import common.world.State;
import common.world.World;
import common.world.WorldServer;
import common.world.AWorldServer;
public class BlockSnow extends Block
{
@ -135,7 +135,7 @@ public class BlockSnow extends Block
return 0;
}
public void updateTick(WorldServer worldIn, BlockPos pos, State state, Random rand)
public void updateTick(AWorldServer worldIn, BlockPos pos, State state, Random rand)
{
if (Config.snowMelt && ((worldIn.getLightFor(LightType.BLOCK, pos) > 11) || !worldIn.canFreezeAt(pos)))
{

View file

@ -9,7 +9,7 @@ import common.rng.Random;
import common.util.BlockPos;
import common.world.LightType;
import common.world.State;
import common.world.WorldServer;
import common.world.AWorldServer;
public class BlockSnowBlock extends Block
{
@ -36,7 +36,7 @@ public class BlockSnowBlock extends Block
return 4;
}
public void updateTick(WorldServer worldIn, BlockPos pos, State state, Random rand)
public void updateTick(AWorldServer worldIn, BlockPos pos, State state, Random rand)
{
if (Config.snowFullMelt && worldIn.getLightFor(LightType.BLOCK, pos) > 11)
{

View file

@ -85,7 +85,7 @@ public class BlockStainedGlass extends BlockBreakable
return this.getState().withProperty(COLOR, DyeColor.byMetadata(meta));
}
// public void onBlockAdded(WorldServer worldIn, BlockPos pos, State state)
// public void onBlockAdded(IWorldServer worldIn, BlockPos pos, State state)
// {
// if (!worldIn.client)
// {
@ -93,7 +93,7 @@ public class BlockStainedGlass extends BlockBreakable
// }
// }
//
// public void onBlockRemoved(WorldServer worldIn, BlockPos pos, State state)
// public void onBlockRemoved(IWorldServer worldIn, BlockPos pos, State state)
// {
// if (!worldIn.client)
// {

View file

@ -77,7 +77,7 @@ public class BlockStainedGlassPane extends BlockPane
return new IProperty[] {NORTH, EAST, WEST, SOUTH, COLOR};
}
// public void onBlockAdded(WorldServer worldIn, BlockPos pos, State state)
// public void onBlockAdded(IWorldServer worldIn, BlockPos pos, State state)
// {
// if (!worldIn.client)
// {
@ -85,7 +85,7 @@ public class BlockStainedGlassPane extends BlockPane
// }
// }
//
// public void onBlockRemoved(WorldServer worldIn, BlockPos pos, State state)
// public void onBlockRemoved(IWorldServer worldIn, BlockPos pos, State state)
// {
// if (!worldIn.client)
// {

View file

@ -27,10 +27,10 @@ import common.util.Vec3;
import common.world.Explosion;
import common.world.IBlockAccess;
import common.world.IWorldAccess;
import common.world.AWorldClient;
import common.world.State;
import common.world.World;
import common.world.WorldClient;
import common.world.WorldServer;
import common.world.AWorldServer;
public class BlockStairs extends Block
{
@ -561,7 +561,7 @@ public class BlockStairs extends Block
this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
}
public void randomDisplayTick(WorldClient worldIn, BlockPos pos, State state, Random rand)
public void randomDisplayTick(AWorldClient worldIn, BlockPos pos, State state, Random rand)
{
this.modelBlock.randomDisplayTick(worldIn, pos, state, rand);
}
@ -633,13 +633,13 @@ public class BlockStairs extends Block
return this.modelBlock.canPlaceBlockAt(worldIn, pos);
}
public void onBlockAdded(WorldServer worldIn, BlockPos pos, State state)
public void onBlockAdded(AWorldServer worldIn, BlockPos pos, State state)
{
this.onNeighborBlockChange(worldIn, pos, this.modelState, Blocks.air);
this.modelBlock.onBlockAdded(worldIn, pos, this.modelState);
}
public void onBlockRemoved(WorldServer worldIn, BlockPos pos, State state)
public void onBlockRemoved(AWorldServer worldIn, BlockPos pos, State state)
{
this.modelBlock.onBlockRemoved(worldIn, pos, this.modelState);
}
@ -652,7 +652,7 @@ public class BlockStairs extends Block
this.modelBlock.onEntityCollidedWithBlock(worldIn, pos, entityIn);
}
public void updateTick(WorldServer worldIn, BlockPos pos, State state, Random rand)
public void updateTick(AWorldServer worldIn, BlockPos pos, State state, Random rand)
{
this.modelBlock.updateTick(worldIn, pos, state, rand);
}

View file

@ -8,7 +8,7 @@ import common.util.BlockPos;
import common.util.Facing;
import common.world.State;
import common.world.World;
import common.world.WorldServer;
import common.world.AWorldServer;
public class BlockStaticLiquid extends BlockLiquid
{
@ -41,7 +41,7 @@ public class BlockStaticLiquid extends BlockLiquid
worldIn.scheduleUpdate(pos, blockdynamicliquid, this.tickRate(worldIn, pos));
}
public void updateTick(WorldServer worldIn, BlockPos pos, State state, Random rand)
public void updateTick(AWorldServer worldIn, BlockPos pos, State state, Random rand)
{
if (Config.lavaFire && this.material == Material.lava)
{

View file

@ -21,7 +21,7 @@ import common.util.Facing;
import common.world.IWorldAccess;
import common.world.State;
import common.world.World;
import common.world.WorldServer;
import common.world.AWorldServer;
public class BlockStem extends BlockBush implements IGrowable
{
@ -73,7 +73,7 @@ public class BlockStem extends BlockBush implements IGrowable
return ground == Blocks.farmland;
}
public void updateTick(WorldServer worldIn, BlockPos pos, State state, Random rand)
public void updateTick(AWorldServer worldIn, BlockPos pos, State state, Random rand)
{
super.updateTick(worldIn, pos, state, rand);
@ -213,7 +213,7 @@ public class BlockStem extends BlockBush implements IGrowable
return true;
}
public void grow(WorldServer worldIn, Random rand, BlockPos pos, State state)
public void grow(AWorldServer worldIn, Random rand, BlockPos pos, State state)
{
this.growStem(worldIn, pos, state);
}

View file

@ -23,7 +23,7 @@ import common.util.Facing;
import common.world.Explosion;
import common.world.State;
import common.world.World;
import common.world.WorldServer;
import common.world.AWorldServer;
public class BlockTNT extends Block
{
@ -37,7 +37,7 @@ public class BlockTNT extends Block
this.setTab(CheatTab.tabTech);
}
public void onBlockAdded(WorldServer worldIn, BlockPos pos, State state)
public void onBlockAdded(AWorldServer worldIn, BlockPos pos, State state)
{
super.onBlockAdded(worldIn, pos, state);

View file

@ -23,7 +23,7 @@ import common.util.Identifyable;
import common.world.IWorldAccess;
import common.world.State;
import common.world.World;
import common.world.WorldServer;
import common.world.AWorldServer;
public class BlockTallGrass extends BlockBush implements IGrowable
{
@ -38,7 +38,7 @@ public class BlockTallGrass extends BlockBush implements IGrowable
// this.setTickRandomly();
}
public void updateTick(WorldServer worldIn, BlockPos pos, State state, Random rand)
public void updateTick(AWorldServer worldIn, BlockPos pos, State state, Random rand)
{
if(Config.tallgrassDry && worldIn.getTemperatureC(pos) >= 50.0f && state.getValue(TYPE) != EnumType.DEAD_BUSH)
{
@ -147,7 +147,7 @@ public class BlockTallGrass extends BlockBush implements IGrowable
return true;
}
public void grow(WorldServer worldIn, Random rand, BlockPos pos, State state)
public void grow(AWorldServer worldIn, Random rand, BlockPos pos, State state)
{
BlockDoublePlant.EnumPlantType blockdoubleplant$enumplanttype = BlockDoublePlant.EnumPlantType.GRASS;

View file

@ -20,10 +20,10 @@ import common.util.Facing;
import common.util.HitPosition;
import common.util.Vec3;
import common.world.Chunk;
import common.world.AWorldClient;
import common.world.State;
import common.world.World;
import common.world.WorldClient;
import common.world.WorldServer;
import common.world.AWorldServer;
public class BlockTorch extends Block
{
@ -135,7 +135,7 @@ public class BlockTorch extends Block
}
}
public void onBlockAdded(WorldServer worldIn, BlockPos pos, State state)
public void onBlockAdded(AWorldServer worldIn, BlockPos pos, State state)
{
this.checkForDrop(worldIn, pos, state);
}
@ -234,7 +234,7 @@ public class BlockTorch extends Block
return super.collisionRayTrace(worldIn, pos, start, end);
}
public void randomDisplayTick(WorldClient worldIn, BlockPos pos, State state, Random rand)
public void randomDisplayTick(AWorldClient worldIn, BlockPos pos, State state, Random rand)
{
Facing enumfacing = (Facing)state.getValue(FACING);
double d0 = (double)pos.getX() + 0.5D;

View file

@ -23,7 +23,7 @@ import common.world.IBlockAccess;
import common.world.IWorldAccess;
import common.world.State;
import common.world.World;
import common.world.WorldServer;
import common.world.AWorldServer;
public class BlockTripWire extends Block
{
@ -124,14 +124,14 @@ public class BlockTripWire extends Block
}
}
public void onBlockAdded(WorldServer worldIn, BlockPos pos, State state)
public void onBlockAdded(AWorldServer worldIn, BlockPos pos, State state)
{
state = state.withProperty(SUSPENDED, Boolean.valueOf(!worldIn.isBlockSolid(pos.down())));
worldIn.setState(pos, state, 3);
this.notifyHook(worldIn, pos, state);
}
public void onBlockRemoved(WorldServer worldIn, BlockPos pos, State state)
public void onBlockRemoved(AWorldServer worldIn, BlockPos pos, State state)
{
this.notifyHook(worldIn, pos, state.withProperty(POWERED, Boolean.valueOf(true)));
}
@ -191,11 +191,11 @@ public class BlockTripWire extends Block
/**
* Called randomly when setTickRandomly is set to true (used by e.g. crops to grow, etc.)
*/
public void randomTick(WorldServer worldIn, BlockPos pos, State state, Random random)
public void randomTick(AWorldServer worldIn, BlockPos pos, State state, Random random)
{
}
public void updateTick(WorldServer worldIn, BlockPos pos, State state, Random rand)
public void updateTick(AWorldServer worldIn, BlockPos pos, State state, Random rand)
{
// if (!worldIn.client)
// {

View file

@ -20,7 +20,7 @@ import common.util.Facing;
import common.world.IWorldAccess;
import common.world.State;
import common.world.World;
import common.world.WorldServer;
import common.world.AWorldServer;
public class BlockTripWireHook extends Block
{
@ -225,11 +225,11 @@ public class BlockTripWireHook extends Block
/**
* Called randomly when setTickRandomly is set to true (used by e.g. crops to grow, etc.)
*/
public void randomTick(WorldServer worldIn, BlockPos pos, State state, Random random)
public void randomTick(AWorldServer worldIn, BlockPos pos, State state, Random random)
{
}
public void updateTick(WorldServer worldIn, BlockPos pos, State state, Random rand)
public void updateTick(AWorldServer worldIn, BlockPos pos, State state, Random rand)
{
this.triggerHookAt(worldIn, pos, state, false, true, -1, (State)null);
}
@ -298,7 +298,7 @@ public class BlockTripWireHook extends Block
}
}
public void onBlockRemoved(WorldServer worldIn, BlockPos pos, State state)
public void onBlockRemoved(AWorldServer worldIn, BlockPos pos, State state)
{
boolean flag = ((Boolean)state.getValue(ATTACHED)).booleanValue();
boolean flag1 = ((Boolean)state.getValue(POWERED)).booleanValue();

View file

@ -24,7 +24,7 @@ import common.util.Facing;
import common.world.IWorldAccess;
import common.world.State;
import common.world.World;
import common.world.WorldServer;
import common.world.AWorldServer;
public class BlockVine extends Block
{
@ -241,7 +241,7 @@ public class BlockVine extends Block
}
}
public void updateTick(WorldServer worldIn, BlockPos pos, State state, Random rand)
public void updateTick(AWorldServer worldIn, BlockPos pos, State state, Random rand)
{
if(Config.vineDry && worldIn.getTemperatureC(pos) >= 50.0f)
{

View file

@ -18,9 +18,9 @@ import common.properties.PropertyDirection;
import common.rng.Random;
import common.util.BlockPos;
import common.util.Facing;
import common.world.AWorldClient;
import common.world.State;
import common.world.World;
import common.world.WorldClient;
public class BlockWarpChest extends Block
{
@ -117,7 +117,7 @@ public class BlockWarpChest extends Block
// return new TileEntityWarpChest();
// }
public void randomDisplayTick(WorldClient worldIn, BlockPos pos, State state, Random rand)
public void randomDisplayTick(AWorldClient worldIn, BlockPos pos, State state, Random rand)
{
for (int i = 0; i < 3; ++i)
{

View file

@ -15,7 +15,7 @@ import common.rng.Random;
import common.util.BlockPos;
import common.world.State;
import common.world.World;
import common.world.WorldServer;
import common.world.AWorldServer;
public class BlockWart extends BlockBush
{
@ -44,7 +44,7 @@ public class BlockWart extends BlockBush
return this.canPlaceBlockOn(worldIn.getState(pos.down()).getBlock());
}
public void updateTick(WorldServer worldIn, BlockPos pos, State state, Random rand)
public void updateTick(AWorldServer worldIn, BlockPos pos, State state, Random rand)
{
if(Config.wartGrowth > 0) {
int i = ((Integer)state.getValue(AGE)).intValue();

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