mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-19 03:39:17 +00:00
Made some things one sided only
This commit is contained in:
1 parent
4a4e583aa8
commit
98e28a0967
10 files changed
+38
-20
No files matched your search
@@ -92,7 +92,10 @@ public class TileCraftCrate extends TileOpenCrate {
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
if(!worldObj.isRemote && (craft(true) && canEject() || isFull()))
|
||||
if (worldObj.isRemote)
|
||||
return;
|
||||
|
||||
if(craft(true) && canEject() || isFull())
|
||||
ejectAll();
|
||||
|
||||
int newSignal = 0;
|
||||
|
||||
@@ -12,6 +12,7 @@ package vazkii.botania.common.block.tile;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.multiplayer.WorldClient;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.Item;
|
||||
@@ -20,6 +21,7 @@ import net.minecraft.util.EnumParticleTypes;
|
||||
import net.minecraft.util.ITickable;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.WorldServer;
|
||||
import vazkii.botania.api.state.BotaniaStateProps;
|
||||
import vazkii.botania.common.block.ModBlocks;
|
||||
import vazkii.botania.common.item.equipment.tool.ToolCommons;
|
||||
@@ -28,6 +30,9 @@ public class TileEnderEye extends TileMod {
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
if (worldObj.isRemote)
|
||||
return;
|
||||
|
||||
boolean wasLooking = worldObj.getBlockState(getPos()).getValue(BotaniaStateProps.POWERED);
|
||||
int range = 80;
|
||||
List<EntityPlayer> players = worldObj.getEntitiesWithinAABB(EntityPlayer.class, new AxisAlignedBB(pos.add(-range, -range, -range), pos.add(range, range, range)));
|
||||
@@ -52,8 +57,8 @@ public class TileEnderEye extends TileMod {
|
||||
double x = getPos().getX() - 0.1 + Math.random() * 1.2;
|
||||
double y = getPos().getY() - 0.1 + Math.random() * 1.2;
|
||||
double z = getPos().getZ() - 0.1 + Math.random() * 1.2;
|
||||
|
||||
worldObj.spawnParticle(EnumParticleTypes.REDSTONE, x, y, z, 1, 0, 0);
|
||||
|
||||
((WorldServer) worldObj).spawnParticle(EnumParticleTypes.REDSTONE, false, x, y, z, 0, 1.0D, 0.0D, 0.0D, 1.0D);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -20,6 +20,8 @@ public class TileForestEye extends TileMod {
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
if (worldObj.isRemote)
|
||||
return;
|
||||
int range = 6;
|
||||
int entityCount = worldObj.getEntitiesWithinAABB(EntityAnimal.class, new AxisAlignedBB(pos.add(-range, -range, -range), pos.add(range + 1, range + 1, range + 1))).size();
|
||||
if(entityCount != entities) {
|
||||
|
||||
@@ -52,8 +52,10 @@ public class TileHourglass extends TileSimpleInventory {
|
||||
time = 0;
|
||||
flip = !flip;
|
||||
flipTicks = 4;
|
||||
worldObj.setBlockState(getPos(), worldObj.getBlockState(getPos()).withProperty(BotaniaStateProps.POWERED, true), 1 | 2);
|
||||
worldObj.scheduleUpdate(pos, getBlockType(), getBlockType().tickRate(worldObj));
|
||||
if (!worldObj.isRemote) {
|
||||
worldObj.setBlockState(getPos(), worldObj.getBlockState(getPos()).withProperty(BotaniaStateProps.POWERED, true), 1 | 2);
|
||||
worldObj.scheduleUpdate(pos, getBlockType(), getBlockType().tickRate(worldObj));
|
||||
}
|
||||
}
|
||||
timeFraction = (float) time / (float) totalTime;
|
||||
} else {
|
||||
|
||||
@@ -35,7 +35,7 @@ public class TileManaFlame extends TileMod {
|
||||
public void updateEntity() {
|
||||
float c = 0.3F;
|
||||
|
||||
if(Math.random() < c) {
|
||||
if(worldObj.isRemote && Math.random() < c) {
|
||||
float v = 0.1F;
|
||||
|
||||
float r = (float) (color >> 16 & 0xFF) / 0xFF + (float) (Math.random() - 0.5) * v;
|
||||
|
||||
@@ -42,6 +42,9 @@ public class TileOpenCrate extends TileSimpleInventory {
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
if (worldObj.isRemote)
|
||||
return;
|
||||
|
||||
boolean redstone = false;
|
||||
for(EnumFacing dir : EnumFacing.VALUES) {
|
||||
int redstoneSide = worldObj.getRedstonePower(pos.offset(dir), dir);
|
||||
@@ -73,8 +76,7 @@ public class TileOpenCrate extends TileSimpleInventory {
|
||||
ObfuscationReflectionHelper.setPrivateValue(EntityItem.class, item, -200, LibObfuscation.AGE);
|
||||
|
||||
setInventorySlotContents(0, null);
|
||||
if(!worldObj.isRemote)
|
||||
worldObj.spawnEntityInWorld(item);
|
||||
worldObj.spawnEntityInWorld(item);
|
||||
}
|
||||
|
||||
public boolean onWanded(EntityPlayer player, ItemStack stack) {
|
||||
|
||||
@@ -16,6 +16,9 @@ public class TileTeruTeruBozu extends TileMod {
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
if (worldObj.isRemote)
|
||||
return;
|
||||
|
||||
boolean isRaining = worldObj.isRaining();
|
||||
if(isRaining && worldObj.rand.nextInt(9600) == 0)
|
||||
worldObj.getWorldInfo().setRaining(false);
|
||||
|
||||
@@ -19,6 +19,7 @@ import net.minecraft.tileentity.TileEntityFurnace;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumParticleTypes;
|
||||
import vazkii.botania.api.internal.VanillaPacketDispatcher;
|
||||
import vazkii.botania.api.state.BotaniaStateProps;
|
||||
import vazkii.botania.common.block.subtile.functional.SubTileExoflame;
|
||||
import vazkii.botania.common.block.tile.TileMod;
|
||||
|
||||
@@ -115,9 +116,8 @@ public class TileBellows extends TileMod {
|
||||
}
|
||||
|
||||
public TileEntity getLinkedTile() {
|
||||
return null;
|
||||
// EnumFacing side = ((EnumFacing) worldObj.getBlockState(getPos()).getValue(BotaniaStateProps.CARDINALS));
|
||||
// return worldObj.getTileEntity(getPos().offset(side));
|
||||
EnumFacing side = worldObj.getBlockState(getPos()).getValue(BotaniaStateProps.CARDINALS);
|
||||
return worldObj.getTileEntity(getPos().offset(side));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -25,16 +25,14 @@ public class TileManaDetector extends TileMod implements IManaCollisionGhost {
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
if(!worldObj.isRemote) {
|
||||
boolean state = worldObj.getBlockState(getPos()).getValue(BotaniaStateProps.POWERED);
|
||||
boolean expectedState = worldObj.getEntitiesWithinAABB(Entity.class, new AxisAlignedBB(pos, pos.add(1, 1, 1)), Predicates.instanceOf(IManaBurst.class)).size() != 0;
|
||||
if(state != expectedState)
|
||||
worldObj.setBlockState(getPos(), worldObj.getBlockState(getPos()).withProperty(BotaniaStateProps.POWERED, expectedState), 1 | 2);
|
||||
boolean state = worldObj.getBlockState(getPos()).getValue(BotaniaStateProps.POWERED);
|
||||
boolean expectedState = worldObj.getEntitiesWithinAABB(Entity.class, new AxisAlignedBB(pos, pos.add(1, 1, 1)), Predicates.instanceOf(IManaBurst.class)).size() != 0;
|
||||
if(state != expectedState && !worldObj.isRemote)
|
||||
worldObj.setBlockState(getPos(), worldObj.getBlockState(getPos()).withProperty(BotaniaStateProps.POWERED, expectedState), 1 | 2);
|
||||
|
||||
if(expectedState)
|
||||
for(int i = 0; i < 4; i++)
|
||||
Botania.proxy.sparkleFX(getWorld(), pos.getX() + Math.random(), pos.getY() + Math.random(), pos.getZ() + Math.random(), 1F, 0.2F, 0.2F, 0.7F + 0.5F * (float) Math.random(), 5);
|
||||
}
|
||||
if(expectedState)
|
||||
for(int i = 0; i < 4; i++)
|
||||
Botania.proxy.sparkleFX(getWorld(), pos.getX() + Math.random(), pos.getY() + Math.random(), pos.getZ() + Math.random(), 1F, 0.2F, 0.2F, 0.7F + 0.5F * (float) Math.random(), 5);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -36,6 +36,9 @@ public class TileTurntable extends TileMod {
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
if (worldObj.isRemote)
|
||||
return;
|
||||
|
||||
boolean redstone = false;
|
||||
|
||||
for(EnumFacing dir : EnumFacing.VALUES) {
|
||||
|
||||
Reference in new issue
Block a user