mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-17 10:55:17 +00:00
muh polish
This commit is contained in:
1 parent
46d3ffc902
commit
e5d2500374
6 files changed
+71
-37
No files matched your search
@@ -39,7 +39,7 @@ public class SubTileEndoflame extends SubTileGenerating {
|
||||
|
||||
if(linkedCollector != null) {
|
||||
if(burnTime == 0) {
|
||||
if(mana < getMaxMana() && !supertile.getWorldObj().isRemote) {
|
||||
if(mana < getMaxMana()) {
|
||||
boolean didSomething = false;
|
||||
|
||||
List<EntityItem> items = supertile.getWorldObj().getEntitiesWithinAABB(EntityItem.class, AxisAlignedBB.getBoundingBox(supertile.xCoord - RANGE, supertile.yCoord - RANGE, supertile.zCoord - RANGE, supertile.xCoord + RANGE + 1, supertile.yCoord + RANGE + 1, supertile.zCoord + RANGE + 1));
|
||||
@@ -53,13 +53,19 @@ public class SubTileEndoflame extends SubTileGenerating {
|
||||
if(burnTime > 0 && stack.stackSize > 0) {
|
||||
this.burnTime = Math.min(FUEL_CAP, burnTime) / 2;
|
||||
|
||||
stack.stackSize--;
|
||||
supertile.getWorldObj().playSoundEffect(supertile.xCoord, supertile.yCoord, supertile.zCoord, "botania:endoflame", 0.2F, 1F);
|
||||
if(!supertile.getWorldObj().isRemote) {
|
||||
stack.stackSize--;
|
||||
supertile.getWorldObj().playSoundEffect(supertile.xCoord, supertile.yCoord, supertile.zCoord, "botania:endoflame", 0.2F, 1F);
|
||||
|
||||
if(stack.stackSize == 0)
|
||||
item.setDead();
|
||||
if(stack.stackSize == 0)
|
||||
item.setDead();
|
||||
|
||||
didSomething = true;
|
||||
} else {
|
||||
item.worldObj.spawnParticle("largesmoke", item.posX, item.posY + 0.1, item.posZ, 0.0D, 0.0D, 0.0D);
|
||||
item.worldObj.spawnParticle("flame", item.posX, item.posY, item.posZ, 0.0D, 0.0D, 0.0D);
|
||||
}
|
||||
|
||||
didSomething = true;
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -70,8 +76,8 @@ public class SubTileEndoflame extends SubTileGenerating {
|
||||
sync();
|
||||
}
|
||||
} else {
|
||||
if(supertile.getWorldObj().rand.nextInt(8) == 0)
|
||||
Botania.proxy.wispFX(supertile.getWorldObj(), supertile.xCoord + 0.55 + Math.random() * 0.2 - 0.1, supertile.yCoord + 0.55 + Math.random() * 0.2 - 0.1, supertile.zCoord + 0.5, 0.7F, 0.05F, 0.05F, (float) Math.random() / 6, (float) -Math.random() / 60);
|
||||
if(supertile.getWorldObj().rand.nextInt(10) == 0)
|
||||
supertile.getWorldObj().spawnParticle("flame", supertile.xCoord + 0.4 + Math.random() * 0.2, supertile.yCoord + 0.65, supertile.zCoord + 0.4 + Math.random() * 0.2, 0.0D, 0.0D, 0.0D);
|
||||
|
||||
burnTime--;
|
||||
}
|
||||
|
||||
+20
-9
@@ -13,6 +13,7 @@ package vazkii.botania.common.block.subtile.generating;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemFood;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
@@ -42,21 +43,31 @@ public class SubTileGourmaryllis extends SubTileGenerating {
|
||||
sync();
|
||||
}
|
||||
|
||||
if(!supertile.getWorldObj().isRemote) {
|
||||
List<EntityItem> items = supertile.getWorldObj().getEntitiesWithinAABB(EntityItem.class, AxisAlignedBB.getBoundingBox(supertile.xCoord - RANGE, supertile.yCoord - RANGE, supertile.zCoord - RANGE, supertile.xCoord + RANGE + 1, supertile.yCoord + RANGE + 1, supertile.zCoord + RANGE + 1));
|
||||
for(EntityItem item : items) {
|
||||
ItemStack stack = item.getEntityItem();
|
||||
if(stack != null && stack.getItem() instanceof ItemFood && !item.isDead) {
|
||||
if(cooldown == 0) {
|
||||
boolean remote = supertile.getWorldObj().isRemote;
|
||||
List<EntityItem> items = supertile.getWorldObj().getEntitiesWithinAABB(EntityItem.class, AxisAlignedBB.getBoundingBox(supertile.xCoord - RANGE, supertile.yCoord - RANGE, supertile.zCoord - RANGE, supertile.xCoord + RANGE + 1, supertile.yCoord + RANGE + 1, supertile.zCoord + RANGE + 1));
|
||||
for(EntityItem item : items) {
|
||||
ItemStack stack = item.getEntityItem();
|
||||
if(stack != null && stack.getItem() instanceof ItemFood && !item.isDead) {
|
||||
if(cooldown == 0) {
|
||||
if(!remote) {
|
||||
int val = ((ItemFood) stack.getItem()).func_150905_g(stack);
|
||||
storedMana = val * val * 64;
|
||||
cooldown = val * 10;
|
||||
supertile.getWorldObj().playSoundEffect(supertile.xCoord, supertile.yCoord, supertile.zCoord, "random.eat", 0.2F, 0.5F + (float) Math.random() * 0.5F);
|
||||
sync();
|
||||
}
|
||||
|
||||
item.setDead();
|
||||
} else
|
||||
for(int i = 0; i < 10; i++) {
|
||||
float m = 0.2F;
|
||||
float mx = (float) (Math.random() - 0.5) * m;
|
||||
float my = (float) (Math.random() - 0.5) * m;
|
||||
float mz = (float) (Math.random() - 0.5) * m;
|
||||
supertile.getWorldObj().spawnParticle("iconcrack_" + Item.getIdFromItem(stack.getItem()), item.posX, item.posY, item.posZ, mx, my, mz);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(!remote)
|
||||
item.setDead();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+20
-10
@@ -43,21 +43,31 @@ public class SubTileSpectrolus extends SubTileGenerating {
|
||||
public void onUpdate() {
|
||||
super.onUpdate();
|
||||
|
||||
if(!supertile.getWorldObj().isRemote) {
|
||||
Item wool = Item.getItemFromBlock(Blocks.wool);
|
||||
List<EntityItem> items = supertile.getWorldObj().getEntitiesWithinAABB(EntityItem.class, AxisAlignedBB.getBoundingBox(supertile.xCoord - RANGE, supertile.yCoord - RANGE, supertile.zCoord - RANGE, supertile.xCoord + RANGE + 1, supertile.yCoord + RANGE + 1, supertile.zCoord + RANGE + 1));
|
||||
for(EntityItem item : items) {
|
||||
ItemStack stack = item.getEntityItem();
|
||||
if(stack != null && stack.getItem() == wool) {
|
||||
int meta = stack.getItemDamage();
|
||||
if(meta == nextColor) {
|
||||
boolean remote = supertile.getWorldObj().isRemote;
|
||||
Item wool = Item.getItemFromBlock(Blocks.wool);
|
||||
List<EntityItem> items = supertile.getWorldObj().getEntitiesWithinAABB(EntityItem.class, AxisAlignedBB.getBoundingBox(supertile.xCoord - RANGE, supertile.yCoord - RANGE, supertile.zCoord - RANGE, supertile.xCoord + RANGE + 1, supertile.yCoord + RANGE + 1, supertile.zCoord + RANGE + 1));
|
||||
for(EntityItem item : items) {
|
||||
ItemStack stack = item.getEntityItem();
|
||||
if(stack != null && stack.getItem() == wool) {
|
||||
int meta = stack.getItemDamage();
|
||||
if(meta == nextColor) {
|
||||
if(!remote) {
|
||||
mana = Math.min(getMaxMana(), mana + 300);
|
||||
nextColor = nextColor == 15 ? 0 : nextColor + 1;
|
||||
|
||||
sync();
|
||||
}
|
||||
item.setDead();
|
||||
|
||||
for(int i = 0; i < 10; i++) {
|
||||
float m = 0.2F;
|
||||
float mx = (float) (Math.random() - 0.5) * m;
|
||||
float my = (float) (Math.random() - 0.5) * m;
|
||||
float mz = (float) (Math.random() - 0.5) * m;
|
||||
supertile.getWorldObj().spawnParticle("blockcrack_" + Item.getIdFromItem(stack.getItem()) + "_" + meta, item.posX, item.posY, item.posZ, mx, my, mz);
|
||||
}
|
||||
}
|
||||
|
||||
if(!remote)
|
||||
item.setDead();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,9 +24,6 @@ public class TileEnderEye extends TileMod {
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
if(worldObj.isRemote)
|
||||
return;
|
||||
|
||||
int meta = getBlockMetadata();
|
||||
int range = 80;
|
||||
List<EntityPlayer> players = worldObj.getEntitiesWithinAABB(EntityPlayer.class, AxisAlignedBB.getBoundingBox(xCoord - range, yCoord - range, zCoord - range, xCoord + range, yCoord + range, zCoord + range));
|
||||
@@ -45,8 +42,16 @@ public class TileEnderEye extends TileMod {
|
||||
}
|
||||
|
||||
int newMeta = looking ? 15 : 0;
|
||||
if(newMeta != meta)
|
||||
if(newMeta != meta && !worldObj.isRemote)
|
||||
worldObj.setBlockMetadataWithNotify(xCoord, yCoord, zCoord, newMeta, 1 | 2);
|
||||
|
||||
if(looking) {
|
||||
double x = xCoord - 0.1 + Math.random() * 1.2;
|
||||
double y = yCoord - 0.1 + Math.random() * 1.2;
|
||||
double z = zCoord - 0.1 + Math.random() * 1.2;
|
||||
|
||||
worldObj.spawnParticle("reddust", x, y, z, 1, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -51,6 +51,8 @@ public class TilePump extends TileMod {
|
||||
if(innerRingPos >= max) {
|
||||
innerRingPos = Math.min(max, innerRingPos);
|
||||
moving = 0F;
|
||||
for(int x = 0; x < 2; x++)
|
||||
worldObj.spawnParticle("explode", xCoord + Math.random(), yCoord + Math.random(), zCoord + Math.random(), 0, 0, 0);
|
||||
}
|
||||
} else if(innerRingPos > min) {
|
||||
innerRingPos -= incr * 2;
|
||||
|
||||
@@ -15,6 +15,7 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.World;
|
||||
import vazkii.botania.common.block.subtile.functional.SubTileSpectranthemum;
|
||||
import vazkii.botania.common.lib.LibItemNames;
|
||||
|
||||
public class ItemOpenBucket extends ItemMod {
|
||||
@@ -45,13 +46,12 @@ public class ItemOpenBucket extends ItemMod {
|
||||
Material material = par2World.getBlock(i, j, k).getMaterial();
|
||||
int l = par2World.getBlockMetadata(i, j, k);
|
||||
|
||||
if(material == Material.water && l == 0) {
|
||||
par2World.setBlockToAir(i, j, k);
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
if(material == Material.lava && l == 0) {
|
||||
if((material == Material.lava || material == Material.water) && l == 0) {
|
||||
par2World.setBlockToAir(i, j, k);
|
||||
|
||||
for(int x = 0; x < 5; x++)
|
||||
par2World.spawnParticle("explode", i + Math.random(), j + Math.random(), k + Math.random(), 0, 0, 0);
|
||||
|
||||
return par1ItemStack;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user