server client split world classes
This commit is contained in:
parent
66e9f68eee
commit
6e77090c5b
247 changed files with 1309 additions and 1187 deletions
|
@ -66,7 +66,6 @@ import client.renderer.chunk.RenderChunk;
|
|||
import client.renderer.entity.RenderItem;
|
||||
import client.renderer.entity.RenderManager;
|
||||
import client.renderer.particle.EffectRenderer;
|
||||
import client.renderer.particle.EntityFirework;
|
||||
import client.renderer.texture.ColormapLoader;
|
||||
import client.renderer.texture.EntityTexManager;
|
||||
import client.renderer.texture.TextureManager;
|
||||
|
@ -95,7 +94,7 @@ import client.window.Keysym;
|
|||
import client.window.Wheel;
|
||||
import client.window.Window;
|
||||
import client.window.WindowEvent;
|
||||
import common.IClient;
|
||||
import client.world.WorldClient;
|
||||
import common.biome.Biome;
|
||||
import common.block.Block;
|
||||
import common.collect.Lists;
|
||||
|
@ -106,7 +105,6 @@ import common.entity.animal.EntityHorse;
|
|||
import common.entity.npc.Energy;
|
||||
import common.entity.npc.EntityNPC;
|
||||
import common.entity.types.EntityLiving;
|
||||
import common.entity.types.IEntityFX;
|
||||
import common.future.Futures;
|
||||
import common.future.ListenableFuture;
|
||||
import common.future.ListenableFutureTask;
|
||||
|
@ -127,8 +125,6 @@ import common.log.Log;
|
|||
import common.log.LogLevel;
|
||||
import common.log.Message;
|
||||
import common.material.Material;
|
||||
import common.model.ParticleType;
|
||||
import common.nbt.NBTTagCompound;
|
||||
import common.network.IThreadListener;
|
||||
import common.network.NetConnection;
|
||||
import common.network.PacketDecoder;
|
||||
|
@ -149,7 +145,6 @@ import common.properties.IProperty;
|
|||
import common.rng.Random;
|
||||
import common.sound.EventType;
|
||||
import common.sound.PositionedSound;
|
||||
import common.sound.Sound;
|
||||
import common.util.BlockPos;
|
||||
import common.util.BoundingBox;
|
||||
import common.util.CharValidator;
|
||||
|
@ -164,7 +159,6 @@ import common.world.Chunk;
|
|||
import common.world.LightType;
|
||||
import common.world.State;
|
||||
import common.world.World;
|
||||
import common.world.WorldClient;
|
||||
import io.netty.bootstrap.Bootstrap;
|
||||
import io.netty.channel.Channel;
|
||||
import io.netty.channel.ChannelException;
|
||||
|
@ -196,7 +190,7 @@ import io.netty.handler.timeout.ReadTimeoutHandler;
|
|||
[[oder einfach einen Toaster mit nem LCD und Maus]]
|
||||
*/
|
||||
|
||||
public class Client implements IThreadListener, IClient {
|
||||
public class Client implements IThreadListener {
|
||||
public static class SyncFunction implements IntFunction {
|
||||
public void apply(IntVar cv, int value) {
|
||||
Client.CLIENT.sync(value);
|
||||
|
@ -1271,7 +1265,7 @@ public class Client implements IThreadListener, IClient {
|
|||
if ((this.pointed.type != ObjectType.BLOCK || this.world.getState(this.pointed.block).getBlock().getMaterial() == Material.air) && itemstack != null && itemstack.getItem().onAction(itemstack, this.player, this.world, ItemControl.PRIMARY, null))
|
||||
{
|
||||
this.player.swingItem();
|
||||
this.player.sendQueue.addToSendQueue(new CPacketAction(Action.ITEM_ACTION, ItemControl.PRIMARY.ordinal()));
|
||||
this.player.client.addToSendQueue(new CPacketAction(Action.ITEM_ACTION, ItemControl.PRIMARY.ordinal()));
|
||||
this.leftClickCounter = 10;
|
||||
return;
|
||||
}
|
||||
|
@ -1323,7 +1317,7 @@ public class Client implements IThreadListener, IClient {
|
|||
if ((this.pointed.type != ObjectType.BLOCK || this.world.getState(this.pointed.block).getBlock().getMaterial() == Material.air) && itemstack != null && itemstack.getItem().onAction(itemstack, this.player, this.world, ItemControl.SECONDARY, null))
|
||||
{
|
||||
this.player.swingItem();
|
||||
this.player.sendQueue.addToSendQueue(new CPacketAction(Action.ITEM_ACTION, ItemControl.SECONDARY.ordinal()));
|
||||
this.player.client.addToSendQueue(new CPacketAction(Action.ITEM_ACTION, ItemControl.SECONDARY.ordinal()));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1389,7 +1383,7 @@ public class Client implements IThreadListener, IClient {
|
|||
if (this.pointed != null)
|
||||
{
|
||||
if(this.player.getHeldItem() != null && this.player.getHeldItem().getItem().onAction(this.player.getHeldItem(), this.player, this.world, ItemControl.TERTIARY, null)) {
|
||||
this.player.sendQueue.addToSendQueue(new CPacketAction(Action.ITEM_ACTION, ItemControl.TERTIARY.ordinal()));
|
||||
this.player.client.addToSendQueue(new CPacketAction(Action.ITEM_ACTION, ItemControl.TERTIARY.ordinal()));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1436,7 +1430,7 @@ public class Client implements IThreadListener, IClient {
|
|||
|
||||
inventoryplayer.setCurrentItem(item, meta, flag1);
|
||||
if(this.itemCheat) {
|
||||
this.player.sendQueue.addToSendQueue(new CPacketCheat(new ItemStack(item, 1, meta), inventoryplayer.currentItem, this.ctrl()));
|
||||
this.player.client.addToSendQueue(new CPacketCheat(new ItemStack(item, 1, meta), inventoryplayer.currentItem, this.ctrl()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1446,7 +1440,7 @@ public class Client implements IThreadListener, IClient {
|
|||
if (this.pointed != null)
|
||||
{
|
||||
if(this.player.getHeldItem() != null && this.player.getHeldItem().getItem().onAction(this.player.getHeldItem(), this.player, this.world, ItemControl.QUARTERNARY, null)) {
|
||||
this.player.sendQueue.addToSendQueue(new CPacketAction(Action.ITEM_ACTION, ItemControl.QUARTERNARY.ordinal()));
|
||||
this.player.client.addToSendQueue(new CPacketAction(Action.ITEM_ACTION, ItemControl.QUARTERNARY.ordinal()));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -1522,7 +1516,7 @@ public class Client implements IThreadListener, IClient {
|
|||
|
||||
public ClientPlayer getNetHandler()
|
||||
{
|
||||
return this.player != null ? (ClientPlayer)this.player.sendQueue : null;
|
||||
return this.player != null ? (ClientPlayer)this.player.client : null;
|
||||
}
|
||||
|
||||
// public void setSkin(BufferedImage skin, String id, ModelType model, boolean slim)
|
||||
|
@ -1569,7 +1563,7 @@ public class Client implements IThreadListener, IClient {
|
|||
|
||||
public void performAction(Action action) {
|
||||
if(this.player != null)
|
||||
this.player.sendQueue.addToSendQueue(new CPacketAction(action));
|
||||
this.player.client.addToSendQueue(new CPacketAction(action));
|
||||
}
|
||||
|
||||
public void setBossStatus(EntityLiving entity) {
|
||||
|
@ -1805,7 +1799,7 @@ public class Client implements IThreadListener, IClient {
|
|||
ticked / 1000L, (ticked / 100L) % 10L
|
||||
) +
|
||||
(this.serverInfo != null ? "\n" + this.serverInfo : "")
|
||||
// WorldServer world = this.server.getWorld(this.theWorld.dimension.getDimensionId());
|
||||
// IWorldServer world = this.server.getWorld(this.theWorld.dimension.getDimensionId());
|
||||
// if(world != null)
|
||||
// list.add("Seed: " + world.getSeed());
|
||||
;
|
||||
|
@ -3342,82 +3336,4 @@ public class Client implements IThreadListener, IClient {
|
|||
}
|
||||
}, "File Browser listener").start();
|
||||
}
|
||||
|
||||
public void makeFireworks(double x, double y, double z, double motionX, double motionY, double motionZ, NBTTagCompound compund)
|
||||
{
|
||||
this.effectRenderer.addEffect(new EntityFirework.StarterFX(this.world, x, y, z, motionX, motionY, motionZ, this.effectRenderer, compund));
|
||||
}
|
||||
|
||||
public int getRenderDistance() {
|
||||
return this.renderDistance;
|
||||
}
|
||||
|
||||
public float getGravity() {
|
||||
return this.gravity;
|
||||
}
|
||||
|
||||
public int getTimeFactor() {
|
||||
return this.timeFactor;
|
||||
}
|
||||
|
||||
public boolean hasDayCycle() {
|
||||
return this.dayCycle;
|
||||
}
|
||||
|
||||
public void playSound(Sound sound) {
|
||||
this.soundManager.playSound(sound);
|
||||
}
|
||||
|
||||
public EntityNPC getPlayer() {
|
||||
return this.player;
|
||||
}
|
||||
|
||||
public IEntityFX spawnEffectParticle(int particleId, double xCoord, double yCoord, double zCoord, double xSpeed, double ySpeed, double zSpeed,
|
||||
int[] parameters) {
|
||||
return this.effectRenderer.spawnEffectParticle(particleId, xCoord, yCoord, zCoord, xSpeed, ySpeed, zSpeed, parameters);
|
||||
}
|
||||
|
||||
public void addBlockDestroyEffects(BlockPos pos, State state) {
|
||||
this.effectRenderer.addBlockDestroyEffects(pos, state);
|
||||
}
|
||||
|
||||
public void sendBlockBreakProgress(int breakerId, BlockPos pos, int progress) {
|
||||
this.renderGlobal.sendBlockBreakProgress(breakerId, pos, progress);
|
||||
}
|
||||
|
||||
public void markBlocksForUpdate(int x1, int y1, int z1, int x2, int y2, int z2) {
|
||||
this.renderGlobal.markBlocksForUpdate(x1, y1, z1, x2, y2, z2);
|
||||
}
|
||||
|
||||
public void emitParticleAtEntity(Entity entityIn, ParticleType particleTypes) {
|
||||
this.effectRenderer.emitParticleAtEntity(entityIn, particleTypes);
|
||||
}
|
||||
|
||||
public boolean isJumping() {
|
||||
return this.jump;
|
||||
}
|
||||
|
||||
public boolean isSprinting() {
|
||||
return this.sprint;
|
||||
}
|
||||
|
||||
public boolean isSneaking() {
|
||||
return this.sneak;
|
||||
}
|
||||
|
||||
public float getMoveForward() {
|
||||
return this.moveForward;
|
||||
}
|
||||
|
||||
public float getMoveStrafe() {
|
||||
return this.moveStrafe;
|
||||
}
|
||||
|
||||
public void setMoveForward(float value) {
|
||||
this.moveForward = value;
|
||||
}
|
||||
|
||||
public void setMoveStrafe(float value) {
|
||||
this.moveStrafe = value;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package client;
|
||||
|
||||
import client.network.ClientPlayer;
|
||||
import client.world.WorldClient;
|
||||
import common.block.Block;
|
||||
import common.entity.Entity;
|
||||
import common.entity.npc.EntityNPC;
|
||||
|
@ -20,7 +21,6 @@ import common.util.Facing;
|
|||
import common.util.Vec3;
|
||||
import common.world.State;
|
||||
import common.world.World;
|
||||
import common.world.WorldClient;
|
||||
|
||||
public class PlayerController
|
||||
{
|
||||
|
@ -471,7 +471,7 @@ public class PlayerController
|
|||
public EntityNPC createPlayerEntity(WorldClient worldIn, int type)
|
||||
{
|
||||
EntityNPC player = (EntityNPC)EntityRegistry.createEntityByID(type, worldIn);
|
||||
player.setClientPlayer(this.gm, this.netClientHandler);
|
||||
player.setClientPlayer(this.netClientHandler);
|
||||
return player;
|
||||
}
|
||||
|
||||
|
|
|
@ -215,7 +215,7 @@ public class GuiConsole extends Gui implements Textbox.Callback {
|
|||
s = argv[argv.length - 1];
|
||||
Iterable<String> res = pre.startsWith("#") ?
|
||||
(argv.length == 1 ? this.gm.getVars() : (argv.length == 2 ? getVarCompletion(argv[0].substring(1)) : Lists.newArrayList())) :
|
||||
(this.gm.player == null ? Lists.newArrayList() : ((ClientPlayer)this.gm.player.sendQueue).getPlayerNames());
|
||||
(this.gm.player == null ? Lists.newArrayList() : ((ClientPlayer)this.gm.player.client).getPlayerNames());
|
||||
if(argv.length == 1 && pre.startsWith("#"))
|
||||
s = s.substring(1);
|
||||
for(String s1 : res) {
|
||||
|
@ -255,7 +255,7 @@ public class GuiConsole extends Gui implements Textbox.Callback {
|
|||
if(this.gm.player != null) {
|
||||
currentText = currentText.substring(1);
|
||||
this.prefixFirst = currentText.split(" ", -1).length == 1 ? "/" : null;
|
||||
this.gm.player.sendQueue.addToSendQueue(new CPacketComplete(currentText, eid, blockpos));
|
||||
this.gm.player.client.addToSendQueue(new CPacketComplete(currentText, eid, blockpos));
|
||||
this.waitingOnAutocomplete = true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -350,7 +350,7 @@ public class GuiChar extends GuiList<GuiChar.SkinEntry>
|
|||
public void use(ActButton elem, Mode action) {
|
||||
if(GuiChar.this.gm.player != null) {
|
||||
GuiChar.this.waiting = false;
|
||||
GuiChar.this.gm.player.sendQueue.addToSendQueue(new CPacketAction(CPacketAction.Action.SET_ALIGN, align.ordinal()));
|
||||
GuiChar.this.gm.player.client.addToSendQueue(new CPacketAction(CPacketAction.Action.SET_ALIGN, align.ordinal()));
|
||||
for(ActButton btn : alignBtns) {
|
||||
btn.enabled = btn != elem;
|
||||
}
|
||||
|
@ -363,7 +363,7 @@ public class GuiChar extends GuiList<GuiChar.SkinEntry>
|
|||
public void use(Slider elem, int value) {
|
||||
if(GuiChar.this.gm.player != null) {
|
||||
GuiChar.this.waiting = false;
|
||||
GuiChar.this.gm.player.sendQueue.addToSendQueue(new CPacketAction(CPacketAction.Action.SET_HEIGHT, value));
|
||||
GuiChar.this.gm.player.client.addToSendQueue(new CPacketAction(CPacketAction.Action.SET_HEIGHT, value));
|
||||
}
|
||||
}
|
||||
}, "Spieler-Größe", "cm")).enabled = this.gm.player == null || this.gm.player.getMinSize() != this.gm.player.getMaxSize();
|
||||
|
@ -378,8 +378,8 @@ public class GuiChar extends GuiList<GuiChar.SkinEntry>
|
|||
if(GuiChar.this.gm.player != null) {
|
||||
GuiChar.this.gm.displayGuiScreen(GuiLoading.makeWaitTask("Lade Welt ..."));
|
||||
Dimension dim = UniverseRegistry.getBaseDimensions().get(GuiChar.this.dimension);
|
||||
GuiChar.this.gm.player.sendQueue.addToSendQueue(new CPacketMessage(CPacketMessage.Type.INFO, descField.getText()));
|
||||
GuiChar.this.gm.player.sendQueue.addToSendQueue(new CPacketAction(CPacketAction.Action.CLOSE_EDITOR, dim.getDimensionId()));
|
||||
GuiChar.this.gm.player.client.addToSendQueue(new CPacketMessage(CPacketMessage.Type.INFO, descField.getText()));
|
||||
GuiChar.this.gm.player.client.addToSendQueue(new CPacketAction(CPacketAction.Action.CLOSE_EDITOR, dim.getDimensionId()));
|
||||
}
|
||||
}
|
||||
}, "Charakter erstellen"));
|
||||
|
@ -391,7 +391,7 @@ public class GuiChar extends GuiList<GuiChar.SkinEntry>
|
|||
elem.setText(GuiChar.this.gm.player == null ? "..." : GuiChar.this.gm.player.getCustomNameTag());
|
||||
else if(GuiChar.this.gm.player != null) {
|
||||
GuiChar.this.waiting = false;
|
||||
GuiChar.this.gm.player.sendQueue.addToSendQueue(new CPacketMessage(CPacketMessage.Type.DISPLAY, name));
|
||||
GuiChar.this.gm.player.client.addToSendQueue(new CPacketMessage(CPacketMessage.Type.DISPLAY, name));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -70,7 +70,7 @@ public class GuiClass extends GuiList<GuiClass.ClassEntry> implements ActButton.
|
|||
public void use(ActButton elem, Mode action) {
|
||||
ClassEntry entry = this.getSelected();
|
||||
if(entry != null && GuiClass.this.gm.player != null) {
|
||||
GuiClass.this.gm.player.sendQueue.addToSendQueue(new CPacketAction(CPacketAction.Action.SET_CLASS, entry.clazz.ordinal()));
|
||||
GuiClass.this.gm.player.client.addToSendQueue(new CPacketAction(CPacketAction.Action.SET_CLASS, entry.clazz.ordinal()));
|
||||
this.gm.displayGuiScreen(GuiChar.INSTANCE);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -74,6 +74,6 @@ public class GuiSpecies extends GuiList<GuiSpecies.SpeciesEntry> implements ActB
|
|||
public void use(ActButton elem, Mode action) {
|
||||
SpeciesEntry entry = this.getSelected();
|
||||
if(entry != null && GuiSpecies.this.gm.player != null)
|
||||
GuiSpecies.this.gm.player.sendQueue.addToSendQueue(new CPacketAction(CPacketAction.Action.SET_SPECIES, EntityRegistry.getEntityID(entry.species.clazz)));
|
||||
GuiSpecies.this.gm.player.client.addToSendQueue(new CPacketAction(CPacketAction.Action.SET_SPECIES, EntityRegistry.getEntityID(entry.species.clazz)));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -644,7 +644,7 @@ public abstract class GuiContainer extends Gui
|
|||
if(this.cheatStack != null) {
|
||||
Slot slot = this.getSlotAtPosition(mouseX, mouseY);
|
||||
if((mouseButton == 0 || mouseButton == 1) && slot != null && this.gm.player != null && slot.inventory == this.gm.player.inventory)
|
||||
this.gm.player.sendQueue.addToSendQueue(new CPacketCheat(this.cheatStack, slot.getIndex(), mouseButton == 0 && this.cheatStack.stackSize > 1));
|
||||
this.gm.player.client.addToSendQueue(new CPacketCheat(this.cheatStack, slot.getIndex(), mouseButton == 0 && this.cheatStack.stackSize > 1));
|
||||
if(mouseButton != 1 && !this.gm.ctrl())
|
||||
this.cheatStack = null;
|
||||
return;
|
||||
|
@ -1197,7 +1197,7 @@ public abstract class GuiContainer extends Gui
|
|||
|
||||
if(i1 >= 0 && i1 < ITEM_LIST.size()) {
|
||||
if(slot >= 0 || instant) {
|
||||
this.gm.player.sendQueue.addToSendQueue(new CPacketCheat(ITEM_LIST.get(i1), slot, full));
|
||||
this.gm.player.client.addToSendQueue(new CPacketCheat(ITEM_LIST.get(i1), slot, full));
|
||||
}
|
||||
else {
|
||||
this.cheatStack = ITEM_LIST.get(i1).copy();
|
||||
|
|
|
@ -30,6 +30,7 @@ public class ClientLoginHandler extends NetHandler implements IClientLoginHandle
|
|||
|
||||
public void handleLoginSuccess(RPacketLoginSuccess packetIn)
|
||||
{
|
||||
this.gm.debugWorld = packetIn.isDebug();
|
||||
this.networkManager.setConnectionState(PacketRegistry.PLAY);
|
||||
this.networkManager.setNetHandler(new ClientPlayer(this.gm, this.networkManager));
|
||||
}
|
||||
|
|
|
@ -27,6 +27,7 @@ import client.gui.container.GuiRepair;
|
|||
import client.gui.ingame.GuiSign;
|
||||
import client.renderer.particle.EntityPickupFX;
|
||||
import client.renderer.texture.EntityTexManager;
|
||||
import client.world.WorldClient;
|
||||
import common.attributes.Attribute;
|
||||
import common.attributes.AttributeInstance;
|
||||
import common.attributes.AttributeMap;
|
||||
|
@ -126,6 +127,7 @@ import common.packet.SPacketUpdateHealth;
|
|||
import common.packet.SPacketWorld;
|
||||
import common.potion.PotionEffect;
|
||||
import common.rng.Random;
|
||||
import common.sound.Sound;
|
||||
import common.tileentity.IInteractionObject;
|
||||
import common.tileentity.LocalBlockIntercommunication;
|
||||
import common.tileentity.TileEntity;
|
||||
|
@ -137,7 +139,6 @@ import common.world.Chunk;
|
|||
import common.world.Explosion;
|
||||
import common.world.Weather;
|
||||
import common.world.World;
|
||||
import common.world.WorldClient;
|
||||
|
||||
public class ClientPlayer extends NetHandler implements IClientPlayer
|
||||
{
|
||||
|
@ -180,6 +181,52 @@ public class ClientPlayer extends NetHandler implements IClientPlayer
|
|||
this.netManager = p_i46300_3_;
|
||||
}
|
||||
|
||||
|
||||
public void playSound(Sound sound) {
|
||||
this.gameController.getSoundManager().playSound(sound);
|
||||
}
|
||||
|
||||
public void emitParticleAtEntity(Entity entityIn, ParticleType particleTypes) {
|
||||
this.gameController.effectRenderer.emitParticleAtEntity(entityIn, particleTypes);
|
||||
}
|
||||
|
||||
public boolean isJumping() {
|
||||
return this.gameController.jump;
|
||||
}
|
||||
|
||||
public boolean isSprinting() {
|
||||
return this.gameController.sprint;
|
||||
}
|
||||
|
||||
public boolean isSneaking() {
|
||||
return this.gameController.sneak;
|
||||
}
|
||||
|
||||
public float getMoveForward() {
|
||||
return this.gameController.moveForward;
|
||||
}
|
||||
|
||||
public float getMoveStrafe() {
|
||||
return this.gameController.moveStrafe;
|
||||
}
|
||||
|
||||
public void setMoveForward(float value) {
|
||||
this.gameController.moveForward = value;
|
||||
}
|
||||
|
||||
public void setMoveStrafe(float value) {
|
||||
this.gameController.moveStrafe = value;
|
||||
}
|
||||
|
||||
public boolean isRenderViewEntity(Entity entity) {
|
||||
return this.gameController.getRenderViewEntity() == entity;
|
||||
}
|
||||
|
||||
public void updatePlayerMoveState() {
|
||||
this.gameController.updatePlayerMoveState();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Clears the WorldClient instance associated with this NetHandlerPlayClient
|
||||
*/
|
||||
|
@ -482,7 +529,7 @@ public class ClientPlayer extends NetHandler implements IClientPlayer
|
|||
float yaw = packetIn.getYaw();
|
||||
float pitch = packetIn.getPitch();
|
||||
EntityNPC player = (EntityNPC)EntityRegistry.createEntityByID(packetIn.getEntityType(), this.gameController.world); // new EntityNPC(this.gameController.theWorld); // , /* this.getPlayerInfo( */ packetIn.getUser()); // ).getUser());
|
||||
player.setOtherPlayer(this.gameController);
|
||||
player.setOtherPlayer();
|
||||
player.prevX = player.lastTickPosX = (double)(player.serverPosX = packetIn.getX());
|
||||
player.prevY = player.lastTickPosY = (double)(player.serverPosY = packetIn.getY());
|
||||
player.prevZ = player.lastTickPosZ = (double)(player.serverPosZ = packetIn.getZ());
|
||||
|
|
|
@ -13,6 +13,7 @@ import client.Client;
|
|||
import client.renderer.particle.EffectRenderer;
|
||||
import client.renderer.texture.DynamicTexture;
|
||||
import client.renderer.texture.TextureMap;
|
||||
import client.world.WorldClient;
|
||||
import common.biome.Biome;
|
||||
import common.block.Block;
|
||||
import common.entity.Entity;
|
||||
|
@ -32,7 +33,6 @@ import common.util.ExtMath;
|
|||
import common.util.HitPosition;
|
||||
import common.util.Vec3;
|
||||
import common.world.World;
|
||||
import common.world.WorldClient;
|
||||
|
||||
public class EntityRenderer {
|
||||
private static final String locationMoltenPng = "textures/world/molten.png";
|
||||
|
|
|
@ -25,6 +25,7 @@ import client.renderer.texture.TextureAtlasSprite;
|
|||
import client.renderer.texture.TextureManager;
|
||||
import client.renderer.texture.TextureMap;
|
||||
import client.renderer.tileentity.TileEntityRendererDispatcher;
|
||||
import client.world.WorldClient;
|
||||
import common.block.Block;
|
||||
import common.block.BlockChest;
|
||||
import common.block.BlockSign;
|
||||
|
@ -52,7 +53,6 @@ import common.util.Vec3;
|
|||
import common.util.Vector3f;
|
||||
import common.world.Chunk;
|
||||
import common.world.State;
|
||||
import common.world.WorldClient;
|
||||
|
||||
public class RenderGlobal
|
||||
{
|
||||
|
|
|
@ -5,12 +5,11 @@ import client.renderer.RenderBuffer;
|
|||
import client.renderer.texture.TextureAtlasSprite;
|
||||
import common.entity.Entity;
|
||||
import common.entity.EntityType;
|
||||
import common.entity.types.IEntityFX;
|
||||
import common.nbt.NBTTagCompound;
|
||||
import common.util.ExtMath;
|
||||
import common.world.World;
|
||||
|
||||
public class EntityFX extends Entity implements IEntityFX
|
||||
public class EntityFX extends Entity
|
||||
{
|
||||
protected int particleTextureIndexX;
|
||||
protected int particleTextureIndexY;
|
||||
|
|
|
@ -2,6 +2,7 @@ package client.renderer.particle;
|
|||
|
||||
import client.Client;
|
||||
import client.renderer.RenderBuffer;
|
||||
import client.world.WorldClient;
|
||||
import common.entity.Entity;
|
||||
import common.init.SoundEvent;
|
||||
import common.item.ItemDye;
|
||||
|
@ -10,7 +11,6 @@ import common.nbt.NBTTagList;
|
|||
import common.util.BoundingBox;
|
||||
import common.util.ExtMath;
|
||||
import common.world.World;
|
||||
import common.world.WorldClient;
|
||||
|
||||
public class EntityFirework
|
||||
{
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
package client.renderer.particle;
|
||||
|
||||
import client.renderer.RenderBuffer;
|
||||
import client.world.WorldClient;
|
||||
import common.entity.Entity;
|
||||
import common.model.ParticleType;
|
||||
import common.world.World;
|
||||
import common.world.WorldClient;
|
||||
|
||||
public class EntityParticleEmitter extends EntityFX
|
||||
{
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package common.world;
|
||||
package client.world;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.function.Predicate;
|
||||
|
@ -9,6 +9,8 @@ import common.init.Blocks;
|
|||
import common.tileentity.TileEntity;
|
||||
import common.util.BlockPos;
|
||||
import common.util.BoundingBox;
|
||||
import common.world.Chunk;
|
||||
import common.world.LightType;
|
||||
|
||||
public class EmptyChunk extends Chunk {
|
||||
public EmptyChunk(WorldClient world) {
|
|
@ -1,9 +1,11 @@
|
|||
package common.world;
|
||||
package client.world;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import common.IClient;
|
||||
import client.Client;
|
||||
import client.renderer.particle.EntityFX;
|
||||
import client.renderer.particle.EntityFirework;
|
||||
import common.biome.Biome;
|
||||
import common.block.Block;
|
||||
import common.collect.Lists;
|
||||
|
@ -12,7 +14,6 @@ import common.dimension.Dimension;
|
|||
import common.entity.Entity;
|
||||
import common.entity.item.EntityCart;
|
||||
import common.entity.npc.EntityNPC;
|
||||
import common.entity.types.IEntityFX;
|
||||
import common.init.BlockRegistry;
|
||||
import common.init.ItemRegistry;
|
||||
import common.init.Items;
|
||||
|
@ -32,12 +33,15 @@ import common.util.ExtMath;
|
|||
import common.util.LongHashMap;
|
||||
import common.util.Vec3;
|
||||
import common.util.BlockPos.MutableBlockPos;
|
||||
import common.world.Chunk;
|
||||
import common.world.AWorldClient;
|
||||
import common.world.State;
|
||||
|
||||
public class WorldClient extends World
|
||||
public class WorldClient extends AWorldClient
|
||||
{
|
||||
private static final int DISPLAY_RANGE = 16;
|
||||
|
||||
private final IClient gm;
|
||||
private final Client gm;
|
||||
private final Set<Entity> entityList = Sets.<Entity>newHashSet();
|
||||
private final Set<Entity> spawnQueue = Sets.<Entity>newHashSet();
|
||||
private final Set<ChunkPos> previousActive = Sets.<ChunkPos>newHashSet();
|
||||
|
@ -48,14 +52,14 @@ public class WorldClient extends World
|
|||
protected int lastLightning;
|
||||
protected Vec3 lightColor = new Vec3(0xffffff);
|
||||
|
||||
public WorldClient(IClient gm, boolean debug, Dimension dim)
|
||||
public WorldClient(Client gm, boolean debug, Dimension dim)
|
||||
{
|
||||
super(dim, true, debug);
|
||||
super(dim, debug);
|
||||
this.gm = gm;
|
||||
this.calculateInitialSkylight();
|
||||
this.calculateInitialWeather();
|
||||
this.setGravity(this.gm.getGravity());
|
||||
this.setTimeFactor(this.gm.getTimeFactor());
|
||||
this.setGravity(this.gm.gravity);
|
||||
this.setTimeFactor(this.gm.timeFactor);
|
||||
// this.setDifficulty(this.gm.difficulty);
|
||||
}
|
||||
|
||||
|
@ -63,7 +67,7 @@ public class WorldClient extends World
|
|||
{
|
||||
// this.info.tick();
|
||||
|
||||
if (this.gm.hasDayCycle())
|
||||
if (this.gm.dayCycle)
|
||||
{
|
||||
this.daytime += this.timeFactor;
|
||||
}
|
||||
|
@ -92,7 +96,7 @@ public class WorldClient extends World
|
|||
|
||||
protected void updateBlocks()
|
||||
{
|
||||
this.setActivePlayerChunksAndCheckLight(this.gm.getRenderDistance());
|
||||
this.setActivePlayerChunksAndCheckLight(this.gm.renderDistance);
|
||||
this.previousActive.retainAll(this.active);
|
||||
|
||||
if (this.previousActive.size() == this.active.size())
|
||||
|
@ -160,7 +164,7 @@ public class WorldClient extends World
|
|||
}
|
||||
else if (entityIn instanceof EntityCart)
|
||||
{
|
||||
this.gm.playSound(new MovingSoundMinecart((EntityCart)entityIn));
|
||||
this.gm.getSoundManager().playSound(new MovingSoundMinecart((EntityCart)entityIn));
|
||||
}
|
||||
|
||||
return flag;
|
||||
|
@ -220,7 +224,7 @@ public class WorldClient extends World
|
|||
|
||||
public Entity getEntityByID(int id)
|
||||
{
|
||||
return (Entity)(id == this.gm.getPlayer().getId() ? this.gm.getPlayer() : super.getEntityByID(id));
|
||||
return (Entity)(id == this.gm.player.getId() ? this.gm.player : super.getEntityByID(id));
|
||||
}
|
||||
|
||||
public Entity removeEntityFromWorld(int entityID)
|
||||
|
@ -338,13 +342,13 @@ public class WorldClient extends World
|
|||
// }
|
||||
// else
|
||||
// {
|
||||
this.gm.playSound(positionedsoundrecord);
|
||||
this.gm.getSoundManager().playSound(positionedsoundrecord);
|
||||
// }
|
||||
}
|
||||
|
||||
public void makeFireworks(double x, double y, double z, double motionX, double motionY, double motionZ, NBTTagCompound compund)
|
||||
{
|
||||
this.gm.makeFireworks(x, y, z, motionX, motionY, motionZ, compund);
|
||||
this.gm.effectRenderer.addEffect(new EntityFirework.StarterFX(this.gm.world, x, y, z, motionX, motionY, motionZ, this.gm.effectRenderer, compund));
|
||||
}
|
||||
|
||||
public Chunk getChunk(int x, int z)
|
||||
|
@ -373,7 +377,7 @@ public class WorldClient extends World
|
|||
this.spawnEntityFX(particleType, particleType.getShouldIgnoreRange(), xCoord, yCoord, zCoord, xOffset, yOffset, zOffset, data);
|
||||
}
|
||||
|
||||
public IEntityFX spawnEntityFX(ParticleType particle, boolean ignoreRange, double xCoord, double yCoord, double zCoord, double xOffset, double yOffset, double zOffset, int[] parameters)
|
||||
public EntityFX spawnEntityFX(ParticleType particle, boolean ignoreRange, double xCoord, double yCoord, double zCoord, double xOffset, double yOffset, double zOffset, int[] parameters)
|
||||
{
|
||||
if (this.gm.getRenderViewEntity() != null)
|
||||
{
|
||||
|
@ -391,14 +395,14 @@ public class WorldClient extends World
|
|||
|
||||
if (ignoreRange)
|
||||
{
|
||||
return this.gm.spawnEffectParticle(particleID, xCoord, yCoord, zCoord, xOffset, yOffset, zOffset, parameters);
|
||||
return this.gm.effectRenderer.spawnEffectParticle(particleID, xCoord, yCoord, zCoord, xOffset, yOffset, zOffset, parameters);
|
||||
}
|
||||
else
|
||||
{
|
||||
double d3 = 16.0D;
|
||||
if(d0 * d0 + d1 * d1 + d2 * d2 > 256.0D)
|
||||
return null;
|
||||
return this.gm.spawnEffectParticle(particleID, xCoord, yCoord, zCoord, xOffset, yOffset, zOffset, parameters);
|
||||
return this.gm.effectRenderer.spawnEffectParticle(particleID, xCoord, yCoord, zCoord, xOffset, yOffset, zOffset, parameters);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
@ -585,10 +589,10 @@ public class WorldClient extends World
|
|||
|
||||
if (block.getMaterial() != Material.air)
|
||||
{
|
||||
this.gm.playSound(new PositionedSound(block.sound.getBreakSound(), 1.0F, /* block.sound.getFrequency() * 0.8F, */ (float)blockPosIn.getX() + 0.5F, (float)blockPosIn.getY() + 0.5F, (float)blockPosIn.getZ() + 0.5F));
|
||||
this.gm.getSoundManager().playSound(new PositionedSound(block.sound.getBreakSound(), 1.0F, /* block.sound.getFrequency() * 0.8F, */ (float)blockPosIn.getX() + 0.5F, (float)blockPosIn.getY() + 0.5F, (float)blockPosIn.getZ() + 0.5F));
|
||||
}
|
||||
|
||||
this.gm.addBlockDestroyEffects(blockPosIn, block.getStateFromMeta(data >> 12 & 255));
|
||||
this.gm.effectRenderer.addBlockDestroyEffects(blockPosIn, block.getStateFromMeta(data >> 12 & 255));
|
||||
break;
|
||||
|
||||
case 2002:
|
||||
|
@ -625,7 +629,7 @@ public class WorldClient extends World
|
|||
double d24 = Math.cos(d23) * d22;
|
||||
double d9 = 0.01D + this.rand.doublev() * 0.5D;
|
||||
double d11 = Math.sin(d23) * d22;
|
||||
IEntityFX entityfx = this.spawnEntityFX(enumparticletypes, enumparticletypes.getShouldIgnoreRange(), d13 + d24 * 0.1D, d14 + 0.3D, d16 + d11 * 0.1D, d24, d9, d11, new int[0]);
|
||||
EntityFX entityfx = this.spawnEntityFX(enumparticletypes, enumparticletypes.getShouldIgnoreRange(), d13 + d24 * 0.1D, d14 + 0.3D, d16 + d11 * 0.1D, d24, d9, d11, new int[0]);
|
||||
|
||||
if (entityfx != null)
|
||||
{
|
||||
|
@ -662,7 +666,7 @@ public class WorldClient extends World
|
|||
int i = pos.getX();
|
||||
int j = pos.getY();
|
||||
int k = pos.getZ();
|
||||
this.gm.markBlocksForUpdate(i - 1, j - 1, k - 1, i + 1, j + 1, k + 1);
|
||||
this.gm.renderGlobal.markBlocksForUpdate(i - 1, j - 1, k - 1, i + 1, j + 1, k + 1);
|
||||
}
|
||||
|
||||
public void notifyLightSet(BlockPos pos)
|
||||
|
@ -670,17 +674,17 @@ public class WorldClient extends World
|
|||
int i = pos.getX();
|
||||
int j = pos.getY();
|
||||
int k = pos.getZ();
|
||||
this.gm.markBlocksForUpdate(i - 1, j - 1, k - 1, i + 1, j + 1, k + 1);
|
||||
this.gm.renderGlobal.markBlocksForUpdate(i - 1, j - 1, k - 1, i + 1, j + 1, k + 1);
|
||||
}
|
||||
|
||||
public void markBlockRangeForRenderUpdate(int x1, int y1, int z1, int x2, int y2, int z2)
|
||||
{
|
||||
this.gm.markBlocksForUpdate(x1 - 1, y1 - 1, z1 - 1, x2 + 1, y2 + 1, z2 + 1);
|
||||
this.gm.renderGlobal.markBlocksForUpdate(x1 - 1, y1 - 1, z1 - 1, x2 + 1, y2 + 1, z2 + 1);
|
||||
}
|
||||
|
||||
public void sendBlockBreakProgress(int breakerId, BlockPos pos, int progress)
|
||||
{
|
||||
this.gm.sendBlockBreakProgress(breakerId, pos, progress);
|
||||
this.gm.renderGlobal.sendBlockBreakProgress(breakerId, pos, progress);
|
||||
}
|
||||
|
||||
public float getSunBrightness(float p_72971_1_) {
|
|
@ -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);
|
||||
}
|
|
@ -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);
|
||||
}
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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())
|
||||
{
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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),
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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))
|
||||
{
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
// {
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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()));
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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))
|
||||
{
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
|
@ -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))
|
||||
{
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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)))
|
||||
{
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
|
@ -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())
|
||||
{
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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))
|
||||
// {
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
// {
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue