mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
forgot some files
This commit is contained in:
parent
f235f1445f
commit
ed6ce927a2
@ -930,6 +930,7 @@ public class ModBlocks {
|
|||||||
public static Block machine_teleporter;
|
public static Block machine_teleporter;
|
||||||
public static final int guiID_machine_teleporter = 36;
|
public static final int guiID_machine_teleporter = 36;
|
||||||
public static Block teleanchor;
|
public static Block teleanchor;
|
||||||
|
public static Block field_disturber;
|
||||||
|
|
||||||
public static Block machine_reix_mainframe;
|
public static Block machine_reix_mainframe;
|
||||||
public static final int guiID_machine_reix_mainframe = 38;
|
public static final int guiID_machine_reix_mainframe = 38;
|
||||||
@ -1928,6 +1929,7 @@ public class ModBlocks {
|
|||||||
|
|
||||||
machine_teleporter = new MachineTeleporter(Material.iron).setBlockName("machine_teleporter").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
|
machine_teleporter = new MachineTeleporter(Material.iron).setBlockName("machine_teleporter").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
|
||||||
teleanchor = new MachineTeleanchor().setBlockName("teleanchor").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
|
teleanchor = new MachineTeleanchor().setBlockName("teleanchor").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
|
||||||
|
field_disturber = new MachineFieldDisturber().setBlockName("field_disturber").setHardness(5.0F).setResistance(200.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":field_disturber");
|
||||||
|
|
||||||
machine_rtg_grey = new MachineRTG(Material.iron).setBlockName("machine_rtg_grey").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":rtg");
|
machine_rtg_grey = new MachineRTG(Material.iron).setBlockName("machine_rtg_grey").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":rtg");
|
||||||
//machine_rtg_red = new MachineRTG(Material.iron).setBlockName("machine_rtg_red").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
|
//machine_rtg_red = new MachineRTG(Material.iron).setBlockName("machine_rtg_red").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
|
||||||
@ -3232,6 +3234,7 @@ public class ModBlocks {
|
|||||||
GameRegistry.registerBlock(machine_combine_factory, machine_combine_factory.getUnlocalizedName());
|
GameRegistry.registerBlock(machine_combine_factory, machine_combine_factory.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(machine_teleporter, machine_teleporter.getUnlocalizedName());
|
GameRegistry.registerBlock(machine_teleporter, machine_teleporter.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(teleanchor, teleanchor.getUnlocalizedName());
|
GameRegistry.registerBlock(teleanchor, teleanchor.getUnlocalizedName());
|
||||||
|
GameRegistry.registerBlock(field_disturber, field_disturber.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(machine_satlinker, machine_satlinker.getUnlocalizedName());
|
GameRegistry.registerBlock(machine_satlinker, machine_satlinker.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(machine_keyforge, machine_keyforge.getUnlocalizedName());
|
GameRegistry.registerBlock(machine_keyforge, machine_keyforge.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(machine_armor_table, machine_armor_table.getUnlocalizedName());
|
GameRegistry.registerBlock(machine_armor_table, machine_armor_table.getUnlocalizedName());
|
||||||
|
|||||||
@ -0,0 +1,36 @@
|
|||||||
|
package com.hbm.blocks.machine;
|
||||||
|
|
||||||
|
import java.util.Random;
|
||||||
|
|
||||||
|
import com.hbm.entity.logic.EntityNukeExplosionMK3;
|
||||||
|
import com.hbm.entity.logic.EntityNukeExplosionMK3.ATEntry;
|
||||||
|
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.block.material.Material;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
public class MachineFieldDisturber extends Block {
|
||||||
|
|
||||||
|
public MachineFieldDisturber() {
|
||||||
|
super(Material.iron);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int tickRate(World world) {
|
||||||
|
return 10;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBlockAdded(World world, int x, int y, int z) {
|
||||||
|
if(!world.isRemote) world.scheduleBlockUpdate(x, y, z, this, this.tickRate(world));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void updateTick(World world, int x, int y, int z, Random rand) {
|
||||||
|
|
||||||
|
if(!world.isRemote) {
|
||||||
|
world.scheduleBlockUpdate(x, y, z, this, this.tickRate(world));
|
||||||
|
EntityNukeExplosionMK3.at.put(new ATEntry(world.provider.dimensionId, x, y, z), world.getTotalWorldTime() + 100);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,8 +1,11 @@
|
|||||||
package com.hbm.entity.logic;
|
package com.hbm.entity.logic;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Iterator;
|
||||||
|
import java.util.Map.Entry;
|
||||||
|
|
||||||
import org.apache.logging.log4j.Level;
|
import org.apache.logging.log4j.Level;
|
||||||
|
|
||||||
import com.hbm.blocks.ModBlocks;
|
|
||||||
import com.hbm.config.BombConfig;
|
import com.hbm.config.BombConfig;
|
||||||
import com.hbm.config.GeneralConfig;
|
import com.hbm.config.GeneralConfig;
|
||||||
import com.hbm.entity.effect.EntityFalloutRain;
|
import com.hbm.entity.effect.EntityFalloutRain;
|
||||||
@ -13,10 +16,14 @@ import com.hbm.explosion.ExplosionNukeGeneric;
|
|||||||
import com.hbm.explosion.ExplosionSolinium;
|
import com.hbm.explosion.ExplosionSolinium;
|
||||||
import com.hbm.interfaces.Spaghetti;
|
import com.hbm.interfaces.Spaghetti;
|
||||||
import com.hbm.main.MainRegistry;
|
import com.hbm.main.MainRegistry;
|
||||||
|
import com.hbm.packet.AuxParticlePacketNT;
|
||||||
|
import com.hbm.packet.PacketDispatcher;
|
||||||
|
|
||||||
|
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
|
import net.minecraft.util.Vec3;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
@Spaghetti("why???")
|
@Spaghetti("why???")
|
||||||
@ -184,15 +191,17 @@ public class EntityNukeExplosionMK3 extends Entity {
|
|||||||
//this.worldObj.getWorldInfo().setRaining(true);
|
//this.worldObj.getWorldInfo().setRaining(true);
|
||||||
|
|
||||||
did2 = true;
|
did2 = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
age++;
|
age++;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void entityInit() { }
|
protected void entityInit() { }
|
||||||
|
|
||||||
|
public static HashMap<ATEntry, Long> at = new HashMap();
|
||||||
|
|
||||||
public static EntityNukeExplosionMK3 statFacFleija(World world, double x, double y, double z, int range) {
|
public static EntityNukeExplosionMK3 statFacFleija(World world, double x, double y, double z, int range) {
|
||||||
|
|
||||||
EntityNukeExplosionMK3 entity = new EntityNukeExplosionMK3(world);
|
EntityNukeExplosionMK3 entity = new EntityNukeExplosionMK3(world);
|
||||||
@ -204,18 +213,45 @@ public class EntityNukeExplosionMK3 extends Entity {
|
|||||||
entity.coefficient = 1.0F;
|
entity.coefficient = 1.0F;
|
||||||
entity.waste = false;
|
entity.waste = false;
|
||||||
|
|
||||||
if(range > 50) {
|
Iterator<Entry<ATEntry, Long>> it = at.entrySet().iterator();
|
||||||
|
|
||||||
|
while(it.hasNext()) {
|
||||||
|
|
||||||
for(int i = -1; i <= 1; i++) {
|
Entry<ATEntry, Long> next = it.next();
|
||||||
for(int j = -1; j <= 1; j++) {
|
if(next.getValue() < world.getTotalWorldTime()) {
|
||||||
for(int k = (int)y + 15; k > 5; k--) {
|
it.remove();
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
ATEntry entry = next.getKey();
|
||||||
|
if(entry.dim != world.provider.dimensionId) continue;
|
||||||
|
|
||||||
|
Vec3 vec = Vec3.createVectorHelper(x - entry.x, y - entry.y, z - entry.z);
|
||||||
|
|
||||||
|
if(vec.lengthVector() < 300) {
|
||||||
|
entity.setDead();
|
||||||
|
|
||||||
|
/* just to make sure */
|
||||||
|
if(!world.isRemote) {
|
||||||
|
|
||||||
|
for(int i = 0; i < 2; i++) {
|
||||||
|
double ix = i == 0 ? x : (entry.x + 0.5);
|
||||||
|
double iy = i == 0 ? y : (entry.y + 0.5);
|
||||||
|
double iz = i == 0 ? z : (entry.z + 0.5);
|
||||||
|
|
||||||
if(world.getBlock((int)x + i * 15, k, (int)z + j * 15) == ModBlocks.stone_porous) {
|
world.playSoundEffect(ix, iy, iz, "hbm:entity.ufoBlast", 15.0F, 0.7F + world.rand.nextFloat() * 0.2F);
|
||||||
entity.destructionRange = 50;
|
|
||||||
return entity;
|
NBTTagCompound data = new NBTTagCompound();
|
||||||
}
|
data.setString("type", "plasmablast");
|
||||||
|
data.setFloat("r", 0.0F);
|
||||||
|
data.setFloat("g", 0.75F);
|
||||||
|
data.setFloat("b", 1.0F);
|
||||||
|
data.setFloat("scale", 7.5F);
|
||||||
|
PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacketNT(data, ix, iy, iz), new TargetPoint(entry.dim, ix, iy, iz, 150));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -226,4 +262,49 @@ public class EntityNukeExplosionMK3 extends Entity {
|
|||||||
this.extType = 1;
|
this.extType = 1;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static class ATEntry {
|
||||||
|
int dim;
|
||||||
|
int x;
|
||||||
|
int y;
|
||||||
|
int z;
|
||||||
|
|
||||||
|
public ATEntry(int dim, int x, int y, int z) {
|
||||||
|
this.dim = dim;
|
||||||
|
this.x = x;
|
||||||
|
this.y = y;
|
||||||
|
this.z = z;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
final int prime = 27644437;
|
||||||
|
int result = 1;
|
||||||
|
result = prime * result + dim;
|
||||||
|
result = prime * result + x;
|
||||||
|
result = prime * result + y;
|
||||||
|
result = prime * result + z;
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object obj) {
|
||||||
|
if(this == obj)
|
||||||
|
return true;
|
||||||
|
if(obj == null)
|
||||||
|
return false;
|
||||||
|
if(getClass() != obj.getClass())
|
||||||
|
return false;
|
||||||
|
ATEntry other = (ATEntry) obj;
|
||||||
|
if(dim != other.dim)
|
||||||
|
return false;
|
||||||
|
if(x != other.x)
|
||||||
|
return false;
|
||||||
|
if(y != other.y)
|
||||||
|
return false;
|
||||||
|
if(z != other.z)
|
||||||
|
return false;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -910,6 +910,7 @@ public class CraftingManager {
|
|||||||
|
|
||||||
addShapelessAuto(ItemBattery.getEmptyBattery(ModItems.anchor_remote), new Object[] { DIAMOND.gem(), ModItems.ducttape, ModItems.circuit_red_copper });
|
addShapelessAuto(ItemBattery.getEmptyBattery(ModItems.anchor_remote), new Object[] { DIAMOND.gem(), ModItems.ducttape, ModItems.circuit_red_copper });
|
||||||
addRecipeAuto(new ItemStack(ModBlocks.teleanchor), new Object[] { "ODO", "EAE", "ODO", 'O', Blocks.obsidian, 'D', DIAMOND.gem(), 'E', ModItems.powder_magic, 'A', ModItems.gem_alexandrite });
|
addRecipeAuto(new ItemStack(ModBlocks.teleanchor), new Object[] { "ODO", "EAE", "ODO", 'O', Blocks.obsidian, 'D', DIAMOND.gem(), 'E', ModItems.powder_magic, 'A', ModItems.gem_alexandrite });
|
||||||
|
addRecipeAuto(new ItemStack(ModBlocks.field_disturber), new Object[] { "ICI", "CAC", "ICI", 'I', STAR.ingot(), 'C', KEY_CIRCUIT_BISMUTH, 'A', ModItems.gem_alexandrite });
|
||||||
|
|
||||||
addShapelessAuto(new ItemStack(ModItems.holotape_image, 1, EnumHoloImage.HOLO_RESTORED.ordinal()), new Object[] { new ItemStack(ModItems.holotape_image, 1, EnumHoloImage.HOLO_DIGAMMA.ordinal()), KEY_TOOL_SCREWDRIVER, ModItems.ducttape, ModItems.armor_polish });
|
addShapelessAuto(new ItemStack(ModItems.holotape_image, 1, EnumHoloImage.HOLO_RESTORED.ordinal()), new Object[] { new ItemStack(ModItems.holotape_image, 1, EnumHoloImage.HOLO_DIGAMMA.ordinal()), KEY_TOOL_SCREWDRIVER, ModItems.ducttape, ModItems.armor_polish });
|
||||||
addShapelessAuto(new ItemStack(ModItems.holotape_damaged), new Object[] { DictFrame.fromOne(ModItems.holotape_image, EnumHoloImage.HOLO_RESTORED), ModBlocks.muffler, ModItems.crt_display, ModItems.gem_alexandrite /* placeholder for amplifier */ });
|
addShapelessAuto(new ItemStack(ModItems.holotape_damaged), new Object[] { DictFrame.fromOne(ModItems.holotape_image, EnumHoloImage.HOLO_RESTORED), ModBlocks.muffler, ModItems.crt_display, ModItems.gem_alexandrite /* placeholder for amplifier */ });
|
||||||
|
|||||||
@ -3458,6 +3458,7 @@ tile.factory_titanium_furnace.name=Einfache Fabrikzugriffsluke
|
|||||||
tile.factory_titanium_hull.name=Fabrikblock
|
tile.factory_titanium_hull.name=Fabrikblock
|
||||||
tile.fallout.name=Fallout
|
tile.fallout.name=Fallout
|
||||||
tile.fence_metal.name=Maschendrahtzaun
|
tile.fence_metal.name=Maschendrahtzaun
|
||||||
|
tile.field_disturber.name=Hochenergiefeld-Jammer
|
||||||
tile.fire_digamma.name=Verweilendes Digamma
|
tile.fire_digamma.name=Verweilendes Digamma
|
||||||
tile.fire_door.name=Brandschutztür
|
tile.fire_door.name=Brandschutztür
|
||||||
tile.fireworks.name=Feuerwerksbatterie
|
tile.fireworks.name=Feuerwerksbatterie
|
||||||
|
|||||||
@ -3896,6 +3896,7 @@ tile.factory_titanium_furnace.name=Basic Factory Access Hatch
|
|||||||
tile.factory_titanium_hull.name=Factory Block
|
tile.factory_titanium_hull.name=Factory Block
|
||||||
tile.fallout.name=Fallout
|
tile.fallout.name=Fallout
|
||||||
tile.fence_metal.name=Chainlink Fence
|
tile.fence_metal.name=Chainlink Fence
|
||||||
|
tile.field_disturber.name=High Energy Field Jammer
|
||||||
tile.fire_digamma.name=Lingering Digamma
|
tile.fire_digamma.name=Lingering Digamma
|
||||||
tile.fire_door.name=Fire Door
|
tile.fire_door.name=Fire Door
|
||||||
tile.fireworks.name=Firework Battery
|
tile.fireworks.name=Firework Battery
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 286 B |
Loading…
x
Reference in New Issue
Block a user