mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-08-10 17:55:44 +00:00
Merge branch 'HbmMods:master' into DetectorOverlay
This commit is contained in:
commit
afb1d317f6
@ -1021,6 +1021,8 @@ public class ModBlocks {
|
||||
public static Block machine_radgen;
|
||||
|
||||
public static Block machine_satlinker;
|
||||
public static Block machine_satlink;
|
||||
|
||||
public static Block machine_keyforge;
|
||||
|
||||
public static Block machine_armor_table;
|
||||
@ -1938,6 +1940,7 @@ public class ModBlocks {
|
||||
machine_transformer = new MachineTransformer(Material.iron).setBlockName("machine_transformer").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_transformer_iron");
|
||||
|
||||
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_satlink = new MachineSatLink().setBlockName("machine_satlink").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.missileTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
machine_keyforge = new MachineKeyForge(Material.iron).setBlockName("machine_keyforge").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.consumableTab).setBlockTextureName(RefStrings.MODID + ":machine_keyforge_side");
|
||||
machine_armor_table = new BlockArmorTable(Material.iron).setBlockName("machine_armor_table").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.consumableTab);
|
||||
machine_weapon_table = new BlockWeaponTable().setBlockName("machine_weapon_table").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.consumableTab);
|
||||
@ -3292,6 +3295,7 @@ public class ModBlocks {
|
||||
GameRegistry.registerBlock(teleanchor, teleanchor.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(field_disturber, field_disturber.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_satlinker, machine_satlinker.getUnlocalizedName());
|
||||
register(machine_satlink);
|
||||
GameRegistry.registerBlock(machine_keyforge, machine_keyforge.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_armor_table, machine_armor_table.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_weapon_table, machine_weapon_table.getUnlocalizedName());
|
||||
|
||||
84
src/main/java/com/hbm/blocks/machine/MachineSatLink.java
Normal file
84
src/main/java/com/hbm/blocks/machine/MachineSatLink.java
Normal file
@ -0,0 +1,84 @@
|
||||
package com.hbm.blocks.machine;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.blocks.ILookOverlay;
|
||||
import com.hbm.items.ISatChip;
|
||||
import com.hbm.main.NTMSounds;
|
||||
import com.hbm.tileentity.TileEntityProxyCombo;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineSatLink;
|
||||
import com.hbm.util.i18n.I18nUtil;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ChatComponentText;
|
||||
import net.minecraft.util.ChatStyle;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.event.RenderGameOverlayEvent.Pre;
|
||||
|
||||
public class MachineSatLink extends BlockDummyable implements ILookOverlay {
|
||||
|
||||
public MachineSatLink() {
|
||||
super(Material.iron);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int meta) {
|
||||
if(meta >= 12) return new TileEntityMachineSatLink();
|
||||
if(meta >= 6) return new TileEntityProxyCombo();
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override public int[] getDimensions() { return new int[] {6, 0, 1, 0, 1, 0}; }
|
||||
@Override public int getOffset() { return 0; }
|
||||
|
||||
@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 && !player.isSneaking()) {
|
||||
|
||||
if(player.getHeldItem() != null && player.getHeldItem().getItem() instanceof ISatChip) {
|
||||
|
||||
int[] pos = this.findCore(world, x, y, z);
|
||||
if(pos == null) return false;
|
||||
|
||||
TileEntity te = world.getTileEntity(pos[0], pos[1], pos[2]);
|
||||
if(!(te instanceof TileEntityMachineSatLink)) return false;
|
||||
|
||||
TileEntityMachineSatLink link = (TileEntityMachineSatLink) te;
|
||||
|
||||
link.freq = ISatChip.getFreqS(player.getHeldItem());
|
||||
player.addChatComponentMessage(new ChatComponentText("Set frequency to " + link.freq).setChatStyle(new ChatStyle().setColor(EnumChatFormatting.YELLOW)));
|
||||
world.playSoundAtEntity(player, NTMSounds.TECH_BLEEP, 1F, 1F);
|
||||
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void printHook(Pre event, World world, int x, int y, int z) {
|
||||
|
||||
int[] pos = this.findCore(world, x, y, z);
|
||||
if(pos == null) return;
|
||||
|
||||
TileEntity te = world.getTileEntity(pos[0], pos[1], pos[2]);
|
||||
if(!(te instanceof TileEntityMachineSatLink)) return;
|
||||
|
||||
TileEntityMachineSatLink link = (TileEntityMachineSatLink) te;
|
||||
|
||||
List<String> text = new ArrayList();
|
||||
text.add("Freq: " + link.freq);
|
||||
text.add("Connected: " + (link.connected ? (EnumChatFormatting.GREEN + "Yes") : (EnumChatFormatting.RED + "No")));
|
||||
|
||||
ILookOverlay.printGeneric(event, I18nUtil.resolveKey(getUnlocalizedName() + ".name"), 0xffff00, 0x404000, text);
|
||||
}
|
||||
}
|
||||
@ -167,8 +167,8 @@ public class AssemblyMachineRecipes extends GenericRecipes<GenericRecipe> {
|
||||
.inputItems(new ComparableStack(ModItems.billet_ra226be, 3)).setGroup(autoPileRod, INSTANCE));
|
||||
this.register(new GenericRecipe("ass.pilepobe").setup(40, 200).outputItems(new ItemStack(ModItems.pile_rod, 1, EnumPileRod.PO210BE.ordinal()))
|
||||
.inputItems(new ComparableStack(ModItems.billet_po210be, 3)).setGroup(autoPileRod, INSTANCE));
|
||||
this.register(new GenericRecipe("ass.pilezr").setup(40, 200).outputItems(new ItemStack(ModItems.pile_rod, 1, EnumPileRod.ZR.ordinal()))
|
||||
.inputItems(new OreDictStack(ZR.billet(), 3)).setGroup(autoPileRod, INSTANCE));
|
||||
this.register(new GenericRecipe("ass.pilezr").setup(40, 200).outputItems(new ItemStack(ModItems.pile_rod, 3, EnumPileRod.ZR.ordinal()))
|
||||
.inputItems(new OreDictStack(ZR.billet(), 1)).setGroup(autoPileRod, INSTANCE));
|
||||
this.register(new GenericRecipe("ass.pilenu").setup(40, 200).outputItems(new ItemStack(ModItems.pile_rod, 1, EnumPileRod.NU.ordinal()))
|
||||
.inputItems(new OreDictStack(U.billet(), 3)).setGroup(autoPileRod, INSTANCE));
|
||||
this.register(new GenericRecipe("ass.pilepu239").setup(40, 200).outputItems(new ItemStack(ModItems.pile_rod, 1, EnumPileRod.PU239.ordinal()))
|
||||
|
||||
@ -301,6 +301,7 @@ public class ClientProxy extends ServerProxy {
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineRadarNT.class, new RenderRadar());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineRadarLarge.class, new RenderRadarLarge());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineRadarScreen.class, new RenderRadarScreen());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineSatLink.class, new RenderSatLink());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityReactorResearch.class, new RenderSmallReactor());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityTesla.class, new RenderTesla());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityBarrel.class, new RenderFluidBarrel());
|
||||
|
||||
@ -25,6 +25,7 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ -92,8 +93,9 @@ public class NEIConfig implements IConfigureNEI {
|
||||
API.hideItem(new ItemStack(ModBlocks.conveyor_double));
|
||||
API.hideItem(new ItemStack(ModBlocks.conveyor_triple));
|
||||
|
||||
API.hideItem(new ItemStack(ModBlocks.brick_forgotten));
|
||||
API.hideItem(new ItemStack(ModBlocks.brick_forgotten_lock));
|
||||
API.hideItem(new ItemStack(ModBlocks.brick_forgotten, 1, OreDictionary.WILDCARD_VALUE));
|
||||
API.hideItem(new ItemStack(ModBlocks.brick_forgotten_lock, 1, OreDictionary.WILDCARD_VALUE));
|
||||
API.hideItem(new ItemStack(ModItems.coal_eternal));
|
||||
|
||||
API.registerHighlightIdentifier(ModBlocks.plushie, new IHighlightHandler() {
|
||||
@Override public ItemStack identifyHighlight(World world, EntityPlayer player, MovingObjectPosition mop) {
|
||||
|
||||
@ -272,6 +272,7 @@ public class ResourceManager {
|
||||
public static final IModelCustom radar = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/radar.obj")).noSmooth().asVBO();
|
||||
public static final IModelCustom radar_large = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/radar_large.obj")).noSmooth().asVBO();
|
||||
public static final IModelCustom radar_screen = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/radar_screen.obj")).noSmooth().asVBO();
|
||||
public static final IModelCustom satlink = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/satlink.obj")).noSmooth().asVBO();
|
||||
|
||||
//Forcefield
|
||||
public static final IModelCustom forcefield_top = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/forcefield_top.obj"));
|
||||
@ -747,6 +748,7 @@ public class ResourceManager {
|
||||
public static final ResourceLocation radar_dish_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/radar_dish.png");
|
||||
public static final ResourceLocation radar_large_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/radar_large.png");
|
||||
public static final ResourceLocation radar_screen_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/radar_screen.png");
|
||||
public static final ResourceLocation satlink_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/satlink.png");
|
||||
|
||||
//Forcefield
|
||||
public static final ResourceLocation forcefield_base_tex = new ResourceLocation(RefStrings.MODID, "textures/models/forcefield_base.png");
|
||||
|
||||
@ -218,6 +218,10 @@ public class QMAWLoader implements IResourceManagerReloadListener {
|
||||
}
|
||||
}
|
||||
|
||||
if(json.has("noindex") && json.get("noindex").getAsBoolean()) {
|
||||
qmaw.noIndex();
|
||||
}
|
||||
|
||||
if(!qmaw.contents.isEmpty()) {
|
||||
QMAWLoader.qmaw.put(name, qmaw);
|
||||
}
|
||||
|
||||
@ -9,6 +9,9 @@ public class QuickManualAndWiki {
|
||||
public String name;
|
||||
public ItemStack icon;
|
||||
|
||||
/** Removes this manual from the calculator search feature */
|
||||
public boolean noIndex = false;
|
||||
|
||||
public HashMap<String, String> title = new HashMap();
|
||||
public HashMap<String, String> contents = new HashMap();
|
||||
|
||||
@ -30,4 +33,9 @@ public class QuickManualAndWiki {
|
||||
this.contents.put(lang, contents);
|
||||
return this;
|
||||
}
|
||||
|
||||
public QuickManualAndWiki noIndex() {
|
||||
this.noIndex = true;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
77
src/main/java/com/hbm/render/tileentity/RenderSatLink.java
Normal file
77
src/main/java/com/hbm/render/tileentity/RenderSatLink.java
Normal file
@ -0,0 +1,77 @@
|
||||
package com.hbm.render.tileentity;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.render.item.ItemRenderBase;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineSatLink;
|
||||
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.client.IItemRenderer;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class RenderSatLink extends TileEntitySpecialRenderer implements IItemRendererProvider {
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float interp) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(x + 0.5D, y, z + 0.5D);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
GL11.glRotatef(180, 0F, 1F, 0F);
|
||||
|
||||
TileEntityMachineSatLink link = (TileEntityMachineSatLink) tile;
|
||||
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(tile.getBlockMetadata() - 10);
|
||||
ForgeDirection rot = dir.getRotation(ForgeDirection.DOWN);
|
||||
|
||||
GL11.glTranslated((dir.offsetX + rot.offsetX) * 0.5, 0, (dir.offsetZ + rot.offsetZ) * 0.5);
|
||||
|
||||
float r = link.prevRot + (link.rot - link.prevRot) * interp;
|
||||
float l = link.prevLift + (link.lift - link.prevLift) * interp;
|
||||
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
bindTexture(ResourceManager.satlink_tex);
|
||||
ResourceManager.satlink.renderPart("Base");
|
||||
GL11.glRotated(r, 0, 1, 0);
|
||||
ResourceManager.satlink.renderPart("Rotor");
|
||||
GL11.glTranslated(0, 7.375, 0);
|
||||
GL11.glRotated(l, 0, 0, 1);
|
||||
GL11.glTranslated(0, -7.375, 0);
|
||||
ResourceManager.satlink.renderPart("Dish");
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemForRenderer() {
|
||||
return Item.getItemFromBlock(ModBlocks.machine_satlink);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IItemRenderer getRenderer() {
|
||||
return new ItemRenderBase( ) {
|
||||
public void renderInventory() {
|
||||
GL11.glTranslated(0, -5, 0);
|
||||
GL11.glScaled(3.5, 3.5, 3.5);
|
||||
}
|
||||
public void renderCommonWithStack(ItemStack item) {
|
||||
GL11.glScaled(0.5, 0.5, 0.5);
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
bindTexture(ResourceManager.satlink_tex);
|
||||
ResourceManager.satlink.renderPart("Base");
|
||||
GL11.glRotated(15, 0, 1, 0);
|
||||
ResourceManager.satlink.renderPart("Rotor");
|
||||
GL11.glTranslated(0, 7.375, 0);
|
||||
GL11.glRotated(-45, 0, 0, 1);
|
||||
GL11.glTranslated(0, -7.375, 0);
|
||||
ResourceManager.satlink.renderPart("Dish");
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}};
|
||||
}
|
||||
}
|
||||
@ -68,11 +68,11 @@ public class SatelliteSavedData extends WorldSavedData {
|
||||
}
|
||||
|
||||
public static SatelliteSavedData getData(World worldObj) {
|
||||
SatelliteSavedData data = (SatelliteSavedData)worldObj.perWorldStorage.loadData(SatelliteSavedData.class, "satellites");
|
||||
SatelliteSavedData data = (SatelliteSavedData) worldObj.perWorldStorage.loadData(SatelliteSavedData.class, "satellites");
|
||||
if(data == null) {
|
||||
worldObj.perWorldStorage.setData("satellites", new SatelliteSavedData());
|
||||
|
||||
data = (SatelliteSavedData)worldObj.perWorldStorage.loadData(SatelliteSavedData.class, "satellites");
|
||||
data = (SatelliteSavedData) worldObj.perWorldStorage.loadData(SatelliteSavedData.class, "satellites");
|
||||
}
|
||||
|
||||
return data;
|
||||
|
||||
@ -133,6 +133,7 @@ public class TileMappings {
|
||||
put(TileEntityMachineRadarScreen.class, "tileentity_radar_screen");
|
||||
put(TileEntityBroadcaster.class, "tileentity_pink_cloud_broadcaster");
|
||||
put(TileEntityMachineSatLinker.class, "tileentity_satlinker");
|
||||
put(TileEntityMachineSatLink.class, "tileentity_satlink");
|
||||
put(TileEntityReactorResearch.class, "tileentity_small_reactor");
|
||||
put(TileEntityVaultDoorMigration.class, "tileentity_vault_door");
|
||||
put(TileEntityRadiobox.class, "tileentity_radio_broadcaster");
|
||||
|
||||
@ -0,0 +1,120 @@
|
||||
package com.hbm.tileentity.machine;
|
||||
|
||||
import com.hbm.saveddata.SatelliteSavedData;
|
||||
import com.hbm.tileentity.TileEntityTickingBase;
|
||||
|
||||
import api.hbm.redstoneoverradio.IRORInteractive;
|
||||
import api.hbm.redstoneoverradio.IRORValueProvider;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
|
||||
public class TileEntityMachineSatLink extends TileEntityTickingBase implements IRORValueProvider, IRORInteractive {
|
||||
|
||||
public boolean connected;
|
||||
public int freq;
|
||||
|
||||
public float rot = INACTIVE_ROT;
|
||||
public float prevRot = INACTIVE_ROT;
|
||||
public float lift = INACTIVE_LIFT;
|
||||
public float prevLift = INACTIVE_LIFT;
|
||||
|
||||
public static final float SPEED = 0.25F;
|
||||
public static final float ACTIVE_ROT = -15F;
|
||||
public static final float ACTIVE_LIFT = -45F;
|
||||
public static final float INACTIVE_ROT = 0F;
|
||||
public static final float INACTIVE_LIFT = -85F;
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
|
||||
if(!worldObj.isRemote) {
|
||||
this.connected = false;
|
||||
|
||||
if(worldObj.getHeightValue(xCoord, zCoord) <= yCoord) {
|
||||
|
||||
SatelliteSavedData dat = SatelliteSavedData.getData(worldObj);
|
||||
this.connected = dat.isFreqTaken(freq);
|
||||
}
|
||||
|
||||
this.networkPackNT(150);
|
||||
|
||||
} else {
|
||||
|
||||
this.prevRot = this.rot;
|
||||
this.prevLift = this.lift;
|
||||
|
||||
float targetR = this.connected ? ACTIVE_ROT : INACTIVE_ROT;
|
||||
float targetL = this.connected ? ACTIVE_LIFT : INACTIVE_LIFT;
|
||||
|
||||
if(Math.abs(rot - targetR) <= SPEED) rot = targetR;
|
||||
else if(rot < targetR) rot += SPEED;
|
||||
else if(rot > targetR) rot -= SPEED;
|
||||
|
||||
if(Math.abs(lift - targetL) <= SPEED) lift = targetL;
|
||||
else if(lift < targetL) lift += SPEED;
|
||||
else if(lift > targetL) lift -= SPEED;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void serialize(ByteBuf buf) {
|
||||
super.serialize(buf);
|
||||
buf.writeBoolean(connected);
|
||||
buf.writeInt(freq);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deserialize(ByteBuf buf) {
|
||||
super.deserialize(buf);
|
||||
this.connected = buf.readBoolean();
|
||||
this.freq = buf.readInt();
|
||||
}
|
||||
|
||||
AxisAlignedBB bb = null;
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getRenderBoundingBox() {
|
||||
|
||||
if(bb == null) {
|
||||
bb = AxisAlignedBB.getBoundingBox(
|
||||
xCoord - 2,
|
||||
yCoord,
|
||||
zCoord - 2,
|
||||
xCoord + 3,
|
||||
yCoord + 10,
|
||||
zCoord + 3
|
||||
);
|
||||
}
|
||||
|
||||
return bb;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public double getMaxRenderDistanceSquared() {
|
||||
return 65536.0D;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getFunctionInfo() {
|
||||
return new String[] {
|
||||
PREFIX_VALUE + "connected",
|
||||
PREFIX_VALUE + "freq",
|
||||
PREFIX_VALUE + "rx",
|
||||
PREFIX_FUNCTION + "setfreq" + NAME_SEPARATOR + "freq",
|
||||
PREFIX_FUNCTION + "tx" + NAME_SEPARATOR + "payload"
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public String provideRORValue(String name) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String runRORFunction(String name, String[] params) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@ -655,6 +655,8 @@ public class TileEntityPWRController extends TileEntityMachineBase implements IG
|
||||
PREFIX_VALUE + "rods",
|
||||
PREFIX_VALUE + "coreheat",
|
||||
PREFIX_VALUE + "hullheat",
|
||||
PREFIX_VALUE + "coldbuf",
|
||||
PREFIX_VALUE + "hotbuf",
|
||||
PREFIX_VALUE + "flux",
|
||||
PREFIX_VALUE + "depletion",
|
||||
PREFIX_FUNCTION + "setrods" + NAME_SEPARATOR + "percent",
|
||||
@ -671,6 +673,8 @@ public class TileEntityPWRController extends TileEntityMachineBase implements IG
|
||||
if((PREFIX_VALUE + "rods").equals(name)) return "" + (int) (100 - this.rodLevel); // why the fuck did i invert this again?
|
||||
if((PREFIX_VALUE + "coreheat").equals(name)) return "" + this.coreHeat;
|
||||
if((PREFIX_VALUE + "hullheat").equals(name)) return "" + this.hullHeat;
|
||||
if((PREFIX_VALUE + "coldbuf").equals(name)) return "" + this.tanks[0].getFill();
|
||||
if((PREFIX_VALUE + "hotbuf").equals(name)) return "" + this.tanks[1].getFill();
|
||||
if((PREFIX_VALUE + "flux").equals(name)) return "" + (int) this.flux;
|
||||
if((PREFIX_VALUE + "depletion").equals(name)) return "" + (int) (this.progress * 100 / this.processTime);
|
||||
return null;
|
||||
|
||||
@ -182,6 +182,7 @@ public class TileEntityPileCore extends TileEntityTickingBase {
|
||||
for(int i = 0; i < list.size(); i++) {
|
||||
PileChannel chan = list.get(i);
|
||||
if(chan.entry.compare(x, y, z) && chan.entry.getDir() == dir) {
|
||||
if(chan.type == chan.type.FUEL) chan.ejectAll();
|
||||
list.remove(i);
|
||||
for(int j = 0; j < size; j++) {
|
||||
int iX = x + dir.offsetX * j;
|
||||
@ -251,6 +252,12 @@ public class TileEntityPileCore extends TileEntityTickingBase {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void invalidate() {
|
||||
super.invalidate();
|
||||
for(PileChannel chan : this.fuelChannels) chan.ejectAll();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void serialize(ByteBuf buf) {
|
||||
super.serialize(buf);
|
||||
@ -535,7 +542,15 @@ public class TileEntityPileCore extends TileEntityTickingBase {
|
||||
if(stack != null) dropItem(stack, length);
|
||||
}
|
||||
|
||||
public void ejectAll() {
|
||||
for(int i = 0; i < this.rods.length; i++) {
|
||||
this.dropItem(rods[i], length);
|
||||
this.rods[i] = null;
|
||||
}
|
||||
}
|
||||
|
||||
public void dropItem(ItemStack stack, int depth) {
|
||||
if(stack == null) return;
|
||||
int x = entry.getX() + entry.getDir().offsetX * depth;
|
||||
int y = entry.getY();
|
||||
int z = entry.getZ() + entry.getDir().offsetZ * depth;
|
||||
|
||||
@ -3838,7 +3838,7 @@ item.pile_rod.rgp.desc=Reactor-grade plutonium rod, mainly plutonium-239 with pl
|
||||
item.pile_rod.waste.name=Chicago Pile Nuclear Waste Rod
|
||||
item.pile_rod.waste.desc=Highly reactive end product from leaving a Chicago Pile fuel rod in the reactor for too long.
|
||||
item.pile_rod.zr.name=Chicago Pile Zirconium Rod
|
||||
item.pile_rod.zr.desc=Inert zirconium rod which is transparent to neutrons. Ideal for safely pushing other rods safely out of the reactor.
|
||||
item.pile_rod.zr.desc=Inert zirconium rod which is transparent to neutrons. Ideal for pushing other rods safely out of the reactor.
|
||||
item.pile_rod_boron.name=Chicago Pile Control Rod
|
||||
item.pile_rod_boron.desc=§9[Neutron Absorber]$§eClick to toggle
|
||||
item.pile_rod_detector.name=Chicago Pile Control & Detector Rod
|
||||
|
||||
@ -2,10 +2,11 @@
|
||||
"name": "Eternal Coal",
|
||||
"icon": ["hbm:item.nothing"],
|
||||
"trigger": [["hbm:item.coal_eternal"]],
|
||||
"noindex": true,
|
||||
"title": {
|
||||
"en_US": "█ █ █ █ █ █"
|
||||
},
|
||||
"content": {
|
||||
"en_US": "████████████ ███ ███ ██ ████████ ████████ ██ ████ ████ ████████ ████ ██████████ █ ████ █████ ██████ ████████ ████ █████ ██ ██ ███ ██████"
|
||||
"en_US": "████████████ ███ ███ ██ ████████ ████████ ██ ████ ████ ████████ ████ ███ ███████ █ ████ █████ ██████ ███████ █ ████ █████ ██ ██ ███ ██████"
|
||||
}
|
||||
}
|
||||
|
||||
12
src/main/resources/assets/hbm/manual/pile/pile.json
Normal file
12
src/main/resources/assets/hbm/manual/pile/pile.json
Normal file
@ -0,0 +1,12 @@
|
||||
{
|
||||
"name": "Chicago Pile",
|
||||
"icon": ["hbm:tile.pile_brick", 1, 0],
|
||||
"trigger": [["hbm:tile.pile_brick"]],
|
||||
"title": {
|
||||
"en_US": "Chicago Pile"
|
||||
},
|
||||
"content": {
|
||||
"en_US": "The Chcago Pile is a low-tech low-power reactor used for breeding nuclear material, mainly turning [[uranium|Uranium]] into [[plutonium-239|Plutonium-239]]. Due to its simplicity, operating it either requires manual intervention or some form of external operation with [[Redstone over Radio]].<br><br>The pile is constructed out of a box of Chicago Pile graphite bricks at least 5x5x5 blocks in size, and at most 15x15x15 blocks. The box does not need to be a perfect cube, so shapes like 5x7x9 are valid, so long as the box is filled. Using a hand drill, the pile is assembled, with the drilled block acting as the core.<br><br>To prepare the Chicago Pile for use, channels need to be drilled, again with a hand drill. The function of the channel depends on the orientation relative to the core. Using the hand drill again on the input side of an existing channel will close the channel again. Channels cannot intersect one another.<br><br>Fuel channels are channels that follow the core's orientation, i.e. either the input or output side is on the same face as the core's panel. Fuel channels can be loaded with Chicago Pile fuel rods using a [[fuel loader|Chicago Pile Fuel Loader]]. The amount of fuel that fits into any given channel depends on its length, with one block of channel being able to hold one fuel rod.<br><br>Ventilation channels are channels which are perpendicular to the core's orientation and therefore also to the fuel channels. Ventilation channels cool down fuel channels which touch (but not intersect) them if compressed air is supplied at a pressure of 1 PU via a [[vent|Chicago Pile Vent]]. Passive cooling in the Chicago Pile is quite low, so while technically optional, vents are basically mandatory for every Pile in practice.<br><br>Channels drilled from the top are for [[control rods|Chicago Pile Control Rod]]. Control rods are used to reduce the interactiion between fuel channels in larger Pile setups, although smaller setups are usually fine without control rods. Still, throttling the reactor can be useful when cycling fuel, since the window for extracting pure plutonium-239 is quite small.<br><>br>If the Pile is disassembled, channels can be drilled again without having to remove all the attachments like fuel loaders and vents, simply shift-click the attachment with the hand drill and a channel will be drilled into the Pile behind it.<br><br>See also:<br>* [[Chicago Pile Operation]]"
|
||||
}
|
||||
}
|
||||
|
||||
12
src/main/resources/assets/hbm/manual/pile/pilecontrol.json
Normal file
12
src/main/resources/assets/hbm/manual/pile/pilecontrol.json
Normal file
@ -0,0 +1,12 @@
|
||||
{
|
||||
"name": "Chicago Pile Control Rod",
|
||||
"icon": ["hbm:tile.pile_device", 1, 2],
|
||||
"trigger": [["hbm:tile.pile_device", 1, 2]],
|
||||
"title": {
|
||||
"en_US": "Chicago Pile Control Rod"
|
||||
},
|
||||
"content": {
|
||||
"en_US": "Control rods can be placed on top of the vertically drilled channels of the [[Chicago Pile]]. Control rods, when inserted, will reduce the reactivity between fuel channels. The control rods can be controlled with a redstone signal, causing it to fully withdraw when a signal is supplied, or via [[RoR controller|Redstone-over-Radio Controller]], which allows more precise settings.<br><br>See also:<br>* [[Chicago Pile Fuel Loader]]<br>* [[Chicago Pile Vent]]"
|
||||
}
|
||||
}
|
||||
|
||||
12
src/main/resources/assets/hbm/manual/pile/pileloader.json
Normal file
12
src/main/resources/assets/hbm/manual/pile/pileloader.json
Normal file
@ -0,0 +1,12 @@
|
||||
{
|
||||
"name": "Chicago Pile Fuel Loader",
|
||||
"icon": ["hbm:tile.pile_device", 1, 0],
|
||||
"trigger": [["hbm:tile.pile_device", 1, 0]],
|
||||
"title": {
|
||||
"en_US": "Chicago Pile Fuel Loader"
|
||||
},
|
||||
"content": {
|
||||
"en_US": "The fuel loader is required to load [[Chicago Pile]] fuel rods into the Pile's fuel channels. Right-clicking with a fuel rod will insert that rod into the loader, and right-clicking again will load it into the Pile manually. Fuel can also be supplied using hoppers or conveyors, and the loading action can be triggered by supplying a redstone signal to the loader's back side (where the light grey circle is).<br><br>Additionally, the loader can relay information about the connected channel to the [[RoR reader|Redstone-over-Radio Reader]], like the type (metadata) and depletion of the backmost loaded fuel rod or the channel's current temperature.<br><br>See also:<br>* [[Chicago Pile Vent]]<br>* [[Chicago Pile Control Rod]]"
|
||||
}
|
||||
}
|
||||
|
||||
12
src/main/resources/assets/hbm/manual/pile/pileop.json
Normal file
12
src/main/resources/assets/hbm/manual/pile/pileop.json
Normal file
@ -0,0 +1,12 @@
|
||||
{
|
||||
"name": "Chicago Pile Operation",
|
||||
"icon": ["hbm:tile.pile_brick", 1, 0],
|
||||
"trigger": [],
|
||||
"title": {
|
||||
"en_US": "Chicago Pile Operation"
|
||||
},
|
||||
"content": {
|
||||
"en_US": "The [[Chicago Pile]] requires at least one fuel channel with some sort of neutron source, being radium-226-beryllium or polonium-210-beryllium rods. It's safest and easiest to simply have one fuel channel dedicated to the neutron sources, although mixing neutron sources in with the regular fuel is also an option. [[Ventilation|Chicago Pile Vent]] is also required before actually using fuel, the amount of compressed air used over time is static no matter how hot the reactor is, so doing a dry-run to see if the [[compressor|Compressor]] setup is sufficient is recommended.<br><br>Once ventilation and neutron sources are in place, fuel can be added, usually in the form of natural uranium which is bred into plutonium-239. The [[fuel loader|Chicago Pile Fuel Loader]] will only load one rod at a time, simply load as many rods as the channel can hold. Any extra rod loaded will cause the last rod in the channel to be pushed out the other end, where it can be collected with a hopper.<br><br>The supplied fuel will be bred as long as its in the reactor. Pu-239 can also be bred into RGP, which can be further bred into nuclear waste. Therefore, leaving fuel in the reactor for too long is undesirable. For this, the fuel loader can be read with an [[RoR reader|Redstone-over-Radio Reader]], which will report the fuel's lifetime and current type in the form of the numeric metadata of the item. For example, Plutonium-239 rods have a meta of 4. Using an [[RoR logic receiver|Redstone-over-Radio Logic Receiver]], this meta can be detected, causing a redstone signal to be sent to the fuel loader, pushing that fuel rod out.<br><br>It is not only desirable to eject the fuel in time due to the purity, but also because nuclear waste has a high heat output, which might destroy Piles not prepared for it. If no new fuel is available and the existing loaded fuel is intended to be ejected, rods made from zirconium are ideal, since they are cheap, inert, and transparent to neutrons, not adding any heat while not interfering with the Pile's reaction either.<br><br>In an emergency, should the Pile overheat, it will catch fire, explode, and eject many flaming graphite bricks which also explode into fire, setting the surroundings ablaze. It is recommended to keep the Pile in a small room, away from flammable material, and to keep a fire extinguisher nearby.<br><br>For people who want to make the most out of their fuel, using [[RoR controllers|Redstone-over-Radio Controller]] to adjust the control rod settings automatically may be desirable. Especially in larger setups, control rods are important to prevent the Pile from quickly overheating, and having an adaptive system controlled either by RoR logic receivers or an [[AUTOCAL]] unit can allow the Pile to run reasonably hot without exploding."
|
||||
}
|
||||
}
|
||||
|
||||
12
src/main/resources/assets/hbm/manual/pile/pilevent.json
Normal file
12
src/main/resources/assets/hbm/manual/pile/pilevent.json
Normal file
@ -0,0 +1,12 @@
|
||||
{
|
||||
"name": "Chicago Pile Vent",
|
||||
"icon": ["hbm:tile.pile_device", 1, 1],
|
||||
"trigger": [["hbm:tile.pile_device", 1, 1]],
|
||||
"title": {
|
||||
"en_US": "Chicago Pile Vent"
|
||||
},
|
||||
"content": {
|
||||
"en_US": "The vent is needed to insert compressed air at 1 PU into the [[Chicago Pile's|Chicago Pile]] ventilation channels. Due to the pressure requirement, each Pile therefore needs at least one [[compressor|Compressor]]. Hot air will harmlessly exit the Pile at the output side of the ventilation channel.<br><br>The vent's cooling effect only applies to fuel channels that touch the ventilation channel, or rather, fuel channels exactly one block above and below that ventilation channel. Without sufficient cooling, the channel will surpass 800°C, causing the highly-flammable graphite bricks to ignite, forcefully disassembling the Pile.<br><br>See also:<br>* [[Chicago Pile Fuel Loader]]<br>* [[Chicago Pile Control Rod]]"
|
||||
}
|
||||
}
|
||||
|
||||
1520
src/main/resources/assets/hbm/models/machines/satlink.obj
Normal file
1520
src/main/resources/assets/hbm/models/machines/satlink.obj
Normal file
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 227 B After Width: | Height: | Size: 286 B |
Binary file not shown.
|
After Width: | Height: | Size: 3.3 KiB |
Loading…
x
Reference in New Issue
Block a user