custom nuke rods, radiorec gui, nuclear barrel structure
@ -208,6 +208,13 @@ item.solinium_core.name=Semistabiler Soliniumkern
|
||||
|
||||
item.n2_charge.name=Große Sprengladung
|
||||
|
||||
item.custom_tnt.name=AB - Sprengladung
|
||||
item.custom_nuke.name=AB - Nukleares Element
|
||||
item.custom_hydro.name=AB - Wasserstoffelement
|
||||
item.custom_amat.name=AB - Antimaterie-Element
|
||||
item.custom_dirty.name=AB - Schmutziges Element
|
||||
item.custom_schrab.name=AB - Schrabidiumelement
|
||||
|
||||
container.nukeGadget=The Gadget
|
||||
container.nukeBoy=Little Boy
|
||||
container.nukeMan=Fat Man
|
||||
@ -318,7 +325,7 @@ tile.machine_coal_on.name=Kohlegenerator
|
||||
container.machineCoal=Kohlegenerator
|
||||
tile.launch_pad.name=Raketenabschussrampe
|
||||
container.launchPad=Raketenabschussrampe
|
||||
tile.book_guide.name=Hbm's Nuclear Tech Mod Handbuch
|
||||
tile.book_guide.name=Hbm's Nuclear Tech Mod Handbuch [LEGACY]
|
||||
tile.machine_schrabidium_transmutator.name=Schrabidium-Transmutationsgerät
|
||||
container.machine_schrabidium_transmutator=Schrabidium-Transmutationsgerät
|
||||
tile.machine_diesel.name=Dieselgenerator
|
||||
|
||||
@ -208,6 +208,13 @@ item.solinium_core.name=Semi-Stable Solinium Core
|
||||
|
||||
item.n2_charge.name=Large Explosive Charge
|
||||
|
||||
item.custom_tnt.name=Custom Nuke Explosive Charge
|
||||
item.custom_nuke.name=Custom Nuke Nuclear Rod
|
||||
item.custom_hydro.name=Custom Nuke Hydrogen Rod
|
||||
item.custom_amat.name=Custom Nuke Antimatter Rod
|
||||
item.custom_dirty.name=Custom Nuke Dirty Rod
|
||||
item.custom_schrab.name=Custom Nuke Schrabidium Rod
|
||||
|
||||
container.nukeGadget=The Gadget
|
||||
container.nukeBoy=Little Boy
|
||||
container.nukeMan=Fat Man
|
||||
@ -318,7 +325,7 @@ tile.machine_coal_on.name=Coal Generator
|
||||
container.machineCoal=Coal Generator
|
||||
tile.launch_pad.name=Missile Launch Pad
|
||||
container.launchPad=Missile Launch Pad
|
||||
tile.book_guide.name=Hbm's Nuclear Tech Mod Manual
|
||||
tile.book_guide.name=Hbm's Nuclear Tech Mod Manual [LEGACY]
|
||||
tile.machine_schrabidium_transmutator.name=Schrabidium Transmutation Device
|
||||
container.machine_schrabidium_transmutator=Schrabidium Transmutation Device
|
||||
tile.machine_diesel.name=Diesel Generator
|
||||
|
||||
@ -94,6 +94,10 @@
|
||||
|
||||
"potatos.random": {"category": "player", "sounds": ["potatos/randResponse0", "potatos/randResponse1", "potatos/randResponse2", "potatos/randResponse3", "potatos/randResponse4", "potatos/randResponse5", "potatos/randResponse6", "potatos/randResponse7"]},
|
||||
|
||||
"fm.clap": {"category": "block", "sounds": [{"name": "clap", "stream": false}]},
|
||||
"fm.mug": {"category": "block", "sounds": [{"name": "mug", "stream": false}]},
|
||||
"fm.sample": {"category": "block", "sounds": [{"name": "sample", "stream": false}]},
|
||||
|
||||
"alarm.amsSiren": {"category": "record", "sounds": [{"name": "alarm/amsSiren", "stream": false}]},
|
||||
"alarm.apcLoop": {"category": "record", "sounds": [{"name": "alarm/apcLoop", "stream": false}]},
|
||||
"alarm.apcPass": {"category": "record", "sounds": [{"name": "alarm/apcPass", "stream": false}]},
|
||||
|
||||
BIN
assets/hbm/sounds/clap.ogg
Normal file
BIN
assets/hbm/sounds/mug.ogg
Normal file
BIN
assets/hbm/sounds/sample.ogg
Normal file
BIN
assets/hbm/textures/items/custom_amat.png
Normal file
|
After Width: | Height: | Size: 254 B |
BIN
assets/hbm/textures/items/custom_dirty.png
Normal file
|
After Width: | Height: | Size: 272 B |
BIN
assets/hbm/textures/items/custom_element.png
Normal file
|
After Width: | Height: | Size: 247 B |
BIN
assets/hbm/textures/items/custom_hydro.png
Normal file
|
After Width: | Height: | Size: 280 B |
BIN
assets/hbm/textures/items/custom_nuke.png
Normal file
|
After Width: | Height: | Size: 270 B |
BIN
assets/hbm/textures/items/custom_schrab.png
Normal file
|
After Width: | Height: | Size: 244 B |
BIN
assets/hbm/textures/items/custom_tnt.png
Normal file
|
After Width: | Height: | Size: 268 B |
BIN
assets/hbm/textures/items/fooditem.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
@ -481,7 +481,7 @@ public class ModBlocks {
|
||||
public static final int guiID_radiobox = 66;
|
||||
|
||||
public static Block radiorec;
|
||||
public static final int guiID_radiorec = 67;
|
||||
public static final int guiID_radiorec = 69;
|
||||
|
||||
public static Block turret_light;
|
||||
public static Block turret_heavy;
|
||||
@ -812,7 +812,7 @@ public class ModBlocks {
|
||||
|
||||
machine_satlinker = new MachineSatLinker(Material.iron).setBlockName("machine_satlinker").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.missileTab).setBlockTextureName(RefStrings.MODID + ":machine_satlinker_side");
|
||||
machine_telelinker = new MachineTeleLinker(Material.iron).setBlockName("machine_telelinker").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.nukeTab).setBlockTextureName(RefStrings.MODID + ":machine_telelinker_side");
|
||||
machine_keyforge = new MachineKeyForge(Material.iron).setBlockName("machine_keyforge").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.nukeTab).setBlockTextureName(RefStrings.MODID + ":machine_keyforge_side");
|
||||
machine_keyforge = new MachineKeyForge(Material.iron).setBlockName("machine_keyforge").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.consumableTab).setBlockTextureName(RefStrings.MODID + ":machine_keyforge_side");
|
||||
|
||||
factory_titanium_hull = new BlockGeneric(Material.iron).setBlockName("factory_titanium_hull").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":factory_titanium_hull");
|
||||
factory_titanium_furnace = new FactoryHatch(Material.iron).setBlockName("factory_titanium_furnace").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":factory_titanium_furnace");
|
||||
|
||||
@ -82,31 +82,34 @@ public class ToxicBlock extends BlockFluidClassic {
|
||||
// {
|
||||
// entity.attackEntityFrom(ModDamageSource.mudPoisoning, 8);
|
||||
// }
|
||||
if (entity instanceof EntityPlayer && Library.checkForHazmat((EntityPlayer) entity)) {
|
||||
/*
|
||||
* Library.damageSuit(((EntityPlayer)entity), 0);
|
||||
* Library.damageSuit(((EntityPlayer)entity), 1);
|
||||
* Library.damageSuit(((EntityPlayer)entity), 2);
|
||||
* Library.damageSuit(((EntityPlayer)entity), 3);
|
||||
*/
|
||||
|
||||
} else if (entity instanceof EntityCreeper) {
|
||||
EntityNuclearCreeper creep = new EntityNuclearCreeper(world);
|
||||
creep.setLocationAndAngles(entity.posX, entity.posY, entity.posZ, entity.rotationYaw, entity.rotationPitch);
|
||||
if (!entity.isDead)
|
||||
if (!world.isRemote)
|
||||
world.spawnEntityInWorld(creep);
|
||||
entity.setDead();
|
||||
} else if (entity instanceof EntityVillager) {
|
||||
EntityZombie creep = new EntityZombie(world);
|
||||
creep.setLocationAndAngles(entity.posX, entity.posY, entity.posZ, entity.rotationYaw, entity.rotationPitch);
|
||||
entity.setDead();
|
||||
if (!world.isRemote)
|
||||
world.spawnEntityInWorld(creep);
|
||||
} else if (entity instanceof EntityLivingBase && !(entity instanceof EntityNuclearCreeper)
|
||||
&& !(entity instanceof EntityMooshroom) && !(entity instanceof EntityZombie)) {
|
||||
entity.attackEntityFrom(ModDamageSource.radiation, 2.5F);
|
||||
}
|
||||
|
||||
// if (entity instanceof EntityPlayer && Library.checkForHazmat((EntityPlayer) entity)) {
|
||||
// /*
|
||||
// * Library.damageSuit(((EntityPlayer)entity), 0);
|
||||
// * Library.damageSuit(((EntityPlayer)entity), 1);
|
||||
// * Library.damageSuit(((EntityPlayer)entity), 2);
|
||||
// * Library.damageSuit(((EntityPlayer)entity), 3);
|
||||
// */
|
||||
//
|
||||
// } else if (entity instanceof EntityCreeper) {
|
||||
// EntityNuclearCreeper creep = new EntityNuclearCreeper(world);
|
||||
// creep.setLocationAndAngles(entity.posX, entity.posY, entity.posZ, entity.rotationYaw, entity.rotationPitch);
|
||||
// if (!entity.isDead)
|
||||
// if (!world.isRemote)
|
||||
// world.spawnEntityInWorld(creep);
|
||||
// entity.setDead();
|
||||
// } else if (entity instanceof EntityVillager) {
|
||||
// EntityZombie creep = new EntityZombie(world);
|
||||
// creep.setLocationAndAngles(entity.posX, entity.posY, entity.posZ, entity.rotationYaw, entity.rotationPitch);
|
||||
// entity.setDead();
|
||||
// if (!world.isRemote)
|
||||
// world.spawnEntityInWorld(creep);
|
||||
// } else if (entity instanceof EntityLivingBase && !(entity instanceof EntityNuclearCreeper)
|
||||
// && !(entity instanceof EntityMooshroom) && !(entity instanceof EntityZombie)) {
|
||||
// entity.attackEntityFrom(ModDamageSource.radiation, 2.5F);
|
||||
// }
|
||||
|
||||
Library.applyRadiation(entity, 2 * 60 * 20, 50, 60 * 20, 35);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -147,7 +147,7 @@ public class Guide extends Block {
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
if(!player.isSneaking())
|
||||
/*if(!player.isSneaking())
|
||||
{
|
||||
|
||||
ItemStack book1 = new ItemStack(Items.written_book);
|
||||
@ -218,7 +218,9 @@ public class Guide extends Block {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}*/
|
||||
|
||||
return super.onBlockActivated(world, x, y, z, player, side, hitX, hitY, hitZ);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -1,10 +1,14 @@
|
||||
package com.hbm.blocks.machine;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.tileentity.machine.TileEntityRadioRec;
|
||||
|
||||
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
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;
|
||||
@ -109,5 +113,19 @@ public class RadioRec extends BlockContainer {
|
||||
|
||||
return AxisAlignedBB.getBoundingBox(x + this.minX, y + this.minY, z + this.minZ, x + this.maxX, y + this.maxY, z + this.maxZ);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
if(world.isRemote)
|
||||
{
|
||||
return true;
|
||||
} else if(!player.isSneaking())
|
||||
{
|
||||
FMLNetworkHandler.openGui(player, MainRegistry.instance, ModBlocks.guiID_radiorec, world, x, y, z);
|
||||
return true;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -64,11 +64,6 @@ public class Radiobox extends BlockContainer {
|
||||
{
|
||||
world.setBlockMetadataWithNotify(x, y, z, 4, 2);
|
||||
}
|
||||
|
||||
if(itemStack.hasDisplayName())
|
||||
{
|
||||
((TileEntityDiFurnace)world.getTileEntity(x, y, z)).setCustomName(itemStack.getDisplayName());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -19,6 +19,7 @@ import com.hbm.main.ModEventHandler;
|
||||
import com.hbm.potion.HbmPotion;
|
||||
import com.hbm.saveddata.SatelliteSaveStructure;
|
||||
import com.hbm.saveddata.SatelliteSavedData;
|
||||
import com.hbm.world.Barrel;
|
||||
import com.hbm.world.Meteorite;
|
||||
import com.hbm.world.Sellafield;
|
||||
|
||||
@ -264,8 +265,21 @@ public class TestEventTester extends Block {
|
||||
|
||||
/*((EntityLivingBase)par5EntityPlayer).addPotionEffect(new PotionEffect(HbmPotion.radiation.id, 100, 0));*/
|
||||
|
||||
/*worldObj.setBlockToAir(par2, par3, par4);
|
||||
(new Sellafield()).generate(worldObj, par2, par4, 50D, 15D);*/
|
||||
|
||||
/*switch(itemRand.nextInt(3)) {
|
||||
case 0:
|
||||
worldObj.playSoundEffect(par2, par3, par4, "hbm:fm.clap", 1.0F, 1.0F); break;
|
||||
case 1:
|
||||
worldObj.playSoundEffect(par2, par3, par4, "hbm:fm.mug", 1.0F, 1.0F); break;
|
||||
case 2:
|
||||
worldObj.playSoundEffect(par2, par3, par4, "hbm:fm.sample", 1.0F, 1.0F); break;
|
||||
}*/
|
||||
|
||||
worldObj.setBlockToAir(par2, par3, par4);
|
||||
(new Sellafield()).generate(worldObj, par2, par4, 15D, 7.5D);
|
||||
|
||||
new Barrel().generate(worldObj, worldObj.rand, par2, par3, par4);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -1289,6 +1289,30 @@ public class ExplosionChaos {
|
||||
else if (world.getBlock(x, y, z) == ModBlocks.block_waste && random.nextInt(10) == 0) {
|
||||
world.setBlock(x, y, z, ModBlocks.block_lead);
|
||||
}
|
||||
|
||||
else if (world.getBlock(x, y, z) == ModBlocks.sellafield_core && random.nextInt(10) == 0) {
|
||||
world.setBlock(x, y, z, ModBlocks.sellafield_4);
|
||||
}
|
||||
|
||||
else if (world.getBlock(x, y, z) == ModBlocks.sellafield_4 && random.nextInt(5) == 0) {
|
||||
world.setBlock(x, y, z, ModBlocks.sellafield_3);
|
||||
}
|
||||
|
||||
else if (world.getBlock(x, y, z) == ModBlocks.sellafield_3 && random.nextInt(5) == 0) {
|
||||
world.setBlock(x, y, z, ModBlocks.sellafield_2);
|
||||
}
|
||||
|
||||
else if (world.getBlock(x, y, z) == ModBlocks.sellafield_2 && random.nextInt(5) == 0) {
|
||||
world.setBlock(x, y, z, ModBlocks.sellafield_1);
|
||||
}
|
||||
|
||||
else if (world.getBlock(x, y, z) == ModBlocks.sellafield_1 && random.nextInt(5) == 0) {
|
||||
world.setBlock(x, y, z, ModBlocks.sellafield_0);
|
||||
}
|
||||
|
||||
else if (world.getBlock(x, y, z) == ModBlocks.sellafield_0 && random.nextInt(5) == 0) {
|
||||
world.setBlock(x, y, z, ModBlocks.sellafield_slaked);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -67,6 +67,7 @@ import com.hbm.tileentity.machine.TileEntityMachineTeleporter;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineTurbofan;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineUF6Tank;
|
||||
import com.hbm.tileentity.machine.TileEntityNukeFurnace;
|
||||
import com.hbm.tileentity.machine.TileEntityRadioRec;
|
||||
import com.hbm.tileentity.machine.TileEntityRadiobox;
|
||||
import com.hbm.tileentity.machine.TileEntityReactorMultiblock;
|
||||
import com.hbm.tileentity.machine.TileEntityReiXMainframe;
|
||||
@ -688,6 +689,15 @@ public class GUIHandler implements IGuiHandler {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_radiorec:
|
||||
{
|
||||
if(entity instanceof TileEntityRadioRec)
|
||||
{
|
||||
return new ContainerRadioRec(player.inventory, (TileEntityRadioRec) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@ -1301,6 +1311,15 @@ public class GUIHandler implements IGuiHandler {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_radiorec:
|
||||
{
|
||||
if(entity instanceof TileEntityRadioRec)
|
||||
{
|
||||
return new GUIRadioRec(player.inventory, (TileEntityRadioRec) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
//CLIENTONLY GUIS
|
||||
|
||||
@ -563,6 +563,34 @@ public class MachineRecipes {
|
||||
return new ItemStack(ModItems.rod_quad_euphemium, 1);
|
||||
}
|
||||
|
||||
if (item == Item.getItemFromBlock(Blocks.stone)) {
|
||||
return new ItemStack(ModBlocks.sellafield_slaked, 1);
|
||||
}
|
||||
|
||||
if (item == Item.getItemFromBlock(ModBlocks.sellafield_slaked)) {
|
||||
return new ItemStack(ModBlocks.sellafield_0, 1);
|
||||
}
|
||||
|
||||
if (item == Item.getItemFromBlock(ModBlocks.sellafield_0)) {
|
||||
return new ItemStack(ModBlocks.sellafield_1, 1);
|
||||
}
|
||||
|
||||
if (item == Item.getItemFromBlock(ModBlocks.sellafield_1)) {
|
||||
return new ItemStack(ModBlocks.sellafield_2, 1);
|
||||
}
|
||||
|
||||
if (item == Item.getItemFromBlock(ModBlocks.sellafield_2)) {
|
||||
return new ItemStack(ModBlocks.sellafield_3, 1);
|
||||
}
|
||||
|
||||
if (item == Item.getItemFromBlock(ModBlocks.sellafield_3)) {
|
||||
return new ItemStack(ModBlocks.sellafield_4, 1);
|
||||
}
|
||||
|
||||
if (item == Item.getItemFromBlock(ModBlocks.sellafield_4)) {
|
||||
return new ItemStack(ModBlocks.sellafield_core, 1);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -922,6 +950,13 @@ public class MachineRecipes {
|
||||
recipes.put(new ItemStack(ModItems.rod_lithium), getReactorOutput(ModItems.rod_lithium));
|
||||
recipes.put(new ItemStack(ModItems.rod_dual_lithium), getReactorOutput(ModItems.rod_dual_lithium));
|
||||
recipes.put(new ItemStack(ModItems.rod_quad_lithium), getReactorOutput(ModItems.rod_quad_lithium));
|
||||
recipes.put(new ItemStack(Blocks.stone), getReactorOutput(Item.getItemFromBlock(Blocks.stone)));
|
||||
recipes.put(new ItemStack(ModBlocks.sellafield_slaked), getReactorOutput(Item.getItemFromBlock(ModBlocks.sellafield_slaked)));
|
||||
recipes.put(new ItemStack(ModBlocks.sellafield_0), getReactorOutput(Item.getItemFromBlock(ModBlocks.sellafield_0)));
|
||||
recipes.put(new ItemStack(ModBlocks.sellafield_1), getReactorOutput(Item.getItemFromBlock(ModBlocks.sellafield_1)));
|
||||
recipes.put(new ItemStack(ModBlocks.sellafield_2), getReactorOutput(Item.getItemFromBlock(ModBlocks.sellafield_2)));
|
||||
recipes.put(new ItemStack(ModBlocks.sellafield_3), getReactorOutput(Item.getItemFromBlock(ModBlocks.sellafield_3)));
|
||||
recipes.put(new ItemStack(ModBlocks.sellafield_4), getReactorOutput(Item.getItemFromBlock(ModBlocks.sellafield_4)));
|
||||
return recipes;
|
||||
}
|
||||
|
||||
|
||||
17
com/hbm/inventory/container/ContainerRadioRec.java
Normal file
@ -0,0 +1,17 @@
|
||||
package com.hbm.inventory.container;
|
||||
|
||||
import com.hbm.tileentity.machine.TileEntityRadioRec;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
|
||||
public class ContainerRadioRec extends Container {
|
||||
|
||||
public ContainerRadioRec(InventoryPlayer invPlayer, TileEntityRadioRec tedf) { }
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer p_75145_1_) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@ -10,8 +10,6 @@ import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ContainerRadiobox extends Container {
|
||||
|
||||
private TileEntityRadiobox radio;
|
||||
|
||||
public ContainerRadiobox(InventoryPlayer invPlayer, TileEntityRadiobox tedf) { }
|
||||
|
||||
|
||||
226
com/hbm/inventory/gui/GUIRadioRec.java
Normal file
@ -0,0 +1,226 @@
|
||||
package com.hbm.inventory.gui;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.lang3.math.NumberUtils;
|
||||
import org.lwjgl.input.Keyboard;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.inventory.container.ContainerRadioRec;
|
||||
import com.hbm.inventory.gui.GUIRadioRec.RadioButton;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.packet.AuxButtonPacket;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.tileentity.machine.TileEntityRadioRec;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.audio.PositionedSoundRecord;
|
||||
import net.minecraft.client.gui.GuiTextField;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class GUIRadioRec extends GuiInfoContainer {
|
||||
|
||||
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/gui_radiorec.png");
|
||||
private TileEntityRadioRec diFurnace;
|
||||
|
||||
private GuiTextField freqField;
|
||||
|
||||
List<RadioButton> buttons = new ArrayList<RadioButton>();
|
||||
|
||||
|
||||
public GUIRadioRec(InventoryPlayer invPlayer, TileEntityRadioRec tedf) {
|
||||
super(new ContainerRadioRec(invPlayer, tedf));
|
||||
diFurnace = tedf;
|
||||
|
||||
this.xSize = 176;
|
||||
this.ySize = 54;
|
||||
}
|
||||
|
||||
public void initGui() {
|
||||
|
||||
super.initGui();
|
||||
|
||||
buttons.clear();
|
||||
buttons.add(new RadioButton(guiLeft + 25, guiTop + 16, 0, "Save"));
|
||||
buttons.add(new RadioButton(guiLeft + 61, guiTop + 16, 1, "On/Off"));
|
||||
|
||||
Keyboard.enableRepeatEvents(true);
|
||||
this.freqField = new GuiTextField(this.fontRendererObj, guiLeft + 100, guiTop + 21, 48, 12);
|
||||
this.freqField.setTextColor(-1);
|
||||
this.freqField.setDisabledTextColour(-1);
|
||||
this.freqField.setEnableBackgroundDrawing(false);
|
||||
this.freqField.setMaxStringLength(5);
|
||||
this.freqField.setText(String.valueOf(diFurnace.freq));
|
||||
|
||||
if(diFurnace.freq == 0) {
|
||||
double d = 100 + diFurnace.getWorldObj().rand.nextInt(900);
|
||||
d += (diFurnace.getWorldObj().rand.nextInt(10) * 0.1D);
|
||||
this.freqField.setText(String.valueOf(d));
|
||||
}
|
||||
|
||||
save();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawScreen(int i, int j, float f) {
|
||||
super.drawScreen(i, j, f);
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
this.freqField.drawTextBox();
|
||||
|
||||
for(RadioButton b : buttons)
|
||||
if(b.isMouseOnButton(i, j))
|
||||
b.drawString(i, j);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(int i, int j) {
|
||||
String name = I18n.format("container.radiobox");
|
||||
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float f, int i, int j) {
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
|
||||
|
||||
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
|
||||
|
||||
if(freqField.isFocused())
|
||||
drawTexturedModalRect(guiLeft + 97, guiTop + 16, 0, 184 + 18, 54, 18);
|
||||
else
|
||||
drawTexturedModalRect(guiLeft + 97, guiTop + 16, 0, 184, 54, 18);
|
||||
|
||||
for(RadioButton b : buttons)
|
||||
b.drawButton();
|
||||
}
|
||||
|
||||
public void updateScreen() { }
|
||||
|
||||
protected void keyTyped(char p_73869_1_, int p_73869_2_)
|
||||
{
|
||||
if (this.freqField.textboxKeyTyped(p_73869_1_, p_73869_2_)) { }
|
||||
else {
|
||||
super.keyTyped(p_73869_1_, p_73869_2_);
|
||||
}
|
||||
}
|
||||
|
||||
protected void rectify() {
|
||||
String s = freqField.getText();
|
||||
|
||||
if(NumberUtils.isNumber(s)) {
|
||||
double d = Double.parseDouble(s);
|
||||
d = Math.max(100, Math.min(999.9, d));
|
||||
d = truncateDecimal(d, 1).doubleValue();
|
||||
s = String.valueOf(d);
|
||||
} else {
|
||||
s = "100.0";
|
||||
}
|
||||
|
||||
freqField.setText(s);
|
||||
}
|
||||
|
||||
private BigDecimal truncateDecimal(double x, int numberofDecimals)
|
||||
{
|
||||
if (x > 0) {
|
||||
return new BigDecimal(String.valueOf(x)).setScale(numberofDecimals, BigDecimal.ROUND_FLOOR);
|
||||
} else {
|
||||
return new BigDecimal(String.valueOf(x)).setScale(numberofDecimals, BigDecimal.ROUND_CEILING);
|
||||
}
|
||||
}
|
||||
|
||||
protected void mouseClicked(int i, int j, int k)
|
||||
{
|
||||
super.mouseClicked(i, j, k);
|
||||
this.freqField.mouseClicked(i, j, k);
|
||||
|
||||
for(RadioButton b : buttons)
|
||||
if(b.isMouseOnButton(i, j))
|
||||
b.executeAction();
|
||||
}
|
||||
|
||||
protected void toggle() {
|
||||
|
||||
rectify();
|
||||
|
||||
PacketDispatcher.wrapper.sendToServer(new AuxButtonPacket(diFurnace.xCoord, diFurnace.yCoord, diFurnace.zCoord, diFurnace.isOn ? 0 : 1, 0));
|
||||
}
|
||||
|
||||
protected void save() {
|
||||
|
||||
rectify();
|
||||
|
||||
String s = freqField.getText();
|
||||
double d = Double.parseDouble(s);
|
||||
PacketDispatcher.wrapper.sendToServer(new AuxButtonPacket(diFurnace.xCoord, diFurnace.yCoord, diFurnace.zCoord, (int)(d * 10D), 1));
|
||||
}
|
||||
|
||||
|
||||
class RadioButton {
|
||||
|
||||
int xPos;
|
||||
int yPos;
|
||||
int buttonType;
|
||||
String info;
|
||||
|
||||
//0: save
|
||||
//1: type
|
||||
//2: music 1
|
||||
//3: music 2
|
||||
//4: music 3
|
||||
//5: music 4
|
||||
|
||||
public RadioButton(int x, int y, int t, String i) {
|
||||
xPos = x;
|
||||
yPos = y;
|
||||
buttonType = t;
|
||||
info = i;
|
||||
}
|
||||
|
||||
public boolean isMouseOnButton(int mouseX, int mouseY) {
|
||||
return xPos <= mouseX && xPos + 18 > mouseX && yPos < mouseY && yPos + 18 >= mouseY;
|
||||
}
|
||||
|
||||
public void drawButton() {
|
||||
|
||||
switch(buttonType) {
|
||||
case 0:
|
||||
drawTexturedModalRect(xPos, yPos, 176 + 18 * 0, 18 * 0, 18, 18); break;
|
||||
case 1:
|
||||
drawTexturedModalRect(xPos, yPos, 176 + 18 * 1, 18 * 0, 18, 18); break;
|
||||
}
|
||||
}
|
||||
|
||||
public void drawString(int x, int y) {
|
||||
if(info == null || info.isEmpty())
|
||||
return;
|
||||
|
||||
String s = info;
|
||||
|
||||
if(buttonType == 1) {
|
||||
if(diFurnace.isOn)
|
||||
s = "Turn Off";
|
||||
else
|
||||
s = "Turn On";
|
||||
}
|
||||
|
||||
func_146283_a(Arrays.asList(new String[] { s }), x, y);
|
||||
}
|
||||
|
||||
public void executeAction() {
|
||||
|
||||
mc.getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F));
|
||||
|
||||
switch(buttonType) {
|
||||
case 0: save(); break;
|
||||
case 1: toggle(); break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -66,6 +66,7 @@ public class GUIRadiobox extends GuiInfoContainer {
|
||||
|
||||
super.initGui();
|
||||
|
||||
buttons.clear();
|
||||
buttons.add(new RadioButton(guiLeft + 25, guiTop + 16, 0, "Save"));
|
||||
buttons.add(new RadioButton(guiLeft + 61, guiTop + 16, 1, "Cycle"));
|
||||
buttons.add(new RadioButton(guiLeft + 25, guiTop + 52, 2, "1"));
|
||||
@ -202,6 +203,13 @@ public class GUIRadiobox extends GuiInfoContainer {
|
||||
type -=3;
|
||||
}
|
||||
|
||||
protected void save() {
|
||||
|
||||
rectify();
|
||||
|
||||
//TODO: send packet here
|
||||
}
|
||||
|
||||
|
||||
class RadioButton {
|
||||
|
||||
|
||||
@ -843,6 +843,7 @@ public class ModItems {
|
||||
public static Item definitelyfood;
|
||||
public static Item loops;
|
||||
public static Item loop_stew;
|
||||
public static Item fooditem;
|
||||
|
||||
public static Item med_ipecac;
|
||||
public static Item med_ptsd;
|
||||
@ -886,6 +887,13 @@ public class ModItems {
|
||||
public static Item solinium_core;
|
||||
|
||||
public static Item n2_charge;
|
||||
|
||||
public static Item custom_tnt;
|
||||
public static Item custom_nuke;
|
||||
public static Item custom_hydro;
|
||||
public static Item custom_amat;
|
||||
public static Item custom_dirty;
|
||||
public static Item custom_schrab;
|
||||
|
||||
|
||||
public static Item battery_generic;
|
||||
@ -2093,6 +2101,7 @@ public class ModItems {
|
||||
med_schizophrenia = new ItemLemon(0, 0, false).setUnlocalizedName("med_schizophrenia").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":med_schizophrenia_new");
|
||||
loops = new ItemLemon(4, 5, false).setUnlocalizedName("loops").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":loops");
|
||||
loop_stew = new ItemLemon(10, 10, false).setUnlocalizedName("loop_stew").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":loop_stew");
|
||||
fooditem = new ItemLemon(2, 5, false).setUnlocalizedName("fooditem").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":fooditem");
|
||||
|
||||
defuser = new Item().setUnlocalizedName("defuser").setMaxStackSize(1).setFull3D().setCreativeTab(MainRegistry.nukeTab).setTextureName(RefStrings.MODID + ":defuser");
|
||||
|
||||
@ -2133,6 +2142,13 @@ public class ModItems {
|
||||
|
||||
n2_charge = new ItemN2().setUnlocalizedName("n2_charge").setMaxStackSize(1).setCreativeTab(MainRegistry.nukeTab).setTextureName(RefStrings.MODID + ":n2_charge");
|
||||
|
||||
custom_tnt = new ItemCustomLore().setUnlocalizedName("custom_tnt").setMaxStackSize(1).setCreativeTab(MainRegistry.nukeTab).setTextureName(RefStrings.MODID + ":custom_tnt");
|
||||
custom_nuke = new ItemCustomLore().setUnlocalizedName("custom_nuke").setMaxStackSize(1).setCreativeTab(MainRegistry.nukeTab).setTextureName(RefStrings.MODID + ":custom_nuke");
|
||||
custom_hydro = new ItemCustomLore().setUnlocalizedName("custom_hydro").setMaxStackSize(1).setCreativeTab(MainRegistry.nukeTab).setTextureName(RefStrings.MODID + ":custom_hydro");
|
||||
custom_amat = new ItemCustomLore().setUnlocalizedName("custom_amat").setMaxStackSize(1).setCreativeTab(MainRegistry.nukeTab).setTextureName(RefStrings.MODID + ":custom_amat");
|
||||
custom_dirty = new ItemCustomLore().setUnlocalizedName("custom_dirty").setMaxStackSize(1).setCreativeTab(MainRegistry.nukeTab).setTextureName(RefStrings.MODID + ":custom_dirty");
|
||||
custom_schrab = new ItemCustomLore().setUnlocalizedName("custom_schrab").setMaxStackSize(1).setCreativeTab(MainRegistry.nukeTab).setTextureName(RefStrings.MODID + ":custom_schrab");
|
||||
|
||||
battery_generic = new ItemBattery(50, 1, 1).setUnlocalizedName("battery_generic").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_generic");
|
||||
battery_advanced = new ItemBattery(200, 5, 5).setUnlocalizedName("battery_advanced").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_advanced");
|
||||
battery_lithium = new ItemBattery(2500, 10, 10).setUnlocalizedName("battery_lithium").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_lithium");
|
||||
@ -2582,7 +2598,7 @@ public class ModItems {
|
||||
void_anim = new Item().setUnlocalizedName("void_anim").setTextureName(RefStrings.MODID + ":void_anim");
|
||||
|
||||
mysteryshovel = new ItemMS().setUnlocalizedName("mysteryshovel").setFull3D().setMaxStackSize(1).setTextureName(RefStrings.MODID + ":cursed_shovel");
|
||||
memory = new ItemBattery(Long.MAX_VALUE / 100L, 100000, 100000).setUnlocalizedName("memory").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":mo8_anim");
|
||||
memory = new ItemBattery(Long.MAX_VALUE / 100L, 100000000000000L, 100000000000000L).setUnlocalizedName("memory").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":mo8_anim");
|
||||
|
||||
FluidContainerRegistry.registerFluidContainer(new FluidStack(ModBlocks.mud_fluid, 1000), new ItemStack(ModItems.bucket_mud));
|
||||
FluidContainerRegistry.registerFluidContainer(new FluidStack(ModBlocks.acid_fluid, 1000), new ItemStack(ModItems.bucket_acid));
|
||||
@ -3646,6 +3662,7 @@ public class ModItems {
|
||||
GameRegistry.registerItem(definitelyfood, definitelyfood.getUnlocalizedName());
|
||||
GameRegistry.registerItem(loops, loops.getUnlocalizedName());
|
||||
GameRegistry.registerItem(loop_stew, loop_stew.getUnlocalizedName());
|
||||
GameRegistry.registerItem(fooditem, fooditem.getUnlocalizedName());
|
||||
GameRegistry.registerItem(med_ipecac, med_ipecac.getUnlocalizedName());
|
||||
GameRegistry.registerItem(med_ptsd, med_ptsd.getUnlocalizedName());
|
||||
//GameRegistry.registerItem(med_schizophrenia, med_schizophrenia.getUnlocalizedName());
|
||||
@ -3744,6 +3761,14 @@ public class ModItems {
|
||||
GameRegistry.registerItem(alloy_legs, alloy_legs.getUnlocalizedName());
|
||||
GameRegistry.registerItem(alloy_boots, alloy_boots.getUnlocalizedName());
|
||||
|
||||
//Custom Rods
|
||||
GameRegistry.registerItem(custom_tnt, custom_tnt.getUnlocalizedName());
|
||||
GameRegistry.registerItem(custom_nuke, custom_nuke.getUnlocalizedName());
|
||||
GameRegistry.registerItem(custom_hydro, custom_hydro.getUnlocalizedName());
|
||||
GameRegistry.registerItem(custom_amat, custom_amat.getUnlocalizedName());
|
||||
GameRegistry.registerItem(custom_dirty, custom_dirty.getUnlocalizedName());
|
||||
GameRegistry.registerItem(custom_schrab, custom_schrab.getUnlocalizedName());
|
||||
|
||||
//Power Armor
|
||||
GameRegistry.registerItem(t45_helmet, t45_helmet.getUnlocalizedName());
|
||||
GameRegistry.registerItem(t45_plate, t45_plate.getUnlocalizedName());
|
||||
|
||||
@ -47,6 +47,8 @@ public class ItemBattery extends Item {
|
||||
list.add("Charge: " + charge1 + "%");
|
||||
list.add("(" + Library.getShortNumber(charge * 100) + "/" + Library.getShortNumber(maxCharge * 100) + "HE)");
|
||||
}
|
||||
list.add("Charge rate: " + Library.getShortNumber(chargeRate * 100) + "HE/t");
|
||||
list.add("Discharge rate: " + Library.getShortNumber(dischargeRate * 100) + "HE/t");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -604,6 +604,38 @@ public class ItemCustomLore extends ItemRadioactive {
|
||||
{
|
||||
list.add("All hail the spout!");
|
||||
}
|
||||
|
||||
if(this == ModItems.custom_tnt)
|
||||
{
|
||||
list.add("Explosive +10");
|
||||
}
|
||||
|
||||
if(this == ModItems.custom_nuke)
|
||||
{
|
||||
list.add("Nuclear +30");
|
||||
list.add("Adds fallout");
|
||||
}
|
||||
|
||||
if(this == ModItems.custom_hydro)
|
||||
{
|
||||
list.add("Hydrogen +30");
|
||||
}
|
||||
|
||||
if(this == ModItems.custom_amat)
|
||||
{
|
||||
list.add("Antimatter +15");
|
||||
}
|
||||
|
||||
if(this == ModItems.custom_dirty)
|
||||
{
|
||||
list.add("Fallout +10");
|
||||
}
|
||||
|
||||
if(this == ModItems.custom_schrab)
|
||||
{
|
||||
list.add("Schrabidium +15");
|
||||
list.add("Removes fallout");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -5,6 +5,7 @@ import java.util.Random;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.world.Antenna;
|
||||
import com.hbm.world.Barrel;
|
||||
import com.hbm.world.Bunker;
|
||||
import com.hbm.world.CrashedVertibird;
|
||||
import com.hbm.world.DesertAtom001;
|
||||
@ -344,6 +345,14 @@ public class HbmWorldGen implements IWorldGenerator {
|
||||
|
||||
new Spaceship().generate(world, rand, x, y, z);
|
||||
}
|
||||
|
||||
if (biome == BiomeGenBase.desert && rand.nextInt(MainRegistry.barrelStructure) == 0) {
|
||||
int x = i + rand.nextInt(16);
|
||||
int z = j + rand.nextInt(16);
|
||||
int y = world.getHeightValue(x, z);
|
||||
|
||||
new Barrel().generate(world, rand, x, y, z);
|
||||
}
|
||||
|
||||
if (rand.nextInt(MainRegistry.broadcaster) == 0) {
|
||||
int x = i + rand.nextInt(16);
|
||||
@ -377,9 +386,12 @@ public class HbmWorldGen implements IWorldGenerator {
|
||||
double r = rand.nextInt(15) + 10;
|
||||
|
||||
if(rand.nextInt(50) == 0)
|
||||
r = 35;
|
||||
r = 50;
|
||||
|
||||
new Sellafield().generate(world, x, z, r, r * 0.35D);
|
||||
|
||||
if(MainRegistry.enableDebugMode)
|
||||
MainRegistry.logger.info("[Debug] Successfully spawned raditation hotspot at " + x + " " + z);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -605,7 +605,15 @@ public class Library {
|
||||
if(slots[index] != null && slots[index].getItem() instanceof ItemBattery) {
|
||||
|
||||
long dR = ((ItemBattery)slots[index].getItem()).getChargeRate();
|
||||
|
||||
|
||||
while(dR >= 1000000000000L) {
|
||||
if(power - 100000000000000L >= 0 && ItemBattery.getCharge(slots[index]) < ((ItemBattery)slots[index].getItem()).getMaxCharge())
|
||||
{
|
||||
power -= 100000000000000L;
|
||||
dR -= 1000000000000L;
|
||||
((ItemBattery)slots[index].getItem()).chargeBattery(slots[index], 1);
|
||||
} else break;
|
||||
}
|
||||
while(dR >= 1000000000) {
|
||||
if(power - 100000000000L >= 0 && ItemBattery.getCharge(slots[index]) < ((ItemBattery)slots[index].getItem()).getMaxCharge())
|
||||
{
|
||||
@ -703,7 +711,15 @@ public class Library {
|
||||
if(slots[index] != null && slots[index].getItem() instanceof ItemBattery) {
|
||||
|
||||
long dR = ((ItemBattery)slots[index].getItem()).getDischargeRate();
|
||||
|
||||
|
||||
while(dR >= 1000000000000L) {
|
||||
if(power + 100000000000000L <= maxPower && ItemBattery.getCharge(slots[index]) > 0)
|
||||
{
|
||||
power += 100000000000000L;
|
||||
dR -= 1000000000000L;
|
||||
((ItemBattery)slots[index].getItem()).dischargeBattery(slots[index], 1);
|
||||
} else break;
|
||||
}
|
||||
while(dR >= 1000000000) {
|
||||
if(power + 100000000000L <= maxPower && ItemBattery.getCharge(slots[index]) > 0)
|
||||
{
|
||||
|
||||
@ -97,7 +97,8 @@ public class CraftingManager {
|
||||
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.canister_empty, 2), new Object[] { "S ", "AA", "AA", 'S', "plateSteel", 'A', "plateAluminum" }));
|
||||
//GameRegistry.addRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.red_barrel), 1), new Object[] { "DDD", "DTD", "DDD", 'D', ModItems.canister_fuel, 'T', ModItems.tank_steel });
|
||||
GameRegistry.addRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.yellow_barrel), 1), new Object[] { "DDD", "DTD", "DDD", 'D', ModItems.nuclear_waste, 'T', ModItems.tank_steel });
|
||||
GameRegistry.addRecipe(new ItemStack(ModBlocks.yellow_barrel, 1), new Object[] { "DDD", "DTD", "DDD", 'D', ModItems.nuclear_waste, 'T', ModItems.tank_steel });
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.nuclear_waste, 8), new Object[] { "B", 'B', ModBlocks.yellow_barrel });
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gas_empty, 2), new Object[] { "S ", "AA", "AA", 'A', "plateSteel", 'S', "plateCopper" }));
|
||||
|
||||
GameRegistry.addRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.block_aluminium), 1), new Object[] { "###", "###", "###", '#', ModItems.ingot_aluminium });
|
||||
|
||||
@ -496,6 +496,7 @@ public class MainRegistry
|
||||
public static int factoryStructure = 1000;
|
||||
public static int dudStructure = 500;
|
||||
public static int spaceshipStructure = 1000;
|
||||
public static int barrelStructure = 5000;
|
||||
public static int broadcaster = 5000;
|
||||
public static int minefreq = 64;
|
||||
public static int radfreq = 5000;
|
||||
@ -1523,13 +1524,16 @@ public class MainRegistry
|
||||
Property propSpaceship = config.get(Configuration.CATEGORY_GENERAL, "4.11_spaceshipSpawn", 1000);
|
||||
propSpaceship.comment = "Spawn spaceship on every nTH chunk";
|
||||
spaceshipStructure = propSpaceship.getInt();
|
||||
Property propBroadcaster = config.get(Configuration.CATEGORY_GENERAL, "4.12_broadcasterSpawn", 5000);
|
||||
Property propBarrel = config.get(Configuration.CATEGORY_GENERAL, "4.12_barrelSpawn", 5000);
|
||||
propBarrel.comment = "Spawn waste tank on every nTH chunk";
|
||||
barrelStructure = propBarrel.getInt();
|
||||
Property propBroadcaster = config.get(Configuration.CATEGORY_GENERAL, "4.13_broadcasterSpawn", 5000);
|
||||
propBroadcaster.comment = "Spawn corrupt broadcaster on every nTH chunk";
|
||||
broadcaster = propBroadcaster.getInt();
|
||||
Property propMines = config.get(Configuration.CATEGORY_GENERAL, "4.13_landmineSpawn", 64);
|
||||
Property propMines = config.get(Configuration.CATEGORY_GENERAL, "4.14_landmineSpawn", 64);
|
||||
propMines.comment = "Spawn AP landmine on every nTH chunk";
|
||||
minefreq = propMines.getInt();
|
||||
Property propRad = config.get(Configuration.CATEGORY_GENERAL, "4.14_radHotsoptSpawn", 5000);
|
||||
Property propRad = config.get(Configuration.CATEGORY_GENERAL, "4.15_radHotsoptSpawn", 5000);
|
||||
propRad.comment = "Spawn radiation hotspot on every nTH chunk";
|
||||
radfreq = propRad.getInt();
|
||||
|
||||
|
||||
@ -11,6 +11,7 @@ import com.hbm.tileentity.machine.TileEntityAMSLimiter;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineDiesel;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineReactorSmall;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineSeleniumEngine;
|
||||
import com.hbm.tileentity.machine.TileEntityRadioRec;
|
||||
|
||||
import cpw.mods.fml.common.network.simpleimpl.IMessage;
|
||||
import cpw.mods.fml.common.network.simpleimpl.IMessageHandler;
|
||||
@ -79,6 +80,20 @@ public class AuxButtonPacket implements IMessage {
|
||||
reactor.retracting = m.value == 1;
|
||||
}
|
||||
|
||||
if (te instanceof TileEntityRadioRec) {
|
||||
TileEntityRadioRec radio = (TileEntityRadioRec)te;
|
||||
|
||||
if(m.id == 0) {
|
||||
radio.isOn = (m.value == 1);
|
||||
System.out.println("Radio is now " + radio.isOn);
|
||||
}
|
||||
|
||||
if(m.id == 1) {
|
||||
radio.freq = ((double)m.value) / 10D;
|
||||
System.out.println("Radio is now " + radio.freq);
|
||||
}
|
||||
}
|
||||
|
||||
//} catch (Exception x) { }
|
||||
|
||||
return null;
|
||||
|
||||
@ -11,6 +11,7 @@ import com.hbm.tileentity.machine.TileEntityAMSLimiter;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineDiesel;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineReactorSmall;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineSeleniumEngine;
|
||||
import com.hbm.tileentity.machine.TileEntityRadioRec;
|
||||
|
||||
import cpw.mods.fml.common.network.simpleimpl.IMessage;
|
||||
import cpw.mods.fml.common.network.simpleimpl.IMessageHandler;
|
||||
@ -140,6 +141,14 @@ public class AuxGaugePacket implements IMessage {
|
||||
if(m.id == 2)
|
||||
bomber.type = m.value;
|
||||
}
|
||||
if (te instanceof TileEntityRadioRec) {
|
||||
TileEntityRadioRec radio = (TileEntityRadioRec)te;
|
||||
|
||||
if(m.id == 0)
|
||||
radio.isOn = (m.value == 1);
|
||||
if(m.id == 1)
|
||||
radio.freq = ((double)m.value) / 10D;
|
||||
}
|
||||
|
||||
} catch (Exception x) { }
|
||||
return null;
|
||||
|
||||
@ -252,6 +252,10 @@ public class TileEntityNukeCustom extends TileEntity implements ISidedInventory
|
||||
if(item == ModItems.clip_immolator) {
|
||||
this.tntStrength += 3.5F;
|
||||
}
|
||||
|
||||
if(item == ModItems.custom_tnt) {
|
||||
this.tntStrength += 10F;
|
||||
}
|
||||
//
|
||||
if(item == ModItems.ingot_u235) {
|
||||
this.nukeStrength += 15F;
|
||||
@ -274,6 +278,10 @@ public class TileEntityNukeCustom extends TileEntity implements ISidedInventory
|
||||
if(item == ModItems.powder_neptunium) {
|
||||
this.nukeStrength += 30F;
|
||||
}
|
||||
|
||||
if(item == ModItems.custom_nuke) {
|
||||
this.nukeStrength += 30F;
|
||||
}
|
||||
//
|
||||
if(item == ModItems.cell_deuterium) {
|
||||
this.hydroStrength += 20F;
|
||||
@ -287,10 +295,18 @@ public class TileEntityNukeCustom extends TileEntity implements ISidedInventory
|
||||
if(item == ModItems.tritium_deuterium_cake) {
|
||||
this.hydroStrength += 200F;
|
||||
}
|
||||
|
||||
if(item == ModItems.custom_hydro) {
|
||||
this.hydroStrength += 30F;
|
||||
}
|
||||
//
|
||||
if(item == ModItems.cell_antimatter) {
|
||||
this.amatStrength += 5F;
|
||||
}
|
||||
|
||||
if(item == ModItems.custom_amat) {
|
||||
this.amatStrength += 15F;
|
||||
}
|
||||
//
|
||||
if(item == ModItems.ingot_tungsten) {
|
||||
this.dirtyStrength += 10F;
|
||||
@ -304,6 +320,10 @@ public class TileEntityNukeCustom extends TileEntity implements ISidedInventory
|
||||
if(item == Item.getItemFromBlock(ModBlocks.block_waste)) {
|
||||
this.dirtyStrength += 25F;
|
||||
}
|
||||
|
||||
if(item == ModItems.custom_dirty) {
|
||||
this.dirtyStrength += 10F;
|
||||
}
|
||||
//
|
||||
if(item == ModItems.ingot_schrabidium) {
|
||||
this.schrabStrength += 5F;
|
||||
@ -323,6 +343,10 @@ public class TileEntityNukeCustom extends TileEntity implements ISidedInventory
|
||||
if(item == ModItems.cell_anti_schrabidium) {
|
||||
this.schrabStrength += 15F;
|
||||
}
|
||||
|
||||
if(item == ModItems.custom_schrab) {
|
||||
this.schrabStrength += 15F;
|
||||
}
|
||||
//
|
||||
if(item == ModItems.nugget_euphemium) {
|
||||
this.euphStrength += 1F;
|
||||
|
||||
@ -208,6 +208,9 @@ public class TileEntityMachineKeyForge extends TileEntity implements ISidedInven
|
||||
if(slots[2] != null && slots[2].getItem() == Items.reeds) {
|
||||
slots[2] = new ItemStack(ModItems.man_kit);
|
||||
}
|
||||
if(slots[2] != null && slots[2].getItem() == ModItems.battery_generic) {
|
||||
slots[2] = new ItemStack(ModItems.memory);
|
||||
}
|
||||
//
|
||||
}
|
||||
}
|
||||
|
||||
@ -341,9 +341,17 @@ public class TileEntityMachineRadGen extends TileEntity implements ISidedInvento
|
||||
|
||||
if(item == ModItems.nuclear_waste) return 100;
|
||||
if(item == Item.getItemFromBlock(ModBlocks.block_waste)) return 1000;
|
||||
if(item == Item.getItemFromBlock(ModBlocks.yellow_barrel)) return 900;
|
||||
if(item == ModItems.trinitite) return 80;
|
||||
if(item == Item.getItemFromBlock(ModBlocks.block_trinitite)) return 800;
|
||||
|
||||
if(item == Item.getItemFromBlock(ModBlocks.sellafield_0)) return 1000;
|
||||
if(item == Item.getItemFromBlock(ModBlocks.sellafield_1)) return 2000;
|
||||
if(item == Item.getItemFromBlock(ModBlocks.sellafield_2)) return 3000;
|
||||
if(item == Item.getItemFromBlock(ModBlocks.sellafield_3)) return 4000;
|
||||
if(item == Item.getItemFromBlock(ModBlocks.sellafield_4)) return 5000;
|
||||
if(item == Item.getItemFromBlock(ModBlocks.sellafield_core)) return 10000;
|
||||
|
||||
if(item == ModItems.rod_uranium_fuel_depleted) return 400;
|
||||
if(item == ModItems.rod_dual_uranium_fuel_depleted) return 800;
|
||||
if(item == ModItems.rod_quad_uranium_fuel_depleted) return 1600;
|
||||
|
||||
@ -54,7 +54,7 @@ public class TileEntityMachineSPP extends TileEntity implements ISource {
|
||||
break;
|
||||
}
|
||||
|
||||
for(int i = yCoord + 1; i < h - 1; i++)
|
||||
for(int i = yCoord + 1; i < h; i++)
|
||||
if(!checkSegment(i))
|
||||
return 0;
|
||||
|
||||
|
||||
@ -1,7 +1,40 @@
|
||||
package com.hbm.tileentity.machine;
|
||||
|
||||
import com.hbm.packet.AuxGaugePacket;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
public class TileEntityRadioRec extends TileEntity {
|
||||
|
||||
public double freq;
|
||||
public boolean isOn = false;
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
|
||||
if(!worldObj.isRemote) {
|
||||
PacketDispatcher.wrapper.sendToAll(new AuxGaugePacket(xCoord, yCoord, zCoord, isOn ? 1 : 0, 0));
|
||||
PacketDispatcher.wrapper.sendToAll(new AuxGaugePacket(xCoord, yCoord, zCoord, (int)(freq * 10D), 1));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound nbt) {
|
||||
super.readFromNBT(nbt);
|
||||
|
||||
freq = nbt.getDouble("freq");
|
||||
isOn = nbt.getBoolean("isOn");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound nbt) {
|
||||
super.writeToNBT(nbt);
|
||||
|
||||
nbt.setDouble("freq", freq);
|
||||
nbt.setBoolean("isOn", isOn);
|
||||
}
|
||||
}
|
||||
|
||||
413
com/hbm/world/Barrel.java
Normal file
@ -0,0 +1,413 @@
|
||||
//Schematic to java Structure by jajo_11 | inspired by "MITHION'S .SCHEMATIC TO JAVA CONVERTINGTOOL"
|
||||
|
||||
package com.hbm.world;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.lib.HbmChestContents;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.tileentity.bomb.TileEntitySellafield;
|
||||
import com.hbm.tileentity.machine.TileEntityCrateSteel;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemDoor;
|
||||
import net.minecraft.tileentity.TileEntityChest;
|
||||
import net.minecraft.util.WeightedRandomChestContent;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
||||
|
||||
public class Barrel extends WorldGenerator {
|
||||
|
||||
protected Block[] GetValidSpawnBlocks() {
|
||||
|
||||
return new Block[] {
|
||||
Blocks.grass,
|
||||
Blocks.dirt,
|
||||
Blocks.sand,
|
||||
Blocks.stone,
|
||||
Blocks.sandstone
|
||||
};
|
||||
}
|
||||
|
||||
public boolean LocationIsValidSpawn(World world, int x, int y, int z) {
|
||||
|
||||
Block checkBlock = world.getBlock(x, y - 1, z);
|
||||
Block blockAbove = world.getBlock(x, y, z);
|
||||
Block blockBelow = world.getBlock(x, y - 2, z);
|
||||
|
||||
for (Block i : GetValidSpawnBlocks()) {
|
||||
if (blockAbove != Blocks.air) {
|
||||
return false;
|
||||
}
|
||||
if (checkBlock == i) {
|
||||
return true;
|
||||
} else if (checkBlock == Blocks.snow_layer && blockBelow == i) {
|
||||
return true;
|
||||
} else if (checkBlock.getMaterial() == Material.plants && blockBelow == i) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean generate(World world, Random rand, int x, int y, int z) {
|
||||
int i = rand.nextInt(1);
|
||||
|
||||
if (i == 0) {
|
||||
generate_r0(world, rand, x, y, z);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
Block Block1 = ModBlocks.reinforced_brick;
|
||||
Block Block2 = ModBlocks.sellafield_slaked;
|
||||
Block Block3 = ModBlocks.brick_concrete;
|
||||
Block Block4 = ModBlocks.sellafield_3;
|
||||
Block Block5 = ModBlocks.sellafield_4;
|
||||
Block Block6 = ModBlocks.sellafield_core;
|
||||
Block Block7 = ModBlocks.sellafield_2;
|
||||
Block Block8 = ModBlocks.sellafield_1;
|
||||
Block Block9 = ModBlocks.sellafield_0;
|
||||
Block Block10 = ModBlocks.deco_lead;
|
||||
Block Block11 = ModBlocks.reinforced_glass;
|
||||
Block Block12 = ModBlocks.toxic_block;
|
||||
|
||||
public boolean generate_r0(World world, Random rand, int x, int y, int z) {
|
||||
if (!LocationIsValidSpawn(world, x, y, z) || !LocationIsValidSpawn(world, x + 4, y, z)
|
||||
|| !LocationIsValidSpawn(world, x + 4, y, z + 6) || !LocationIsValidSpawn(world, x, y, z + 6)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
world.setBlock(x + 1, y + -1, z + 0, Block1, 0, 3);
|
||||
world.setBlock(x + 2, y + -1, z + 0, Block1, 0, 3);
|
||||
world.setBlock(x + 3, y + -1, z + 0, Block1, 0, 3);
|
||||
world.setBlock(x + 0, y + -1, z + 1, Block1, 0, 3);
|
||||
world.setBlock(x + 1, y + -1, z + 1, Block1, 0, 3);
|
||||
world.setBlock(x + 2, y + -1, z + 1, Block1, 0, 3);
|
||||
world.setBlock(x + 3, y + -1, z + 1, Block1, 0, 3);
|
||||
world.setBlock(x + 4, y + -1, z + 1, Block1, 0, 3);
|
||||
world.setBlock(x + 0, y + -1, z + 2, Block1, 0, 3);
|
||||
world.setBlock(x + 1, y + -1, z + 2, Block1, 0, 3);
|
||||
world.setBlock(x + 2, y + -1, z + 2, Block1, 0, 3);
|
||||
world.setBlock(x + 3, y + -1, z + 2, Block1, 0, 3);
|
||||
world.setBlock(x + 4, y + -1, z + 2, Block1, 0, 3);
|
||||
world.setBlock(x + 0, y + -1, z + 3, Block1, 0, 3);
|
||||
world.setBlock(x + 1, y + -1, z + 3, Block1, 0, 3);
|
||||
world.setBlock(x + 2, y + -1, z + 3, Block1, 0, 3);
|
||||
world.setBlock(x + 3, y + -1, z + 3, Block1, 0, 3);
|
||||
world.setBlock(x + 4, y + -1, z + 3, Block1, 0, 3);
|
||||
world.setBlock(x + 1, y + -1, z + 4, Block1, 0, 3);
|
||||
world.setBlock(x + 2, y + -1, z + 4, Block1, 0, 3);
|
||||
world.setBlock(x + 3, y + -1, z + 4, Block1, 0, 3);
|
||||
world.setBlock(x + 1, y + -1, z + 5, Block1, 0, 3);
|
||||
world.setBlock(x + 2, y + -1, z + 5, Block1, 0, 3);
|
||||
world.setBlock(x + 3, y + -1, z + 5, Block1, 0, 3);
|
||||
world.setBlock(x + 1, y + -1, z + 6, Block1, 0, 3);
|
||||
world.setBlock(x + 2, y + -1, z + 6, Block1, 0, 3);
|
||||
world.setBlock(x + 3, y + -1, z + 6, Block1, 0, 3);
|
||||
world.setBlock(x + 1, y + 0, z + 0, Block2, 0, 3);
|
||||
world.setBlock(x + 2, y + 0, z + 0, Block3, 0, 3);
|
||||
world.setBlock(x + 3, y + 0, z + 0, Block2, 0, 3);
|
||||
world.setBlock(x + 0, y + 0, z + 1, Block3, 0, 3);
|
||||
world.setBlock(x + 1, y + 0, z + 1, Block4, 0, 3);
|
||||
world.setBlock(x + 2, y + 0, z + 1, Block5, 0, 3);
|
||||
world.setBlock(x + 3, y + 0, z + 1, Block4, 0, 3);
|
||||
world.setBlock(x + 4, y + 0, z + 1, Block3, 0, 3);
|
||||
world.setBlock(x + 0, y + 0, z + 2, Block3, 0, 3);
|
||||
world.setBlock(x + 1, y + 0, z + 2, Block5, 0, 3);
|
||||
world.setBlock(x + 2, y + 0, z + 2, Block6, 0, 3);
|
||||
|
||||
if(world.getTileEntity(x + 2, y + 0, z + 2) instanceof TileEntitySellafield) {
|
||||
((TileEntitySellafield)world.getTileEntity(x + 2, y + 0, z + 2)).radius = 2.5;
|
||||
}
|
||||
|
||||
world.setBlock(x + 3, y + 0, z + 2, Block5, 0, 3);
|
||||
world.setBlock(x + 4, y + 0, z + 2, Block2, 0, 3);
|
||||
world.setBlock(x + 0, y + 0, z + 3, Block2, 0, 3);
|
||||
world.setBlock(x + 1, y + 0, z + 3, Block5, 0, 3);
|
||||
world.setBlock(x + 2, y + 0, z + 3, Block4, 0, 3);
|
||||
world.setBlock(x + 3, y + 0, z + 3, Block5, 0, 3);
|
||||
world.setBlock(x + 4, y + 0, z + 3, Block2, 0, 3);
|
||||
world.setBlock(x + 1, y + 0, z + 4, Block2, 0, 3);
|
||||
world.setBlock(x + 2, y + 0, z + 4, Block3, 0, 3);
|
||||
world.setBlock(x + 3, y + 0, z + 4, Block3, 0, 3);
|
||||
world.setBlock(x + 1, y + 1, z + 0, Block2, 0, 3);
|
||||
world.setBlock(x + 2, y + 1, z + 0, Block3, 0, 3);
|
||||
world.setBlock(x + 3, y + 1, z + 0, Block2, 0, 3);
|
||||
world.setBlock(x + 0, y + 1, z + 1, Block3, 0, 3);
|
||||
world.setBlock(x + 1, y + 1, z + 1, Block7, 0, 3);
|
||||
world.setBlock(x + 2, y + 1, z + 1, Block4, 0, 3);
|
||||
world.setBlock(x + 3, y + 1, z + 1, Block4, 0, 3);
|
||||
world.setBlock(x + 4, y + 1, z + 1, Block2, 0, 3);
|
||||
world.setBlock(x + 0, y + 1, z + 2, Block3, 0, 3);
|
||||
world.setBlock(x + 1, y + 1, z + 2, Block4, 0, 3);
|
||||
|
||||
/*world.setBlock(x + 2, y + 1, z + 2, Blocks.chest, 3, 3);
|
||||
|
||||
if(world.getBlock(x + 2, y + 1, z + 2) == Blocks.chest)
|
||||
{
|
||||
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.getLoot(3), (TileEntityChest)world.getTileEntity(x + 2, y + 1, z + 2), 16);
|
||||
}*/
|
||||
|
||||
world.setBlock(x + 2, y + 1, z + 2, ModBlocks.crate_steel, 0, 3);
|
||||
|
||||
if(world.getBlock(x + 2, y + 1, z + 2) == ModBlocks.crate_steel)
|
||||
{
|
||||
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.getLoot(3), (TileEntityCrateSteel)world.getTileEntity(x + 2, y + 1, z + 2), 32);
|
||||
}
|
||||
|
||||
world.setBlock(x + 3, y + 1, z + 2, Block4, 0, 3);
|
||||
world.setBlock(x + 4, y + 1, z + 2, Block3, 0, 3);
|
||||
world.setBlock(x + 0, y + 1, z + 3, Block3, 0, 3);
|
||||
world.setBlock(x + 1, y + 1, z + 3, Block4, 0, 3);
|
||||
world.setBlock(x + 2, y + 1, z + 3, Block7, 0, 3);
|
||||
world.setBlock(x + 3, y + 1, z + 3, Block4, 0, 3);
|
||||
world.setBlock(x + 4, y + 1, z + 3, Block2, 0, 3);
|
||||
world.setBlock(x + 1, y + 1, z + 4, Block2, 0, 3);
|
||||
world.setBlock(x + 2, y + 1, z + 4, Block3, 0, 3);
|
||||
world.setBlock(x + 3, y + 1, z + 4, Block3, 0, 3);
|
||||
world.setBlock(x + 1, y + 2, z + 0, Block3, 0, 3);
|
||||
world.setBlock(x + 2, y + 2, z + 0, Block2, 0, 3);
|
||||
world.setBlock(x + 3, y + 2, z + 0, Block3, 0, 3);
|
||||
world.setBlock(x + 0, y + 2, z + 1, Block2, 0, 3);
|
||||
world.setBlock(x + 1, y + 2, z + 1, Block8, 0, 3);
|
||||
world.setBlock(x + 2, y + 2, z + 1, Block7, 0, 3);
|
||||
world.setBlock(x + 3, y + 2, z + 1, Block7, 0, 3);
|
||||
world.setBlock(x + 4, y + 2, z + 1, Block3, 0, 3);
|
||||
world.setBlock(x + 0, y + 2, z + 2, Block3, 0, 3);
|
||||
world.setBlock(x + 1, y + 2, z + 2, Block7, 0, 3);
|
||||
world.setBlock(x + 2, y + 2, z + 2, Block5, 0, 3);
|
||||
world.setBlock(x + 3, y + 2, z + 2, Block7, 0, 3);
|
||||
world.setBlock(x + 4, y + 2, z + 2, Block3, 0, 3);
|
||||
world.setBlock(x + 0, y + 2, z + 3, Block3, 0, 3);
|
||||
world.setBlock(x + 1, y + 2, z + 3, Block7, 0, 3);
|
||||
world.setBlock(x + 2, y + 2, z + 3, Block8, 0, 3);
|
||||
world.setBlock(x + 3, y + 2, z + 3, Block7, 0, 3);
|
||||
world.setBlock(x + 4, y + 2, z + 3, Block3, 0, 3);
|
||||
world.setBlock(x + 1, y + 2, z + 4, Block3, 0, 3);
|
||||
world.setBlock(x + 2, y + 2, z + 4, Block3, 0, 3);
|
||||
world.setBlock(x + 3, y + 2, z + 4, Block3, 0, 3);
|
||||
world.setBlock(x + 1, y + 3, z + 0, Block3, 0, 3);
|
||||
world.setBlock(x + 2, y + 3, z + 0, Block3, 0, 3);
|
||||
world.setBlock(x + 3, y + 3, z + 0, Block3, 0, 3);
|
||||
world.setBlock(x + 0, y + 3, z + 1, Block3, 0, 3);
|
||||
world.setBlock(x + 1, y + 3, z + 1, Block8, 0, 3);
|
||||
world.setBlock(x + 2, y + 3, z + 1, Block8, 0, 3);
|
||||
world.setBlock(x + 3, y + 3, z + 1, Block8, 0, 3);
|
||||
world.setBlock(x + 4, y + 3, z + 1, Block2, 0, 3);
|
||||
world.setBlock(x + 0, y + 3, z + 2, Block3, 0, 3);
|
||||
world.setBlock(x + 1, y + 3, z + 2, Block8, 0, 3);
|
||||
world.setBlock(x + 2, y + 3, z + 2, Block4, 0, 3);
|
||||
world.setBlock(x + 3, y + 3, z + 2, Block8, 0, 3);
|
||||
world.setBlock(x + 4, y + 3, z + 2, Block3, 0, 3);
|
||||
world.setBlock(x + 0, y + 3, z + 3, Block2, 0, 3);
|
||||
world.setBlock(x + 1, y + 3, z + 3, Block8, 0, 3);
|
||||
world.setBlock(x + 2, y + 3, z + 3, Block9, 0, 3);
|
||||
world.setBlock(x + 3, y + 3, z + 3, Block8, 0, 3);
|
||||
world.setBlock(x + 4, y + 3, z + 3, Block3, 0, 3);
|
||||
world.setBlock(x + 1, y + 3, z + 4, Block3, 0, 3);
|
||||
world.setBlock(x + 2, y + 3, z + 4, Block3, 0, 3);
|
||||
world.setBlock(x + 3, y + 3, z + 4, Block3, 0, 3);
|
||||
world.setBlock(x + 1, y + 4, z + 0, Block3, 0, 3);
|
||||
world.setBlock(x + 2, y + 4, z + 0, Block3, 0, 3);
|
||||
world.setBlock(x + 3, y + 4, z + 0, Block3, 0, 3);
|
||||
world.setBlock(x + 0, y + 4, z + 1, Block3, 0, 3);
|
||||
world.setBlock(x + 1, y + 4, z + 1, Block9, 0, 3);
|
||||
world.setBlock(x + 2, y + 4, z + 1, Block8, 0, 3);
|
||||
world.setBlock(x + 3, y + 4, z + 1, Block9, 0, 3);
|
||||
world.setBlock(x + 4, y + 4, z + 1, Block3, 0, 3);
|
||||
world.setBlock(x + 0, y + 4, z + 2, Block3, 0, 3);
|
||||
world.setBlock(x + 1, y + 4, z + 2, Block9, 0, 3);
|
||||
world.setBlock(x + 2, y + 4, z + 2, Block7, 0, 3);
|
||||
world.setBlock(x + 3, y + 4, z + 2, Block8, 0, 3);
|
||||
world.setBlock(x + 4, y + 4, z + 2, Block2, 0, 3);
|
||||
world.setBlock(x + 0, y + 4, z + 3, Block3, 0, 3);
|
||||
world.setBlock(x + 1, y + 4, z + 3, Block8, 0, 3);
|
||||
world.setBlock(x + 2, y + 4, z + 3, Block9, 0, 3);
|
||||
world.setBlock(x + 3, y + 4, z + 3, Block9, 0, 3);
|
||||
world.setBlock(x + 4, y + 4, z + 3, Block2, 0, 3);
|
||||
world.setBlock(x + 1, y + 4, z + 4, Block3, 0, 3);
|
||||
world.setBlock(x + 2, y + 4, z + 4, Block3, 0, 3);
|
||||
world.setBlock(x + 3, y + 4, z + 4, Block2, 0, 3);
|
||||
world.setBlock(x + 1, y + 5, z + 0, Block3, 0, 3);
|
||||
world.setBlock(x + 2, y + 5, z + 0, Block3, 0, 3);
|
||||
world.setBlock(x + 3, y + 5, z + 0, Block3, 0, 3);
|
||||
world.setBlock(x + 0, y + 5, z + 1, Block3, 0, 3);
|
||||
world.setBlock(x + 1, y + 5, z + 1, Block9, 0, 3);
|
||||
world.setBlock(x + 2, y + 5, z + 1, Block9, 0, 3);
|
||||
world.setBlock(x + 3, y + 5, z + 1, Block9, 0, 3);
|
||||
world.setBlock(x + 4, y + 5, z + 1, Block2, 0, 3);
|
||||
world.setBlock(x + 0, y + 5, z + 2, Block3, 0, 3);
|
||||
world.setBlock(x + 1, y + 5, z + 2, Block12, 0, 3);
|
||||
world.setBlock(x + 2, y + 5, z + 2, Block8, 0, 3);
|
||||
world.setBlock(x + 3, y + 5, z + 2, Block12, 0, 3);
|
||||
world.setBlock(x + 4, y + 5, z + 2, Blocks.air, 0, 3);
|
||||
world.setBlock(x + 0, y + 5, z + 3, Block3, 0, 3);
|
||||
world.setBlock(x + 1, y + 5, z + 3, Block9, 0, 3);
|
||||
world.setBlock(x + 2, y + 5, z + 3, Block9, 0, 3);
|
||||
world.setBlock(x + 3, y + 5, z + 3, Block12, 0, 3);
|
||||
world.setBlock(x + 4, y + 5, z + 3, Block2, 0, 3);
|
||||
world.setBlock(x + 1, y + 5, z + 4, Block3, 0, 3);
|
||||
world.setBlock(x + 2, y + 5, z + 4, Block3, 0, 3);
|
||||
world.setBlock(x + 3, y + 5, z + 4, Block3, 0, 3);
|
||||
world.setBlock(x + 1, y + 6, z + 0, Block10, 0, 3);
|
||||
world.setBlock(x + 2, y + 6, z + 0, Block10, 0, 3);
|
||||
world.setBlock(x + 3, y + 6, z + 0, Block10, 0, 3);
|
||||
world.setBlock(x + 0, y + 6, z + 1, Block10, 0, 3);
|
||||
world.setBlock(x + 1, y + 6, z + 1, Block12, 0, 3);
|
||||
world.setBlock(x + 2, y + 6, z + 1, Block12, 0, 3);
|
||||
world.setBlock(x + 3, y + 6, z + 1, Block12, 0, 3);
|
||||
world.setBlock(x + 4, y + 6, z + 1, Block10, 0, 3);
|
||||
world.setBlock(x + 0, y + 6, z + 2, Block10, 0, 3);
|
||||
world.setBlock(x + 1, y + 6, z + 2, Block12, 0, 3);
|
||||
world.setBlock(x + 2, y + 6, z + 2, Block9, 0, 3);
|
||||
world.setBlock(x + 3, y + 6, z + 2, Block12, 0, 3);
|
||||
world.setBlock(x + 4, y + 6, z + 2, Block10, 0, 3);
|
||||
world.setBlock(x + 0, y + 6, z + 3, Block10, 0, 3);
|
||||
world.setBlock(x + 1, y + 6, z + 3, Block12, 0, 3);
|
||||
world.setBlock(x + 2, y + 6, z + 3, Block12, 0, 3);
|
||||
world.setBlock(x + 3, y + 6, z + 3, Block12, 0, 3);
|
||||
world.setBlock(x + 4, y + 6, z + 3, Block10, 0, 3);
|
||||
world.setBlock(x + 1, y + 6, z + 4, Block10, 0, 3);
|
||||
world.setBlock(x + 2, y + 6, z + 4, Block10, 0, 3);
|
||||
world.setBlock(x + 3, y + 6, z + 4, Block10, 0, 3);
|
||||
world.setBlock(x + 1, y + 7, z + 0, Block3, 0, 3);
|
||||
world.setBlock(x + 2, y + 7, z + 0, Block3, 0, 3);
|
||||
world.setBlock(x + 3, y + 7, z + 0, Block3, 0, 3);
|
||||
world.setBlock(x + 0, y + 7, z + 1, Block3, 0, 3);
|
||||
world.setBlock(x + 1, y + 7, z + 1, Block12, 0, 3);
|
||||
world.setBlock(x + 2, y + 7, z + 1, Block12, 0, 3);
|
||||
world.setBlock(x + 3, y + 7, z + 1, Block12, 0, 3);
|
||||
world.setBlock(x + 4, y + 7, z + 1, Block2, 0, 3);
|
||||
world.setBlock(x + 0, y + 7, z + 2, Block3, 0, 3);
|
||||
world.setBlock(x + 1, y + 7, z + 2, Block12, 0, 3);
|
||||
world.setBlock(x + 2, y + 7, z + 2, Block12, 0, 3);
|
||||
world.setBlock(x + 3, y + 7, z + 2, Block12, 0, 3);
|
||||
world.setBlock(x + 4, y + 7, z + 2, Block2, 0, 3);
|
||||
world.setBlock(x + 0, y + 7, z + 3, Block3, 0, 3);
|
||||
world.setBlock(x + 1, y + 7, z + 3, Block12, 0, 3);
|
||||
world.setBlock(x + 2, y + 7, z + 3, Block12, 0, 3);
|
||||
world.setBlock(x + 3, y + 7, z + 3, Block12, 0, 3);
|
||||
world.setBlock(x + 4, y + 7, z + 3, Block3, 0, 3);
|
||||
world.setBlock(x + 1, y + 7, z + 4, Block3, 0, 3);
|
||||
world.setBlock(x + 2, y + 7, z + 4, Block3, 0, 3);
|
||||
world.setBlock(x + 3, y + 7, z + 4, Block3, 0, 3);
|
||||
world.setBlock(x + 1, y + 8, z + 0, Block10, 0, 3);
|
||||
world.setBlock(x + 2, y + 8, z + 0, Block10, 0, 3);
|
||||
world.setBlock(x + 3, y + 8, z + 0, Block10, 0, 3);
|
||||
world.setBlock(x + 0, y + 8, z + 1, Block10, 0, 3);
|
||||
world.setBlock(x + 1, y + 8, z + 1, Block12, 0, 3);
|
||||
world.setBlock(x + 2, y + 8, z + 1, Block12, 0, 3);
|
||||
world.setBlock(x + 3, y + 8, z + 1, Block12, 0, 3);
|
||||
world.setBlock(x + 4, y + 8, z + 1, Block10, 0, 3);
|
||||
world.setBlock(x + 0, y + 8, z + 2, Block10, 0, 3);
|
||||
world.setBlock(x + 1, y + 8, z + 2, Block12, 0, 3);
|
||||
world.setBlock(x + 2, y + 8, z + 2, Block12, 0, 3);
|
||||
world.setBlock(x + 3, y + 8, z + 2, Block12, 0, 3);
|
||||
world.setBlock(x + 4, y + 8, z + 2, Block10, 0, 3);
|
||||
world.setBlock(x + 0, y + 8, z + 3, Block10, 0, 3);
|
||||
world.setBlock(x + 1, y + 8, z + 3, Block12, 0, 3);
|
||||
world.setBlock(x + 2, y + 8, z + 3, Block12, 0, 3);
|
||||
world.setBlock(x + 3, y + 8, z + 3, Block12, 0, 3);
|
||||
world.setBlock(x + 4, y + 8, z + 3, Block10, 0, 3);
|
||||
world.setBlock(x + 1, y + 8, z + 4, Block10, 0, 3);
|
||||
world.setBlock(x + 2, y + 8, z + 4, Block10, 0, 3);
|
||||
world.setBlock(x + 3, y + 8, z + 4, Block10, 0, 3);
|
||||
world.setBlock(x + 1, y + 9, z + 0, Block3, 0, 3);
|
||||
world.setBlock(x + 2, y + 9, z + 0, Block3, 0, 3);
|
||||
world.setBlock(x + 3, y + 9, z + 0, Block3, 0, 3);
|
||||
world.setBlock(x + 0, y + 9, z + 1, Block3, 0, 3);
|
||||
world.setBlock(x + 4, y + 9, z + 1, Block3, 0, 3);
|
||||
world.setBlock(x + 0, y + 9, z + 2, Block3, 0, 3);
|
||||
world.setBlock(x + 4, y + 9, z + 2, Block3, 0, 3);
|
||||
world.setBlock(x + 0, y + 9, z + 3, Block3, 0, 3);
|
||||
world.setBlock(x + 4, y + 9, z + 3, Block3, 0, 3);
|
||||
world.setBlock(x + 1, y + 9, z + 4, Block3, 0, 3);
|
||||
world.setBlock(x + 2, y + 9, z + 4, Block3, 0, 3);
|
||||
world.setBlock(x + 3, y + 9, z + 4, Block3, 0, 3);
|
||||
world.setBlock(x + 1, y + 10, z + 0, Block3, 0, 3);
|
||||
world.setBlock(x + 2, y + 10, z + 0, Block3, 0, 3);
|
||||
world.setBlock(x + 3, y + 10, z + 0, Block3, 0, 3);
|
||||
world.setBlock(x + 0, y + 10, z + 1, Block3, 0, 3);
|
||||
world.setBlock(x + 4, y + 10, z + 1, Block3, 0, 3);
|
||||
world.setBlock(x + 0, y + 10, z + 2, Block3, 0, 3);
|
||||
world.setBlock(x + 4, y + 10, z + 2, Block3, 0, 3);
|
||||
world.setBlock(x + 0, y + 10, z + 3, Block3, 0, 3);
|
||||
world.setBlock(x + 4, y + 10, z + 3, Block3, 0, 3);
|
||||
world.setBlock(x + 1, y + 10, z + 4, Block3, 0, 3);
|
||||
//world.setBlock(x + 2, y + 10, z + 4, Blocks.iron_door, 2, 3);
|
||||
world.setBlock(x + 3, y + 10, z + 4, Block3, 0, 3);
|
||||
world.setBlock(x + 1, y + 11, z + 0, Block3, 0, 3);
|
||||
world.setBlock(x + 2, y + 11, z + 0, Block3, 0, 3);
|
||||
world.setBlock(x + 3, y + 11, z + 0, Block3, 0, 3);
|
||||
world.setBlock(x + 0, y + 11, z + 1, Block11, 0, 3);
|
||||
world.setBlock(x + 0, y + 11, z + 2, Block11, 0, 3);
|
||||
world.setBlock(x + 4, y + 11, z + 2, Block11, 0, 3);
|
||||
world.setBlock(x + 0, y + 11, z + 3, Block11, 0, 3);
|
||||
world.setBlock(x + 4, y + 11, z + 3, Block11, 0, 3);
|
||||
world.setBlock(x + 1, y + 11, z + 4, Block3, 0, 3);
|
||||
//world.setBlock(x + 2, y + 11, z + 4, Blocks.iron_door, 8, 3);
|
||||
ItemDoor.placeDoorBlock(world, x + 2, y + 10, z + 4, 2, Blocks.iron_door);
|
||||
world.setBlock(x + 3, y + 11, z + 4, Block3, 0, 3);
|
||||
world.setBlock(x + 1, y + 12, z + 0, Block3, 0, 3);
|
||||
world.setBlock(x + 2, y + 12, z + 0, Block3, 0, 3);
|
||||
world.setBlock(x + 3, y + 12, z + 0, Block3, 0, 3);
|
||||
world.setBlock(x + 0, y + 12, z + 1, Block3, 0, 3);
|
||||
world.setBlock(x + 4, y + 12, z + 1, Block3, 0, 3);
|
||||
world.setBlock(x + 0, y + 12, z + 2, Block3, 0, 3);
|
||||
world.setBlock(x + 4, y + 12, z + 2, Block3, 0, 3);
|
||||
world.setBlock(x + 0, y + 12, z + 3, Block3, 0, 3);
|
||||
world.setBlock(x + 4, y + 12, z + 3, Block3, 0, 3);
|
||||
world.setBlock(x + 1, y + 12, z + 4, Block3, 0, 3);
|
||||
world.setBlock(x + 2, y + 12, z + 4, Block3, 0, 3);
|
||||
world.setBlock(x + 3, y + 12, z + 4, Block3, 0, 3);
|
||||
world.setBlock(x + 1, y + 13, z + 0, Block1, 0, 3);
|
||||
world.setBlock(x + 2, y + 13, z + 0, Block1, 0, 3);
|
||||
world.setBlock(x + 3, y + 13, z + 0, Block1, 0, 3);
|
||||
world.setBlock(x + 0, y + 13, z + 1, Block1, 0, 3);
|
||||
world.setBlock(x + 1, y + 13, z + 1, Block10, 0, 3);
|
||||
world.setBlock(x + 2, y + 13, z + 1, Block10, 0, 3);
|
||||
world.setBlock(x + 3, y + 13, z + 1, Block10, 0, 3);
|
||||
world.setBlock(x + 4, y + 13, z + 1, Block1, 0, 3);
|
||||
world.setBlock(x + 0, y + 13, z + 2, Block1, 0, 3);
|
||||
world.setBlock(x + 1, y + 13, z + 2, Block10, 0, 3);
|
||||
world.setBlock(x + 2, y + 13, z + 2, Block10, 0, 3);
|
||||
world.setBlock(x + 4, y + 13, z + 2, Block1, 0, 3);
|
||||
world.setBlock(x + 0, y + 13, z + 3, Block1, 0, 3);
|
||||
world.setBlock(x + 1, y + 13, z + 3, Block10, 0, 3);
|
||||
world.setBlock(x + 2, y + 13, z + 3, Block10, 0, 3);
|
||||
world.setBlock(x + 1, y + 13, z + 4, Block1, 0, 3);
|
||||
world.setBlock(x + 2, y + 13, z + 4, Block1, 0, 3);
|
||||
world.setBlock(x + 3, y + 13, z + 4, Block1, 0, 3);
|
||||
|
||||
generate_r02_last(world, rand, x, y, z);
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
public boolean generate_r02_last(World world, Random rand, int x, int y, int z) {
|
||||
|
||||
world.setBlock(x + 2, y + 0, z + 5, Blocks.ladder, 3, 3);
|
||||
world.setBlock(x + 2, y + 1, z + 5, Blocks.ladder, 3, 3);
|
||||
world.setBlock(x + 2, y + 2, z + 5, Blocks.ladder, 3, 3);
|
||||
world.setBlock(x + 2, y + 3, z + 5, Blocks.ladder, 3, 3);
|
||||
world.setBlock(x + 2, y + 4, z + 5, Blocks.ladder, 3, 3);
|
||||
world.setBlock(x + 2, y + 5, z + 5, Blocks.ladder, 3, 3);
|
||||
world.setBlock(x + 2, y + 6, z + 5, Blocks.ladder, 3, 3);
|
||||
world.setBlock(x + 2, y + 7, z + 5, Blocks.ladder, 3, 3);
|
||||
world.setBlock(x + 2, y + 8, z + 5, Blocks.ladder, 3, 3);
|
||||
world.setBlock(x + 2, y + 9, z + 5, Blocks.ladder, 3, 3);
|
||||
|
||||
if(MainRegistry.enableDebugMode)
|
||||
System.out.print("[Debug] Successfully spawned waste tank at " + x + " " + y +" " + z + "\n");
|
||||
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -6,6 +6,7 @@ import java.util.Random;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.lib.HbmChestContents;
|
||||
import com.hbm.tileentity.machine.TileEntityCrateSteel;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.init.Blocks;
|
||||
@ -1739,11 +1740,23 @@ public class DesertAtom002
|
||||
world.setBlock(x + 10, y + 1, z + 16, Block5, 0, 3);
|
||||
world.setBlock(x + 16, y + 1, z + 16, Block1, 0, 3);
|
||||
world.setBlock(x + 17, y + 1, z + 16, Block1, 0, 3);
|
||||
world.setBlock(x + 18, y + 1, z + 16, Blocks.chest, 2, 3);
|
||||
|
||||
|
||||
//world.setBlock(x + 18, y + 1, z + 16, Blocks.chest, 2, 3);
|
||||
|
||||
/*
|
||||
if(world.getBlock(x + 18, y + 1, z + 16) == Blocks.chest)
|
||||
{
|
||||
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.getLoot(3), (TileEntityChest)world.getTileEntity(x + 18, y + 1, z + 16), 8);
|
||||
}
|
||||
*/
|
||||
|
||||
world.setBlock(x + 18, y + 1, z + 16, ModBlocks.crate_steel, 0, 3);
|
||||
if(world.getBlock(x + 18, y + 1, z + 16) == ModBlocks.crate_steel)
|
||||
{
|
||||
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.getLoot(3), (TileEntityCrateSteel)world.getTileEntity(x + 18, y + 1, z + 16), 12);
|
||||
}
|
||||
|
||||
world.setBlock(x + 19, y + 1, z + 16, Block1, 0, 3);
|
||||
world.setBlock(x + 20, y + 1, z + 16, Blocks.vine, 2, 3);
|
||||
world.setBlock(x + 22, y + 1, z + 16, Blocks.stone_brick_stairs, 4, 3);
|
||||
|
||||
@ -6,6 +6,7 @@ import java.util.Random;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.lib.HbmChestContents;
|
||||
import com.hbm.tileentity.machine.TileEntityCrateSteel;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
@ -2809,9 +2810,14 @@ public class Radio01 extends WorldGenerator
|
||||
world.setBlock(x + 2, y + 8, z + 11, Blocks.air, 0, 3);
|
||||
world.setBlock(x + 3, y + 8, z + 11, Blocks.air, 0, 3);
|
||||
world.setBlock(x + 4, y + 8, z + 11, ModBlocks.deco_steel, 0, 3);
|
||||
world.setBlock(x + 5, y + 8, z + 11, Blocks.chest, 4, 3);
|
||||
|
||||
/*world.setBlock(x + 5, y + 8, z + 11, Blocks.chest, 4, 3);
|
||||
world.setBlockMetadataWithNotify(x + 5, y + 8, z + 11, 5, 3);
|
||||
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.getLoot(3), (TileEntityChest)world.getTileEntity(x + 5, y + 8, z + 11), 16);
|
||||
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.getLoot(3), (TileEntityChest)world.getTileEntity(x + 5, y + 8, z + 11), 16);*/
|
||||
|
||||
world.setBlock(x + 5, y + 8, z + 11, ModBlocks.crate_steel, 0, 3);
|
||||
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.getLoot(3), (TileEntityCrateSteel)world.getTileEntity(x + 5, y + 8, z + 11), 16);
|
||||
|
||||
world.setBlock(x + 6, y + 8, z + 11, ModBlocks.deco_steel, 0, 3);
|
||||
world.setBlock(x + 7, y + 8, z + 11, Blocks.air, 0, 3);
|
||||
world.setBlock(x + 8, y + 8, z + 11, Blocks.air, 0, 3);
|
||||
|
||||
@ -52,7 +52,7 @@ public class Sellafield {
|
||||
}
|
||||
}
|
||||
|
||||
place(world, x, z, 1, ModBlocks.sellafield_core);
|
||||
placeCore(world, x, z, radius * 0.3D);
|
||||
}
|
||||
|
||||
private void dig(World world, int x, int z, int depth) {
|
||||
@ -72,13 +72,19 @@ public class Sellafield {
|
||||
|
||||
for(int i = 0; i < depth; i++)
|
||||
world.setBlock(x, y - i, z, block);
|
||||
}
|
||||
|
||||
private void placeCore(World world, int x, int z, double rad) {
|
||||
|
||||
/*try {
|
||||
if(block == ModBlocks.sellafield_core) {
|
||||
TileEntitySellafield te = (TileEntitySellafield) world.getTileEntity(x, y, z);
|
||||
|
||||
te.radius = depth * 0.75D;
|
||||
}
|
||||
} catch(Exception ex) { }*/
|
||||
int y = world.getHeightValue(x, z) - 1;
|
||||
|
||||
world.setBlock(x, y, z, ModBlocks.sellafield_core);
|
||||
|
||||
try {
|
||||
|
||||
TileEntitySellafield te = (TileEntitySellafield) world.getTileEntity(x, y, z);
|
||||
te.radius = rad;
|
||||
|
||||
} catch(Exception ex) { }
|
||||
}
|
||||
}
|
||||
|
||||