mirror of
https://github.com/GTNewHorizons/Electro-Magic-Tools.git
synced 2026-11-21 12:32:12 +00:00
Cleanup and some changes...
This commit is contained in:
1 parent
a39ac3bd74
commit
7b6ec78cd7
125 files changed
+971
-955
No files matched your search
@@ -0,0 +1,100 @@
|
||||
package emt.block;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import emt.ModInformation;
|
||||
import emt.tile.TileElectricCloud;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.particle.EffectRenderer;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import thaumcraft.client.fx.ParticleEngine;
|
||||
import thaumcraft.client.fx.particles.FXSparkle;
|
||||
import thaumcraft.client.fx.particles.FXWisp;
|
||||
import thaumcraft.common.Thaumcraft;
|
||||
import thaumcraft.common.lib.world.ThaumcraftWorldGenerator;
|
||||
import thaumcraft.common.tiles.TileNitor;
|
||||
|
||||
public class BlockElectricCloud extends BlockBase {
|
||||
public IIcon icon;
|
||||
|
||||
public BlockElectricCloud(String unlocName) {
|
||||
super(unlocName, Material.cloth, soundTypeCloth, 0.1f);
|
||||
setBlockBounds(0.3f, 0.3f, 0.3f, 0.7f, 0.7f, 0.7f);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void randomDisplayTick(World world, int x, int y, int z, Random rnd) {
|
||||
FXSparkle ef = new FXSparkle(world, x + 0.5F, y + 0.5F, z + 0.5F, x + 0.5F + (rnd.nextFloat() - rnd.nextFloat()) / 3.0F, y + 0.5F + (rnd.nextFloat() - rnd.nextFloat()) / 3.0F, z + 0.5F + (rnd.nextFloat() - rnd.nextFloat()) / 3.0F, 1.0F, 6, 3);
|
||||
ef.setGravity(0.05F);
|
||||
ParticleEngine.instance.addEffect(world, ef);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createTileEntity(World world, int metadata) {
|
||||
return new TileElectricCloud();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName() {
|
||||
return "tile.EMT." + super.getUnlocalizedName().substring(15);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerBlockIcons(IIconRegister ir) {
|
||||
icon = ir.registerIcon(ModInformation.texturePath + ":empty");
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIcon(int side, int meta) {
|
||||
return icon;
|
||||
}
|
||||
|
||||
public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int x, int y, int z) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getLightValue() {
|
||||
return 15;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isAir(IBlockAccess world, int x, int y, int z) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasTileEntity() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasTileEntity(int metadata) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderType() {
|
||||
return -1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean renderAsNormalBlock() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user