mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
plylons
bylons plons
This commit is contained in:
parent
1f271f6b23
commit
bed04f4311
34
changelog
34
changelog
@ -1,32 +1,10 @@
|
||||
## Added
|
||||
* PWR Heatsink
|
||||
* Increases the core heat capacity by 5% per block
|
||||
* Makes cooling channels and heat exchangers slightly less effective (each heatsink counts as one quarter of a fuel rod in the heat calculation)
|
||||
* New medium sized electricity pylons
|
||||
* Come in wood and steel flavor
|
||||
* The regular ones don't connect to cable blocks, the variants with transformers do (i.e. they act like substations for huge pylons)
|
||||
|
||||
## Changed
|
||||
* All launch pad blocks can now accept items, not just ports
|
||||
* Removed the old watz pellets and titanium filter
|
||||
* Removed copper panels, cast copper plates now take its place in most use-cases
|
||||
* Removed generator bodies and rotors, recipes use 6 dense gold wires per generator instead
|
||||
* Removed reinforced turbine shafts, most turbines now use HSS pipes instead
|
||||
* Removed the steam batteries (why did we even have those?)
|
||||
* Removed some old remap items (from back when the ZIRNOX rods got remapped)
|
||||
* Large and small shells have been merged into a single item which uses material autogen
|
||||
* A copper variant for shells has been added which is used for artillery shells
|
||||
* Shells are now only directly craftable via anvil, however they can be cast using the crucible as well
|
||||
* Most instances of the expensive steel pipes as well as the decorative pipes which need tons of microcrafting have been replaced with a new pipe item
|
||||
* The new pipes also use autogen, being available in different materials
|
||||
* Some of the recipes that used the small shells now use pipes instead
|
||||
* Tenfolded the throughout of powered condensers
|
||||
* Regular and combo filters now work for blistering agents (like mustard gas or air pollution)
|
||||
* Wires now render two faces instead of one, making them appear equally thick from any viewed angle
|
||||
* Slag taps can now be toggled and filtered
|
||||
* Foundry channels now have twice the throughput (2 ingots)
|
||||
* RBMK ReaSim and steam connectors now have tooltips explaining how they work, as there is no other ingame documentation on them
|
||||
* Condensers now need cast plates instead of welded plates
|
||||
* Tweaked the substation recipe, it now yields two substations
|
||||
|
||||
## Fixed
|
||||
* Fixed crash caused by invalid default loot pool configuration
|
||||
* Fixed enchantment glint not rendering on upscaled items like certain swords or tier 2 pickaxes
|
||||
* Fixed wire connections becoming invisible when pointing straight down, wires should now rotate correctly
|
||||
* Fixed connection issue allowing channels to output into slag taps sideways
|
||||
* Fixed the strand caster sometimes voiding small amounts of material
|
||||
## Fixed
|
||||
@ -773,6 +773,10 @@ public class ModBlocks {
|
||||
public static Block red_cable_gauge;
|
||||
public static Block red_connector;
|
||||
public static Block red_pylon;
|
||||
public static Block red_pylon_medium_wood;
|
||||
public static Block red_pylon_medium_wood_transformer;
|
||||
public static Block red_pylon_medium_steel;
|
||||
public static Block red_pylon_medium_steel_transformer;
|
||||
public static Block red_pylon_large;
|
||||
public static Block substation;
|
||||
public static Block cable_switch;
|
||||
@ -1922,6 +1926,10 @@ public class ModBlocks {
|
||||
red_cable_gauge = new BlockCableGauge().setBlockName("red_cable_gauge").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
|
||||
red_connector = new ConnectorRedWire(Material.iron).setBlockName("red_connector").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":red_connector");
|
||||
red_pylon = new PylonRedWire(Material.iron).setBlockName("red_pylon").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":red_pylon");
|
||||
red_pylon_medium_wood = new PylonMedium(Material.wood).setBlockName("red_pylon_medium_wood").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":red_pylon");
|
||||
red_pylon_medium_wood_transformer = new PylonMedium(Material.wood).setBlockName("red_pylon_medium_wood_transformer").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":red_pylon");
|
||||
red_pylon_medium_steel = new PylonMedium(Material.iron).setBlockName("red_pylon_medium_steel").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":red_pylon");
|
||||
red_pylon_medium_steel_transformer = new PylonMedium(Material.iron).setBlockName("red_pylon_medium_steel_transformer").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":red_pylon");
|
||||
red_pylon_large = new PylonLarge(Material.iron).setBlockName("red_pylon_large").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":red_pylon_large");
|
||||
substation = new Substation(Material.iron).setBlockName("substation").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":substation");
|
||||
cable_switch = new CableSwitch(Material.iron).setBlockName("cable_switch").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
|
||||
@ -3196,6 +3204,10 @@ public class ModBlocks {
|
||||
GameRegistry.registerBlock(red_wire_coated, red_wire_coated.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(red_connector, ItemBlockBase.class, red_connector.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(red_pylon, ItemBlockBase.class, red_pylon.getUnlocalizedName());
|
||||
register(red_pylon_medium_wood);
|
||||
register(red_pylon_medium_wood_transformer);
|
||||
register(red_pylon_medium_steel);
|
||||
register(red_pylon_medium_steel_transformer);
|
||||
GameRegistry.registerBlock(red_pylon_large, ItemBlockBase.class, red_pylon_large.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(substation, ItemBlockBase.class, substation.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(cable_switch, cable_switch.getUnlocalizedName());
|
||||
|
||||
53
src/main/java/com/hbm/blocks/network/PylonMedium.java
Normal file
53
src/main/java/com/hbm/blocks/network/PylonMedium.java
Normal file
@ -0,0 +1,53 @@
|
||||
package com.hbm.blocks.network;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.blocks.ITooltipProvider;
|
||||
import com.hbm.tileentity.network.TileEntityPylonBase;
|
||||
import com.hbm.tileentity.network.TileEntityPylonMedium;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class PylonMedium extends BlockDummyable implements ITooltipProvider {
|
||||
|
||||
public PylonMedium(Material mat) {
|
||||
super(mat);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int meta) {
|
||||
|
||||
if(meta >= 12) return new TileEntityPylonMedium();
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
|
||||
list.add(EnumChatFormatting.GOLD + "Connection Type: " + EnumChatFormatting.YELLOW + "Triple");
|
||||
list.add(EnumChatFormatting.GOLD + "Connection Range: " + EnumChatFormatting.YELLOW + "45m");
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getDimensions() {
|
||||
return new int[] {6, 0, 0, 0, 0, 0};
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getOffset() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void breakBlock(World world, int x, int y, int z, Block b, int m) {
|
||||
TileEntity te = world.getTileEntity(x, y, z);
|
||||
if(te instanceof TileEntityPylonBase) ((TileEntityPylonBase)te).disconnectAll();
|
||||
super.breakBlock(world, x, y, z, b, m);
|
||||
}
|
||||
}
|
||||
@ -3,7 +3,6 @@ package com.hbm.inventory.container;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.tileentity.machine.TileEntityFEL;
|
||||
|
||||
import api.hbm.energy.IBatteryItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
@ -49,7 +48,7 @@ public class ContainerFEL extends Container {
|
||||
}
|
||||
} else {
|
||||
|
||||
if(rStack.getItem() instanceof IBatteryItem || rStack.getItem() == ModItems.battery_creative) {
|
||||
if(rStack.getItem() instanceof api.hbm.energymk2.IBatteryItem || rStack.getItem() == ModItems.battery_creative) {
|
||||
if(!this.mergeItemStack(stack, 0, 1, false)) return null;
|
||||
} else {
|
||||
if(!this.mergeItemStack(stack, 1, 2, false)) return null;
|
||||
|
||||
@ -6,7 +6,7 @@ import com.hbm.items.machine.ItemAssemblyTemplate;
|
||||
import com.hbm.items.machine.ItemMachineUpgrade;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineAssembler;
|
||||
|
||||
import api.hbm.energy.IBatteryItem;
|
||||
import api.hbm.energymk2.IBatteryItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
|
||||
@ -7,7 +7,7 @@ import com.hbm.items.machine.ItemChemistryTemplate;
|
||||
import com.hbm.items.machine.ItemMachineUpgrade;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineChemplant;
|
||||
|
||||
import api.hbm.energy.IBatteryItem;
|
||||
import api.hbm.energymk2.IBatteryItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
|
||||
@ -6,7 +6,7 @@ import com.hbm.items.machine.IItemFluidIdentifier;
|
||||
import com.hbm.items.machine.ItemMachineUpgrade;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineGasCent;
|
||||
|
||||
import api.hbm.energy.IBatteryItem;
|
||||
import api.hbm.energymk2.IBatteryItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
|
||||
@ -5,7 +5,7 @@ import com.hbm.items.ModItems;
|
||||
import com.hbm.items.machine.ItemBlades;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineShredder;
|
||||
|
||||
import api.hbm.energy.IBatteryItem;
|
||||
import api.hbm.energymk2.IBatteryItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
|
||||
@ -5,7 +5,7 @@ import com.hbm.items.machine.IItemFluidIdentifier;
|
||||
import com.hbm.items.machine.ItemMachineUpgrade;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineTurbofan;
|
||||
|
||||
import api.hbm.energy.IBatteryItem;
|
||||
import api.hbm.energymk2.IBatteryItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
|
||||
@ -458,14 +458,12 @@ public class AnvilRecipes {
|
||||
|
||||
constructionRecipes.add(new AnvilConstructionRecipe(
|
||||
new AStack[] {
|
||||
new OreDictStack(ANY_CONCRETE.any(), 6),
|
||||
new OreDictStack(STEEL.ingot(), 4),
|
||||
new ComparableStack(ModBlocks.steel_scaffold, 2),
|
||||
new ComparableStack(ModItems.plate_polymer, 8),
|
||||
new ComparableStack(ModItems.coil_copper, 2),
|
||||
new ComparableStack(ModItems.coil_copper_torus, 2)
|
||||
new OreDictStack(ANY_CONCRETE.any(), 8),
|
||||
new OreDictStack(STEEL.ingot(), 8),
|
||||
new ComparableStack(ModItems.plate_polymer, 12),
|
||||
new ComparableStack(ModItems.coil_copper, 8)
|
||||
},
|
||||
new AnvilOutput(new ItemStack(ModBlocks.substation))).setTier(2));
|
||||
new AnvilOutput(new ItemStack(ModBlocks.substation, 2))).setTier(2));
|
||||
|
||||
constructionRecipes.add(new AnvilConstructionRecipe(
|
||||
new AStack[] {
|
||||
|
||||
@ -147,8 +147,6 @@ public class ClientProxy extends ServerProxy {
|
||||
registerBlockRenderer();
|
||||
|
||||
Jars.initJars();
|
||||
|
||||
//SoundUtil.addSoundCategory("ntmMachines");
|
||||
}
|
||||
|
||||
private void registerClientEventHandler(Object handler) {
|
||||
@ -337,6 +335,7 @@ public class ClientProxy extends ServerProxy {
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityFluidDuct.class, new RenderFluidDuct());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityPylon.class, new RenderPylon());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityConnector.class, new RenderConnector());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityPylonMedium.class, new RenderPylonMedium());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityPylonLarge.class, new RenderPylonLarge());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntitySubstation.class, new RenderSubstation());
|
||||
//chargers
|
||||
|
||||
@ -279,6 +279,10 @@ public class CraftingManager {
|
||||
addShapelessAuto(new ItemStack(ModBlocks.red_cable_gauge), new Object[] { ModBlocks.red_wire_coated, STEEL.ingot(), ModItems.circuit_aluminium });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.red_connector, 4), new Object[] { "C", "I", "S", 'C', ModItems.coil_copper, 'I', ModItems.plate_polymer, 'S', STEEL.ingot() });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.red_pylon, 4), new Object[] { "CWC", "PWP", " T ", 'C', ModItems.coil_copper, 'W', KEY_PLANKS, 'P', ModItems.plate_polymer, 'T', ModBlocks.red_wire_coated });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.red_pylon_medium_wood, 2), new Object[] { "CCW", "IIW", " S", 'C', ModItems.coil_copper, 'W', KEY_PLANKS, 'I', ModItems.plate_polymer, 'S', KEY_COBBLESTONE });
|
||||
addShapelessAuto(new ItemStack(ModBlocks.red_pylon_medium_wood_transformer, 1), new Object[] { ModBlocks.red_pylon_medium_wood, ModItems.plate_polymer, ModItems.coil_copper });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.red_pylon_medium_steel, 2), new Object[] { "CCW", "IIW", " S", 'C', ModItems.coil_copper, 'W', STEEL.pipe(), 'I', ModItems.plate_polymer, 'S', KEY_COBBLESTONE });
|
||||
addShapelessAuto(new ItemStack(ModBlocks.red_pylon_medium_steel_transformer, 1), new Object[] { ModBlocks.red_pylon_medium_steel, ModItems.plate_polymer, ModItems.coil_copper });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.machine_battery_potato, 1), new Object[] { "PCP", "WRW", "PCP", 'P', ItemBattery.getEmptyBattery(ModItems.battery_potato), 'C', CU.ingot(), 'R', REDSTONE.block(), 'W', KEY_PLANKS });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.capacitor_bus, 1), new Object[] { "PIP", "PIP", "PIP", 'P', ModItems.plate_polymer, 'I', MINGRADE.ingot() });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.capacitor_copper, 1), new Object[] { "PPP", "PCP", "WWW", 'P', STEEL.plate(), 'C', CU.block(), 'W', KEY_PLANKS });
|
||||
@ -960,7 +964,7 @@ public class CraftingManager {
|
||||
addShapelessAuto(new ItemStack(ModItems.solid_fuel, 3), new Object[] { Fluids.HEATINGOIL.getDict(16000), KEY_TOOL_CHEMISTRYSET });
|
||||
addShapelessAuto(new ItemStack(ModItems.canister_full, 2, Fluids.LUBRICANT.getID()), new Object[] { Fluids.HEATINGOIL.getDict(1000), Fluids.UNSATURATEDS.getDict(1000), ModItems.canister_empty, ModItems.canister_empty, KEY_TOOL_CHEMISTRYSET });
|
||||
|
||||
addRecipeAuto(new ItemStack(ModBlocks.machine_condenser), new Object[] { "SIS", "ICI", "SIS", 'S', STEEL.ingot(), 'I', IRON.plate(), 'C', CU.plateWelded() });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.machine_condenser), new Object[] { "SIS", "ICI", "SIS", 'S', STEEL.ingot(), 'I', IRON.plate(), 'C', CU.plateCast() });
|
||||
|
||||
addShapelessAuto(new ItemStack(ModItems.book_guide, 1, BookType.TEST.ordinal()), new Object[] { Items.book, ModItems.canned_conserve.stackFromEnum(EnumFoodType.JIZZ) });
|
||||
addShapelessAuto(new ItemStack(ModItems.book_guide, 1, BookType.RBMK.ordinal()), new Object[] { Items.book, Items.potato });
|
||||
|
||||
@ -385,6 +385,7 @@ public class ResourceManager {
|
||||
|
||||
//Network
|
||||
public static final IModelCustom connector = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/network/connector.obj"));
|
||||
public static final IModelCustom pylon_medium = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/network/pylon_medium.obj"));
|
||||
public static final IModelCustom pylon_large = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/network/pylon_large.obj"));
|
||||
public static final IModelCustom substation = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/network/substation.obj"));
|
||||
|
||||
@ -782,6 +783,8 @@ public class ResourceManager {
|
||||
|
||||
//Electricity
|
||||
public static final ResourceLocation connector_tex = new ResourceLocation(RefStrings.MODID, "textures/models/network/connector.png");
|
||||
public static final ResourceLocation pylon_medium_tex = new ResourceLocation(RefStrings.MODID, "textures/models/network/pylon_medium.png");
|
||||
public static final ResourceLocation pylon_medium_steel_tex = new ResourceLocation(RefStrings.MODID, "textures/models/network/pylon_medium_steel.png");
|
||||
public static final ResourceLocation pylon_large_tex = new ResourceLocation(RefStrings.MODID, "textures/models/network/pylon_large.png");
|
||||
public static final ResourceLocation substation_tex = new ResourceLocation(RefStrings.MODID, "textures/models/network/substation.png");
|
||||
public static final ResourceLocation wire_tex = new ResourceLocation(RefStrings.MODID, "textures/models/network/wire.png");
|
||||
|
||||
@ -4,7 +4,6 @@ import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.tileentity.network.TileEntityPylonBase;
|
||||
import com.hbm.tileentity.network.TileEntityPylonBase.ConnectionType;
|
||||
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
@ -15,63 +14,6 @@ import net.minecraft.world.World;
|
||||
|
||||
public abstract class RenderPylonBase extends TileEntitySpecialRenderer {
|
||||
|
||||
//TODO: adapt this into a more generic form for multi wire pylons
|
||||
/*@Deprecated
|
||||
public void renderSingleLine(TileEntityPylonBase pyl, double x, double y, double z) {
|
||||
|
||||
for(int i = 0; i < pyl.connected.size(); i++) {
|
||||
|
||||
int[] wire = pyl.connected.get(i);
|
||||
TileEntity tile = pyl.getWorldObj().getTileEntity(wire[0], wire[1], wire[2]);
|
||||
|
||||
if(tile instanceof TileEntityPylonBase) {
|
||||
TileEntityPylonBase pylon = (TileEntityPylonBase) tile;
|
||||
Vec3 myOffset = pyl.getMountPos()[0];
|
||||
Vec3 theirOffset = pylon.getMountPos()[0];
|
||||
|
||||
double conX0 = pyl.xCoord + myOffset.xCoord;
|
||||
double conY0 = pyl.yCoord + myOffset.yCoord;
|
||||
double conZ0 = pyl.zCoord + myOffset.zCoord;
|
||||
double conX1 = pylon.xCoord + theirOffset.xCoord;
|
||||
double conY1 = pylon.yCoord + theirOffset.yCoord;
|
||||
double conZ1 = pylon.zCoord + theirOffset.zCoord;
|
||||
|
||||
double wX = (conX1 - conX0) / 2D;
|
||||
double wY = (conY1 - conY0) / 2D;
|
||||
double wZ = (conZ1 - conZ0) / 2D;
|
||||
|
||||
float count = 10;
|
||||
Vec3 delta = Vec3.createVectorHelper(conX1 - conX0, conY1 - conY0, conZ1 - conZ0);
|
||||
double hang = delta.lengthVector() / 15D;
|
||||
|
||||
for(float j = 0; j < count; j++) {
|
||||
|
||||
float k = j + 1;
|
||||
|
||||
double ja = j + 0.5D;
|
||||
double ix = conX0 + delta.xCoord / (double)(count * 2) * ja;
|
||||
double iy = conY0 + delta.yCoord / (double)(count * 2) * ja - Math.sin(j / count * Math.PI * 0.5) * hang;
|
||||
double iz = conZ0 + delta.zCoord / (double)(count * 2) * ja;
|
||||
|
||||
//pylon.getWorldObj().spawnParticle("reddust", ix, iy, iz, 0.01 + j * 0.1, 0, 0);
|
||||
|
||||
int brightness = pyl.getWorldObj().getLightBrightnessForSkyBlocks(MathHelper.floor_double(ix), MathHelper.floor_double(iy), MathHelper.floor_double(iz), 0);
|
||||
int lX = brightness % 65536;
|
||||
int lY = brightness / 65536;
|
||||
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float)lX / 1.0F, (float)lY / 1.0F);
|
||||
|
||||
drawLineSegment(
|
||||
x + myOffset.xCoord + (wX * j / count),
|
||||
y + myOffset.yCoord + (wY * j / count) - Math.sin(j / count * Math.PI * 0.5) * hang,
|
||||
z + myOffset.zCoord + (wZ * j / count),
|
||||
x + myOffset.xCoord + (wX * k / count),
|
||||
y + myOffset.yCoord + (wY * k / count) - Math.sin(k / count * Math.PI * 0.5) * hang,
|
||||
z + myOffset.zCoord + (wZ * k / count));
|
||||
}
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
/**
|
||||
* The closest we have to a does-all solution. It will figure out if it needs to draw multiple lines,
|
||||
* iterate through all the mounting points, try to find the matching mounting points and then draw the lines.
|
||||
@ -95,7 +37,7 @@ public abstract class RenderPylonBase extends TileEntitySpecialRenderer {
|
||||
Vec3[] m1 = pyl.getMountPos();
|
||||
Vec3[] m2 = pylon.getMountPos();
|
||||
|
||||
int lineCount = Math.max(pyl.getConnectionType() == ConnectionType.QUAD ? 4 : 1, pylon.getConnectionType() == ConnectionType.QUAD ? 4 : 1);
|
||||
int lineCount = Math.min(m1.length, m2.length);
|
||||
|
||||
for(int line = 0; line < lineCount; line++) {
|
||||
|
||||
@ -227,12 +169,16 @@ public abstract class RenderPylonBase extends TileEntitySpecialRenderer {
|
||||
double iZ = Math.cos(yaw) * Math.cos(newPitch) * girth;
|
||||
double iX = Math.sin(yaw) * Math.cos(newPitch) * girth;
|
||||
double iY = Math.sin(newPitch) * girth;
|
||||
double jZ = Math.cos(newYaw) * Math.cos(newPitch) * girth;
|
||||
double jX = Math.sin(newYaw) * Math.cos(newPitch) * girth;
|
||||
double jZ = Math.cos(newYaw) * girth;
|
||||
double jX = Math.sin(newYaw) * girth;
|
||||
double length = Math.sqrt(deltaX * deltaX + deltaY * deltaY + deltaZ * deltaZ);
|
||||
int wrap = (int) Math.ceil(length * 8);
|
||||
|
||||
if(deltaX + deltaZ < 0) wrap *= -1;
|
||||
if(deltaX + deltaZ < 0) {
|
||||
wrap *= -1;
|
||||
jZ *= -1;
|
||||
jX *= -1;
|
||||
}
|
||||
|
||||
tessellator.setColorOpaque_I(0xffffff);
|
||||
tessellator.addVertexWithUV(x + iX, y + iY, z + iZ, 0, 0);
|
||||
|
||||
@ -35,5 +35,4 @@ public class RenderPylonLarge extends RenderPylonBase {
|
||||
this.renderLinesGeneric(pyl, x, y, z);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -0,0 +1,87 @@
|
||||
package com.hbm.render.tileentity;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.render.item.ItemRenderBase;
|
||||
import com.hbm.tileentity.network.TileEntityPylonMedium;
|
||||
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.client.IItemRenderer;
|
||||
|
||||
public class RenderPylonMedium extends RenderPylonBase implements IItemRendererProvider {
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float interp) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(x + 0.5, y, z + 0.5);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
|
||||
switch(tile.getBlockMetadata() - BlockDummyable.offset) {
|
||||
case 2: GL11.glRotatef(180, 0F, 1F, 0F); break;
|
||||
case 4: GL11.glRotatef(270, 0F, 1F, 0F); break;
|
||||
case 3: GL11.glRotatef(0, 0F, 1F, 0F); break;
|
||||
case 5: GL11.glRotatef(90, 0F, 1F, 0F); break;
|
||||
}
|
||||
|
||||
TileEntityPylonMedium pyl = (TileEntityPylonMedium)tile;
|
||||
|
||||
|
||||
if(tile.getBlockType() == ModBlocks.red_pylon_medium_steel || tile.getBlockType() == ModBlocks.red_pylon_medium_steel_transformer)
|
||||
bindTexture(ResourceManager.pylon_medium_steel_tex);
|
||||
else
|
||||
bindTexture(ResourceManager.pylon_medium_tex);
|
||||
|
||||
ResourceManager.pylon_medium.renderPart("Pylon");
|
||||
if(pyl.hasTransformer()) ResourceManager.pylon_medium.renderPart("Transformer");
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glPushMatrix();
|
||||
this.renderLinesGeneric(pyl, x, y, z);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item[] getItemsForRenderer() {
|
||||
return new Item[] {
|
||||
Item.getItemFromBlock(ModBlocks.red_pylon_medium_wood),
|
||||
Item.getItemFromBlock(ModBlocks.red_pylon_medium_wood_transformer),
|
||||
Item.getItemFromBlock(ModBlocks.red_pylon_medium_steel),
|
||||
Item.getItemFromBlock(ModBlocks.red_pylon_medium_steel_transformer)
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemForRenderer() { return Item.getItemFromBlock(ModBlocks.red_pylon_medium_wood); }
|
||||
|
||||
@Override
|
||||
public IItemRenderer getRenderer() {
|
||||
return new ItemRenderBase( ) {
|
||||
public void renderInventory() {
|
||||
GL11.glTranslated(1, -5, 0);
|
||||
GL11.glScaled(4.5, 4.5, 4.5);
|
||||
}
|
||||
public void renderCommonWithStack(ItemStack stack) {
|
||||
GL11.glRotatef(90, 0F, 1F, 0F);
|
||||
GL11.glScaled(0.5, 0.5, 0.5);
|
||||
GL11.glTranslated(0.75, 0, 0);
|
||||
|
||||
if(stack.getItem() == Item.getItemFromBlock(ModBlocks.red_pylon_medium_steel) || stack.getItem() == Item.getItemFromBlock(ModBlocks.red_pylon_medium_steel_transformer))
|
||||
bindTexture(ResourceManager.pylon_medium_steel_tex);
|
||||
else
|
||||
bindTexture(ResourceManager.pylon_medium_tex);
|
||||
|
||||
ResourceManager.pylon_medium.renderPart("Pylon");
|
||||
|
||||
if(stack.getItem() == Item.getItemFromBlock(ModBlocks.red_pylon_medium_wood_transformer) || stack.getItem() == Item.getItemFromBlock(ModBlocks.red_pylon_medium_steel_transformer))
|
||||
ResourceManager.pylon_medium.renderPart("Transformer");
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
@ -382,6 +382,7 @@ public class TileMappings {
|
||||
|
||||
put(TileEntityConnector.class, "tileentity_connector_redwire");
|
||||
put(TileEntityPylon.class, "tileentity_pylon_redwire");
|
||||
put(TileEntityPylonMedium.class, "tileentity_pylon_medium");
|
||||
put(TileEntityPylonLarge.class, "tileentity_pylon_large");
|
||||
put(TileEntitySubstation.class, "tileentity_substation");
|
||||
|
||||
|
||||
@ -156,6 +156,7 @@ public abstract class TileEntityPylonBase extends TileEntityCableBaseNT {
|
||||
|
||||
public static enum ConnectionType {
|
||||
SINGLE,
|
||||
TRIPLE,
|
||||
QUAD
|
||||
//more to follow
|
||||
}
|
||||
|
||||
@ -37,5 +37,4 @@ public class TileEntityPylonLarge extends TileEntityPylonBase {
|
||||
public double getMaxWireLength() {
|
||||
return 100;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -0,0 +1,59 @@
|
||||
package com.hbm.tileentity.network;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.util.fauxpointtwelve.BlockPos;
|
||||
import com.hbm.util.fauxpointtwelve.DirPos;
|
||||
|
||||
import api.hbm.energymk2.Nodespace.PowerNode;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class TileEntityPylonMedium extends TileEntityPylonBase {
|
||||
|
||||
@Override
|
||||
public ConnectionType getConnectionType() {
|
||||
return ConnectionType.TRIPLE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Vec3[] getMountPos() {
|
||||
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - 10);
|
||||
double height = 7.5D;
|
||||
|
||||
return new Vec3[] {
|
||||
Vec3.createVectorHelper(0.5, height, 0.5),
|
||||
Vec3.createVectorHelper(0.5 + dir.offsetX, height, 0.5 + dir.offsetZ),
|
||||
Vec3.createVectorHelper(0.5 + dir.offsetX * 2, height, 0.5 + dir.offsetZ * 2),
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getMaxWireLength() {
|
||||
return 45;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canConnect(ForgeDirection dir) {
|
||||
return this.hasTransformer() ? ForgeDirection.getOrientation(this.getBlockMetadata() - 10).getOpposite() == dir : false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PowerNode createNode() {
|
||||
TileEntity tile = (TileEntity) this;
|
||||
PowerNode node = new PowerNode(new BlockPos(tile.xCoord, tile.yCoord, tile.zCoord)).setConnections(new DirPos(xCoord, yCoord, zCoord, ForgeDirection.UNKNOWN));
|
||||
for(int[] pos : this.connected) node.addConnection(new DirPos(pos[0], pos[1], pos[2], ForgeDirection.UNKNOWN));
|
||||
if(this.hasTransformer()) {
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - 10).getOpposite();
|
||||
node.addConnection(new DirPos(xCoord + dir.offsetX, yCoord, zCoord + dir.offsetZ, dir));
|
||||
}
|
||||
return node;
|
||||
}
|
||||
|
||||
public boolean hasTransformer() {
|
||||
Block block = this.getBlockType();
|
||||
return block == ModBlocks.red_pylon_medium_wood_transformer || block == ModBlocks.red_pylon_medium_steel_transformer;
|
||||
}
|
||||
}
|
||||
@ -4482,6 +4482,10 @@ tile.red_cable_paintable.name=Geschirmtes rotes Kupferkabel (Färbbar)
|
||||
tile.red_connector.name=Stromverbindungsstück
|
||||
tile.red_pylon.name=Strommasten
|
||||
tile.red_pylon_large.name=Hochspannungsmasten
|
||||
tile.red_pylon_medium_steel.name=Stählerner mittelgroßer Strommasten
|
||||
tile.red_pylon_medium_steel_transformer.name=Stählerner mittelgroßer Strommasten mit Transformator
|
||||
tile.red_pylon_medium_wood.name=Hölzerner mittelgroßer Strommasten
|
||||
tile.red_pylon_medium_wood_transformer.name=Hölzerner mittelgroßer Strommasten mit Transformator
|
||||
tile.red_wire_coated.name=Geschirmtes rotes Kupferkabel
|
||||
tile.reinforced_brick.name=Verstärkter Stein
|
||||
tile.reinforced_brick_stairs.name=Verstärkte Steintreppe
|
||||
|
||||
@ -5537,8 +5537,12 @@ tile.red_cable_gauge.name=Power Gauge
|
||||
tile.red_cable_gauge.desc=Cable that displays how much power$moves within the network per tick.$Split networks connected by energy$storage blocks are considered as one shared network.
|
||||
tile.red_cable_paintable.name=Paintable Red Copper Cable
|
||||
tile.red_connector.name=Electricity Connector
|
||||
tile.red_pylon.name=Electricity Pole
|
||||
tile.red_pylon.name=Electricity Pylon
|
||||
tile.red_pylon_large.name=Large Electricity Pylon
|
||||
tile.red_pylon_medium_steel.name=Medium Steel Electicity Pylon
|
||||
tile.red_pylon_medium_steel_transformer.name=Medium Steel Electicity Pylon with Transformer
|
||||
tile.red_pylon_medium_wood.name=Medium Wooden Electicity Pylon
|
||||
tile.red_pylon_medium_wood_transformer.name=Medium Wooden Electicity Pylon with Transformer
|
||||
tile.red_wire_coated.name=Coated Red Copper Cable
|
||||
tile.reinforced_brick.name=Reinforced Stone
|
||||
tile.reinforced_brick_stairs.name=Reinforced Stone Stairs
|
||||
|
||||
1023
src/main/resources/assets/hbm/models/network/pylon_medium.obj
Normal file
1023
src/main/resources/assets/hbm/models/network/pylon_medium.obj
Normal file
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
Before Width: | Height: | Size: 957 B After Width: | Height: | Size: 2.9 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.3 KiB |
Loading…
x
Reference in New Issue
Block a user