mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
added soyuz launcher core compnent with hologram, diamond gravel recipes
This commit is contained in:
parent
accbb1fba1
commit
ad0954a145
@ -70,6 +70,7 @@ potion.hbm_phosphorus=Phosphorverbrennung
|
||||
|
||||
tool.ability.recursion=Erzadern-Miner
|
||||
tool.ability.hammer=AoE
|
||||
tool.ability.silktouch=Präzisionswerkzeug
|
||||
tool.ability.smelter=Auto-Ofen
|
||||
tool.ability.shredder=Auto-Brecher
|
||||
tool.ability.cnetrifuge=Auto-Zentrifuge
|
||||
@ -675,7 +676,7 @@ item.coil_magnetized_tungsten.name=4000K Hochtemperaturensupraleitermagnetspule
|
||||
item.plate_mixed.name=Gemischte Platte
|
||||
item.plate_paa.name=PaA-Legierungsplatte
|
||||
item.ingot_dura_steel.name=Schnellarbeitsstahlbarren
|
||||
item.ingot_polymer.name=Polymerbarren
|
||||
item.ingot_polymer.name=Polymertafel
|
||||
item.bolt_dura_steel.name=Schnellarbeitsstahlbolzen
|
||||
item.pipes_steel.name=Stahlrohre
|
||||
item.drill_titanium.name=Titanbohrer
|
||||
@ -745,6 +746,7 @@ item.nugget_beryllium.name=Berylliumnugget
|
||||
item.crystal_iron.name=Eisenkristalle
|
||||
item.crystal_gold.name=Goldkristalle
|
||||
item.crystal_redstone.name=Redstonekristalle
|
||||
item.crystal_diamond.name=Diamantkristalle
|
||||
item.crystal_uranium.name=Urankristalle
|
||||
item.crystal_thorium.name=Thoriumkristalle
|
||||
item.crystal_plutonium.name=Plutoniumkristalle
|
||||
|
||||
@ -70,6 +70,7 @@ potion.hbm_phosphorus=Phosphorus Burns
|
||||
|
||||
tool.ability.recursion=Vein Miner
|
||||
tool.ability.hammer=AoE
|
||||
tool.ability.silktouch=Precision Miner
|
||||
tool.ability.smelter=Auto-Smelter
|
||||
tool.ability.shredder=Auto-Shredder
|
||||
tool.ability.centrifuge=Auto-Centrifuge
|
||||
@ -675,7 +676,7 @@ item.coil_magnetized_tungsten.name=4000K High Temperature Super Conducting Coil
|
||||
item.plate_mixed.name=Mixed Plate
|
||||
item.plate_paa.name=PaA Alloy Plate
|
||||
item.ingot_dura_steel.name=High-Speed Steel Ingot
|
||||
item.ingot_polymer.name=Polymer Ingot
|
||||
item.ingot_polymer.name=Polymer Bar
|
||||
item.bolt_dura_steel.name=High-Speed Steel Bolt
|
||||
item.pipes_steel.name=Steel Pipes
|
||||
item.drill_titanium.name=Titanium Drill
|
||||
@ -745,6 +746,7 @@ item.nugget_beryllium.name=Beryllium Nugget
|
||||
item.crystal_iron.name=Iron Crystals
|
||||
item.crystal_gold.name=Gold Crystals
|
||||
item.crystal_redstone.name=Redstone Crystals
|
||||
item.crystal_diamond.name=Diamond Crystals
|
||||
item.crystal_uranium.name=Uranium Crystals
|
||||
item.crystal_thorium.name=Thorium Crystals
|
||||
item.crystal_plutonium.name=Plutonium Crystals
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 372 B After Width: | Height: | Size: 378 B |
BIN
assets/hbm/textures/blocks/struct_soyuz_core.png
Normal file
BIN
assets/hbm/textures/blocks/struct_soyuz_core.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 405 B |
BIN
assets/hbm/textures/items/crystal_diamond.png
Normal file
BIN
assets/hbm/textures/items/crystal_diamond.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 433 B |
@ -42,7 +42,7 @@ public abstract class BlockDummyable extends BlockContainer {
|
||||
|
||||
super.onNeighborBlockChange(world, x, y, z, block);
|
||||
|
||||
if(world.isRemote)
|
||||
if(world.isRemote || safeRem)
|
||||
return;
|
||||
|
||||
int metadata = world.getBlockMetadata(x, y, z);
|
||||
@ -56,6 +56,7 @@ public abstract class BlockDummyable extends BlockContainer {
|
||||
|
||||
if(b != this) {
|
||||
world.setBlockToAir(x, y, z);
|
||||
//world.setBlock(x, y, z, ModBlocks.dfc_injector, dir.ordinal(), 3);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -460,6 +460,7 @@ public class ModBlocks {
|
||||
public static Block struct_scaffold;
|
||||
public static Block struct_launcher_core;
|
||||
public static Block struct_launcher_core_large;
|
||||
public static Block struct_soyuz_core;
|
||||
|
||||
public static Block factory_titanium_hull;
|
||||
public static Block factory_titanium_furnace;
|
||||
@ -1124,6 +1125,7 @@ public class ModBlocks {
|
||||
struct_scaffold = new BlockGeneric(Material.iron).setBlockName("struct_scaffold").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.missileTab).setBlockTextureName(RefStrings.MODID + ":struct_scaffold");
|
||||
struct_launcher_core = new BlockStruct(Material.iron).setBlockName("struct_launcher_core").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.missileTab).setBlockTextureName(RefStrings.MODID + ":struct_launcher_core");
|
||||
struct_launcher_core_large = new BlockStruct(Material.iron).setBlockName("struct_launcher_core_large").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.missileTab).setBlockTextureName(RefStrings.MODID + ":struct_launcher_core_large");
|
||||
struct_soyuz_core = new BlockSoyuzStruct(Material.iron).setBlockName("struct_soyuz_core").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.missileTab).setBlockTextureName(RefStrings.MODID + ":struct_soyuz_core");
|
||||
|
||||
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");
|
||||
@ -1805,6 +1807,7 @@ public class ModBlocks {
|
||||
GameRegistry.registerBlock(struct_scaffold, struct_scaffold.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(struct_launcher_core, struct_launcher_core.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(struct_launcher_core_large, struct_launcher_core_large.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(struct_soyuz_core, struct_soyuz_core.getUnlocalizedName());
|
||||
|
||||
//Absorbers
|
||||
GameRegistry.registerBlock(absorber, absorber.getUnlocalizedName());
|
||||
|
||||
26
com/hbm/blocks/machine/BlockSoyuzStruct.java
Normal file
26
com/hbm/blocks/machine/BlockSoyuzStruct.java
Normal file
@ -0,0 +1,26 @@
|
||||
package com.hbm.blocks.machine;
|
||||
|
||||
import com.hbm.tileentity.machine.TileEntitySoyuzStruct;
|
||||
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class BlockSoyuzStruct extends BlockContainer {
|
||||
|
||||
public BlockSoyuzStruct(Material mat) {
|
||||
super(mat);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int meta) {
|
||||
return new TileEntitySoyuzStruct();
|
||||
}
|
||||
|
||||
public boolean isOpaqueCube() {
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
@ -75,7 +75,7 @@ public class SoyuzLauncher extends BlockDummyable {
|
||||
}
|
||||
}
|
||||
|
||||
int height = 4;
|
||||
public static final int height = 4;
|
||||
|
||||
@Override
|
||||
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack itemStack) {
|
||||
@ -120,7 +120,7 @@ public class SoyuzLauncher extends BlockDummyable {
|
||||
super.onBlockPlacedBy(world, x, y, z, player, itemStack);
|
||||
}
|
||||
|
||||
protected boolean checkRequirement(World world, int x, int y, int z, ForgeDirection dir, int o) {
|
||||
public boolean checkRequirement(World world, int x, int y, int z, ForgeDirection dir, int o) {
|
||||
|
||||
x = x + dir.offsetX * o;
|
||||
y = y + dir.offsetY * o + height;
|
||||
@ -137,7 +137,7 @@ public class SoyuzLauncher extends BlockDummyable {
|
||||
return true;
|
||||
}
|
||||
|
||||
protected void fillSpace(World world, int x, int y, int z, ForgeDirection dir, int o) {
|
||||
public void fillSpace(World world, int x, int y, int z, ForgeDirection dir, int o) {
|
||||
|
||||
x = x + dir.offsetX * o;
|
||||
y = y + dir.offsetY * o + height;
|
||||
@ -210,7 +210,15 @@ public class SoyuzLauncher extends BlockDummyable {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
for(int l = 0; l < 10; l++)
|
||||
world.spawnEntityInWorld(new EntityItem(world, x + 0.5, y + 0.5, z + 0.5, new ItemStack(ModBlocks.struct_launcher, 38)));
|
||||
for(int l = 0; l < 8; l++)
|
||||
world.spawnEntityInWorld(new EntityItem(world, x + 0.5, y + 0.5, z + 0.5, new ItemStack(ModBlocks.concrete_smooth, 41)));
|
||||
for(int l = 0; l < 6; l++)
|
||||
world.spawnEntityInWorld(new EntityItem(world, x + 0.5, y + 0.5, z + 0.5, new ItemStack(ModBlocks.struct_scaffold, 64)));
|
||||
world.spawnEntityInWorld(new EntityItem(world, x + 0.5, y + 0.5, z + 0.5, new ItemStack(ModBlocks.struct_scaffold, 53)));
|
||||
|
||||
world.func_147453_f(x, y, z, p_149749_5_);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
package com.hbm.handler;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
@ -52,6 +54,8 @@ public class MultiblockHandlerXR {
|
||||
int count = 0;
|
||||
|
||||
int[] rot = rotate(dim, dir);
|
||||
|
||||
BlockDummyable.safeRem = true;
|
||||
|
||||
for(int a = x - rot[4]; a <= x + rot[5]; a++) {
|
||||
for(int b = y - rot[1]; b <= y + rot[0]; b++) {
|
||||
@ -81,11 +85,15 @@ public class MultiblockHandlerXR {
|
||||
|
||||
if(count > 2000) {
|
||||
System.out.println("fillspace: ded " + a + " " + b + " " + c + " " + x + " " + y + " " + z);
|
||||
|
||||
BlockDummyable.safeRem = false;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
BlockDummyable.safeRem = false;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
|
||||
@ -162,6 +162,34 @@ public abstract class ToolAbility {
|
||||
}
|
||||
}
|
||||
|
||||
public static class SilkAbility extends ToolAbility {
|
||||
|
||||
@Override
|
||||
public void onDig(World world, int x, int y, int z, EntityPlayer player, Block block, int meta, ItemToolAbility tool) {
|
||||
|
||||
//a band-aid on a gaping wound
|
||||
if(block == Blocks.lit_redstone_ore)
|
||||
block = Blocks.redstone_ore;
|
||||
|
||||
ItemStack stack = new ItemStack(block, 1, meta);
|
||||
|
||||
if(stack.getItem() != null) {
|
||||
world.setBlockToAir(x, y, z);
|
||||
world.spawnEntityInWorld(new EntityItem(world, x + 0.5, y + 0.5, z + 0.5, stack));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return "tool.ability.silktouch";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getFullName() {
|
||||
return I18n.format(getName());
|
||||
}
|
||||
}
|
||||
|
||||
public static class SmelterAbility extends ToolAbility {
|
||||
|
||||
@Override
|
||||
|
||||
@ -175,7 +175,7 @@ public class BulletConfigFactory {
|
||||
bullet.HBRC = 0;
|
||||
bullet.LBRC = 0;
|
||||
bullet.bounceMod = 1.0;
|
||||
bullet.doesPenetrate = false;
|
||||
bullet.doesPenetrate = true;
|
||||
bullet.doesBreakGlass = false;
|
||||
bullet.nuke = 35;
|
||||
bullet.style = BulletConfiguration.STYLE_NUKE;
|
||||
|
||||
@ -203,6 +203,7 @@ public class CentrifugeRecipes {
|
||||
recipes.put(new ComparableStack(ModItems.crystal_iron), new ItemStack[] { new ItemStack(ModItems.powder_iron, 2), new ItemStack(ModItems.powder_iron, 2), new ItemStack(ModItems.powder_titanium, 1), new ItemStack(ModItems.powder_lithium_tiny, 1) });
|
||||
recipes.put(new ComparableStack(ModItems.crystal_gold), new ItemStack[] { new ItemStack(ModItems.powder_gold, 2), new ItemStack(ModItems.powder_gold, 2), new ItemStack(ModItems.nugget_mercury, 1), new ItemStack(ModItems.powder_lithium_tiny, 1) });
|
||||
recipes.put(new ComparableStack(ModItems.crystal_redstone), new ItemStack[] { new ItemStack(Items.redstone, 3), new ItemStack(Items.redstone, 3), new ItemStack(Items.redstone, 3), new ItemStack(ModItems.nugget_mercury, 3) });
|
||||
recipes.put(new ComparableStack(ModItems.crystal_diamond), new ItemStack[] { new ItemStack(ModItems.powder_diamond, 1), new ItemStack(ModItems.powder_diamond, 1), new ItemStack(ModItems.powder_diamond, 1), new ItemStack(ModItems.powder_diamond, 1) });
|
||||
recipes.put(new ComparableStack(ModItems.crystal_uranium), new ItemStack[] { new ItemStack(ModItems.powder_uranium, 2), new ItemStack(ModItems.powder_uranium, 2), new ItemStack(ModItems.powder_thorium, 1), new ItemStack(ModItems.powder_lithium_tiny, 1) });
|
||||
recipes.put(new ComparableStack(ModItems.crystal_thorium), new ItemStack[] { new ItemStack(ModItems.powder_thorium, 2), new ItemStack(ModItems.powder_thorium, 2), new ItemStack(ModItems.powder_uranium, 1), new ItemStack(ModItems.powder_lithium_tiny, 1) });
|
||||
recipes.put(new ComparableStack(ModItems.crystal_plutonium), new ItemStack[] { new ItemStack(ModItems.powder_plutonium, 2), new ItemStack(ModItems.powder_plutonium, 2), new ItemStack(ModItems.powder_uranium, 1), new ItemStack(ModItems.powder_lithium_tiny, 1) });
|
||||
|
||||
@ -10,6 +10,7 @@ import com.hbm.inventory.RecipesCommon.ComparableStack;
|
||||
import com.hbm.items.ModItems;
|
||||
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
@ -25,6 +26,7 @@ public class CrystallizerRecipes {
|
||||
recipes.put("oreIron", new ItemStack(ModItems.crystal_iron));
|
||||
recipes.put("oreGold", new ItemStack(ModItems.crystal_gold));
|
||||
recipes.put("oreRedstone", new ItemStack(ModItems.crystal_redstone));
|
||||
recipes.put("oreDiamond", new ItemStack(ModItems.crystal_diamond));
|
||||
recipes.put("oreUranium", new ItemStack(ModItems.crystal_uranium));
|
||||
recipes.put("oreThorium", new ItemStack(ModItems.crystal_thorium));
|
||||
recipes.put("orePlutonium", new ItemStack(ModItems.crystal_plutonium));
|
||||
@ -48,6 +50,10 @@ public class CrystallizerRecipes {
|
||||
recipes.put(new ComparableStack(Blocks.cobblestone), new ItemStack(ModBlocks.reinforced_stone));
|
||||
recipes.put(new ComparableStack(ModBlocks.gravel_obsidian), new ItemStack(ModBlocks.brick_obsidian));
|
||||
recipes.put("blockRedstone", new ItemStack(ModItems.nugget_mercury));
|
||||
recipes.put(new ComparableStack(ModBlocks.gravel_diamond), new ItemStack(ModItems.crystal_diamond));
|
||||
recipes.put(new ComparableStack(ModItems.powder_diamond), new ItemStack(Items.diamond));
|
||||
recipes.put(new ComparableStack(ModItems.powder_emerald), new ItemStack(Items.emerald));
|
||||
recipes.put(new ComparableStack(ModItems.powder_lapis), new ItemStack(Items.dye, 1, 4));
|
||||
}
|
||||
|
||||
public static ItemStack getOutput(ItemStack stack) {
|
||||
|
||||
@ -144,10 +144,12 @@ public class ShredderRecipes {
|
||||
ShredderRecipes.setRecipe(ModBlocks.meteor_brick_chiseled, new ItemStack(ModItems.powder_meteorite, 1));
|
||||
ShredderRecipes.setRecipe(ModBlocks.meteor_pillar, new ItemStack(ModItems.powder_meteorite, 1));
|
||||
ShredderRecipes.setRecipe(ModBlocks.ore_rare, new ItemStack(ModItems.powder_desh_mix, 1));
|
||||
ShredderRecipes.setRecipe(Blocks.diamond_ore, new ItemStack(ModBlocks.gravel_diamond, 2));
|
||||
|
||||
ShredderRecipes.setRecipe(ModItems.crystal_iron, new ItemStack(ModItems.powder_iron, 3));
|
||||
ShredderRecipes.setRecipe(ModItems.crystal_gold, new ItemStack(ModItems.powder_iron, 3));
|
||||
ShredderRecipes.setRecipe(ModItems.crystal_gold, new ItemStack(ModItems.powder_gold, 3));
|
||||
ShredderRecipes.setRecipe(ModItems.crystal_redstone, new ItemStack(Items.redstone, 8));
|
||||
ShredderRecipes.setRecipe(ModItems.crystal_diamond, new ItemStack(ModItems.powder_diamond, 3));
|
||||
ShredderRecipes.setRecipe(ModItems.crystal_uranium, new ItemStack(ModItems.powder_uranium, 3));
|
||||
ShredderRecipes.setRecipe(ModItems.crystal_plutonium, new ItemStack(ModItems.powder_plutonium, 3));
|
||||
ShredderRecipes.setRecipe(ModItems.crystal_thorium, new ItemStack(ModItems.powder_thorium, 3));
|
||||
|
||||
@ -229,6 +229,7 @@ public class ModItems {
|
||||
public static Item crystal_iron;
|
||||
public static Item crystal_gold;
|
||||
public static Item crystal_redstone;
|
||||
public static Item crystal_diamond;
|
||||
public static Item crystal_uranium;
|
||||
public static Item crystal_thorium;
|
||||
public static Item crystal_plutonium;
|
||||
@ -2078,6 +2079,7 @@ public class ModItems {
|
||||
crystal_iron = new Item().setUnlocalizedName("crystal_iron").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":crystal_iron");
|
||||
crystal_gold = new Item().setUnlocalizedName("crystal_gold").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":crystal_gold");
|
||||
crystal_redstone = new Item().setUnlocalizedName("crystal_redstone").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":crystal_redstone");
|
||||
crystal_diamond = new Item().setUnlocalizedName("crystal_diamond").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":crystal_diamond");
|
||||
crystal_uranium = new ItemRadioactive(0.75F).setUnlocalizedName("crystal_uranium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":crystal_uranium");
|
||||
crystal_thorium = new Item().setUnlocalizedName("crystal_thorium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":crystal_thorium");
|
||||
crystal_plutonium = new ItemRadioactive(3.0F).setUnlocalizedName("crystal_plutonium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":crystal_plutonium");
|
||||
@ -3478,6 +3480,7 @@ public class ModItems {
|
||||
jackt2 = new ModArmor(MainRegistry.aMatSteel, 7, 1).setUnlocalizedName("jackt2").setTextureName(RefStrings.MODID + ":jackt2");
|
||||
|
||||
chainsaw = new ItemToolAbility(25, -0.05, MainRegistry.tMatChainsaw, EnumToolType.AXE)
|
||||
.addBreakAbility(new ToolAbility.SilkAbility())
|
||||
.addBreakAbility(new ToolAbility.RecursionAbility(5)).setUnlocalizedName("chainsaw").setTextureName(RefStrings.MODID + ":chainsaw");
|
||||
|
||||
schrabidium_sword = new ItemToolAbility(150, 0, MainRegistry.tMatSchrab, EnumToolType.SWORD)
|
||||
@ -3489,6 +3492,7 @@ public class ModItems {
|
||||
.addHitAbility(new WeaponAbility.RadiationAbility(15F))
|
||||
.addBreakAbility(new ToolAbility.HammerAbility(2))
|
||||
.addBreakAbility(new ToolAbility.RecursionAbility(10))
|
||||
.addBreakAbility(new ToolAbility.SilkAbility())
|
||||
.addBreakAbility(new ToolAbility.SmelterAbility())
|
||||
.addBreakAbility(new ToolAbility.ShredderAbility())
|
||||
.setRarity(EnumRarity.rare).setUnlocalizedName("schrabidium_pickaxe").setTextureName(RefStrings.MODID + ":schrabidium_pickaxe");
|
||||
@ -3497,6 +3501,7 @@ public class ModItems {
|
||||
.addHitAbility(new WeaponAbility.RadiationAbility(15F))
|
||||
.addBreakAbility(new ToolAbility.HammerAbility(2))
|
||||
.addBreakAbility(new ToolAbility.RecursionAbility(10))
|
||||
.addBreakAbility(new ToolAbility.SilkAbility())
|
||||
.addBreakAbility(new ToolAbility.SmelterAbility())
|
||||
.addBreakAbility(new ToolAbility.ShredderAbility())
|
||||
.setRarity(EnumRarity.rare).setUnlocalizedName("schrabidium_axe").setTextureName(RefStrings.MODID + ":schrabidium_axe");
|
||||
@ -3505,6 +3510,7 @@ public class ModItems {
|
||||
.addHitAbility(new WeaponAbility.RadiationAbility(15F))
|
||||
.addBreakAbility(new ToolAbility.HammerAbility(2))
|
||||
.addBreakAbility(new ToolAbility.RecursionAbility(10))
|
||||
.addBreakAbility(new ToolAbility.SilkAbility())
|
||||
.addBreakAbility(new ToolAbility.SmelterAbility())
|
||||
.addBreakAbility(new ToolAbility.ShredderAbility())
|
||||
.setRarity(EnumRarity.rare).setUnlocalizedName("schrabidium_shovel").setTextureName(RefStrings.MODID + ":schrabidium_shovel");
|
||||
@ -3542,15 +3548,18 @@ public class ModItems {
|
||||
|
||||
cmb_pickaxe = new ItemToolAbility(10F, 0, MainRegistry.tMatCMB, EnumToolType.PICKAXE)
|
||||
.addBreakAbility(new ToolAbility.RecursionAbility(5))
|
||||
.addBreakAbility(new ToolAbility.SmelterAbility()).setUnlocalizedName("cmb_pickaxe").setTextureName(RefStrings.MODID + ":cmb_pickaxe");
|
||||
.addBreakAbility(new ToolAbility.SmelterAbility())
|
||||
.addBreakAbility(new ToolAbility.SilkAbility()).setUnlocalizedName("cmb_pickaxe").setTextureName(RefStrings.MODID + ":cmb_pickaxe");
|
||||
|
||||
cmb_axe = new ItemToolAbility(12.5F, 0, MainRegistry.tMatCMB, EnumToolType.AXE)
|
||||
.addBreakAbility(new ToolAbility.RecursionAbility(5))
|
||||
.addBreakAbility(new ToolAbility.SmelterAbility()).setUnlocalizedName("cmb_axe").setTextureName(RefStrings.MODID + ":cmb_axe");
|
||||
.addBreakAbility(new ToolAbility.SmelterAbility())
|
||||
.addBreakAbility(new ToolAbility.SilkAbility()).setUnlocalizedName("cmb_axe").setTextureName(RefStrings.MODID + ":cmb_axe");
|
||||
|
||||
cmb_shovel = new ItemToolAbility(8F, 0, MainRegistry.tMatCMB, EnumToolType.SHOVEL)
|
||||
.addBreakAbility(new ToolAbility.RecursionAbility(5))
|
||||
.addBreakAbility(new ToolAbility.SmelterAbility()).setUnlocalizedName("cmb_shovel").setTextureName(RefStrings.MODID + ":cmb_shovel");
|
||||
.addBreakAbility(new ToolAbility.SmelterAbility())
|
||||
.addBreakAbility(new ToolAbility.SilkAbility()).setUnlocalizedName("cmb_shovel").setTextureName(RefStrings.MODID + ":cmb_shovel");
|
||||
|
||||
cmb_hoe = new ModHoe(MainRegistry.tMatCMB).setUnlocalizedName("cmb_hoe").setTextureName(RefStrings.MODID + ":cmb_hoe");
|
||||
|
||||
@ -3559,43 +3568,52 @@ public class ModItems {
|
||||
|
||||
elec_pickaxe = new ItemToolAbilityPower(10F, 0, MainRegistry.tMatElec, EnumToolType.PICKAXE, 500000, 1000, 100)
|
||||
.addBreakAbility(new ToolAbility.HammerAbility(2))
|
||||
.addBreakAbility(new ToolAbility.RecursionAbility(5)).setUnlocalizedName("elec_pickaxe").setTextureName(RefStrings.MODID + ":elec_drill_anim");
|
||||
.addBreakAbility(new ToolAbility.RecursionAbility(5))
|
||||
.addBreakAbility(new ToolAbility.SilkAbility()).setUnlocalizedName("elec_pickaxe").setTextureName(RefStrings.MODID + ":elec_drill_anim");
|
||||
|
||||
elec_axe = new ItemToolAbilityPower(12.5F, 0, MainRegistry.tMatElec, EnumToolType.AXE, 500000, 1000, 100)
|
||||
.addBreakAbility(new ToolAbility.HammerAbility(2))
|
||||
.addBreakAbility(new ToolAbility.RecursionAbility(5)).setUnlocalizedName("elec_axe").setTextureName(RefStrings.MODID + ":elec_chainsaw_anim");
|
||||
.addBreakAbility(new ToolAbility.RecursionAbility(5))
|
||||
.addBreakAbility(new ToolAbility.SilkAbility()).setUnlocalizedName("elec_axe").setTextureName(RefStrings.MODID + ":elec_chainsaw_anim");
|
||||
|
||||
elec_shovel = new ItemToolAbilityPower(7.5F, 0, MainRegistry.tMatElec, EnumToolType.SHOVEL, 500000, 1000, 100)
|
||||
.addBreakAbility(new ToolAbility.HammerAbility(2))
|
||||
.addBreakAbility(new ToolAbility.RecursionAbility(5)).setUnlocalizedName("elec_shovel").setTextureName(RefStrings.MODID + ":elec_shovel_anim");
|
||||
.addBreakAbility(new ToolAbility.RecursionAbility(5))
|
||||
.addBreakAbility(new ToolAbility.SilkAbility()).setUnlocalizedName("elec_shovel").setTextureName(RefStrings.MODID + ":elec_shovel_anim");
|
||||
|
||||
desh_sword = new ItemToolAbility(15F, 0, MainRegistry.tMatDesh, EnumToolType.SWORD)
|
||||
.addHitAbility(new WeaponAbility.StunAbility(2)).setUnlocalizedName("desh_sword").setTextureName(RefStrings.MODID + ":desh_sword");
|
||||
|
||||
desh_pickaxe = new ItemToolAbility(5F, 0, MainRegistry.tMatDesh, EnumToolType.PICKAXE)
|
||||
desh_pickaxe = new ItemToolAbility(5F, -0.05, MainRegistry.tMatDesh, EnumToolType.PICKAXE)
|
||||
.addBreakAbility(new ToolAbility.HammerAbility(1))
|
||||
.addBreakAbility(new ToolAbility.RecursionAbility(3)).setUnlocalizedName("desh_pickaxe").setTextureName(RefStrings.MODID + ":desh_pickaxe");
|
||||
.addBreakAbility(new ToolAbility.RecursionAbility(3))
|
||||
.addBreakAbility(new ToolAbility.SilkAbility()).setUnlocalizedName("desh_pickaxe").setTextureName(RefStrings.MODID + ":desh_pickaxe");
|
||||
|
||||
desh_axe = new ItemToolAbility(6.5F, 0, MainRegistry.tMatDesh, EnumToolType.AXE)
|
||||
desh_axe = new ItemToolAbility(6.5F, -0.05, MainRegistry.tMatDesh, EnumToolType.AXE)
|
||||
.addBreakAbility(new ToolAbility.HammerAbility(1))
|
||||
.addBreakAbility(new ToolAbility.RecursionAbility(3)).setUnlocalizedName("desh_axe").setTextureName(RefStrings.MODID + ":desh_axe");
|
||||
.addBreakAbility(new ToolAbility.RecursionAbility(3))
|
||||
.addBreakAbility(new ToolAbility.SilkAbility()).setUnlocalizedName("desh_axe").setTextureName(RefStrings.MODID + ":desh_axe");
|
||||
|
||||
desh_shovel = new ItemToolAbility(4F, 0, MainRegistry.tMatDesh, EnumToolType.SHOVEL)
|
||||
desh_shovel = new ItemToolAbility(4F, -0.05, MainRegistry.tMatDesh, EnumToolType.SHOVEL)
|
||||
.addBreakAbility(new ToolAbility.HammerAbility(1))
|
||||
.addBreakAbility(new ToolAbility.RecursionAbility(3)).setUnlocalizedName("desh_shovel").setTextureName(RefStrings.MODID + ":desh_shovel");
|
||||
.addBreakAbility(new ToolAbility.RecursionAbility(3))
|
||||
.addBreakAbility(new ToolAbility.SilkAbility()).setUnlocalizedName("desh_shovel").setTextureName(RefStrings.MODID + ":desh_shovel");
|
||||
|
||||
desh_hoe = new ModHoe(MainRegistry.tMatDesh).setUnlocalizedName("desh_hoe").setTextureName(RefStrings.MODID + ":desh_hoe");
|
||||
|
||||
cobalt_sword = new ItemToolAbility(12F, 0, MainRegistry.tMatCobalt, EnumToolType.SWORD).setUnlocalizedName("cobalt_sword").setTextureName(RefStrings.MODID + ":cobalt_sword");
|
||||
|
||||
cobalt_pickaxe = new ItemToolAbility(4F, 0, MainRegistry.tMatCobalt, EnumToolType.PICKAXE)
|
||||
.addBreakAbility(new ToolAbility.RecursionAbility(4)).setUnlocalizedName("cobalt_pickaxe").setTextureName(RefStrings.MODID + ":cobalt_pickaxe");
|
||||
.addBreakAbility(new ToolAbility.RecursionAbility(4))
|
||||
.addBreakAbility(new ToolAbility.SilkAbility()).setUnlocalizedName("cobalt_pickaxe").setTextureName(RefStrings.MODID + ":cobalt_pickaxe");
|
||||
|
||||
cobalt_axe = new ItemToolAbility(6F, 0, MainRegistry.tMatCobalt, EnumToolType.AXE)
|
||||
.addBreakAbility(new ToolAbility.RecursionAbility(4)).setUnlocalizedName("cobalt_axe").setTextureName(RefStrings.MODID + ":cobalt_axe");
|
||||
.addBreakAbility(new ToolAbility.RecursionAbility(4))
|
||||
.addBreakAbility(new ToolAbility.SilkAbility()).setUnlocalizedName("cobalt_axe").setTextureName(RefStrings.MODID + ":cobalt_axe");
|
||||
|
||||
cobalt_shovel = new ItemToolAbility(3.5F, 0, MainRegistry.tMatCobalt, EnumToolType.SHOVEL)
|
||||
.addBreakAbility(new ToolAbility.RecursionAbility(4)).setUnlocalizedName("cobalt_shovel").setTextureName(RefStrings.MODID + ":cobalt_shovel");
|
||||
.addBreakAbility(new ToolAbility.RecursionAbility(4))
|
||||
.addBreakAbility(new ToolAbility.SilkAbility()).setUnlocalizedName("cobalt_shovel").setTextureName(RefStrings.MODID + ":cobalt_shovel");
|
||||
|
||||
cobalt_hoe = new ModHoe(MainRegistry.tMatCobalt).setUnlocalizedName("cobalt_hoe").setTextureName(RefStrings.MODID + ":cobalt_hoe");
|
||||
|
||||
@ -3979,6 +3997,7 @@ public class ModItems {
|
||||
GameRegistry.registerItem(crystal_iron, crystal_iron.getUnlocalizedName());
|
||||
GameRegistry.registerItem(crystal_gold, crystal_gold.getUnlocalizedName());
|
||||
GameRegistry.registerItem(crystal_redstone, crystal_redstone.getUnlocalizedName());
|
||||
GameRegistry.registerItem(crystal_diamond, crystal_diamond.getUnlocalizedName());
|
||||
GameRegistry.registerItem(crystal_uranium, crystal_uranium.getUnlocalizedName());
|
||||
GameRegistry.registerItem(crystal_thorium, crystal_thorium.getUnlocalizedName());
|
||||
GameRegistry.registerItem(crystal_plutonium, crystal_plutonium.getUnlocalizedName());
|
||||
|
||||
@ -11,7 +11,6 @@ public class ItemMike extends ItemRadioactive {
|
||||
|
||||
public ItemMike(float radiation) {
|
||||
super(radiation);
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -1353,7 +1353,7 @@ public class ItemAssemblyTemplate extends Item {
|
||||
//scheme.applyUniversalScheme();
|
||||
scheme.colorCount = 4;
|
||||
//universal scheme configuration for testing
|
||||
//TODO: get textures properly baked, display color for shield
|
||||
//todo: get textures properly baked, display color for shield
|
||||
scheme.addColor(0x334077);
|
||||
scheme.addColor(0x6A298F);
|
||||
scheme.addColor(0xDF3795);
|
||||
|
||||
@ -410,8 +410,7 @@ public class Library {
|
||||
|
||||
return power;
|
||||
}
|
||||
|
||||
//TODO: rewrite this shit
|
||||
|
||||
public static long chargeTEFromItems(ItemStack[] slots, int index, long power, long maxPower) {
|
||||
|
||||
if(slots[index] != null && slots[index].getItem() == ModItems.battery_creative)
|
||||
|
||||
@ -359,6 +359,7 @@ public class ClientProxy extends ServerProxy
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityPylonRedWire.class, new RenderPylon());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityStructureMarker.class, new RenderStructureMaker());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMultiblock.class, new RenderMultiblock());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntitySoyuzStruct.class, new RenderSoyuzMultiblock());
|
||||
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityAMSBase.class, new RenderAMSBase());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityAMSEmitter.class, new RenderAMSEmitter());
|
||||
|
||||
@ -1603,10 +1603,12 @@ public class CraftingManager {
|
||||
GameRegistry.addSmelting(new ItemStack(Items.dye, 1, 15), new ItemStack(Items.slime_ball, 1), 0.0F);
|
||||
GameRegistry.addSmelting(new ItemStack(Blocks.gravel, 1), new ItemStack(Blocks.cobblestone, 1), 0.0F);
|
||||
GameRegistry.addSmelting(new ItemStack(ModBlocks.gravel_obsidian), new ItemStack(Blocks.obsidian), 0.0F);
|
||||
GameRegistry.addSmelting(new ItemStack(ModBlocks.gravel_diamond), new ItemStack(Items.diamond), 3.0F);
|
||||
|
||||
GameRegistry.addSmelting(ModItems.crystal_iron, new ItemStack(Items.iron_ingot, 2), 2.0F);
|
||||
GameRegistry.addSmelting(ModItems.crystal_gold, new ItemStack(Items.gold_ingot, 2), 2.0F);
|
||||
GameRegistry.addSmelting(ModItems.crystal_redstone, new ItemStack(Items.redstone, 6), 2.0F);
|
||||
GameRegistry.addSmelting(ModItems.crystal_diamond, new ItemStack(Items.diamond, 2), 2.0F);
|
||||
GameRegistry.addSmelting(ModItems.crystal_uranium, new ItemStack(ModItems.ingot_uranium, 2), 2.0F);
|
||||
GameRegistry.addSmelting(ModItems.crystal_thorium, new ItemStack(ModItems.ingot_th232, 2), 2.0F);
|
||||
GameRegistry.addSmelting(ModItems.crystal_plutonium, new ItemStack(ModItems.ingot_plutonium, 2), 2.0F);
|
||||
|
||||
@ -443,6 +443,9 @@ public class MainRegistry
|
||||
GameRegistry.registerTileEntity(TileEntityYellowBarrel.class, "tileentity_nukebarrel");
|
||||
GameRegistry.registerTileEntity(TileEntityLaunchPad.class, "tileentity_launch1");
|
||||
GameRegistry.registerTileEntity(TileEntityDecoBlock.class, "tileentity_deco");
|
||||
GameRegistry.registerTileEntity(TileEntityDecoBlockAltW.class, "tileentity_deco_w");
|
||||
GameRegistry.registerTileEntity(TileEntityDecoBlockAltG.class, "tileentity_deco_g");
|
||||
GameRegistry.registerTileEntity(TileEntityDecoBlockAltF.class, "tileentity_deco_f");
|
||||
GameRegistry.registerTileEntity(TileEntityCoreTitanium.class, "tileentity_core_titanium");
|
||||
GameRegistry.registerTileEntity(TileEntityCoreAdvanced.class, "tileentity_core_advanced");
|
||||
GameRegistry.registerTileEntity(TileEntityFusionMultiblock.class, "tileentity_fusion_multiblock");
|
||||
@ -557,6 +560,7 @@ public class MainRegistry
|
||||
GameRegistry.registerTileEntity(TileEntityCyberCrab.class, "tileentity_crabs");
|
||||
GameRegistry.registerTileEntity(TileEntitySoyuzCapsule.class, "tileentity_soyuz_capsule");
|
||||
GameRegistry.registerTileEntity(TileEntityMachineCrystallizer.class, "tileentity_acidomatic");
|
||||
GameRegistry.registerTileEntity(TileEntitySoyuzStruct.class, "tileentity_soyuz_struct");
|
||||
|
||||
EntityRegistry.registerModEntity(EntityRocket.class, "entity_rocket", 0, this, 250, 1, true);
|
||||
EntityRegistry.registerModEntity(EntityNukeExplosion.class, "entity_nuke_explosion", 1, this, 250, 1, true);
|
||||
|
||||
65
com/hbm/render/block/BusAnimation.java
Normal file
65
com/hbm/render/block/BusAnimation.java
Normal file
@ -0,0 +1,65 @@
|
||||
package com.hbm.render.block;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
//a """simple""" implementation of an animation system
|
||||
//it's the first thing i came up with and i suppose it's relatively simple but
|
||||
//it's probably not since i suck at everything
|
||||
//i could have jut used collada XML animations but where's the fun in that?
|
||||
public class BusAnimation {
|
||||
|
||||
//"buses" with one S since it's not a vehicle
|
||||
private final HashMap<String, BusAnimationSequence> animationBuses= new HashMap();
|
||||
//multiples buses exist simultaneously and start with 0.
|
||||
//a bus has one authority, i.e. the translation of a single part of a model or the rotation of the entire thing.
|
||||
//imagine the busses being film strips that hang from the ceiling, with the tape player
|
||||
//rolling down, picking up images from all tapes and combining them into a movie.
|
||||
|
||||
/**
|
||||
* Adds a bus to the animation
|
||||
* If an object has several moving parts, each transformation type of each seperat bus should have its own bus
|
||||
* Unless you use one bus for several things because the animation is identical, that's ok too
|
||||
* @param name of the bus being added
|
||||
* @param bus the bus in question
|
||||
* @return
|
||||
*/
|
||||
public BusAnimation addBus(String name, BusAnimationSequence bus) {
|
||||
|
||||
animationBuses.put(name, bus);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a bus from the specified name. Usually not something you want to do
|
||||
* @param name
|
||||
* @param bus
|
||||
* @return
|
||||
*/
|
||||
public BusAnimationSequence getBus(String name) {
|
||||
return animationBuses.get(name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the state of a bus at a specified time
|
||||
* @param name the name of the bus in question
|
||||
* @param millis the elapsed time since the animation started in milliseconds
|
||||
* @return
|
||||
*/
|
||||
public double[] getTimedTransformation(String name, int millis) {
|
||||
|
||||
if(this.animationBuses.containsKey(name))
|
||||
return animationBuses.get(name).getTransformation(millis);
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* reads all buses and checks if inbetween the last invocation and this one, a sound was scheduled
|
||||
* @param lastMillis the last time the bus was checked
|
||||
* @param millis the current time
|
||||
*/
|
||||
public void playPendingSounds(int lastMillis, int millis) {
|
||||
//TODO: pending
|
||||
}
|
||||
|
||||
}
|
||||
47
com/hbm/render/block/BusAnimationKeyframe.java
Normal file
47
com/hbm/render/block/BusAnimationKeyframe.java
Normal file
@ -0,0 +1,47 @@
|
||||
package com.hbm.render.block;
|
||||
|
||||
//"pieces" that make up a bus
|
||||
public class BusAnimationKeyframe {
|
||||
|
||||
//whether the next frame "snaps" to the intended value or has interpolation
|
||||
//it's an enum so stuff like accelerated animations between just
|
||||
//two frames could be implemented
|
||||
public static enum InterpolationType {
|
||||
NONE,
|
||||
SMOOTH
|
||||
}
|
||||
|
||||
//unimplemented, all current animations are absolute
|
||||
//whether the transformation happens on its own or relative to the last state
|
||||
//i.e. 5 with 15 being the previous would be 20 additive and 5 absolute, simple enough
|
||||
public static enum StateType {
|
||||
ADDITIVE,
|
||||
ABSOLTE
|
||||
}
|
||||
|
||||
public double x;
|
||||
public double y;
|
||||
public double z;
|
||||
public InterpolationType interpolationType;
|
||||
public int duration;
|
||||
|
||||
//this one can be used for "reset" type keyframes
|
||||
public BusAnimationKeyframe() {
|
||||
this.x = 0;
|
||||
this.y = 0;
|
||||
this.z = 0;
|
||||
this.interpolationType = InterpolationType.SMOOTH;
|
||||
}
|
||||
|
||||
public BusAnimationKeyframe(double x, double y, double z) {
|
||||
this();
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.z = z;
|
||||
}
|
||||
|
||||
public BusAnimationKeyframe(double x, double y, double z, InterpolationType interpolation) {
|
||||
this(x, y, z);
|
||||
this.interpolationType = interpolation;
|
||||
}
|
||||
}
|
||||
24
com/hbm/render/block/BusAnimationSequence.java
Normal file
24
com/hbm/render/block/BusAnimationSequence.java
Normal file
@ -0,0 +1,24 @@
|
||||
package com.hbm.render.block;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
//the actual bus, a sequence of keyframes with their own behavior and such
|
||||
public class BusAnimationSequence {
|
||||
|
||||
//not actually useful for anything since the renderer usually handles
|
||||
//this part, but it's nice to have for distinction just in case
|
||||
public static enum EnumTransformation {
|
||||
UNDEFINED,
|
||||
ROTATION,
|
||||
TRANSLATION,
|
||||
SCALE
|
||||
}
|
||||
|
||||
private List<BusAnimationKeyframe> keyframes = new ArrayList();
|
||||
public EnumTransformation transformationType;
|
||||
|
||||
public double[] getTransformation(int millis) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
165
com/hbm/render/tileentity/RenderSoyuzMultiblock.java
Normal file
165
com/hbm/render/tileentity/RenderSoyuzMultiblock.java
Normal file
@ -0,0 +1,165 @@
|
||||
package com.hbm.render.tileentity;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.lib.RefStrings;
|
||||
|
||||
import net.minecraft.client.renderer.OpenGlHelper;
|
||||
import net.minecraft.client.renderer.RenderBlocks;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class RenderSoyuzMultiblock extends TileEntitySpecialRenderer {
|
||||
|
||||
float pixel = 1F/16F;
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity te, double x, double y, double z, float f) {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glTranslatef((float)x + 1, (float)y + 1, (float)z);
|
||||
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
OpenGlHelper.glBlendFunc(770, 771, 1, 0);
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 0.75F);
|
||||
GL11.glDisable(GL11.GL_ALPHA_TEST);
|
||||
|
||||
RenderBlocks rb = RenderBlocks.getInstance();
|
||||
|
||||
IIcon icon;
|
||||
ResourceLocation loc;
|
||||
|
||||
icon = rb.getBlockIconFromSide(ModBlocks.struct_launcher, 1);
|
||||
loc = new ResourceLocation(RefStrings.MODID + ":textures/blocks/" + icon.getIconName().substring(4, icon.getIconName().length()) + ".png");
|
||||
|
||||
for(int i = -6; i <= 6; i++)
|
||||
for(int j = 3; j <= 4; j++)
|
||||
for(int k = -6; k <= 6; k++)
|
||||
renderSmolBlockAt(loc, i, j, k);
|
||||
|
||||
for(int i = -1; i <= 1; i++)
|
||||
for(int j = 3; j <= 4; j++)
|
||||
for(int k = -8; k <= -7; k++)
|
||||
renderSmolBlockAt(loc, i, j, k);
|
||||
|
||||
for(int i = -2; i <= 2; i++)
|
||||
for(int j = 3; j <= 4; j++)
|
||||
for(int k = 7; k <= 9; k++)
|
||||
renderSmolBlockAt(loc, i, j, k);
|
||||
|
||||
for(int i = -2; i <= 2; i++)
|
||||
for(int k = 5; k <= 9; k++)
|
||||
renderSmolBlockAt(loc, i, 51, k);
|
||||
|
||||
for(int i = -1; i <= 1; i++)
|
||||
for(int k = -8; k <= -6; k++)
|
||||
renderSmolBlockAt(loc, i, 38, k);
|
||||
|
||||
icon = rb.getBlockIconFromSide(ModBlocks.concrete_smooth, 1);
|
||||
loc = new ResourceLocation(RefStrings.MODID + ":textures/blocks/" + icon.getIconName().substring(4, icon.getIconName().length()) + ".png");
|
||||
|
||||
for(int i = 3; i <= 6; i++)
|
||||
for(int j = 0; j <= 2; j++)
|
||||
for(int k = 3; k <= 6; k++)
|
||||
renderSmolBlockAt(loc, i, j, k);
|
||||
|
||||
for(int i = -6; i <= -3; i++)
|
||||
for(int j = 0; j <= 2; j++)
|
||||
for(int k = 3; k <= 6; k++)
|
||||
renderSmolBlockAt(loc, i, j, k);
|
||||
|
||||
for(int i = -6; i <= -3; i++)
|
||||
for(int j = 0; j <= 2; j++)
|
||||
for(int k = -6; k <= -3; k++)
|
||||
renderSmolBlockAt(loc, i, j, k);
|
||||
|
||||
for(int i = 3; i <= 6; i++)
|
||||
for(int j = 0; j <= 2; j++)
|
||||
for(int k = -6; k <= -3; k++)
|
||||
renderSmolBlockAt(loc, i, j, k);
|
||||
|
||||
for(int i = -1; i <= 1; i++)
|
||||
for(int j = 0; j <= 2; j++)
|
||||
for(int k = -8; k <= -6; k++)
|
||||
renderSmolBlockAt(loc, i, j, k);
|
||||
|
||||
for(int i = -2; i <= 2; i++)
|
||||
for(int j = 0; j <= 2; j++)
|
||||
for(int k = 5; k <= 9; k++)
|
||||
renderSmolBlockAt(loc, i, j, k);
|
||||
|
||||
icon = rb.getBlockIconFromSide(ModBlocks.struct_scaffold, 1);
|
||||
loc = new ResourceLocation(RefStrings.MODID + ":textures/blocks/" + icon.getIconName().substring(4, icon.getIconName().length()) + ".png");
|
||||
|
||||
for(int i = -1; i <= 1; i++)
|
||||
for(int j = 5; j <= 50; j++)
|
||||
for(int k = 6; k <= 8; k++)
|
||||
renderSmolBlockAt(loc, i, j, k);
|
||||
|
||||
for(int j = 5; j <= 37; j++)
|
||||
renderSmolBlockAt(loc, 0, j, -7);
|
||||
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
GL11.glEnable(GL11.GL_ALPHA_TEST);
|
||||
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
public void renderSmolBlockAt(ResourceLocation loc, int x, int y, int z) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(x, y, z);
|
||||
GL11.glRotatef(180, 0F, 0F, 1F);
|
||||
|
||||
Tessellator tesseract = Tessellator.instance;
|
||||
tesseract.startDrawingQuads();
|
||||
this.bindTexture(loc);
|
||||
tesseract.addVertexWithUV(1 - 11 * pixel / 2, 1 - 11 * pixel / 2, 1 - 11 * pixel / 2, 1, 0);
|
||||
tesseract.addVertexWithUV(11 * pixel / 2, 1 - 11 * pixel / 2, 1 - 11 * pixel / 2, 0, 0);
|
||||
tesseract.addVertexWithUV(11 * pixel / 2, 11 * pixel / 2, 1 - 11 * pixel / 2, 0, 1);
|
||||
tesseract.addVertexWithUV(1 - 11 * pixel / 2, 11 * pixel / 2, 1 - 11 * pixel / 2, 1, 1);
|
||||
tesseract.draw();
|
||||
|
||||
tesseract.startDrawingQuads();
|
||||
tesseract.addVertexWithUV(1 - 11 * pixel / 2, 1 - 11 * pixel / 2, 11 * pixel / 2, 1, 0);
|
||||
tesseract.addVertexWithUV(1 - 11 * pixel / 2, 1 - 11 * pixel / 2, 1 - 11 * pixel / 2, 0, 0);
|
||||
tesseract.addVertexWithUV(1 - 11 * pixel / 2, 11 * pixel / 2, 1 - 11 * pixel / 2, 0, 1);
|
||||
tesseract.addVertexWithUV(1 - 11 * pixel / 2, 11 * pixel / 2, 11 * pixel / 2, 1, 1);
|
||||
tesseract.draw();
|
||||
|
||||
tesseract.startDrawingQuads();
|
||||
tesseract.addVertexWithUV(11 * pixel / 2, 1 - 11 * pixel / 2, 11 * pixel / 2, 1, 0);
|
||||
tesseract.addVertexWithUV(1 - 11 * pixel / 2, 1 - 11 * pixel / 2, 11 * pixel / 2, 0, 0);
|
||||
tesseract.addVertexWithUV(1 - 11 * pixel / 2, 11 * pixel / 2, 11 * pixel / 2, 0, 1);
|
||||
tesseract.addVertexWithUV(11 * pixel / 2, 11 * pixel / 2, 11 * pixel / 2, 1, 1);
|
||||
tesseract.draw();
|
||||
|
||||
tesseract.startDrawingQuads();
|
||||
tesseract.addVertexWithUV(11 * pixel / 2, 1 - 11 * pixel / 2, 1 - 11 * pixel / 2, 1, 0);
|
||||
tesseract.addVertexWithUV(11 * pixel / 2, 1 - 11 * pixel / 2, 11 * pixel / 2, 0, 0);
|
||||
tesseract.addVertexWithUV(11 * pixel / 2, 11 * pixel / 2, 11 * pixel / 2, 0, 1);
|
||||
tesseract.addVertexWithUV(11 * pixel / 2, 11 * pixel / 2, 1 - 11 * pixel / 2, 1, 1);
|
||||
tesseract.draw();
|
||||
|
||||
tesseract.startDrawingQuads();
|
||||
tesseract.addVertexWithUV(1 - 11 * pixel / 2, 1 - 11 * pixel / 2, 11 * pixel / 2, 1, 0);
|
||||
tesseract.addVertexWithUV(11 * pixel / 2, 1 - 11 * pixel / 2, 11 * pixel / 2, 0, 0);
|
||||
tesseract.addVertexWithUV(11 * pixel / 2, 1 - 11 * pixel / 2, 1 - 11 * pixel / 2, 0, 1);
|
||||
tesseract.addVertexWithUV(1 - 11 * pixel / 2, 1 - 11 * pixel / 2, 1 - 11 * pixel / 2, 1, 1);
|
||||
tesseract.draw();
|
||||
|
||||
tesseract.startDrawingQuads();
|
||||
tesseract.addVertexWithUV(11 * pixel / 2, 11 * pixel / 2, 11 * pixel / 2, 1, 0);
|
||||
tesseract.addVertexWithUV(1 - 11 * pixel / 2, 11 * pixel / 2, 11 * pixel / 2, 0, 0);
|
||||
tesseract.addVertexWithUV(1 - 11 * pixel / 2, 11 * pixel / 2, 1 - 11 * pixel / 2, 0, 1);
|
||||
tesseract.addVertexWithUV(11 * pixel / 2, 11 * pixel / 2, 1 - 11 * pixel / 2, 1, 1);
|
||||
tesseract.draw();
|
||||
GL11.glPopMatrix();
|
||||
|
||||
}
|
||||
}
|
||||
@ -3,12 +3,14 @@ package com.hbm.tileentity.machine;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.entity.missile.EntityMinerRocket;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.machine.ItemSatChip;
|
||||
import com.hbm.saveddata.SatelliteSavedData;
|
||||
import com.hbm.saveddata.satellites.Satellite;
|
||||
import com.hbm.saveddata.satellites.SatelliteMiner;
|
||||
import com.hbm.util.WeightedRandomObject;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@ -22,6 +24,7 @@ import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.WeightedRandom;
|
||||
|
||||
public class TileEntityMachineSatDock extends TileEntity implements ISidedInventory {
|
||||
|
||||
@ -252,50 +255,43 @@ public class TileEntityMachineSatDock extends TileEntity implements ISidedInvent
|
||||
|
||||
int items = rand.nextInt(6) + 10;
|
||||
|
||||
int randy = 0;
|
||||
rand = new Random();
|
||||
|
||||
for(int i = 0; i < items; i++) {
|
||||
|
||||
randy = (int) (rand.nextFloat() * 100);
|
||||
|
||||
if(randy < 10)
|
||||
addToInv(new ItemStack(ModItems.powder_aluminium, 3));
|
||||
else if(randy < 20)
|
||||
addToInv(new ItemStack(ModItems.powder_iron, 3));
|
||||
else if(randy < 30)
|
||||
addToInv(new ItemStack(ModItems.powder_titanium, 2));
|
||||
else if(randy < 45)
|
||||
addToInv(new ItemStack(ModItems.powder_coal, 4));
|
||||
else if(randy < 50)
|
||||
addToInv(new ItemStack(ModItems.powder_uranium, 2));
|
||||
else if(randy < 53)
|
||||
addToInv(new ItemStack(ModItems.powder_plutonium, 1));
|
||||
else if(randy < 58)
|
||||
addToInv(new ItemStack(ModItems.powder_thorium, 2));
|
||||
else if(randy < 60)
|
||||
addToInv(new ItemStack(ModItems.powder_desh_mix, 3));
|
||||
else if(randy < 65)
|
||||
addToInv(new ItemStack(ModItems.powder_diamond, 2));
|
||||
else if(randy < 75)
|
||||
addToInv(new ItemStack(Items.redstone, 5));
|
||||
else if(randy < 77)
|
||||
addToInv(new ItemStack(ModItems.powder_nitan_mix, 2));
|
||||
else if(randy < 80)
|
||||
addToInv(new ItemStack(ModItems.powder_power, 2));
|
||||
else if(randy < 85)
|
||||
addToInv(new ItemStack(ModItems.powder_copper, 5));
|
||||
else if(randy < 90)
|
||||
addToInv(new ItemStack(ModItems.powder_lead, 3));
|
||||
else if(randy < 95)
|
||||
addToInv(new ItemStack(ModItems.fluorite, 4));
|
||||
else if(randy < 99)
|
||||
addToInv(new ItemStack(ModItems.powder_lapis, 4));
|
||||
else
|
||||
addToInv(new ItemStack(ModItems.powder_combine_steel, 1));
|
||||
ItemStack stack = ((WeightedRandomObject)WeightedRandom.getRandomItem(rand, cargo)).asStack();
|
||||
addToInv(stack);
|
||||
}
|
||||
}
|
||||
|
||||
private WeightedRandomObject[] cargo = new WeightedRandomObject[] {
|
||||
new WeightedRandomObject(new ItemStack(ModItems.powder_aluminium, 3), 10),
|
||||
new WeightedRandomObject(new ItemStack(ModItems.powder_iron, 3), 10),
|
||||
new WeightedRandomObject(new ItemStack(ModItems.powder_titanium, 2), 8),
|
||||
new WeightedRandomObject(new ItemStack(ModItems.powder_coal, 4), 15),
|
||||
new WeightedRandomObject(new ItemStack(ModItems.powder_uranium, 2), 5),
|
||||
new WeightedRandomObject(new ItemStack(ModItems.powder_plutonium, 1), 5),
|
||||
new WeightedRandomObject(new ItemStack(ModItems.powder_thorium, 2), 7),
|
||||
new WeightedRandomObject(new ItemStack(ModItems.powder_desh_mix, 3), 5),
|
||||
new WeightedRandomObject(new ItemStack(ModItems.powder_diamond, 2), 7),
|
||||
new WeightedRandomObject(new ItemStack(Items.redstone, 5), 15),
|
||||
new WeightedRandomObject(new ItemStack(ModItems.powder_nitan_mix, 2), 5),
|
||||
new WeightedRandomObject(new ItemStack(ModItems.powder_power, 2), 5),
|
||||
new WeightedRandomObject(new ItemStack(ModItems.powder_copper, 5), 15),
|
||||
new WeightedRandomObject(new ItemStack(ModItems.powder_lead, 3), 10),
|
||||
new WeightedRandomObject(new ItemStack(ModItems.fluorite, 4), 15),
|
||||
new WeightedRandomObject(new ItemStack(ModItems.powder_lapis, 4), 10),
|
||||
new WeightedRandomObject(new ItemStack(ModItems.powder_combine_steel, 1), 1),
|
||||
new WeightedRandomObject(new ItemStack(ModItems.crystal_aluminium, 1), 5),
|
||||
new WeightedRandomObject(new ItemStack(ModItems.crystal_gold, 1), 5),
|
||||
new WeightedRandomObject(new ItemStack(ModItems.crystal_phosphorus, 1), 10),
|
||||
new WeightedRandomObject(new ItemStack(ModBlocks.gravel_diamond, 1), 3),
|
||||
new WeightedRandomObject(new ItemStack(ModItems.crystal_uranium, 1), 3),
|
||||
new WeightedRandomObject(new ItemStack(ModItems.crystal_plutonium, 1), 3),
|
||||
new WeightedRandomObject(new ItemStack(ModItems.crystal_trixite, 1), 1),
|
||||
new WeightedRandomObject(new ItemStack(ModItems.crystal_starmetal, 1), 1),
|
||||
};
|
||||
|
||||
private void addToInv(ItemStack stack) {
|
||||
|
||||
for(int i = 0; i < 15; i++) {
|
||||
|
||||
156
com/hbm/tileentity/machine/TileEntitySoyuzStruct.java
Normal file
156
com/hbm/tileentity/machine/TileEntitySoyuzStruct.java
Normal file
@ -0,0 +1,156 @@
|
||||
package com.hbm.tileentity.machine;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.blocks.machine.SoyuzLauncher;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class TileEntitySoyuzStruct extends TileEntity {
|
||||
|
||||
int age;
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
|
||||
if(worldObj.isRemote)
|
||||
return;
|
||||
|
||||
age++;
|
||||
|
||||
if(age < 20)
|
||||
return;
|
||||
|
||||
age = 0;
|
||||
|
||||
/// CHECK PAD ///
|
||||
for(int i = -6; i <= 6; i++)
|
||||
for(int j = 3; j <= 4; j++)
|
||||
for(int k = -6; k <= 6; k++)
|
||||
if(worldObj.getBlock(xCoord + i, yCoord + j, zCoord + k) != ModBlocks.struct_launcher)
|
||||
return;
|
||||
|
||||
for(int i = -1; i <= 1; i++)
|
||||
for(int j = 3; j <= 4; j++)
|
||||
for(int k = -8; k <= -7; k++)
|
||||
if(worldObj.getBlock(xCoord + i, yCoord + j, zCoord + k) != ModBlocks.struct_launcher)
|
||||
return;
|
||||
|
||||
for(int i = -2; i <= 2; i++)
|
||||
for(int j = 3; j <= 4; j++)
|
||||
for(int k = 7; k <= 9; k++)
|
||||
if(worldObj.getBlock(xCoord + i, yCoord + j, zCoord + k) != ModBlocks.struct_launcher)
|
||||
return;
|
||||
|
||||
for(int i = -2; i <= 2; i++)
|
||||
for(int k = 5; k <= 9; k++)
|
||||
if(worldObj.getBlock(xCoord + i, yCoord + 51, zCoord + k) != ModBlocks.struct_launcher)
|
||||
return;
|
||||
|
||||
for(int i = -1; i <= 1; i++)
|
||||
for(int k = -8; k <= -6; k++)
|
||||
if(worldObj.getBlock(xCoord + i, yCoord + 38, zCoord + k) != ModBlocks.struct_launcher)
|
||||
return;
|
||||
|
||||
/// CHECK LEGS ///
|
||||
for(int i = 3; i <= 6; i++)
|
||||
for(int j = 0; j <= 2; j++)
|
||||
for(int k = 3; k <= 6; k++)
|
||||
if(worldObj.getBlock(xCoord + i, yCoord + j, zCoord + k) != ModBlocks.concrete &&
|
||||
worldObj.getBlock(xCoord + i, yCoord + j, zCoord + k) != ModBlocks.concrete_smooth)
|
||||
return;
|
||||
|
||||
for(int i = -6; i <= -3; i++)
|
||||
for(int j = 0; j <= 2; j++)
|
||||
for(int k = 3; k <= 6; k++)
|
||||
if(worldObj.getBlock(xCoord + i, yCoord + j, zCoord + k) != ModBlocks.concrete &&
|
||||
worldObj.getBlock(xCoord + i, yCoord + j, zCoord + k) != ModBlocks.concrete_smooth)
|
||||
return;
|
||||
|
||||
for(int i = -6; i <= -3; i++)
|
||||
for(int j = 0; j <= 2; j++)
|
||||
for(int k = -6; k <= -3; k++)
|
||||
if(worldObj.getBlock(xCoord + i, yCoord + j, zCoord + k) != ModBlocks.concrete &&
|
||||
worldObj.getBlock(xCoord + i, yCoord + j, zCoord + k) != ModBlocks.concrete_smooth)
|
||||
return;
|
||||
|
||||
for(int i = 3; i <= 6; i++)
|
||||
for(int j = 0; j <= 2; j++)
|
||||
for(int k = -6; k <= -3; k++)
|
||||
if(worldObj.getBlock(xCoord + i, yCoord + j, zCoord + k) != ModBlocks.concrete &&
|
||||
worldObj.getBlock(xCoord + i, yCoord + j, zCoord + k) != ModBlocks.concrete_smooth)
|
||||
return;
|
||||
|
||||
for(int i = -1; i <= 1; i++)
|
||||
for(int j = 0; j <= 2; j++)
|
||||
for(int k = -8; k <= -6; k++)
|
||||
if(worldObj.getBlock(xCoord + i, yCoord + j, zCoord + k) != ModBlocks.concrete &&
|
||||
worldObj.getBlock(xCoord + i, yCoord + j, zCoord + k) != ModBlocks.concrete_smooth)
|
||||
return;
|
||||
|
||||
for(int i = -2; i <= 2; i++)
|
||||
for(int j = 0; j <= 2; j++)
|
||||
for(int k = 5; k <= 9; k++)
|
||||
if(worldObj.getBlock(xCoord + i, yCoord + j, zCoord + k) != ModBlocks.concrete &&
|
||||
worldObj.getBlock(xCoord + i, yCoord + j, zCoord + k) != ModBlocks.concrete_smooth)
|
||||
return;
|
||||
|
||||
/// CHECK SCAFFOLDING ///
|
||||
for(int i = -1; i <= 1; i++)
|
||||
for(int j = 5; j <= 50; j++)
|
||||
for(int k = 6; k <= 8; k++)
|
||||
if(worldObj.getBlock(xCoord + i, yCoord + j, zCoord + k) != ModBlocks.struct_scaffold)
|
||||
return;
|
||||
|
||||
for(int j = 5; j <= 37; j++)
|
||||
if(worldObj.getBlock(xCoord, yCoord + j, zCoord - 7) != ModBlocks.struct_scaffold)
|
||||
return;
|
||||
/// CHECKS COMPLETE ///
|
||||
|
||||
/// DELETE SCAFFOLDING ///
|
||||
|
||||
for(int i = -2; i <= 2; i++)
|
||||
for(int k = 5; k <= 9; k++)
|
||||
worldObj.setBlock(xCoord + i, yCoord + 51, zCoord + k, Blocks.air);
|
||||
|
||||
for(int i = -1; i <= 1; i++)
|
||||
for(int k = -8; k <= -6; k++)
|
||||
worldObj.setBlock(xCoord + i, yCoord + 38, zCoord + k, Blocks.air);
|
||||
|
||||
for(int i = -2; i <= 2; i++)
|
||||
for(int j = 0; j <= 2; j++)
|
||||
for(int k = 5; k <= 9; k++)
|
||||
worldObj.setBlock(xCoord + i, yCoord + j, zCoord + k, Blocks.air);
|
||||
|
||||
for(int i = -1; i <= 1; i++)
|
||||
for(int j = 5; j <= 50; j++)
|
||||
for(int k = 6; k <= 8; k++)
|
||||
worldObj.setBlock(xCoord + i, yCoord + j, zCoord + k, Blocks.air);
|
||||
|
||||
for(int j = 5; j <= 37; j++)
|
||||
worldObj.setBlock(xCoord, yCoord + j, zCoord - 7, Blocks.air);
|
||||
|
||||
/// GENERATE LAUNCHER ///
|
||||
|
||||
ForgeDirection dir = ForgeDirection.EAST;
|
||||
|
||||
worldObj.setBlock(xCoord, yCoord, zCoord, Blocks.air);
|
||||
worldObj.setBlock(xCoord , yCoord + SoyuzLauncher.height, zCoord, ModBlocks.soyuz_launcher, dir.ordinal() + SoyuzLauncher.offset, 3);
|
||||
((SoyuzLauncher)ModBlocks.soyuz_launcher).fillSpace(worldObj, xCoord, yCoord, zCoord, dir, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getRenderBoundingBox() {
|
||||
return TileEntity.INFINITE_EXTENT_AABB;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public double getMaxRenderDistanceSquared() {
|
||||
return 65536.0D;
|
||||
}
|
||||
}
|
||||
23
com/hbm/util/WeightedRandomObject.java
Normal file
23
com/hbm/util/WeightedRandomObject.java
Normal file
@ -0,0 +1,23 @@
|
||||
package com.hbm.util;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.WeightedRandom;
|
||||
|
||||
public class WeightedRandomObject extends WeightedRandom.Item {
|
||||
|
||||
Object item;
|
||||
|
||||
public WeightedRandomObject(Object o, int weight) {
|
||||
super(weight);
|
||||
item = o;
|
||||
}
|
||||
|
||||
public ItemStack asStack() {
|
||||
|
||||
if(item instanceof ItemStack)
|
||||
return ((ItemStack) item).copy();
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user