mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-02-24 15:00:48 +00:00
better afterburn mechanics
This commit is contained in:
parent
55bced3b3e
commit
a37dd9e639
@ -45,6 +45,8 @@
|
|||||||
* Ore dict recipe autogen for crucible molds now prioritizes NTM's own items over any other ore dict compatible item
|
* Ore dict recipe autogen for crucible molds now prioritizes NTM's own items over any other ore dict compatible item
|
||||||
* If a cracking tower's input is set to an incorrect type, the input and steam tanks are now preserved instead of being set to NONE
|
* If a cracking tower's input is set to an incorrect type, the input and steam tanks are now preserved instead of being set to NONE
|
||||||
* Removed legacy wire items
|
* Removed legacy wire items
|
||||||
|
* Removed random ore, along with its configs
|
||||||
|
* DFC emitters are now only 95% efficient instead of 98%
|
||||||
|
|
||||||
## Fixed
|
## Fixed
|
||||||
* The conveyor grabber should no longer skip over items when used in long lines
|
* The conveyor grabber should no longer skip over items when used in long lines
|
||||||
@ -59,3 +61,4 @@
|
|||||||
* Fixed a bug regarding shift clicking in the breeding reactor
|
* Fixed a bug regarding shift clicking in the breeding reactor
|
||||||
* Fixed empty particle capsules not being extractable from the ICF pellet maker
|
* Fixed empty particle capsules not being extractable from the ICF pellet maker
|
||||||
* Fixed issue regarding mass storage filters when using GTNH-NEI
|
* Fixed issue regarding mass storage filters when using GTNH-NEI
|
||||||
|
* Fixed DFC emitters calculating their original 98% inefficiency twice when hitting another emitter or tungsten crate
|
||||||
|
|||||||
@ -8,7 +8,6 @@ import com.hbm.blocks.fluid.*;
|
|||||||
import com.hbm.blocks.gas.*;
|
import com.hbm.blocks.gas.*;
|
||||||
import com.hbm.blocks.generic.*;
|
import com.hbm.blocks.generic.*;
|
||||||
import com.hbm.blocks.generic.BlockHazard.ExtDisplayEffect;
|
import com.hbm.blocks.generic.BlockHazard.ExtDisplayEffect;
|
||||||
import com.hbm.blocks.generic.BlockMotherOfAllOres.ItemRandomOreBlock;
|
|
||||||
import com.hbm.blocks.machine.*;
|
import com.hbm.blocks.machine.*;
|
||||||
import com.hbm.blocks.machine.pile.*;
|
import com.hbm.blocks.machine.pile.*;
|
||||||
import com.hbm.blocks.machine.rbmk.*;
|
import com.hbm.blocks.machine.rbmk.*;
|
||||||
@ -72,7 +71,6 @@ public class ModBlocks {
|
|||||||
public static Block ore_coltan;
|
public static Block ore_coltan;
|
||||||
public static Block ore_alexandrite;
|
public static Block ore_alexandrite;
|
||||||
|
|
||||||
public static Block ore_random;
|
|
||||||
public static Block ore_bedrock;
|
public static Block ore_bedrock;
|
||||||
public static Block ore_volcano;
|
public static Block ore_volcano;
|
||||||
|
|
||||||
@ -1283,7 +1281,6 @@ public class ModBlocks {
|
|||||||
|
|
||||||
stone_keyhole = new BlockKeyhole().setBlockName("stone_keyhole").setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":stone_keyhole");
|
stone_keyhole = new BlockKeyhole().setBlockName("stone_keyhole").setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":stone_keyhole");
|
||||||
|
|
||||||
ore_random = new BlockMotherOfAllOres().setBlockName("ore_random").setCreativeTab(MainRegistry.blockTab);
|
|
||||||
ore_bedrock = new BlockBedrockOreTE().setBlockName("ore_bedrock").setCreativeTab(null);
|
ore_bedrock = new BlockBedrockOreTE().setBlockName("ore_bedrock").setCreativeTab(null);
|
||||||
ore_volcano = new BlockFissure().setBlockName("ore_volcano").setLightLevel(1F).setCreativeTab(MainRegistry.blockTab);
|
ore_volcano = new BlockFissure().setBlockName("ore_volcano").setLightLevel(1F).setCreativeTab(MainRegistry.blockTab);
|
||||||
|
|
||||||
@ -2422,9 +2419,6 @@ public class ModBlocks {
|
|||||||
//End Ores
|
//End Ores
|
||||||
GameRegistry.registerBlock(ore_tikite, ore_tikite.getUnlocalizedName());
|
GameRegistry.registerBlock(ore_tikite, ore_tikite.getUnlocalizedName());
|
||||||
|
|
||||||
//It's a meme you dip
|
|
||||||
GameRegistry.registerBlock(ore_random, ItemRandomOreBlock.class, ore_random.getUnlocalizedName());
|
|
||||||
|
|
||||||
//Bedrock ore
|
//Bedrock ore
|
||||||
register(ore_bedrock);
|
register(ore_bedrock);
|
||||||
register(ore_volcano);
|
register(ore_volcano);
|
||||||
|
|||||||
@ -1,319 +0,0 @@
|
|||||||
package com.hbm.blocks.generic;
|
|
||||||
|
|
||||||
import java.awt.Color;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.HashSet;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
import com.google.common.collect.HashBiMap;
|
|
||||||
import com.hbm.blocks.IBlockMultiPass;
|
|
||||||
import com.hbm.config.WorldConfig;
|
|
||||||
import com.hbm.inventory.RecipesCommon.ComparableStack;
|
|
||||||
import com.hbm.items.ModItems;
|
|
||||||
import com.hbm.lib.RefStrings;
|
|
||||||
import com.hbm.render.block.RenderBlockMultipass;
|
|
||||||
import com.hbm.util.ColorUtil;
|
|
||||||
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
|
||||||
import net.minecraft.block.Block;
|
|
||||||
import net.minecraft.block.BlockContainer;
|
|
||||||
import net.minecraft.block.material.Material;
|
|
||||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
|
||||||
import net.minecraft.creativetab.CreativeTabs;
|
|
||||||
import net.minecraft.entity.EntityLivingBase;
|
|
||||||
import net.minecraft.init.Blocks;
|
|
||||||
import net.minecraft.item.Item;
|
|
||||||
import net.minecraft.item.ItemBlock;
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
|
||||||
import net.minecraft.network.NetworkManager;
|
|
||||||
import net.minecraft.network.Packet;
|
|
||||||
import net.minecraft.network.play.server.S35PacketUpdateTileEntity;
|
|
||||||
import net.minecraft.tileentity.TileEntity;
|
|
||||||
import net.minecraft.util.IIcon;
|
|
||||||
import net.minecraft.util.MovingObjectPosition;
|
|
||||||
import net.minecraft.util.StatCollector;
|
|
||||||
import net.minecraft.world.IBlockAccess;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
import net.minecraftforge.oredict.OreDictionary;
|
|
||||||
|
|
||||||
public class BlockMotherOfAllOres extends BlockContainer implements IBlockMultiPass {
|
|
||||||
|
|
||||||
public static int override = -1;
|
|
||||||
|
|
||||||
public static void shuffleOverride(Random rand) {
|
|
||||||
override = rand.nextInt(uniqueItems.size());
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void resetOverride() {
|
|
||||||
override = -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
public BlockMotherOfAllOres() {
|
|
||||||
super(Material.rock);
|
|
||||||
this.setBlockTextureName("stone");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public TileEntity createNewTileEntity(World world, int meta) {
|
|
||||||
return new TileEntityRandomOre();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
@SideOnly(Side.CLIENT)
|
|
||||||
public void getSubBlocks(Item item, CreativeTabs tab, List list) {
|
|
||||||
|
|
||||||
for(int i = 0; i < uniqueItems.size(); i++)
|
|
||||||
list.add(new ItemStack(item, 1, i));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public ItemStack getPickBlock(MovingObjectPosition target, World world, int x, int y, int z) {
|
|
||||||
|
|
||||||
TileEntity te = world.getTileEntity(x, y, z);
|
|
||||||
|
|
||||||
if(te instanceof TileEntityRandomOre) {
|
|
||||||
TileEntityRandomOre ore = (TileEntityRandomOre) te;
|
|
||||||
return new ItemStack(this, 1, ore.getStackId());
|
|
||||||
}
|
|
||||||
|
|
||||||
return new ItemStack(ModItems.nothing);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public ArrayList<ItemStack> getDrops(World world, int x, int y, int z, int metadata, int fortune) {
|
|
||||||
ArrayList<ItemStack> ret = new ArrayList<ItemStack>();
|
|
||||||
|
|
||||||
if(fortune == 0xFECE00) {
|
|
||||||
TileEntity te = world.getTileEntity(x, y, z);
|
|
||||||
|
|
||||||
if(te instanceof TileEntityRandomOre) {
|
|
||||||
TileEntityRandomOre ore = (TileEntityRandomOre) te;
|
|
||||||
ComparableStack item = ore.getCompStack();
|
|
||||||
ret.add(item.toStack());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void breakBlock(World world, int x, int y, int z, Block block, int meta) {
|
|
||||||
this.dropBlockAsItemWithChance(world, x, y, z, meta, 1, 0xFECE00);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase entity, ItemStack stack) {
|
|
||||||
((TileEntityRandomOre)world.getTileEntity(x, y, z)).setItem(stack.getItemDamage());
|
|
||||||
world.markBlockForUpdate(x, y, z);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int getRenderType(){
|
|
||||||
return IBlockMultiPass.getRenderType();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int getPasses() {
|
|
||||||
return 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
private IIcon[] overlays = new IIcon[10];
|
|
||||||
|
|
||||||
@Override
|
|
||||||
@SideOnly(Side.CLIENT)
|
|
||||||
public void registerBlockIcons(IIconRegister reg) {
|
|
||||||
|
|
||||||
this.blockIcon = reg.registerIcon("stone");
|
|
||||||
for(int i = 0; i < overlays.length; i++) {
|
|
||||||
overlays[i] = reg.registerIcon(RefStrings.MODID + ":ore_random_" + (i + 1));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
@SideOnly(Side.CLIENT)
|
|
||||||
public IIcon getIcon(IBlockAccess world, int x, int y, int z, int side) {
|
|
||||||
|
|
||||||
if(RenderBlockMultipass.currentPass == 0)
|
|
||||||
return Blocks.stone.getIcon(0, 0);
|
|
||||||
|
|
||||||
TileEntity te = world.getTileEntity(x, y, z);
|
|
||||||
|
|
||||||
if(te instanceof TileEntityRandomOre) {
|
|
||||||
TileEntityRandomOre ore = (TileEntityRandomOre) te;
|
|
||||||
int index = ore.getStackId() % overlays.length;
|
|
||||||
return overlays[index];
|
|
||||||
}
|
|
||||||
|
|
||||||
return Blocks.stone.getIcon(0, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
|
||||||
public IIcon getIcon(int side, int meta) {
|
|
||||||
|
|
||||||
if(RenderBlockMultipass.currentPass == 0)
|
|
||||||
return Blocks.stone.getIcon(0, 0);
|
|
||||||
|
|
||||||
int index = meta % overlays.length;
|
|
||||||
return overlays[index];
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
@SideOnly(Side.CLIENT)
|
|
||||||
public int colorMultiplier(IBlockAccess world, int x, int y, int z) {
|
|
||||||
|
|
||||||
if(RenderBlockMultipass.currentPass == 0)
|
|
||||||
return 0xffffff;
|
|
||||||
|
|
||||||
TileEntity te = world.getTileEntity(x, y, z);
|
|
||||||
|
|
||||||
if(te instanceof TileEntityRandomOre) {
|
|
||||||
TileEntityRandomOre ore = (TileEntityRandomOre) te;
|
|
||||||
ItemStack stack = ore.getStack();
|
|
||||||
int color = ColorUtil.getAverageColorFromStack(stack);
|
|
||||||
color = ColorUtil.amplifyColor(color);
|
|
||||||
|
|
||||||
Color col = new Color(color);
|
|
||||||
int r = col.getRed();
|
|
||||||
int g = col.getGreen();
|
|
||||||
int b = col.getBlue();
|
|
||||||
|
|
||||||
float[] hsb = new Color(color).RGBtoHSB(r, g, b, new float[3]);
|
|
||||||
|
|
||||||
if(hsb[1] > 0F && hsb[1] < 0.75F)
|
|
||||||
hsb[1] = 0.75F;
|
|
||||||
|
|
||||||
color = Color.HSBtoRGB(hsb[0], hsb[1], hsb[2]);
|
|
||||||
|
|
||||||
return color;
|
|
||||||
}
|
|
||||||
|
|
||||||
return super.colorMultiplier(world, x, y, z);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static class TileEntityRandomOre extends TileEntity {
|
|
||||||
|
|
||||||
private ComparableStack stack;
|
|
||||||
|
|
||||||
public TileEntityRandomOre() {
|
|
||||||
if(override != -1) {
|
|
||||||
setItem(override);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setItem(int id) {
|
|
||||||
ComparableStack comp = itemMap.get(id);
|
|
||||||
this.stack = comp != null ? ((ComparableStack) comp.copy()) : null;
|
|
||||||
|
|
||||||
if(this.worldObj != null)
|
|
||||||
this.worldObj.markTileEntityChunkModified(this.xCoord, this.yCoord, this.zCoord, this);
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getStackId() {
|
|
||||||
return itemMap.inverse().get(getCompStack());
|
|
||||||
}
|
|
||||||
|
|
||||||
public ItemStack getStack() {
|
|
||||||
return getCompStack().toStack();
|
|
||||||
}
|
|
||||||
|
|
||||||
public ComparableStack getCompStack() {
|
|
||||||
|
|
||||||
if(stack == null) {
|
|
||||||
int rand = worldObj.rand.nextInt(uniqueItems.size());
|
|
||||||
stack = (ComparableStack) itemMap.get(rand).copy();
|
|
||||||
this.worldObj.markTileEntityChunkModified(this.xCoord, this.yCoord, this.zCoord, this);
|
|
||||||
}
|
|
||||||
|
|
||||||
return stack != null ? stack : new ComparableStack(ModItems.nothing);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean canUpdate() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void readFromNBT(NBTTagCompound nbt) {
|
|
||||||
super.readFromNBT(nbt);
|
|
||||||
int key = nbt.getInteger("item");
|
|
||||||
this.setItem(key);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void writeToNBT(NBTTagCompound nbt) {
|
|
||||||
super.writeToNBT(nbt);
|
|
||||||
|
|
||||||
try {
|
|
||||||
Integer key = itemMap.inverse().get(getCompStack());
|
|
||||||
nbt.setInteger("item", key != null ? key : 0);
|
|
||||||
} catch(Exception ex) { }
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Packet getDescriptionPacket() {
|
|
||||||
NBTTagCompound nbt = new NBTTagCompound();
|
|
||||||
this.writeToNBT(nbt);
|
|
||||||
return new S35PacketUpdateTileEntity(this.xCoord, this.yCoord, this.zCoord, 0, nbt);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt) {
|
|
||||||
this.readFromNBT(pkt.func_148857_g());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static class ItemRandomOreBlock extends ItemBlock {
|
|
||||||
|
|
||||||
public ItemRandomOreBlock(Block block) {
|
|
||||||
super(block);
|
|
||||||
this.setHasSubtypes(true);
|
|
||||||
this.setMaxDamage(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getItemStackDisplayName(ItemStack stack) {
|
|
||||||
ComparableStack comp = itemMap.get(stack.getItemDamage());
|
|
||||||
ItemStack name = comp != null ? comp.toStack() : new ItemStack(ModItems.nothing);
|
|
||||||
if(name.getItemDamage() == OreDictionary.WILDCARD_VALUE) {
|
|
||||||
name.setItemDamage(0);
|
|
||||||
}
|
|
||||||
return StatCollector.translateToLocalFormatted(this.getUnlocalizedName() + ".name", name.getItem().getItemStackDisplayName(name));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static HashSet<ComparableStack> uniqueItems = new HashSet();
|
|
||||||
public static HashBiMap<Integer, ComparableStack> itemMap = HashBiMap.create();
|
|
||||||
|
|
||||||
public static void init() {
|
|
||||||
|
|
||||||
if(WorldConfig.enableRandom) {
|
|
||||||
for(Object b : Block.blockRegistry.getKeys()) {
|
|
||||||
Block block = Block.getBlockFromName((String) b);
|
|
||||||
if(block != null && Item.getItemFromBlock(block) != null)
|
|
||||||
uniqueItems.add(new ComparableStack(block));
|
|
||||||
}
|
|
||||||
|
|
||||||
for(Object i : Item.itemRegistry.getKeys()) {
|
|
||||||
Item item = (Item) Item.itemRegistry.getObject((String) i);
|
|
||||||
uniqueItems.add(new ComparableStack(item));
|
|
||||||
}
|
|
||||||
|
|
||||||
for(String i : OreDictionary.getOreNames()) {
|
|
||||||
for(ItemStack stack : OreDictionary.getOres(i)) {
|
|
||||||
uniqueItems.add(new ComparableStack(stack));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
uniqueItems.add(new ComparableStack(ModItems.nothing));
|
|
||||||
}
|
|
||||||
|
|
||||||
int i = 0;
|
|
||||||
for(ComparableStack stack : uniqueItems) {
|
|
||||||
itemMap.put(i++, stack);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -76,9 +76,6 @@ public class WorldConfig {
|
|||||||
|
|
||||||
public static int endTikiteSpawn = 8;
|
public static int endTikiteSpawn = 8;
|
||||||
|
|
||||||
public static boolean enableRandom = false;
|
|
||||||
public static int randomSpawn = 0;
|
|
||||||
|
|
||||||
public static int radioStructure = 500;
|
public static int radioStructure = 500;
|
||||||
public static int antennaStructure = 250;
|
public static int antennaStructure = 250;
|
||||||
public static int atomStructure = 500;
|
public static int atomStructure = 500;
|
||||||
@ -198,9 +195,6 @@ public class WorldConfig {
|
|||||||
|
|
||||||
endTikiteSpawn = CommonConfig.createConfigInt(config, CATEGORY_OREGEN, "2.E00_tikiteSpawnrate", "Amount of end trixite per chunk", 8);
|
endTikiteSpawn = CommonConfig.createConfigInt(config, CATEGORY_OREGEN, "2.E00_tikiteSpawnrate", "Amount of end trixite per chunk", 8);
|
||||||
|
|
||||||
enableRandom = CommonConfig.createConfigBool(config, CATEGORY_OREGEN, "2.R00_enableRandomOre", "Amount of random ore per chunk", false);
|
|
||||||
randomSpawn = CommonConfig.createConfigInt(config, CATEGORY_OREGEN, "2.R01_randomOreSpawnrate", "Amount of random ore per chunk", 0);
|
|
||||||
|
|
||||||
final String CATEGORY_DUNGEON = CommonConfig.CATEGORY_DUNGEONS;
|
final String CATEGORY_DUNGEON = CommonConfig.CATEGORY_DUNGEONS;
|
||||||
radioStructure = CommonConfig.createConfigInt(config, CATEGORY_DUNGEON, "4.00_radioSpawn", "Spawn radio station on every nTH chunk", 500);
|
radioStructure = CommonConfig.createConfigInt(config, CATEGORY_DUNGEON, "4.00_radioSpawn", "Spawn radio station on every nTH chunk", 500);
|
||||||
antennaStructure = CommonConfig.createConfigInt(config, CATEGORY_DUNGEON, "4.01_antennaSpawn", "Spawn antenna on every nTH chunk", 250);
|
antennaStructure = CommonConfig.createConfigInt(config, CATEGORY_DUNGEON, "4.01_antennaSpawn", "Spawn antenna on every nTH chunk", 250);
|
||||||
|
|||||||
@ -203,6 +203,7 @@ public class EntityMappings {
|
|||||||
addEntity(EntitySawblade.class, "entity_stray_saw", 1000);
|
addEntity(EntitySawblade.class, "entity_stray_saw", 1000);
|
||||||
addEntity(EntityChemical.class, "entity_chemthrower_splash", 1000);
|
addEntity(EntityChemical.class, "entity_chemthrower_splash", 1000);
|
||||||
addEntity(EntityMist.class, "entity_mist", 250, false);
|
addEntity(EntityMist.class, "entity_mist", 250, false);
|
||||||
|
addEntity(EntityFireLingering.class, "entity_fire_lingering", 250, false);
|
||||||
addEntity(EntityAcidBomb.class, "entity_acid_bomb", 1000);
|
addEntity(EntityAcidBomb.class, "entity_acid_bomb", 1000);
|
||||||
addEntity(EntityFallingBlockNT.class, "entity_falling_block_nt", 1000);
|
addEntity(EntityFallingBlockNT.class, "entity_falling_block_nt", 1000);
|
||||||
addEntity(EntityBoatRubber.class, "entity_rubber_boat", 250, false);
|
addEntity(EntityBoatRubber.class, "entity_rubber_boat", 250, false);
|
||||||
|
|||||||
99
src/main/java/com/hbm/entity/effect/EntityFireLingering.java
Normal file
99
src/main/java/com/hbm/entity/effect/EntityFireLingering.java
Normal file
@ -0,0 +1,99 @@
|
|||||||
|
package com.hbm.entity.effect;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.hbm.extprop.HbmLivingProps;
|
||||||
|
import com.hbm.particle.helper.FlameCreator;
|
||||||
|
|
||||||
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
import net.minecraft.entity.Entity;
|
||||||
|
import net.minecraft.entity.EntityLivingBase;
|
||||||
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
|
import net.minecraft.util.AxisAlignedBB;
|
||||||
|
import net.minecraft.util.MovingObjectPosition;
|
||||||
|
import net.minecraft.util.Vec3;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
public class EntityFireLingering extends Entity {
|
||||||
|
|
||||||
|
public static int TYPE_DIESEL = 0;
|
||||||
|
public static int TYPE_BALEFIRE = 1;
|
||||||
|
public int maxAge = 150;
|
||||||
|
|
||||||
|
public EntityFireLingering(World world) {
|
||||||
|
super(world);
|
||||||
|
}
|
||||||
|
|
||||||
|
public EntityFireLingering setArea(float width, float height) {
|
||||||
|
this.dataWatcher.updateObject(11, width);
|
||||||
|
this.dataWatcher.updateObject(12, height);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
public EntityFireLingering setDuration(int duration){
|
||||||
|
this.maxAge = duration;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void entityInit() {
|
||||||
|
this.dataWatcher.addObject(10, new Integer(0));
|
||||||
|
this.dataWatcher.addObject(11, new Float(0));
|
||||||
|
this.dataWatcher.addObject(12, new Float(0));
|
||||||
|
}
|
||||||
|
|
||||||
|
public EntityFireLingering setType(int type) {
|
||||||
|
this.dataWatcher.updateObject(10, type);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getType() {
|
||||||
|
return this.dataWatcher.getWatchableObjectInt(10);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onEntityUpdate() {
|
||||||
|
|
||||||
|
float height = this.dataWatcher.getWatchableObjectFloat(12);
|
||||||
|
this.yOffset = 0;
|
||||||
|
this.setSize(this.dataWatcher.getWatchableObjectFloat(11), height);
|
||||||
|
this.setPosition(this.posX, this.posY, this.posZ);
|
||||||
|
|
||||||
|
if(!worldObj.isRemote) {
|
||||||
|
|
||||||
|
if(this.ticksExisted >= maxAge) {
|
||||||
|
this.setDead();
|
||||||
|
}
|
||||||
|
|
||||||
|
List<Entity> affected = worldObj.getEntitiesWithinAABBExcludingEntity(this, AxisAlignedBB.getBoundingBox(posX - width / 2, posY, posZ - width / 2, posX + width / 2, posY + height, posZ + width / 2));
|
||||||
|
|
||||||
|
for(Entity e : affected) {
|
||||||
|
if(e instanceof EntityLivingBase) {
|
||||||
|
EntityLivingBase livng = (EntityLivingBase) e;
|
||||||
|
HbmLivingProps props = HbmLivingProps.getData(livng);
|
||||||
|
if(this.getType() == this.TYPE_DIESEL) if(props.fire < 60) props.fire = 60;
|
||||||
|
if(this.getType() == this.TYPE_BALEFIRE) if(props.balefire < 100) props.balefire = 100;
|
||||||
|
} else {
|
||||||
|
e.setFire(4);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
|
||||||
|
double x = posX - width / 2 + rand.nextDouble() * width;
|
||||||
|
double z = posZ - width / 2 + rand.nextDouble() * width;
|
||||||
|
|
||||||
|
Vec3 up = Vec3.createVectorHelper(x, posY + height, z);
|
||||||
|
Vec3 down = Vec3.createVectorHelper(x, posY - height, z);
|
||||||
|
MovingObjectPosition mop = worldObj.func_147447_a(up, down, false, true, true);
|
||||||
|
if(mop != null && mop.typeOfHit == mop.typeOfHit.BLOCK) down = mop.hitVec;
|
||||||
|
if(this.getType() == this.TYPE_DIESEL) FlameCreator.composeEffectClient(worldObj, x, down.yCoord, z, FlameCreator.META_FIRE);
|
||||||
|
if(this.getType() == this.TYPE_BALEFIRE) FlameCreator.composeEffectClient(worldObj, x, down.yCoord, z, FlameCreator.META_BALEFIRE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override @SideOnly(Side.CLIENT) public boolean canRenderOnFire() { return false; }
|
||||||
|
@Override protected void writeEntityToNBT(NBTTagCompound nbt) { }
|
||||||
|
@Override public boolean writeToNBTOptional(NBTTagCompound nbt) { return false; }
|
||||||
|
@Override public void writeToNBT(NBTTagCompound nbt) { }
|
||||||
|
@Override public void readEntityFromNBT(NBTTagCompound nbt) { this.setDead(); }
|
||||||
|
}
|
||||||
@ -67,7 +67,6 @@ public class EntityMist extends Entity {
|
|||||||
return Fluids.fromID(this.dataWatcher.getWatchableObjectInt(10));
|
return Fluids.fromID(this.dataWatcher.getWatchableObjectInt(10));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onEntityUpdate() {
|
public void onEntityUpdate() {
|
||||||
|
|
||||||
|
|||||||
@ -182,15 +182,6 @@ public class EntityChemical extends EntityThrowableNT {
|
|||||||
if(style == ChemicalStyle.LIQUID || style == ChemicalStyle.GAS) {
|
if(style == ChemicalStyle.LIQUID || style == ChemicalStyle.GAS) {
|
||||||
if(type.temperature < -20) {
|
if(type.temperature < -20) {
|
||||||
if(living != null) { //only living things are affected
|
if(living != null) { //only living things are affected
|
||||||
|
|
||||||
HbmLivingProps.setTemperature(living, HbmLivingProps.getTemperature(living) + type.temperature / 20);
|
|
||||||
|
|
||||||
if(HbmLivingProps.isFrozen(living)) {
|
|
||||||
if(!EntityDamageUtil.attackEntityFromIgnoreIFrame(e, getDamage(ModDamageSource.s_cryolator), living.getMaxHealth() * -type.temperature / 273 * 0.01F))
|
|
||||||
e.attackEntityFrom(getDamage(ModDamageSource.s_cryolator), living.getMaxHealth() * -type.temperature / 273);
|
|
||||||
living.addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 100, 2));
|
|
||||||
living.addPotionEffect(new PotionEffect(Potion.digSlowdown.id, 100, 4));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -25,7 +25,6 @@ import net.minecraft.entity.player.EntityPlayerMP;
|
|||||||
import net.minecraft.init.Blocks;
|
import net.minecraft.init.Blocks;
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
import net.minecraft.util.EnumChatFormatting;
|
import net.minecraft.util.EnumChatFormatting;
|
||||||
import net.minecraft.util.MathHelper;
|
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraftforge.common.IExtendedEntityProperties;
|
import net.minecraftforge.common.IExtendedEntityProperties;
|
||||||
|
|
||||||
@ -47,9 +46,8 @@ public class HbmLivingProps implements IExtendedEntityProperties {
|
|||||||
private int bombTimer;
|
private int bombTimer;
|
||||||
private int contagion;
|
private int contagion;
|
||||||
private int oil;
|
private int oil;
|
||||||
private int temperature;
|
public int fire;
|
||||||
private boolean frozen = false;
|
public int balefire;
|
||||||
private boolean burning = false;
|
|
||||||
private List<ContaminationEffect> contamination = new ArrayList();
|
private List<ContaminationEffect> contamination = new ArrayList();
|
||||||
|
|
||||||
public HbmLivingProps(EntityLivingBase entity) {
|
public HbmLivingProps(EntityLivingBase entity) {
|
||||||
@ -267,31 +265,8 @@ public class HbmLivingProps implements IExtendedEntityProperties {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// OIL ///
|
/// OIL ///
|
||||||
public static int getOil(EntityLivingBase entity) {
|
public static int getOil(EntityLivingBase entity) { return getData(entity).oil; }
|
||||||
return getData(entity).oil;
|
public static void setOil(EntityLivingBase entity, int oil) { getData(entity).oil = oil; }
|
||||||
}
|
|
||||||
|
|
||||||
public static void setOil(EntityLivingBase entity, int oil) {
|
|
||||||
getData(entity).oil = oil;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// TEMPERATURE ///
|
|
||||||
public static int getTemperature(EntityLivingBase entity) {
|
|
||||||
return getData(entity).temperature;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void setTemperature(EntityLivingBase entity, int temperature) {
|
|
||||||
HbmLivingProps data = getData(entity);
|
|
||||||
temperature = MathHelper.clamp_int(temperature, -2500, 2500);
|
|
||||||
data.temperature = temperature;
|
|
||||||
if(temperature > 1000) data.burning = true;
|
|
||||||
if(temperature < 800) data.burning = false;
|
|
||||||
if(temperature < -1000) data.frozen = true;
|
|
||||||
if(temperature > -800) data.frozen = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static boolean isFrozen(EntityLivingBase entity) { return getData(entity).frozen; };
|
|
||||||
public static boolean isBurning(EntityLivingBase entity) { return getData(entity).burning; };
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void init(Entity entity, World world) { }
|
public void init(Entity entity, World world) { }
|
||||||
@ -308,6 +283,8 @@ public class HbmLivingProps implements IExtendedEntityProperties {
|
|||||||
props.setInteger("hfr_contagion", contagion);
|
props.setInteger("hfr_contagion", contagion);
|
||||||
props.setInteger("hfr_blacklung", blacklung);
|
props.setInteger("hfr_blacklung", blacklung);
|
||||||
props.setInteger("hfr_oil", oil);
|
props.setInteger("hfr_oil", oil);
|
||||||
|
props.setInteger("hfr_fire", fire);
|
||||||
|
props.setInteger("hfr_balefire", balefire);
|
||||||
|
|
||||||
props.setInteger("hfr_cont_count", this.contamination.size());
|
props.setInteger("hfr_cont_count", this.contamination.size());
|
||||||
|
|
||||||
@ -331,6 +308,8 @@ public class HbmLivingProps implements IExtendedEntityProperties {
|
|||||||
contagion = props.getInteger("hfr_contagion");
|
contagion = props.getInteger("hfr_contagion");
|
||||||
blacklung = props.getInteger("hfr_blacklung");
|
blacklung = props.getInteger("hfr_blacklung");
|
||||||
oil = props.getInteger("hfr_oil");
|
oil = props.getInteger("hfr_oil");
|
||||||
|
fire = props.getInteger("hfr_fire");
|
||||||
|
balefire = props.getInteger("hfr_balefire");
|
||||||
|
|
||||||
int cont = props.getInteger("hfr_cont_count");
|
int cont = props.getInteger("hfr_cont_count");
|
||||||
|
|
||||||
|
|||||||
@ -23,6 +23,7 @@ import com.hbm.main.MainRegistry;
|
|||||||
import com.hbm.packet.PacketDispatcher;
|
import com.hbm.packet.PacketDispatcher;
|
||||||
import com.hbm.packet.toclient.AuxParticlePacketNT;
|
import com.hbm.packet.toclient.AuxParticlePacketNT;
|
||||||
import com.hbm.packet.toclient.ExtPropPacket;
|
import com.hbm.packet.toclient.ExtPropPacket;
|
||||||
|
import com.hbm.particle.helper.FlameCreator;
|
||||||
import com.hbm.potion.HbmPotion;
|
import com.hbm.potion.HbmPotion;
|
||||||
import com.hbm.saveddata.AuxSavedData;
|
import com.hbm.saveddata.AuxSavedData;
|
||||||
import com.hbm.util.ArmorRegistry;
|
import com.hbm.util.ArmorRegistry;
|
||||||
@ -47,6 +48,7 @@ import net.minecraft.item.ItemStack;
|
|||||||
import net.minecraft.nbt.NBTTagCompound;
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
import net.minecraft.potion.Potion;
|
import net.minecraft.potion.Potion;
|
||||||
import net.minecraft.potion.PotionEffect;
|
import net.minecraft.potion.PotionEffect;
|
||||||
|
import net.minecraft.util.DamageSource;
|
||||||
import net.minecraft.util.MathHelper;
|
import net.minecraft.util.MathHelper;
|
||||||
import net.minecraft.util.Vec3;
|
import net.minecraft.util.Vec3;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
@ -567,34 +569,28 @@ public class EntityEffectHandler {
|
|||||||
if(entity.worldObj.isRemote) return;
|
if(entity.worldObj.isRemote) return;
|
||||||
|
|
||||||
EntityLivingBase living = (EntityLivingBase) entity;
|
EntityLivingBase living = (EntityLivingBase) entity;
|
||||||
int temp = HbmLivingProps.getTemperature(living);
|
HbmLivingProps props = HbmLivingProps.getData(living);
|
||||||
|
Random rand = living.getRNG();
|
||||||
|
|
||||||
if(temp < 0) HbmLivingProps.setTemperature(living, temp + Math.min(-temp, 5));
|
if(living.isImmuneToFire()) props.fire = 0;
|
||||||
if(temp > 0) HbmLivingProps.setTemperature(living, temp - Math.min(temp, 5));
|
|
||||||
|
|
||||||
if(HbmLivingProps.isFrozen(living)) {
|
double x = living.posX;
|
||||||
living.motionX = 0;
|
double y = living.posY;
|
||||||
living.motionZ = 0;
|
double z = living.posZ;
|
||||||
living.motionY = Math.min(living.motionY, 0);
|
|
||||||
|
|
||||||
if(entity.ticksExisted % 5 == 0) {
|
if(props.fire > 0) {
|
||||||
NBTTagCompound nbt0 = new NBTTagCompound();
|
props.fire--;
|
||||||
nbt0.setString("type", "sweat");
|
if((living.ticksExisted + living.getEntityId()) % 15 == 0) living.worldObj.playSoundEffect(living.posX, living.posY + living.height / 2, living.posZ, "random.fizz", 1F, 1.5F + rand.nextFloat() * 0.5F);
|
||||||
nbt0.setInteger("count", 1);
|
if((living.ticksExisted + living.getEntityId()) % 40 == 0) living.attackEntityFrom(DamageSource.onFire, 2F);
|
||||||
nbt0.setInteger("block", Block.getIdFromBlock(Blocks.snow));
|
FlameCreator.composeEffect(entity.worldObj, x - living.width / 2 + living.width * rand.nextDouble(), y + rand.nextDouble() * living.height, z - living.width / 2 + living.width * rand.nextDouble(), FlameCreator.META_FIRE);
|
||||||
nbt0.setInteger("entity", entity.getEntityId());
|
|
||||||
PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacketNT(nbt0, 0, 0, 0), new TargetPoint(entity.dimension, entity.posX, entity.posY, entity.posZ, 25));
|
|
||||||
|
|
||||||
if(entity instanceof EntityPlayerMP) {
|
|
||||||
NBTTagCompound nbt1 = new NBTTagCompound();
|
|
||||||
nbt1.setString("type", "frozen");
|
|
||||||
PacketDispatcher.wrapper.sendTo(new AuxParticlePacketNT(nbt1, 0, 0, 0), (EntityPlayerMP) entity);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(HbmLivingProps.isBurning(living)) {
|
if(props.balefire > 0) {
|
||||||
living.setFire(1);
|
props.balefire--;
|
||||||
|
if((living.ticksExisted + living.getEntityId()) % 15 == 0) living.worldObj.playSoundEffect(living.posX, living.posY + living.height / 2, living.posZ, "random.fizz", 1F, 1.5F + rand.nextFloat() * 0.5F);
|
||||||
|
ContaminationUtil.contaminate(living, HazardType.RADIATION, ContaminationType.CREATIVE, 5F);
|
||||||
|
if((living.ticksExisted + living.getEntityId()) % 20 == 0) living.attackEntityFrom(DamageSource.onFire, 5F);
|
||||||
|
FlameCreator.composeEffect(entity.worldObj, x - living.width / 2 + living.width * rand.nextDouble(), y + rand.nextDouble() * living.height, z - living.width / 2 + living.width * rand.nextDouble(), FlameCreator.META_BALEFIRE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -75,7 +75,7 @@ public class GunFactory {
|
|||||||
G12_BP, G12_BP_MAGNUM, G12_BP_SLUG, G12, G12_SLUG, G12_FLECHETTE, G12_MAGNUM, G12_EXPLOSIVE, G12_PHOSPHORUS, G12_ANTHRAX,
|
G12_BP, G12_BP_MAGNUM, G12_BP_SLUG, G12, G12_SLUG, G12_FLECHETTE, G12_MAGNUM, G12_EXPLOSIVE, G12_PHOSPHORUS, G12_ANTHRAX,
|
||||||
G40_FLARE, G40,
|
G40_FLARE, G40,
|
||||||
ROCKET_HE, ROCKET_HEAT,
|
ROCKET_HE, ROCKET_HEAT,
|
||||||
FLAME_DIESEL,
|
FLAME_DIESEL, FLAME_GAS, FLAME_NAPALM, FLAME_BALEFIRE,
|
||||||
M44_EQUESTRIAN, G12_EQUESTRIAN, BMG50_EQUESTRIAN
|
M44_EQUESTRIAN, G12_EQUESTRIAN, BMG50_EQUESTRIAN
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,7 +1,13 @@
|
|||||||
package com.hbm.items.weapon.sedna.factory;
|
package com.hbm.items.weapon.sedna.factory;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.function.BiConsumer;
|
||||||
import java.util.function.BiFunction;
|
import java.util.function.BiFunction;
|
||||||
|
import java.util.function.Consumer;
|
||||||
|
|
||||||
|
import com.hbm.entity.effect.EntityFireLingering;
|
||||||
|
import com.hbm.entity.projectile.EntityBulletBaseMK4;
|
||||||
|
import com.hbm.extprop.HbmLivingProps;
|
||||||
import com.hbm.items.ModItems;
|
import com.hbm.items.ModItems;
|
||||||
import com.hbm.items.weapon.sedna.BulletConfig;
|
import com.hbm.items.weapon.sedna.BulletConfig;
|
||||||
import com.hbm.items.weapon.sedna.Crosshair;
|
import com.hbm.items.weapon.sedna.Crosshair;
|
||||||
@ -15,36 +21,92 @@ import com.hbm.items.weapon.sedna.mags.MagazineFluid;
|
|||||||
import com.hbm.items.weapon.sedna.mags.MagazineFullReload;
|
import com.hbm.items.weapon.sedna.mags.MagazineFullReload;
|
||||||
import com.hbm.main.MainRegistry;
|
import com.hbm.main.MainRegistry;
|
||||||
import com.hbm.main.ResourceManager;
|
import com.hbm.main.ResourceManager;
|
||||||
|
import com.hbm.particle.helper.FlameCreator;
|
||||||
import com.hbm.render.anim.BusAnimation;
|
import com.hbm.render.anim.BusAnimation;
|
||||||
import com.hbm.render.anim.BusAnimationSequence;
|
import com.hbm.render.anim.BusAnimationSequence;
|
||||||
import com.hbm.render.anim.BusAnimationKeyframe.IType;
|
import com.hbm.render.anim.BusAnimationKeyframe.IType;
|
||||||
import com.hbm.render.anim.HbmAnimations.AnimType;
|
import com.hbm.render.anim.HbmAnimations.AnimType;
|
||||||
|
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.entity.EntityLivingBase;
|
||||||
|
import net.minecraft.init.Blocks;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
import net.minecraft.util.AxisAlignedBB;
|
||||||
|
import net.minecraft.util.MovingObjectPosition;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraftforge.common.util.ForgeDirection;
|
||||||
|
|
||||||
public class XFactoryFlamer {
|
public class XFactoryFlamer {
|
||||||
|
|
||||||
public static BulletConfig flame_diesel;
|
public static BulletConfig flame_diesel;
|
||||||
|
public static BulletConfig flame_gas;
|
||||||
|
public static BulletConfig flame_napalm;
|
||||||
|
public static BulletConfig flame_balefire;
|
||||||
|
public static BulletConfig flame_digamma;
|
||||||
|
|
||||||
|
public static Consumer<EntityBulletBaseMK4> LAMBDA_FIRE = (bullet) -> {
|
||||||
|
if(bullet.worldObj.isRemote && MainRegistry.proxy.me().getDistanceToEntity(bullet) < 100) FlameCreator.composeEffectClient(bullet.worldObj, bullet.posX, bullet.posY - 0.125, bullet.posZ, FlameCreator.META_FIRE);
|
||||||
|
};
|
||||||
|
public static Consumer<EntityBulletBaseMK4> LAMBDA_BALEFIRE = (bullet) -> {
|
||||||
|
if(bullet.worldObj.isRemote && MainRegistry.proxy.me().getDistanceToEntity(bullet) < 100) FlameCreator.composeEffectClient(bullet.worldObj, bullet.posX, bullet.posY - 0.125, bullet.posZ, FlameCreator.META_BALEFIRE);
|
||||||
|
};
|
||||||
|
public static BiConsumer<EntityBulletBaseMK4, MovingObjectPosition> LAMBDA_IGNITE_FIRE = (bullet, mop) -> {
|
||||||
|
if(mop.entityHit instanceof EntityLivingBase) {
|
||||||
|
HbmLivingProps props = HbmLivingProps.getData((EntityLivingBase) mop.entityHit);
|
||||||
|
if(props.fire < 100) props.fire = 100;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
public static BiConsumer<EntityBulletBaseMK4, MovingObjectPosition> LAMBDA_IGNITE_BALEFIRE = (bullet, mop) -> {
|
||||||
|
if(mop.entityHit instanceof EntityLivingBase) {
|
||||||
|
HbmLivingProps props = HbmLivingProps.getData((EntityLivingBase) mop.entityHit);
|
||||||
|
if(props.balefire < 200) props.balefire = 200;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
public static BiConsumer<EntityBulletBaseMK4, MovingObjectPosition> LAMBDA_LINGER_DIESEL = (bullet, mop) -> { if(!igniteIfPossible(bullet, mop)) spawnFire(bullet, mop, 2F, 1F, 100, EntityFireLingering.TYPE_DIESEL); };
|
||||||
|
public static BiConsumer<EntityBulletBaseMK4, MovingObjectPosition> LAMBDA_LINGER_GAS = (bullet, mop) -> { igniteIfPossible(bullet, mop); };
|
||||||
|
public static BiConsumer<EntityBulletBaseMK4, MovingObjectPosition> LAMBDA_LINGER_NAPALM = (bullet, mop) -> { if(!igniteIfPossible(bullet, mop)) spawnFire(bullet, mop, 2.5F, 1F, 200, EntityFireLingering.TYPE_DIESEL); };
|
||||||
|
public static BiConsumer<EntityBulletBaseMK4, MovingObjectPosition> LAMBDA_LINGER_BALEFIRE = (bullet, mop) -> { spawnFire(bullet, mop, 3F, 1F, 300, EntityFireLingering.TYPE_BALEFIRE); };
|
||||||
|
|
||||||
|
public static boolean igniteIfPossible(EntityBulletBaseMK4 bullet, MovingObjectPosition mop) {
|
||||||
|
if(mop.typeOfHit == mop.typeOfHit.BLOCK) {
|
||||||
|
World world = bullet.worldObj;
|
||||||
|
Block b = world.getBlock(mop.blockX, mop.blockY, mop.blockZ);
|
||||||
|
ForgeDirection dir = ForgeDirection.getOrientation(mop.sideHit);
|
||||||
|
if(b.isFlammable(world, mop.blockX, mop.blockY, mop.blockZ, dir)) {
|
||||||
|
if(world.getBlock(mop.blockX + dir.offsetX, mop.blockY + dir.offsetY, mop.blockZ + dir.offsetZ).isAir(world, mop.blockX + dir.offsetX, mop.blockY + dir.offsetY, mop.blockZ + dir.offsetZ)) {
|
||||||
|
world.setBlock(mop.blockX + dir.offsetX, mop.blockY + dir.offsetY, mop.blockZ + dir.offsetZ, Blocks.fire);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
bullet.setDead();
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void spawnFire(EntityBulletBaseMK4 bullet, MovingObjectPosition mop, float width, float height, int duration, int type) {
|
||||||
|
if(mop.typeOfHit == mop.typeOfHit.BLOCK) {
|
||||||
|
List<EntityFireLingering> fires = bullet.worldObj.getEntitiesWithinAABB(EntityFireLingering.class,
|
||||||
|
AxisAlignedBB.getBoundingBox(mop.hitVec.xCoord, mop.hitVec.yCoord, mop.hitVec.zCoord, mop.hitVec.xCoord, mop.hitVec.yCoord, mop.hitVec.zCoord).expand(width / 2 + 0.5, height / 2 + 0.5, width / 2 + 0.5));
|
||||||
|
if(fires.isEmpty()) {
|
||||||
|
EntityFireLingering fire = new EntityFireLingering(bullet.worldObj).setArea(width, height).setDuration(duration).setType(type);
|
||||||
|
fire.setPosition(mop.hitVec.xCoord, mop.hitVec.yCoord, mop.hitVec.zCoord);
|
||||||
|
bullet.worldObj.spawnEntityInWorld(fire);
|
||||||
|
}
|
||||||
|
bullet.setDead();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static void init() {
|
public static void init() {
|
||||||
flame_diesel = new BulletConfig().setItem(EnumAmmo.FLAME_DIESEL).setLife(100).setVel(1F).setGrav(0.02D).setReloadCount(300)
|
flame_diesel = new BulletConfig().setItem(EnumAmmo.FLAME_DIESEL).setLife(100).setVel(1F).setGrav(0.02D).setReloadCount(300).setOnUpdate(LAMBDA_FIRE).setOnRicochet(LAMBDA_LINGER_DIESEL);
|
||||||
.setOnUpdate((bullet) -> {
|
flame_gas = new BulletConfig().setItem(EnumAmmo.FLAME_GAS).setLife(10).setSpread(0.05F).setVel(1F).setGrav(0.0D).setReloadCount(300).setOnUpdate(LAMBDA_FIRE).setOnRicochet(LAMBDA_LINGER_GAS);
|
||||||
if(bullet.worldObj.isRemote && MainRegistry.proxy.me().getDistanceToEntity(bullet) < 100) {
|
flame_napalm = new BulletConfig().setItem(EnumAmmo.FLAME_NAPALM).setLife(200).setVel(1F).setGrav(0.02D).setReloadCount(300).setOnUpdate(LAMBDA_FIRE).setOnRicochet(LAMBDA_LINGER_NAPALM);
|
||||||
NBTTagCompound data = new NBTTagCompound();
|
flame_balefire = new BulletConfig().setItem(EnumAmmo.FLAME_BALEFIRE).setLife(200).setVel(1F).setGrav(0.02D).setReloadCount(300).setOnUpdate(LAMBDA_BALEFIRE).setOnRicochet(LAMBDA_LINGER_BALEFIRE);
|
||||||
data.setString("type", "flamethrower");
|
|
||||||
data.setDouble("posX", bullet.posX);
|
|
||||||
data.setDouble("posY", bullet.posY - 0.125);
|
|
||||||
data.setDouble("posZ", bullet.posZ);
|
|
||||||
MainRegistry.proxy.effectNT(data);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
ModItems.gun_flamer = new ItemGunBaseNT(WeaponQuality.A_SIDE, new GunConfig()
|
ModItems.gun_flamer = new ItemGunBaseNT(WeaponQuality.A_SIDE, new GunConfig()
|
||||||
.dura(20_000).draw(10).inspect(17).crosshair(Crosshair.L_CIRCLE).smoke(Lego.LAMBDA_STANDARD_SMOKE)
|
.dura(20_000).draw(10).inspect(17).crosshair(Crosshair.L_CIRCLE).smoke(Lego.LAMBDA_STANDARD_SMOKE)
|
||||||
.rec(new Receiver(0)
|
.rec(new Receiver(0)
|
||||||
.dmg(10F).delay(1).auto(true).reload(90).jam(17)
|
.dmg(10F).delay(1).auto(true).reload(90).jam(17)
|
||||||
.mag(new MagazineFullReload(0, 300).addConfigs(flame_diesel))
|
.mag(new MagazineFullReload(0, 300).addConfigs(flame_diesel, flame_gas, flame_napalm, flame_balefire))
|
||||||
.offset(0.75, -0.0625, -0.25D)
|
.offset(0.75, -0.0625, -0.25D)
|
||||||
.setupStandardFire().recoil(Lego.LAMBDA_STANDARD_RECOIL))
|
.setupStandardFire().recoil(Lego.LAMBDA_STANDARD_RECOIL))
|
||||||
.setupStandardConfiguration()
|
.setupStandardConfiguration()
|
||||||
|
|||||||
@ -4,7 +4,6 @@ import java.util.Random;
|
|||||||
|
|
||||||
import com.hbm.blocks.BlockEnums.EnumStoneType;
|
import com.hbm.blocks.BlockEnums.EnumStoneType;
|
||||||
import com.hbm.blocks.ModBlocks;
|
import com.hbm.blocks.ModBlocks;
|
||||||
import com.hbm.blocks.generic.BlockMotherOfAllOres;
|
|
||||||
import com.hbm.blocks.generic.BlockNTMFlower.EnumFlowerType;
|
import com.hbm.blocks.generic.BlockNTMFlower.EnumFlowerType;
|
||||||
import com.hbm.config.GeneralConfig;
|
import com.hbm.config.GeneralConfig;
|
||||||
import com.hbm.config.MobConfig;
|
import com.hbm.config.MobConfig;
|
||||||
@ -180,12 +179,6 @@ public class HbmWorldGen implements IWorldGenerator {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for(int k = 0; k < WorldConfig.randomSpawn; k++) {
|
|
||||||
BlockMotherOfAllOres.shuffleOverride(rand);
|
|
||||||
DungeonToolbox.generateOre(world, rand, i, j, 1, 10, 4, 30, ModBlocks.ore_random);
|
|
||||||
}
|
|
||||||
BlockMotherOfAllOres.resetOverride();
|
|
||||||
|
|
||||||
if(GeneralConfig.enable528ColtanSpawn) {
|
if(GeneralConfig.enable528ColtanSpawn) {
|
||||||
DungeonToolbox.generateOre(world, rand, i, j, GeneralConfig.coltanRate, 4, 15, 40, ModBlocks.ore_coltan);
|
DungeonToolbox.generateOre(world, rand, i, j, GeneralConfig.coltanRate, 4, 15, 40, ModBlocks.ore_coltan);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -662,6 +662,7 @@ public class ClientProxy extends ServerProxy {
|
|||||||
RenderingRegistry.registerEntityRenderingHandler(EntitySawblade.class, new RenderSawblade());
|
RenderingRegistry.registerEntityRenderingHandler(EntitySawblade.class, new RenderSawblade());
|
||||||
RenderingRegistry.registerEntityRenderingHandler(EntityChemical.class, new RenderChemical());
|
RenderingRegistry.registerEntityRenderingHandler(EntityChemical.class, new RenderChemical());
|
||||||
RenderingRegistry.registerEntityRenderingHandler(EntityMist.class, new RenderMist());
|
RenderingRegistry.registerEntityRenderingHandler(EntityMist.class, new RenderMist());
|
||||||
|
RenderingRegistry.registerEntityRenderingHandler(EntityFireLingering.class, new RenderMist());
|
||||||
RenderingRegistry.registerEntityRenderingHandler(EntityWaypoint.class, new RenderMist());
|
RenderingRegistry.registerEntityRenderingHandler(EntityWaypoint.class, new RenderMist());
|
||||||
RenderingRegistry.registerEntityRenderingHandler(EntityAcidBomb.class, new RenderSnowball(Items.slime_ball));
|
RenderingRegistry.registerEntityRenderingHandler(EntityAcidBomb.class, new RenderSnowball(Items.slime_ball));
|
||||||
//grenades
|
//grenades
|
||||||
|
|||||||
@ -3,7 +3,6 @@ package com.hbm.main;
|
|||||||
import com.google.common.collect.ImmutableList;
|
import com.google.common.collect.ImmutableList;
|
||||||
import com.hbm.blocks.BlockEnums.EnumStoneType;
|
import com.hbm.blocks.BlockEnums.EnumStoneType;
|
||||||
import com.hbm.blocks.ModBlocks;
|
import com.hbm.blocks.ModBlocks;
|
||||||
import com.hbm.blocks.generic.BlockMotherOfAllOres;
|
|
||||||
import com.hbm.blocks.generic.BlockToolConversion;
|
import com.hbm.blocks.generic.BlockToolConversion;
|
||||||
import com.hbm.commands.*;
|
import com.hbm.commands.*;
|
||||||
import com.hbm.config.*;
|
import com.hbm.config.*;
|
||||||
@ -872,8 +871,6 @@ public class MainRegistry {
|
|||||||
|
|
||||||
proxy.registerMissileItems();
|
proxy.registerMissileItems();
|
||||||
|
|
||||||
BlockMotherOfAllOres.init();
|
|
||||||
|
|
||||||
// Load compatibility for OC.
|
// Load compatibility for OC.
|
||||||
CompatHandler.init();
|
CompatHandler.init();
|
||||||
|
|
||||||
@ -1456,6 +1453,7 @@ public class MainRegistry {
|
|||||||
ignoreMappings.add("hbm:item.powder_unobtainium");
|
ignoreMappings.add("hbm:item.powder_unobtainium");
|
||||||
ignoreMappings.add("hbm:item.powder_daffergon");
|
ignoreMappings.add("hbm:item.powder_daffergon");
|
||||||
ignoreMappings.add("hbm:item.powder_verticium");
|
ignoreMappings.add("hbm:item.powder_verticium");
|
||||||
|
ignoreMappings.add("hbm:tile.ore_random");
|
||||||
|
|
||||||
/// REMAP ///
|
/// REMAP ///
|
||||||
remapItems.put("hbm:item.gadget_explosive8", ModItems.early_explosive_lenses);
|
remapItems.put("hbm:item.gadget_explosive8", ModItems.early_explosive_lenses);
|
||||||
|
|||||||
@ -4,7 +4,6 @@ import java.util.List;
|
|||||||
|
|
||||||
import codechicken.nei.recipe.*;
|
import codechicken.nei.recipe.*;
|
||||||
import com.hbm.blocks.ModBlocks;
|
import com.hbm.blocks.ModBlocks;
|
||||||
import com.hbm.blocks.generic.BlockMotherOfAllOres.TileEntityRandomOre;
|
|
||||||
import com.hbm.blocks.generic.BlockPlushie.TileEntityPlushie;
|
import com.hbm.blocks.generic.BlockPlushie.TileEntityPlushie;
|
||||||
import com.hbm.config.CustomMachineConfigJSON;
|
import com.hbm.config.CustomMachineConfigJSON;
|
||||||
import com.hbm.handler.nei.CustomMachineHandler;
|
import com.hbm.handler.nei.CustomMachineHandler;
|
||||||
@ -79,31 +78,6 @@ public class NEIConfig implements IConfigureNEI {
|
|||||||
API.hideItem(new ItemStack(ModBlocks.spotlight_halogen_off));
|
API.hideItem(new ItemStack(ModBlocks.spotlight_halogen_off));
|
||||||
API.hideItem(new ItemStack(ModBlocks.spotlight_beam));
|
API.hideItem(new ItemStack(ModBlocks.spotlight_beam));
|
||||||
|
|
||||||
API.registerHighlightIdentifier(ModBlocks.ore_random, new IHighlightHandler() {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public ItemStack identifyHighlight(World world, EntityPlayer player, MovingObjectPosition mop) {
|
|
||||||
int x = mop.blockX;
|
|
||||||
int y = mop.blockY;
|
|
||||||
int z = mop.blockZ;
|
|
||||||
|
|
||||||
TileEntity te = world.getTileEntity(x, y, z);
|
|
||||||
|
|
||||||
if(te instanceof TileEntityRandomOre) {
|
|
||||||
TileEntityRandomOre ore = (TileEntityRandomOre) te;
|
|
||||||
return new ItemStack(ModBlocks.ore_random, 1, ore.getStackId());
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<String> handleTextData(ItemStack itemStack, World world, EntityPlayer player, MovingObjectPosition mop, List<String> currenttip, Layout layout) {
|
|
||||||
return currenttip;
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
API.registerHighlightIdentifier(ModBlocks.plushie, new IHighlightHandler() {
|
API.registerHighlightIdentifier(ModBlocks.plushie, new IHighlightHandler() {
|
||||||
@Override public ItemStack identifyHighlight(World world, EntityPlayer player, MovingObjectPosition mop) {
|
@Override public ItemStack identifyHighlight(World world, EntityPlayer player, MovingObjectPosition mop) {
|
||||||
int x = mop.blockX;
|
int x = mop.blockX;
|
||||||
|
|||||||
@ -3,6 +3,7 @@ package com.hbm.particle;
|
|||||||
import java.awt.Color;
|
import java.awt.Color;
|
||||||
|
|
||||||
import com.hbm.main.ModEventHandlerClient;
|
import com.hbm.main.ModEventHandlerClient;
|
||||||
|
import com.hbm.particle.helper.FlameCreator;
|
||||||
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
@ -12,7 +13,7 @@ import net.minecraft.world.World;
|
|||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public class ParticleFlamethrower extends EntityFXRotating {
|
public class ParticleFlamethrower extends EntityFXRotating {
|
||||||
|
|
||||||
public ParticleFlamethrower(World world, double x, double y, double z) {
|
public ParticleFlamethrower(World world, double x, double y, double z, int type) {
|
||||||
super(world, x, y, z);
|
super(world, x, y, z);
|
||||||
particleIcon = ModEventHandlerClient.particleBase;
|
particleIcon = ModEventHandlerClient.particleBase;
|
||||||
this.particleMaxAge = 20 + rand.nextInt(10);
|
this.particleMaxAge = 20 + rand.nextInt(10);
|
||||||
@ -21,7 +22,12 @@ public class ParticleFlamethrower extends EntityFXRotating {
|
|||||||
this.motionX = world.rand.nextGaussian() * 0.02;
|
this.motionX = world.rand.nextGaussian() * 0.02;
|
||||||
this.motionZ = world.rand.nextGaussian() * 0.02;
|
this.motionZ = world.rand.nextGaussian() * 0.02;
|
||||||
|
|
||||||
Color color = Color.getHSBColor((15F + rand.nextFloat() * 25F) / 255F, 1F, 1F);
|
float initialColor = 15F + rand.nextFloat() * 25F;
|
||||||
|
|
||||||
|
if(type == FlameCreator.META_BALEFIRE) initialColor = 65F + rand.nextFloat() * 35F;
|
||||||
|
if(type == FlameCreator.META_DIGAMMA) initialColor = 0F - rand.nextFloat() * 15F;
|
||||||
|
|
||||||
|
Color color = Color.getHSBColor(initialColor / 255F, 1F, 1F);
|
||||||
this.particleRed = color.getRed() / 255F;
|
this.particleRed = color.getRed() / 255F;
|
||||||
this.particleGreen = color.getGreen() / 255F;
|
this.particleGreen = color.getGreen() / 255F;
|
||||||
this.particleBlue = color.getBlue() / 255F;
|
this.particleBlue = color.getBlue() / 255F;
|
||||||
|
|||||||
@ -2,6 +2,7 @@ package com.hbm.particle.helper;
|
|||||||
|
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
|
import com.hbm.main.MainRegistry;
|
||||||
import com.hbm.particle.ParticleFlamethrower;
|
import com.hbm.particle.ParticleFlamethrower;
|
||||||
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
@ -14,16 +15,31 @@ import net.minecraft.world.World;
|
|||||||
|
|
||||||
public class FlameCreator implements IParticleCreator {
|
public class FlameCreator implements IParticleCreator {
|
||||||
|
|
||||||
public static void composeEffect(World world, double x, double y, double z) {
|
public static int META_FIRE = 0;
|
||||||
|
public static int META_BALEFIRE = 1;
|
||||||
|
public static int META_DIGAMMA = 2;
|
||||||
|
|
||||||
|
public static void composeEffect(World world, double x, double y, double z, int meta) {
|
||||||
NBTTagCompound data = new NBTTagCompound();
|
NBTTagCompound data = new NBTTagCompound();
|
||||||
data.setString("type", "flamethrower");
|
data.setString("type", "flamethrower");
|
||||||
|
data.setInteger("meta", meta);
|
||||||
IParticleCreator.sendPacket(world, x, y, z, 50, data);
|
IParticleCreator.sendPacket(world, x, y, z, 50, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void composeEffectClient(World world, double x, double y, double z, int meta) {
|
||||||
|
NBTTagCompound data = new NBTTagCompound();
|
||||||
|
data.setString("type", "flamethrower");
|
||||||
|
data.setInteger("meta", meta);
|
||||||
|
data.setDouble("posX", x);
|
||||||
|
data.setDouble("posY", y);
|
||||||
|
data.setDouble("posZ", z);
|
||||||
|
MainRegistry.proxy.effectNT(data);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void makeParticle(World world, EntityPlayer player, TextureManager texman, Random rand, double x, double y, double z, NBTTagCompound data) {
|
public void makeParticle(World world, EntityPlayer player, TextureManager texman, Random rand, double x, double y, double z, NBTTagCompound data) {
|
||||||
ParticleFlamethrower particle = new ParticleFlamethrower(world, x, y, z);
|
ParticleFlamethrower particle = new ParticleFlamethrower(world, x, y, z, data.getInteger("meta"));
|
||||||
Minecraft.getMinecraft().effectRenderer.addEffect(particle);
|
Minecraft.getMinecraft().effectRenderer.addEffect(particle);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,21 +1,13 @@
|
|||||||
package com.hbm.render.block;
|
package com.hbm.render.block;
|
||||||
|
|
||||||
import java.awt.Color;
|
|
||||||
|
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
import com.hbm.blocks.IBlockMultiPass;
|
import com.hbm.blocks.IBlockMultiPass;
|
||||||
import com.hbm.blocks.ModBlocks;
|
|
||||||
import com.hbm.blocks.generic.BlockMotherOfAllOres;
|
|
||||||
import com.hbm.inventory.RecipesCommon.ComparableStack;
|
|
||||||
import com.hbm.items.ModItems;
|
|
||||||
import com.hbm.util.ColorUtil;
|
|
||||||
|
|
||||||
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
|
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.client.renderer.RenderBlocks;
|
import net.minecraft.client.renderer.RenderBlocks;
|
||||||
import net.minecraft.client.renderer.Tessellator;
|
import net.minecraft.client.renderer.Tessellator;
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraft.world.IBlockAccess;
|
import net.minecraft.world.IBlockAccess;
|
||||||
|
|
||||||
public class RenderBlockMultipass implements ISimpleBlockRenderingHandler {
|
public class RenderBlockMultipass implements ISimpleBlockRenderingHandler {
|
||||||
@ -72,7 +64,7 @@ public class RenderBlockMultipass implements ISimpleBlockRenderingHandler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** terrible hack to make this shit work */
|
/** terrible hack to make this shit work */
|
||||||
if(block == ModBlocks.ore_random) {
|
/*if(block == ModBlocks.ore_random) {
|
||||||
|
|
||||||
this.currentPass = 1;
|
this.currentPass = 1;
|
||||||
renderer.setOverrideBlockTexture(block.getIcon(0, metadata));
|
renderer.setOverrideBlockTexture(block.getIcon(0, metadata));
|
||||||
@ -123,7 +115,7 @@ public class RenderBlockMultipass implements ISimpleBlockRenderingHandler {
|
|||||||
|
|
||||||
renderer.clearOverrideBlockTexture();
|
renderer.clearOverrideBlockTexture();
|
||||||
GL11.glColor3f(1F, 1F, 1F);
|
GL11.glColor3f(1F, 1F, 1F);
|
||||||
}
|
}*/
|
||||||
|
|
||||||
GL11.glTranslatef(0.5F, 0.5F, 0.5F);
|
GL11.glTranslatef(0.5F, 0.5F, 0.5F);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -11,7 +11,6 @@ import com.hbm.blocks.generic.BlockDynamicSlag.TileEntitySlag;
|
|||||||
import com.hbm.blocks.generic.BlockEmitter.TileEntityEmitter;
|
import com.hbm.blocks.generic.BlockEmitter.TileEntityEmitter;
|
||||||
import com.hbm.blocks.generic.BlockGlyphidSpawner.TileEntityGlpyhidSpawner;
|
import com.hbm.blocks.generic.BlockGlyphidSpawner.TileEntityGlpyhidSpawner;
|
||||||
import com.hbm.blocks.generic.BlockLoot.TileEntityLoot;
|
import com.hbm.blocks.generic.BlockLoot.TileEntityLoot;
|
||||||
import com.hbm.blocks.generic.BlockMotherOfAllOres.TileEntityRandomOre;
|
|
||||||
import com.hbm.blocks.generic.BlockPedestal.TileEntityPedestal;
|
import com.hbm.blocks.generic.BlockPedestal.TileEntityPedestal;
|
||||||
import com.hbm.blocks.generic.BlockPlushie.TileEntityPlushie;
|
import com.hbm.blocks.generic.BlockPlushie.TileEntityPlushie;
|
||||||
import com.hbm.blocks.generic.BlockSnowglobe.TileEntitySnowglobe;
|
import com.hbm.blocks.generic.BlockSnowglobe.TileEntitySnowglobe;
|
||||||
@ -216,7 +215,6 @@ public class TileMappings {
|
|||||||
put(TileEntityProxyCombo.class, "tileentity_proxy_combo");
|
put(TileEntityProxyCombo.class, "tileentity_proxy_combo");
|
||||||
put(TileEntityProxyConductor.class, "tileentity_proxy_conductor");
|
put(TileEntityProxyConductor.class, "tileentity_proxy_conductor");
|
||||||
|
|
||||||
put(TileEntityRandomOre.class, "tileentity_mother_of_all_ores");
|
|
||||||
put(TileEntityBedrockOre.class, "tileentity_bedrock_ore");
|
put(TileEntityBedrockOre.class, "tileentity_bedrock_ore");
|
||||||
|
|
||||||
put(TileEntityBlockPWR.class, "tileentity_block_pwr");
|
put(TileEntityBlockPWR.class, "tileentity_block_pwr");
|
||||||
|
|||||||
@ -96,7 +96,7 @@ public class TileEntityCoreEmitter extends TileEntityMachineBase implements IEne
|
|||||||
|
|
||||||
if(joules > 0) {
|
if(joules > 0) {
|
||||||
|
|
||||||
long out = joules * 98 / 100;
|
long out = joules * 95 / 100;
|
||||||
|
|
||||||
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata());
|
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata());
|
||||||
for(int i = 1; i <= range; i++) {
|
for(int i = 1; i <= range; i++) {
|
||||||
@ -110,20 +110,9 @@ public class TileEntityCoreEmitter extends TileEntityMachineBase implements IEne
|
|||||||
Block block = worldObj.getBlock(x, y, z);
|
Block block = worldObj.getBlock(x, y, z);
|
||||||
TileEntity te = worldObj.getTileEntity(x, y, z);
|
TileEntity te = worldObj.getTileEntity(x, y, z);
|
||||||
|
|
||||||
if(block instanceof ILaserable) {
|
if(block instanceof ILaserable) { ((ILaserable)block).addEnergy(worldObj, x, y, z, out, dir); break; }
|
||||||
((ILaserable)block).addEnergy(worldObj, x, y, z, out * 98 / 100, dir);
|
if(te instanceof ILaserable) { ((ILaserable)te).addEnergy(worldObj, x, y, z, out, dir); break; }
|
||||||
break;
|
if(te instanceof TileEntityCore) { out = ((TileEntityCore)te).burn(out); continue; }
|
||||||
}
|
|
||||||
|
|
||||||
if(te instanceof ILaserable) {
|
|
||||||
((ILaserable)te).addEnergy(worldObj, x, y, z, out * 98 / 100, dir);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(te instanceof TileEntityCore) {
|
|
||||||
out = ((TileEntityCore)te).burn(out);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
Block b = worldObj.getBlock(x, y, z);
|
Block b = worldObj.getBlock(x, y, z);
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 14 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 364 B |
Binary file not shown.
|
After Width: | Height: | Size: 343 B |
Binary file not shown.
|
After Width: | Height: | Size: 352 B |
Loading…
x
Reference in New Issue
Block a user