mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
cloud residue
This commit is contained in:
parent
33d4876767
commit
5472e71892
@ -1720,6 +1720,7 @@ tile.crystal_hardened.name=Gehärteter Dunkler Kristall
|
||||
tile.crystal_pulsar.name=Pulsating Crystal
|
||||
|
||||
tile.taint.name=Korrupter Schmutz
|
||||
tile.residue.name=Wolkenrückstände
|
||||
|
||||
tile.cheater_virus.name=Geliertes Euphemium
|
||||
tile.cheater_virus_seed.name=Instabiler Euphemiumschrabid-Block
|
||||
|
||||
@ -1720,6 +1720,7 @@ tile.crystal_hardened.name=Hardened Dark Crystal
|
||||
tile.crystal_pulsar.name=Pulsating Crystal
|
||||
|
||||
tile.taint.name=Taint
|
||||
tile.residue.name=Cloud Residue
|
||||
|
||||
tile.cheater_virus.name=Gelid Euphemium
|
||||
tile.cheater_virus_seed.name=Unstable Euphemium Schrabide Block
|
||||
|
||||
BIN
assets/hbm/textures/blocks/residue.png
Normal file
BIN
assets/hbm/textures/blocks/residue.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 757 B |
@ -493,6 +493,7 @@ public class ModBlocks {
|
||||
public static Block crystal_hardened;
|
||||
public static Block crystal_pulsar;
|
||||
public static Block taint;
|
||||
public static Block residue;
|
||||
|
||||
public static Block vent_chlorine;
|
||||
public static Block vent_cloud;
|
||||
@ -910,6 +911,7 @@ public class ModBlocks {
|
||||
crystal_hardened = new BlockGeneric(Material.iron).setBlockName("crystal_hardened").setHardness(15.0F).setResistance(Float.POSITIVE_INFINITY).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":crystal_hardened");
|
||||
crystal_pulsar = new CrystalPulsar(Material.iron).setBlockName("crystal_pulsar").setHardness(15.0F).setResistance(Float.POSITIVE_INFINITY).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":crystal_pulsar");
|
||||
taint = new BlockTaint(Material.iron).setBlockName("taint").setHardness(15.0F).setResistance(10.0F).setCreativeTab(null);
|
||||
residue = new BlockCloudResidue(Material.iron).setBlockName("residue").setHardness(15.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":residue");
|
||||
|
||||
vent_chlorine = new BlockVent(Material.iron).setBlockName("vent_chlorine").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":vent_chlorine");
|
||||
vent_cloud = new BlockVent(Material.iron).setBlockName("vent_cloud").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":vent_cloud");
|
||||
@ -1393,6 +1395,7 @@ public class ModBlocks {
|
||||
GameRegistry.registerBlock(crystal_hardened, crystal_hardened.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(crystal_pulsar, crystal_pulsar.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(taint, ItemTaintBlock.class, taint.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(residue, residue.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(cheater_virus, cheater_virus.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(cheater_virus_seed, cheater_virus_seed.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(ntm_dirt, ntm_dirt.getUnlocalizedName());
|
||||
|
||||
96
com/hbm/blocks/bomb/BlockCloudResidue.java
Normal file
96
com/hbm/blocks/bomb/BlockCloudResidue.java
Normal file
@ -0,0 +1,96 @@
|
||||
package com.hbm.blocks.bomb;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.MapColor;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class BlockCloudResidue extends Block {
|
||||
|
||||
public BlockCloudResidue(Material p_i45386_1_) {
|
||||
super(p_i45386_1_);
|
||||
}
|
||||
|
||||
public static int func_150032_b(int p_150032_0_)
|
||||
{
|
||||
return func_150031_c(p_150032_0_);
|
||||
}
|
||||
|
||||
public static int func_150031_c(int p_150031_0_)
|
||||
{
|
||||
return p_150031_0_ & 15;
|
||||
}
|
||||
|
||||
public MapColor getMapColor(int p_149728_1_)
|
||||
{
|
||||
return MapColor.redColor;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderType(){
|
||||
return 334077;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean renderAsNormalBlock() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public void onNeighborBlockChange(World world, int x, int y, int z, Block b)
|
||||
{
|
||||
if(!hasPosNeightbour(world, x, y, z) && !world.isRemote)
|
||||
world.setBlockToAir(x, y, z);
|
||||
}
|
||||
|
||||
public static boolean hasPosNeightbour(World world, int x, int y, int z) {
|
||||
Block b0 = world.getBlock(x + 1, y, z);
|
||||
Block b1 = world.getBlock(x, y + 1, z);
|
||||
Block b2 = world.getBlock(x, y, z + 1);
|
||||
Block b3 = world.getBlock(x - 1, y, z);
|
||||
Block b4 = world.getBlock(x, y - 1, z);
|
||||
Block b5 = world.getBlock(x, y, z - 1);
|
||||
boolean b = (b0.renderAsNormalBlock() && b0.getMaterial().isOpaque()) ||
|
||||
(b1.renderAsNormalBlock() && b1.getMaterial().isOpaque()) ||
|
||||
(b2.renderAsNormalBlock() && b2.getMaterial().isOpaque()) ||
|
||||
(b3.renderAsNormalBlock() && b3.getMaterial().isOpaque()) ||
|
||||
(b4.renderAsNormalBlock() && b4.getMaterial().isOpaque()) ||
|
||||
(b5.renderAsNormalBlock() && b5.getMaterial().isOpaque());
|
||||
return b;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getCollisionBoundingBoxFromPool(World par1World, int par2, int par3, int par4)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getSelectedBoundingBoxFromPool(World par1World, int par2, int par3, int par4)
|
||||
{
|
||||
return AxisAlignedBB.getBoundingBox(par2, par3, par4, par2, par3, par4);
|
||||
}
|
||||
}
|
||||
@ -119,6 +119,8 @@ public class BlockCrate extends BlockFalling {
|
||||
BlockCrate.addToListWithWeight(weaponList, ModItems.gun_mp40, 9);
|
||||
BlockCrate.addToListWithWeight(weaponList, ModItems.gun_uzi, 6);
|
||||
BlockCrate.addToListWithWeight(weaponList, ModItems.gun_uzi_silencer, 5);
|
||||
BlockCrate.addToListWithWeight(weaponList, ModItems.gun_uzi_saturnite, 4);
|
||||
BlockCrate.addToListWithWeight(weaponList, ModItems.gun_uzi_saturnite_silencer, 3);
|
||||
BlockCrate.addToListWithWeight(weaponList, ModItems.gun_uboinik, 8);
|
||||
BlockCrate.addToListWithWeight(weaponList, ModItems.gun_lever_action, 7);
|
||||
BlockCrate.addToListWithWeight(weaponList, ModItems.gun_lever_action_dark, 6);
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
package com.hbm.entity.particle;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.blocks.bomb.BlockCloudResidue;
|
||||
import com.hbm.explosion.ExplosionChaos;
|
||||
|
||||
import net.minecraft.util.MathHelper;
|
||||
@ -75,8 +77,13 @@ public class EntityCloudFX extends EntityModFX {
|
||||
|
||||
if (worldObj.getBlock((int) posX, (int) posY, (int) posZ).isNormalCube()) {
|
||||
|
||||
if(rand.nextInt(5) != 0)
|
||||
if(rand.nextInt(5) != 0) {
|
||||
this.setDead();
|
||||
|
||||
if(BlockCloudResidue.hasPosNeightbour(worldObj, (int) (posX - motionX/subdivisions), (int) (posY - motionY/subdivisions), (int) (posZ - motionZ/subdivisions)) && worldObj.getBlock((int) (posX - motionX/subdivisions), (int) (posY - motionY/subdivisions), (int) (posZ - motionZ/subdivisions)).isReplaceable(worldObj, (int) (posX - motionX/subdivisions), (int) (posY - motionY/subdivisions), (int) (posZ - motionZ/subdivisions))) {
|
||||
worldObj.setBlock((int) (posX - motionX/subdivisions), (int) (posY - motionY/subdivisions), (int) (posZ - motionZ/subdivisions), ModBlocks.residue);
|
||||
}
|
||||
}
|
||||
|
||||
this.posX -= this.motionX/subdivisions;
|
||||
this.posY -= this.motionY/subdivisions;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user