mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
Got rid of functionality for legacy rad absorber
This commit is contained in:
parent
1e4346a54b
commit
f089578ba7
@ -2333,10 +2333,10 @@ public class ModBlocks {
|
|||||||
vacuum = new BlockVacuum().setBlockName("vacuum").setResistance(1000000F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":vacuum");
|
vacuum = new BlockVacuum().setBlockName("vacuum").setResistance(1000000F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":vacuum");
|
||||||
|
|
||||||
// OLD ABSORBERS
|
// OLD ABSORBERS
|
||||||
absorber = new BlockAbsorberOLD(Material.iron, 2.5F).setBlockName("absorber").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":absorber");
|
absorber = new BlockAbsorberOLD(Material.iron).setBlockName("absorber").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":absorber");
|
||||||
absorber_red = new BlockAbsorberOLD(Material.iron, 10F).setBlockName("absorber_red").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":absorber_red");
|
absorber_red = new BlockAbsorberOLD(Material.iron).setBlockName("absorber_red").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":absorber_red");
|
||||||
absorber_green = new BlockAbsorberOLD(Material.iron, 100F).setBlockName("absorber_green").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":absorber_green");
|
absorber_green = new BlockAbsorberOLD(Material.iron).setBlockName("absorber_green").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":absorber_green");
|
||||||
absorber_pink = new BlockAbsorberOLD(Material.iron, 10000F).setBlockName("absorber_pink").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":absorber_pink");
|
absorber_pink = new BlockAbsorberOLD(Material.iron).setBlockName("absorber_pink").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":absorber_pink");
|
||||||
|
|
||||||
//NEW ABSORBER
|
//NEW ABSORBER
|
||||||
rad_absorber = new BlockAbsorber(Material.iron).setBlockName("rad_absorber").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
|
rad_absorber = new BlockAbsorber(Material.iron).setBlockName("rad_absorber").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
|
||||||
|
|||||||
@ -1,40 +1,12 @@
|
|||||||
package com.hbm.blocks.generic;
|
package com.hbm.blocks.generic;
|
||||||
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
import com.hbm.handler.radiation.ChunkRadiationManager;
|
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.world.World;
|
|
||||||
|
|
||||||
public class BlockAbsorberOLD extends Block {
|
public class BlockAbsorberOLD extends Block {
|
||||||
|
|
||||||
float absorb = 0;
|
public BlockAbsorberOLD(Material mat) {
|
||||||
|
|
||||||
public BlockAbsorberOLD(Material mat, float ab) {
|
|
||||||
super(mat);
|
super(mat);
|
||||||
this.setTickRandomly(true);
|
|
||||||
absorb = ab;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int tickRate(World world) {
|
|
||||||
|
|
||||||
return 10;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void updateTick(World world, int x, int y, int z, Random rand) {
|
|
||||||
|
|
||||||
ChunkRadiationManager.proxy.decrementRad(world, x, y, z, absorb);
|
|
||||||
world.scheduleBlockUpdate(x, y, z, this, this.tickRate(world));
|
|
||||||
}
|
|
||||||
|
|
||||||
public void onBlockAdded(World world, int x, int y, int z) {
|
|
||||||
super.onBlockAdded(world, x, y, z);
|
|
||||||
|
|
||||||
world.scheduleBlockUpdate(x, y, z, this, this.tickRate(world));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user