dead plants, usable presentation system
@ -452,6 +452,7 @@ public class ModBlocks {
|
||||
public static Block mush_block_stem;
|
||||
|
||||
public static Block plant_flower;
|
||||
public static Block plant_dead;
|
||||
|
||||
public static Block waste_earth;
|
||||
public static Block waste_mycelium;
|
||||
@ -1701,6 +1702,7 @@ public class ModBlocks {
|
||||
mush_block_stem = new BlockMushHuge(Material.plants).setBlockName("mush_block_stem").setLightLevel(1.0F).setStepSound(Block.soundTypeGrass).setHardness(0.2F).setBlockTextureName(RefStrings.MODID + ":mush_block_stem");
|
||||
|
||||
plant_flower = new BlockNTMFlower().setBlockName("plant_flower").setCreativeTab(MainRegistry.blockTab).setStepSound(Block.soundTypeGrass).setHardness(0.0F);
|
||||
plant_dead = new BlockDeadPlant().setBlockName("plant_dead").setCreativeTab(MainRegistry.blockTab).setStepSound(Block.soundTypeGrass).setHardness(0.0F);
|
||||
|
||||
waste_earth = new WasteEarth(Material.ground, true).setBlockName("waste_earth").setStepSound(Block.soundTypeGrass).setCreativeTab(MainRegistry.blockTab).setHardness(0.6F).setBlockTextureName(RefStrings.MODID + ":waste_earth");
|
||||
waste_mycelium = new WasteEarth(Material.ground, true).setBlockName("waste_mycelium").setStepSound(Block.soundTypeGrass).setLightLevel(1F).setCreativeTab(MainRegistry.blockTab).setHardness(0.6F).setBlockTextureName(RefStrings.MODID + ":waste_mycelium_side");
|
||||
@ -2769,7 +2771,8 @@ public class ModBlocks {
|
||||
GameRegistry.registerBlock(deco_pipe_quad_green_rusted, ItemBlockBase.class, deco_pipe_quad_green_rusted.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(deco_pipe_quad_red, ItemBlockBase.class, deco_pipe_quad_red.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(deco_pipe_quad_marked, ItemBlockBase.class, deco_pipe_quad_marked.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(plant_flower, ItemBlockBase.class, plant_flower.getUnlocalizedName());
|
||||
register(plant_flower);
|
||||
register(plant_dead);
|
||||
GameRegistry.registerBlock(mush, mush.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(mush_block, mush_block.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(mush_block_stem, mush_block_stem.getUnlocalizedName());
|
||||
|
||||
85
src/main/java/com/hbm/blocks/generic/BlockDeadPlant.java
Normal file
@ -0,0 +1,85 @@
|
||||
package com.hbm.blocks.generic;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.blocks.BlockEnumMulti;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class BlockDeadPlant extends BlockEnumMulti {
|
||||
|
||||
public BlockDeadPlant() {
|
||||
super(Material.plants, EnumDeadPlantType.class, false, true);
|
||||
}
|
||||
|
||||
public static enum EnumDeadPlantType {
|
||||
GENERIC,
|
||||
GRASS,
|
||||
FLOWER,
|
||||
BIGFLOWER,
|
||||
FERN
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canPlaceBlockAt(World world, int x, int y, int z) {
|
||||
return super.canPlaceBlockAt(world, x, y, z) && this.canBlockStay(world, x, y, z);
|
||||
}
|
||||
|
||||
protected boolean canPlaceBlockOn(Block block) {
|
||||
return block == Blocks.grass || block == Blocks.dirt || block == ModBlocks.waste_earth || block == ModBlocks.dirt_oily || block == ModBlocks.dirt_dead;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNeighborBlockChange(World world, int x, int y, int z, Block block) {
|
||||
super.onNeighborBlockChange(world, x, y, z, block);
|
||||
this.checkAndDropBlock(world, x, y, z);
|
||||
}
|
||||
|
||||
protected void checkAndDropBlock(World world, int x, int y, int z) {
|
||||
if(!this.canBlockStay(world, x, y, z)) {
|
||||
this.dropBlockAsItem(world, x, y, z, world.getBlockMetadata(x, y, z), 0);
|
||||
world.setBlock(x, y, z, getBlockById(0), 0, 2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canBlockStay(World world, int x, int y, int z) {
|
||||
return canPlaceBlockOn(world.getBlock(x, y - 1, z));
|
||||
}
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int x, int y, int z) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean renderAsNormalBlock() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderType() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int damageDropped(int meta) {
|
||||
return meta;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(int meta, Random rand, int fortune) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@ -844,8 +844,6 @@ public class GUIHandler implements IGuiHandler {
|
||||
public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
TileEntity entity = world.getTileEntity(x, y, z);
|
||||
|
||||
if(ID == -1) return new GuiWorldInAJar();
|
||||
|
||||
if(entity instanceof IGUIProvider) {
|
||||
return ((IGUIProvider) entity).provideGUI(ID, player, world, x, y, z);
|
||||
}
|
||||
|
||||
@ -218,6 +218,7 @@ public class HadronRecipes extends SerializableRecipe {
|
||||
writer.endArray();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getComment() {
|
||||
return "Rules: Both in- and output stacks cannot be null. Stacksizes are set to 1 for all stacks.";
|
||||
}
|
||||
|
||||
@ -1,13 +1,19 @@
|
||||
package com.hbm.inventory.recipes;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import com.google.gson.JsonElement;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.blocks.generic.BlockBobble.BobbleType;
|
||||
import com.hbm.interfaces.Untested;
|
||||
import com.hbm.inventory.RecipesCommon.ComparableStack;
|
||||
import com.hbm.inventory.recipes.loader.SerializableRecipe;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.util.Compat;
|
||||
@ -19,12 +25,13 @@ import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
public class ShredderRecipes {
|
||||
public class ShredderRecipes extends SerializableRecipe {
|
||||
|
||||
public static HashMap<ComparableStack, ItemStack> shredderRecipes = new HashMap();
|
||||
public static HashMap<Object, Object> neiShredderRecipes;
|
||||
|
||||
public static void registerShredder() {
|
||||
@Override
|
||||
public void registerPost() {
|
||||
|
||||
String[] names = OreDictionary.getOreNames();
|
||||
|
||||
@ -106,7 +113,7 @@ public class ShredderRecipes {
|
||||
if(in != null) {
|
||||
|
||||
if(in.getItem() != null) {
|
||||
shredderRecipes.put(new ComparableStack(in), dust);
|
||||
setRecipe(new ComparableStack(in), dust);
|
||||
} else {
|
||||
MainRegistry.logger.error("Ore dict entry '" + name + "' has a null item in its stack! How does that even happen?");
|
||||
Thread.currentThread().dumpStack();
|
||||
@ -117,12 +124,11 @@ public class ShredderRecipes {
|
||||
Thread.currentThread().dumpStack();
|
||||
}
|
||||
}
|
||||
|
||||
public static void registerOverrides() {
|
||||
|
||||
/*
|
||||
* Primary recipes
|
||||
*/
|
||||
@Override
|
||||
public void registerDefaults() {
|
||||
|
||||
/* Primary recipes */
|
||||
ShredderRecipes.setRecipe(ModItems.scrap, new ItemStack(ModItems.dust));
|
||||
ShredderRecipes.setRecipe(ModItems.dust, new ItemStack(ModItems.dust));
|
||||
ShredderRecipes.setRecipe(Blocks.glowstone, new ItemStack(Items.glowstone_dust, 4));
|
||||
@ -192,9 +198,7 @@ public class ShredderRecipes {
|
||||
|
||||
for(int i = 0; i < 5; i++) ShredderRecipes.setRecipe(new ItemStack(Items.skull, 1, i), new ItemStack(ModItems.biomass));
|
||||
|
||||
/*
|
||||
* Crstaly processing
|
||||
*/
|
||||
/* Crystal processing */
|
||||
ShredderRecipes.setRecipe(ModItems.ingot_schraranium, new ItemStack(ModItems.nugget_schrabidium, 2));
|
||||
ShredderRecipes.setRecipe(ModItems.crystal_coal, new ItemStack(ModItems.powder_coal, 3));
|
||||
ShredderRecipes.setRecipe(ModItems.crystal_iron, new ItemStack(ModItems.powder_iron, 3));
|
||||
@ -223,9 +227,7 @@ public class ShredderRecipes {
|
||||
ShredderRecipes.setRecipe(ModItems.crystal_starmetal, new ItemStack(ModItems.powder_dura_steel, 6));
|
||||
ShredderRecipes.setRecipe(ModItems.crystal_cobalt, new ItemStack(ModItems.powder_cobalt, 3));
|
||||
|
||||
/*
|
||||
* Misc recycling
|
||||
*/
|
||||
/* Misc recycling */
|
||||
ShredderRecipes.setRecipe(ModBlocks.steel_poles, new ItemStack(ModItems.powder_steel_tiny, 3));
|
||||
ShredderRecipes.setRecipe(ModBlocks.pole_top, new ItemStack(ModItems.powder_tungsten, 4));
|
||||
ShredderRecipes.setRecipe(ModBlocks.tape_recorder, new ItemStack(ModItems.powder_steel, 1));
|
||||
@ -251,9 +253,7 @@ public class ShredderRecipes {
|
||||
ShredderRecipes.setRecipe(ModBlocks.steel_grate, new ItemStack(ModItems.powder_steel_tiny, 3));
|
||||
ShredderRecipes.setRecipe(ModItems.pipes_steel, new ItemStack(ModItems.powder_steel, 27));
|
||||
|
||||
/*
|
||||
* Sellafite scrapping
|
||||
*/
|
||||
/* Sellafite scrapping */
|
||||
ShredderRecipes.setRecipe(ModBlocks.sellafield_slaked, new ItemStack(Blocks.gravel));
|
||||
ShredderRecipes.setRecipe(new ItemStack(ModBlocks.sellafield, 1, 0), new ItemStack(ModItems.scrap_nuclear, 1));
|
||||
ShredderRecipes.setRecipe(new ItemStack(ModBlocks.sellafield, 1, 1), new ItemStack(ModItems.scrap_nuclear, 2));
|
||||
@ -262,9 +262,7 @@ public class ShredderRecipes {
|
||||
ShredderRecipes.setRecipe(new ItemStack(ModBlocks.sellafield, 1, 4), new ItemStack(ModItems.scrap_nuclear, 7));
|
||||
ShredderRecipes.setRecipe(new ItemStack(ModBlocks.sellafield, 1, 5), new ItemStack(ModItems.scrap_nuclear, 15));
|
||||
|
||||
/*
|
||||
* Fracking debris scrapping
|
||||
*/
|
||||
/* Fracking debris scrapping */
|
||||
ShredderRecipes.setRecipe(ModBlocks.dirt_dead, new ItemStack(ModItems.scrap_oil, 1));
|
||||
ShredderRecipes.setRecipe(ModBlocks.dirt_oily, new ItemStack(ModItems.scrap_oil, 1));
|
||||
ShredderRecipes.setRecipe(ModBlocks.sand_dirty, new ItemStack(ModItems.scrap_oil, 1));
|
||||
@ -272,9 +270,7 @@ public class ShredderRecipes {
|
||||
ShredderRecipes.setRecipe(ModBlocks.stone_cracked, new ItemStack(ModItems.scrap_oil, 1));
|
||||
ShredderRecipes.setRecipe(ModBlocks.stone_porous, new ItemStack(ModItems.scrap_oil, 1));
|
||||
|
||||
/*
|
||||
* Deco pipe recycling
|
||||
*/
|
||||
/* Deco pipe recycling */
|
||||
ShredderRecipes.setRecipe(ModBlocks.deco_pipe, new ItemStack(ModItems.powder_steel, 1));
|
||||
ShredderRecipes.setRecipe(ModBlocks.deco_pipe_rusted, new ItemStack(ModItems.powder_steel, 1));
|
||||
ShredderRecipes.setRecipe(ModBlocks.deco_pipe_green, new ItemStack(ModItems.powder_steel, 1));
|
||||
@ -300,9 +296,7 @@ public class ShredderRecipes {
|
||||
ShredderRecipes.setRecipe(ModBlocks.deco_pipe_framed_red, new ItemStack(ModItems.powder_steel, 1));
|
||||
ShredderRecipes.setRecipe(ModBlocks.deco_pipe_framed_marked, new ItemStack(ModItems.powder_steel, 1));
|
||||
|
||||
/*
|
||||
* Turret and ammo recycling
|
||||
*/
|
||||
/* Turret and ammo recycling */
|
||||
ShredderRecipes.setRecipe(ModBlocks.turret_light, new ItemStack(ModItems.powder_steel, 16));
|
||||
ShredderRecipes.setRecipe(ModBlocks.turret_heavy, new ItemStack(ModItems.powder_steel, 16));
|
||||
ShredderRecipes.setRecipe(ModBlocks.turret_flamer, new ItemStack(ModItems.powder_steel, 16));
|
||||
@ -316,25 +310,19 @@ public class ShredderRecipes {
|
||||
ShredderRecipes.setRecipe(ModItems.turret_cwis_ammo, new ItemStack(Items.gunpowder, 4));
|
||||
ShredderRecipes.setRecipe(ModItems.turret_tau_ammo, new ItemStack(ModItems.powder_uranium, 4));
|
||||
|
||||
/*
|
||||
* Wool and clay scrapping
|
||||
*/
|
||||
/* Wool and clay scrapping */
|
||||
for(int i = 0; i < 16; i++) {
|
||||
ShredderRecipes.setRecipe(new ItemStack(Blocks.stained_hardened_clay, 1, i), new ItemStack(Items.clay_ball, 4));
|
||||
ShredderRecipes.setRecipe(new ItemStack(Blocks.wool, 1, i), new ItemStack(Items.string, 4));
|
||||
}
|
||||
|
||||
/*
|
||||
* Shredding bobbleheads
|
||||
*/
|
||||
/* Shredding bobbleheads */
|
||||
for(int i = 0; i < BobbleType.values().length; i++) {
|
||||
BobbleType type = BobbleType.values()[i];
|
||||
ShredderRecipes.setRecipe(new ItemStack(ModBlocks.bobblehead, 1, i), new ItemStack(ModItems.scrap_plastic, 1, type.scrap.ordinal()));
|
||||
}
|
||||
|
||||
/*
|
||||
* Debris shredding
|
||||
*/
|
||||
/* Debris shredding */
|
||||
ShredderRecipes.setRecipe(ModItems.debris_concrete, new ItemStack(ModItems.scrap_nuclear, 2));
|
||||
ShredderRecipes.setRecipe(ModItems.debris_shrapnel, new ItemStack(ModItems.powder_steel_tiny, 5));
|
||||
ShredderRecipes.setRecipe(ModItems.debris_exchanger, new ItemStack(ModItems.powder_steel, 3));
|
||||
@ -342,18 +330,14 @@ public class ShredderRecipes {
|
||||
ShredderRecipes.setRecipe(ModItems.debris_metal, new ItemStack(ModItems.powder_steel_tiny, 3));
|
||||
ShredderRecipes.setRecipe(ModItems.debris_graphite, new ItemStack(ModItems.powder_coal, 1));
|
||||
|
||||
/*
|
||||
* GC COMPAT
|
||||
*/
|
||||
/* GC COMPAT */
|
||||
Item gcMoonBlock = Compat.tryLoadItem(Compat.MOD_GCC, "moonBlock");
|
||||
if(gcMoonBlock != null) {
|
||||
ShredderRecipes.setRecipe(new ItemStack(gcMoonBlock, 1, 3), new ItemStack(ModBlocks.moon_turf)); //Moon dirt
|
||||
ShredderRecipes.setRecipe(new ItemStack(gcMoonBlock, 1, 5), new ItemStack(ModBlocks.moon_turf)); //Moon topsoil
|
||||
}
|
||||
|
||||
/*
|
||||
* AR COMPAT
|
||||
*/
|
||||
/* AR COMPAT */
|
||||
Item arMoonTurf = Compat.tryLoadItem(Compat.MOD_AR, "turf");
|
||||
if(arMoonTurf != null) ShredderRecipes.setRecipe(arMoonTurf, new ItemStack(ModBlocks.moon_turf)); //i assume it's moon turf
|
||||
Item arMoonTurfDark = Compat.tryLoadItem(Compat.MOD_AR, "turfDark");
|
||||
@ -396,18 +380,21 @@ public class ShredderRecipes {
|
||||
}
|
||||
|
||||
public static void setRecipe(Item in, ItemStack out) {
|
||||
|
||||
shredderRecipes.put(new ComparableStack(in), out);
|
||||
setRecipe(new ComparableStack(in), out);
|
||||
}
|
||||
|
||||
public static void setRecipe(Block in, ItemStack out) {
|
||||
|
||||
shredderRecipes.put(new ComparableStack(in), out);
|
||||
setRecipe(new ComparableStack(in), out);
|
||||
}
|
||||
|
||||
public static void setRecipe(ItemStack in, ItemStack out) {
|
||||
|
||||
shredderRecipes.put(new ComparableStack(in), out);
|
||||
setRecipe(new ComparableStack(in), out);
|
||||
}
|
||||
|
||||
public static void setRecipe(ComparableStack in, ItemStack out) {
|
||||
if(!shredderRecipes.containsKey(in)) {
|
||||
shredderRecipes.put(in, out);
|
||||
}
|
||||
}
|
||||
|
||||
public static Map<Object, Object> getShredderRecipes() {
|
||||
@ -426,11 +413,46 @@ public class ShredderRecipes {
|
||||
|
||||
ItemStack sta = shredderRecipes.get(new ComparableStack(stack).makeSingular());
|
||||
|
||||
/*if(sta != null)
|
||||
System.out.println(stack.getDisplayName() + " resulted " + sta.getDisplayName());
|
||||
else
|
||||
System.out.println(stack.getDisplayName() + " resulted null");*/
|
||||
|
||||
return sta == null ? new ItemStack(ModItems.scrap) : sta;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getFileName() {
|
||||
return "hbmShredder.json";
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getRecipeObject() {
|
||||
return shredderRecipes;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readRecipe(JsonElement recipe) {
|
||||
JsonObject obj = (JsonObject) recipe;
|
||||
ComparableStack comp = new ComparableStack(this.readItemStack(obj.get("input").getAsJsonArray())).makeSingular();
|
||||
ItemStack out = this.readItemStack(obj.get("output").getAsJsonArray());
|
||||
|
||||
this.shredderRecipes.put(comp, out);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeRecipe(Object recipe, JsonWriter writer) throws IOException {
|
||||
Entry<ComparableStack, ItemStack> entry = (Entry<ComparableStack, ItemStack>) recipe;
|
||||
|
||||
writer.name("input");
|
||||
this.writeItemStack(entry.getKey().toStack(), writer);
|
||||
writer.name("output");
|
||||
this.writeItemStack(entry.getValue(), writer);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteRecipes() {
|
||||
this.shredderRecipes.clear();
|
||||
this.neiShredderRecipes = null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getComment() {
|
||||
return "Ingot/block/ore -> dust recipes are generated in post and can therefore not be changed with the config. Non-auto recipes do not use ore dict.";
|
||||
}
|
||||
}
|
||||
|
||||
@ -38,6 +38,7 @@ public abstract class SerializableRecipe {
|
||||
*/
|
||||
|
||||
public static void registerAllHandlers() {
|
||||
recipeHandlers.add(new ShredderRecipes());
|
||||
recipeHandlers.add(new ChemplantRecipes());
|
||||
recipeHandlers.add(new CentrifugeRecipes());
|
||||
recipeHandlers.add(new CyclotronRecipes());
|
||||
|
||||
@ -8,6 +8,7 @@ import com.hbm.entity.mob.siege.EntitySiegeTunneler;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.special.ItemKitCustom;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.world.feature.OilSpot;
|
||||
|
||||
import net.minecraft.entity.EntityLiving;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
@ -31,9 +32,11 @@ public class ItemWandD extends Item {
|
||||
|
||||
if(pos != null) {
|
||||
|
||||
EntityNukeTorex torex = new EntityNukeTorex(world);
|
||||
OilSpot.generateOilSpot(world, pos.blockX, pos.blockZ, 20, 500);
|
||||
|
||||
/*EntityNukeTorex torex = new EntityNukeTorex(world);
|
||||
torex.setPositionAndRotation(pos.blockX, pos.blockY + 1, pos.blockZ, 0, 0);
|
||||
world.spawnEntityInWorld(torex);
|
||||
world.spawnEntityInWorld(torex);*/
|
||||
|
||||
/*EntitySiegeTunneler tunneler = new EntitySiegeTunneler(world);
|
||||
tunneler.setPosition(pos.blockX, pos.blockY + 1, pos.blockZ);
|
||||
|
||||
@ -3,7 +3,7 @@ package com.hbm.lib;
|
||||
public class RefStrings {
|
||||
public static final String MODID = "hbm";
|
||||
public static final String NAME = "Hbm's Nuclear Tech Mod";
|
||||
public static final String VERSION = "1.0.27 BETA (4336)";
|
||||
public static final String VERSION = "1.0.27 BETA (4347)";
|
||||
//HBM's Beta Naming Convention:
|
||||
//V T (X)
|
||||
//V -> next release version
|
||||
|
||||
@ -768,8 +768,6 @@ public class MainRegistry {
|
||||
|
||||
@EventHandler
|
||||
public static void PostLoad(FMLPostInitializationEvent PostEvent) {
|
||||
ShredderRecipes.registerShredder();
|
||||
ShredderRecipes.registerOverrides();
|
||||
CrystallizerRecipes.register();
|
||||
TileEntityNukeFurnace.registerFuels();
|
||||
BreederRecipes.registerRecipes();
|
||||
|
||||
@ -1,9 +1,11 @@
|
||||
package com.hbm.main;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
import org.lwjgl.input.Mouse;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.blocks.ILookOverlay;
|
||||
@ -55,6 +57,9 @@ import com.hbm.tileentity.machine.TileEntityNukeFurnace;
|
||||
import com.hbm.util.I18nUtil;
|
||||
import com.hbm.util.ItemStackUtil;
|
||||
import com.hbm.util.LoggingUtil;
|
||||
import com.hbm.wiaj.GuiWorldInAJar;
|
||||
import com.hbm.wiaj.cannery.CanneryBase;
|
||||
import com.hbm.wiaj.cannery.Jars;
|
||||
import com.hbm.util.ArmorRegistry;
|
||||
import com.hbm.util.ArmorUtil;
|
||||
import com.hbm.util.ArmorRegistry.HazardClass;
|
||||
@ -66,17 +71,20 @@ import api.hbm.item.IClickReceiver;
|
||||
import com.hbm.sound.MovingSoundPlayerLoop.EnumHbmSound;
|
||||
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.common.eventhandler.EventPriority;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import cpw.mods.fml.common.gameevent.InputEvent.KeyInputEvent;
|
||||
import cpw.mods.fml.common.gameevent.TickEvent.ClientTickEvent;
|
||||
import cpw.mods.fml.common.gameevent.TickEvent.Phase;
|
||||
import cpw.mods.fml.relauncher.ReflectionHelper;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.entity.AbstractClientPlayer;
|
||||
import net.minecraft.client.gui.ScaledResolution;
|
||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||
import net.minecraft.client.multiplayer.WorldClient;
|
||||
import net.minecraft.client.renderer.OpenGlHelper;
|
||||
import net.minecraft.client.renderer.RenderHelper;
|
||||
@ -84,6 +92,7 @@ import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.entity.RenderPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemArmor;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@ -611,6 +620,11 @@ public class ModEventHandlerClient {
|
||||
if(entry.entry == EnumEntryType.MULT)
|
||||
list.add(EnumChatFormatting.GOLD + "Adds multiplier " + entry.value + " to the custom nuke stage " + entry.type);
|
||||
}
|
||||
|
||||
CanneryBase cannery = Jars.canneries.get(comp);
|
||||
if(cannery != null) {
|
||||
list.add(EnumChatFormatting.GREEN + I18nUtil.resolveKey("cannery.f1"));
|
||||
}
|
||||
}
|
||||
|
||||
private ResourceLocation ashes = new ResourceLocation(RefStrings.MODID + ":textures/misc/overlay_ash.png");
|
||||
@ -720,6 +734,40 @@ public class ModEventHandlerClient {
|
||||
MainRegistry.proxy.displayTooltip(EnumChatFormatting.RED + "Your mask has no filter!", MainRegistry.proxy.ID_FILTER);
|
||||
}
|
||||
}
|
||||
|
||||
if(mc.currentScreen instanceof GuiContainer && Keyboard.isKeyDown(Keyboard.KEY_F1)) {
|
||||
|
||||
ScaledResolution scaledresolution = new ScaledResolution(mc, mc.displayWidth, mc.displayHeight);
|
||||
int width = scaledresolution.getScaledWidth();
|
||||
int height = scaledresolution.getScaledHeight();
|
||||
int mouseX = Mouse.getX() * width / mc.displayWidth;
|
||||
int mouseY = height - Mouse.getY() * height / mc.displayHeight - 1;
|
||||
|
||||
GuiContainer container = (GuiContainer) mc.currentScreen;
|
||||
|
||||
for(Object o : container.inventorySlots.inventorySlots) {
|
||||
Slot slot = (Slot) o;
|
||||
|
||||
if(slot.getHasStack()) {
|
||||
try {
|
||||
Method isMouseOverSlot = ReflectionHelper.findMethod(GuiContainer.class, container, new String[] {"func_146981_a", "isMouseOverSlot"}, Slot.class, int.class, int.class);
|
||||
|
||||
if((boolean) isMouseOverSlot.invoke(container, slot, mouseX, mouseY)) {
|
||||
|
||||
ComparableStack comp = new ComparableStack(slot.getStack()).makeSingular();
|
||||
CanneryBase cannery = Jars.canneries.get(comp);
|
||||
|
||||
if(cannery != null) {
|
||||
FMLCommonHandler.instance().showGuiScreen(new GuiWorldInAJar(cannery.createScript(), cannery.getIcon()));
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
} catch(Exception ex) { }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
|
||||
@ -2,6 +2,8 @@ package com.hbm.tileentity;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import com.hbm.util.CompatExternal;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
@ -27,7 +29,8 @@ public interface IPersistentNBT {
|
||||
}
|
||||
|
||||
public static ArrayList<ItemStack> getDrops(World world, int x, int y, int z, Block b) {
|
||||
TileEntity tile = world.getTileEntity(x, y, z);
|
||||
|
||||
TileEntity tile = CompatExternal.getCoreFromPos(world, x, y, z);
|
||||
|
||||
if(tile instanceof IPersistentNBT) {
|
||||
return ((IPersistentNBT) tile).getDrops(b);
|
||||
|
||||
@ -167,7 +167,7 @@ public class TileEntityMachineAutocrafter extends TileEntityMachineBase implemen
|
||||
if(ingredient != null) {
|
||||
this.decrStackSize(i, 1);
|
||||
|
||||
if(ingredient.getItem().hasContainerItem(ingredient)) {
|
||||
if(slots[i] == null && ingredient.getItem().hasContainerItem(ingredient)) {
|
||||
ItemStack container = ingredient.getItem().getContainerItem(ingredient);
|
||||
|
||||
if(container != null && container.isItemStackDamageable() && container.getItemDamage() > container.getMaxDamage()) {
|
||||
@ -269,6 +269,10 @@ public class TileEntityMachineAutocrafter extends TileEntityMachineBase implemen
|
||||
|
||||
@Override
|
||||
public boolean isItemValidForSlot(int slot, ItemStack stack) {
|
||||
|
||||
//automatically prohibit any stacked item with a container
|
||||
if(stack.stackSize > 1 && stack.getItem().hasContainerItem(stack))
|
||||
return false;
|
||||
|
||||
//only allow insertion for the nine recipe slots
|
||||
if(slot < 10 || slot > 18)
|
||||
|
||||
@ -147,7 +147,7 @@ public class TileEntityMachineBattery extends TileEntityMachineBase implements I
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
|
||||
if(worldObj.getBlock(xCoord, yCoord, zCoord) instanceof MachineBattery && !worldObj.isRemote) {
|
||||
if(!worldObj.isRemote && worldObj.getBlock(xCoord, yCoord, zCoord) instanceof MachineBattery) {
|
||||
|
||||
long prevPower = this.power;
|
||||
|
||||
@ -163,16 +163,17 @@ public class TileEntityMachineBattery extends TileEntityMachineBase implements I
|
||||
power = Library.chargeTEFromItems(slots, 0, power, getMaxPower());
|
||||
power = Library.chargeItemsFromTE(slots, 1, power, getMaxPower());
|
||||
|
||||
this.delta = this.power - this.log[0];
|
||||
long avg = (power + prevPower) / 2;
|
||||
this.delta = avg - this.log[0];
|
||||
|
||||
for(int i = 1; i < this.log.length; i++) {
|
||||
this.log[i - 1] = this.log[i];
|
||||
}
|
||||
|
||||
this.log[19] = this.power;
|
||||
this.log[19] = avg;
|
||||
|
||||
NBTTagCompound nbt = new NBTTagCompound();
|
||||
nbt.setLong("power", (power + prevPower) / 2);
|
||||
nbt.setLong("power", avg);
|
||||
nbt.setLong("delta", delta);
|
||||
nbt.setShort("redLow", redLow);
|
||||
nbt.setShort("redHigh", redHigh);
|
||||
|
||||
@ -1,9 +1,14 @@
|
||||
package com.hbm.util;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.inventory.fluid.tank.FluidTank;
|
||||
import com.hbm.tileentity.machine.TileEntityDummy;
|
||||
|
||||
import api.hbm.energy.IEnergyUser;
|
||||
import api.hbm.fluid.IFluidUser;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
@ -87,4 +92,37 @@ public class CompatExternal {
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a list of tank definitions from the supplied tile entity. Uses IFluidUser, if the tile is incompatible it returns an empty list.
|
||||
* @param tile
|
||||
* @return an ArrayList of Object arrays with each array representing a fluid tank.<br>
|
||||
* [0]: STRING - unlocalized name of the fluid, simply use I18n to get the translated name<br>
|
||||
* [1]: INT - the unique ID of this fluid<br>
|
||||
* [2]: INT - the hexadecimal color of this fluid<br>
|
||||
* [3]: INT - the amount of fluid in this tank in millibuckets<br>
|
||||
* [4]: INT - the capacity of this tank in millibuckets
|
||||
*/
|
||||
public static ArrayList<Object[]> getFluidInfoFromTile(TileEntity tile) {
|
||||
ArrayList<Object[]> list = new ArrayList();
|
||||
|
||||
if(!(tile instanceof IFluidUser)) {
|
||||
return list;
|
||||
}
|
||||
|
||||
IFluidUser container = (IFluidUser) tile;
|
||||
|
||||
for(FluidTank tank : container.getAllTanks()) {
|
||||
FluidType type = tank.getTankType();
|
||||
list.add(new Object[] {
|
||||
type.getName(),
|
||||
type.getID(),
|
||||
type.getColor(),
|
||||
tank.getFill(),
|
||||
tank.getMaxFill()
|
||||
});
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
}
|
||||
|
||||
@ -9,21 +9,9 @@ import org.lwjgl.input.Keyboard;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL12;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.render.tileentity.RenderStirling;
|
||||
import com.hbm.wiaj.actions.ActionCreateActor;
|
||||
import com.hbm.wiaj.actions.ActionOffsetBy;
|
||||
import com.hbm.wiaj.actions.ActionRotateBy;
|
||||
import com.hbm.wiaj.actions.ActionSetActorData;
|
||||
import com.hbm.wiaj.actions.ActionSetBlock;
|
||||
import com.hbm.wiaj.actions.ActionUpdateActor;
|
||||
import com.hbm.wiaj.actions.ActionWait;
|
||||
import com.hbm.wiaj.actors.ActorFancyPanel;
|
||||
import com.hbm.wiaj.actors.ActorTileEntity;
|
||||
import com.hbm.wiaj.actors.ISpecialActor;
|
||||
import com.hbm.wiaj.cannery.*;
|
||||
import com.hbm.wiaj.actors.ActorFancyPanel.Orientation;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.audio.PositionedSoundRecord;
|
||||
@ -34,9 +22,7 @@ import net.minecraft.client.renderer.RenderBlocks;
|
||||
import net.minecraft.client.renderer.RenderHelper;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.texture.TextureMap;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.ChatComponentText;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
@ -48,11 +34,20 @@ public class GuiWorldInAJar extends GuiScreen {
|
||||
|
||||
RenderBlocks renderer;
|
||||
JarScript testScript;
|
||||
ItemStack icon;
|
||||
CanneryBase[] seeAlso;
|
||||
|
||||
public GuiWorldInAJar() {
|
||||
public GuiWorldInAJar(JarScript script, ItemStack icon, CanneryBase... seeAlso) {
|
||||
super();
|
||||
this.fontRendererObj = Minecraft.getMinecraft().fontRenderer;
|
||||
WorldInAJar world = new WorldInAJar(15, 15, 15);
|
||||
|
||||
this.testScript = script;
|
||||
this.icon = icon;
|
||||
this.seeAlso = seeAlso;
|
||||
renderer = new RenderBlocks(testScript.world);
|
||||
renderer.enableAO = true;
|
||||
|
||||
/*WorldInAJar world = new WorldInAJar(15, 15, 15);
|
||||
|
||||
testScript = new JarScript(world);
|
||||
JarScene startingScene = new JarScene(testScript);
|
||||
@ -141,10 +136,7 @@ public class GuiWorldInAJar extends GuiScreen {
|
||||
.setColors(0xFFFDCA88, 0xFFD57C4F, 0xFFAB4223, 0xff1A1F22).setOrientation(Orientation.BOTTOM)));
|
||||
brickScene.add(new ActionWait(200));
|
||||
|
||||
//this.testScript.addScene(startingScene).addScene(brickScene);
|
||||
this.testScript = CanneryFirebox.createScript();
|
||||
renderer = new RenderBlocks(testScript.world);
|
||||
renderer.enableAO = true;
|
||||
this.testScript.addScene(startingScene).addScene(brickScene);*/
|
||||
//SKY BLUE: 0xffA5D9FF, 0xff39ACFF, 0xff1A6CA7, 0xff1A1F22
|
||||
}
|
||||
|
||||
@ -242,6 +234,10 @@ public class GuiWorldInAJar extends GuiScreen {
|
||||
this.drawTexturedModalRect(width / 2 - 12 + 36, height - 36, 112, 48, 24, 24);
|
||||
|
||||
GL11.glEnable(GL11.GL_DEPTH_TEST);
|
||||
this.drawTexturedModalRect(15, 15, 136, 48, 24, 24);
|
||||
itemRender.renderItemAndEffectIntoGUI(this.fontRendererObj, this.mc.renderEngine, this.icon, 19, 19);
|
||||
itemRender.renderItemOverlayIntoGUI(this.fontRendererObj, this.mc.renderEngine, this.icon, 19, 19, null);
|
||||
RenderHelper.disableStandardItemLighting();
|
||||
}
|
||||
|
||||
private void drawGuiContainerBackgroundLayer(float f, int mouseX, int mouseY) {
|
||||
|
||||
11
src/main/java/com/hbm/wiaj/cannery/CanneryBase.java
Normal file
@ -0,0 +1,11 @@
|
||||
package com.hbm.wiaj.cannery;
|
||||
|
||||
import com.hbm.wiaj.JarScript;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public abstract class CanneryBase {
|
||||
|
||||
public abstract ItemStack getIcon();
|
||||
public abstract JarScript createScript();
|
||||
}
|
||||
@ -7,6 +7,7 @@ import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.tileentity.network.TileEntityPipeBaseNT;
|
||||
import com.hbm.util.I18nUtil;
|
||||
import com.hbm.wiaj.JarScene;
|
||||
import com.hbm.wiaj.JarScript;
|
||||
import com.hbm.wiaj.WorldInAJar;
|
||||
@ -26,9 +27,14 @@ import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
||||
public class CanneryCentrifuge {
|
||||
public class CanneryCentrifuge extends CanneryBase {
|
||||
|
||||
public static JarScript createScript() {
|
||||
@Override
|
||||
public ItemStack getIcon() {
|
||||
return new ItemStack(ModBlocks.machine_gascent);
|
||||
}
|
||||
|
||||
public JarScript createScript() {
|
||||
WorldInAJar world = new WorldInAJar(9, 5, 5);
|
||||
JarScript script = new JarScript(world);
|
||||
|
||||
@ -66,8 +72,7 @@ public class CanneryCentrifuge {
|
||||
scene0.add(new ActionWait(2));
|
||||
}
|
||||
|
||||
scene0.add(new ActionCreateActor(1, new ActorFancyPanel(Minecraft.getMinecraft().fontRenderer, -15, -50, new Object[][] {{"Gas centrifuges can be supplied with fluid "
|
||||
+ "using regular fluid ducts."}}, 200)
|
||||
scene0.add(new ActionCreateActor(1, new ActorFancyPanel(Minecraft.getMinecraft().fontRenderer, -15, -50, new Object[][] {{I18nUtil.resolveKey("cannery.centrifuge.0")}}, 200)
|
||||
.setColors(0xFFFDCA88, 0xFFD57C4F, 0xFFAB4223, 0xff1A1F22).setOrientation(Orientation.BOTTOM)));
|
||||
|
||||
scene0.add(new ActionWait(60));
|
||||
@ -75,8 +80,7 @@ public class CanneryCentrifuge {
|
||||
|
||||
JarScene scene1 = new JarScene(script);
|
||||
|
||||
scene1.add(new ActionCreateActor(1, new ActorFancyPanel(Minecraft.getMinecraft().fontRenderer, -15, 10, new Object[][] {{"Most recipes require multiple centrifuges. "
|
||||
+ "The intermediate products cannot be transported via pipes."}}, 200)
|
||||
scene1.add(new ActionCreateActor(1, new ActorFancyPanel(Minecraft.getMinecraft().fontRenderer, -15, 10, new Object[][] {{I18nUtil.resolveKey("cannery.centrifuge.1")}}, 200)
|
||||
.setColors(0xFFFDCA88, 0xFFD57C4F, 0xFFAB4223, 0xff1A1F22).setOrientation(Orientation.CENTER)));
|
||||
|
||||
scene1.add(new ActionWait(60));
|
||||
@ -84,8 +88,7 @@ public class CanneryCentrifuge {
|
||||
|
||||
scene1.add(new ActionSetZoom(4, 20));
|
||||
|
||||
scene1.add(new ActionCreateActor(1, new ActorFancyPanel(Minecraft.getMinecraft().fontRenderer, 0, 40, new Object[][] {{"This side acts as a connector which "
|
||||
+ "outputs the intermediate product into an adjecent centrifuge."}}, 150)
|
||||
scene1.add(new ActionCreateActor(1, new ActorFancyPanel(Minecraft.getMinecraft().fontRenderer, 0, 40, new Object[][] {{I18nUtil.resolveKey("cannery.centrifuge.2")}}, 150)
|
||||
.setColors(0xFFFDCA88, 0xFFD57C4F, 0xFFAB4223, 0xff1A1F22).setOrientation(Orientation.LEFT)));
|
||||
|
||||
scene1.add(new ActionWait(60));
|
||||
@ -97,16 +100,14 @@ public class CanneryCentrifuge {
|
||||
scene1.add(new ActionCreateActor(1, new ActorTileEntity(new ActorGasCent(), c2)));
|
||||
scene1.add(new ActionWait(10));
|
||||
|
||||
scene1.add(new ActionCreateActor(2, new ActorFancyPanel(Minecraft.getMinecraft().fontRenderer, 0, 0, new Object[][] {{"Uranium hexafluoride can be processed with just "
|
||||
+ "two centrifuges, this however will produce Uranium fuel and Uranium-238."}}, 200)
|
||||
scene1.add(new ActionCreateActor(2, new ActorFancyPanel(Minecraft.getMinecraft().fontRenderer, 0, 0, new Object[][] {{I18nUtil.resolveKey("cannery.centrifuge.3")}}, 200)
|
||||
.setColors(0xFFFDCA88, 0xFFD57C4F, 0xFFAB4223, 0xff1A1F22).setOrientation(Orientation.CENTER)));
|
||||
|
||||
scene1.add(new ActionWait(100));
|
||||
scene1.add(new ActionRemoveActor(2));
|
||||
scene1.add(new ActionSetZoom(-2, 20));
|
||||
|
||||
scene1.add(new ActionCreateActor(2, new ActorFancyPanel(Minecraft.getMinecraft().fontRenderer, 0, 0, new Object[][] {{"Fully processing it into Uranium-235 and Uranium-238 "
|
||||
+ "requires a total of four centrifuges."}}, 200)
|
||||
scene1.add(new ActionCreateActor(2, new ActorFancyPanel(Minecraft.getMinecraft().fontRenderer, 0, 0, new Object[][] {{I18nUtil.resolveKey("cannery.centrifuge.4")}}, 200)
|
||||
.setColors(0xFFFDCA88, 0xFFD57C4F, 0xFFAB4223, 0xff1A1F22).setOrientation(Orientation.CENTER)));
|
||||
|
||||
scene1.add(new ActionWait(60));
|
||||
@ -119,7 +120,7 @@ public class CanneryCentrifuge {
|
||||
scene1.add(new ActionCreateActor(3, new ActorTileEntity(new ActorGasCent(), c4)));
|
||||
scene1.add(new ActionWait(10));
|
||||
|
||||
scene1.add(new ActionCreateActor(4, new ActorFancyPanel(Minecraft.getMinecraft().fontRenderer, 0, 0, new Object[][] {{"Some recipes also require the centrifuge speed upgrade."}}, 200)
|
||||
scene1.add(new ActionCreateActor(4, new ActorFancyPanel(Minecraft.getMinecraft().fontRenderer, 0, 0, new Object[][] {{I18nUtil.resolveKey("cannery.centrifuge.5")}}, 200)
|
||||
.setColors(0xFFFDCA88, 0xFFD57C4F, 0xFFAB4223, 0xff1A1F22).setOrientation(Orientation.CENTER)));
|
||||
|
||||
scene1.add(new ActionWait(60));
|
||||
|
||||
@ -2,6 +2,7 @@ package com.hbm.wiaj.cannery;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.render.tileentity.RenderFENSU;
|
||||
import com.hbm.util.I18nUtil;
|
||||
import com.hbm.wiaj.JarScene;
|
||||
import com.hbm.wiaj.JarScript;
|
||||
import com.hbm.wiaj.WorldInAJar;
|
||||
@ -18,11 +19,17 @@ import com.hbm.wiaj.actors.ActorFancyPanel.Orientation;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
||||
public class CanneryFEnSU {
|
||||
public class CanneryFEnSU extends CanneryBase {
|
||||
|
||||
public static JarScript createScript() {
|
||||
@Override
|
||||
public ItemStack getIcon() {
|
||||
return new ItemStack(ModBlocks.machine_fensu);
|
||||
}
|
||||
|
||||
public JarScript createScript() {
|
||||
WorldInAJar world = new WorldInAJar(11, 5, 5);
|
||||
JarScript script = new JarScript(world);
|
||||
|
||||
@ -37,22 +44,19 @@ public class CanneryFEnSU {
|
||||
fensu.setFloat("speed", 10F);
|
||||
scene0.add(new ActionCreateActor(0, new ActorTileEntity(new RenderFENSU(), fensu)));
|
||||
|
||||
scene0.add(new ActionCreateActor(1, new ActorFancyPanel(Minecraft.getMinecraft().fontRenderer, 0, -50, new Object[][] {{"The FEnSU is capable of storing absurd "
|
||||
+ "amounts of energy, over 9EHE (that's a nine followed by 18 zeros)."}}, 200)
|
||||
scene0.add(new ActionCreateActor(1, new ActorFancyPanel(Minecraft.getMinecraft().fontRenderer, 0, -50, new Object[][] {{I18nUtil.resolveKey("cannery.fensu.0")}}, 200)
|
||||
.setColors(0xFFFDCA88, 0xFFD57C4F, 0xFFAB4223, 0xff1A1F22).setOrientation(Orientation.BOTTOM)));
|
||||
scene0.add(new ActionWait(80));
|
||||
scene0.add(new ActionRemoveActor(1));
|
||||
scene0.add(new ActionWait(10));
|
||||
scene0.add(new ActionRotateBy(45, 90, 20));
|
||||
|
||||
scene0.add(new ActionCreateActor(1, new ActorFancyPanel(Minecraft.getMinecraft().fontRenderer, 0, 20, new Object[][] {{"There is only one energy connector "
|
||||
+ "which can be found on the bottom."}}, 200)
|
||||
scene0.add(new ActionCreateActor(1, new ActorFancyPanel(Minecraft.getMinecraft().fontRenderer, 0, 20, new Object[][] {{I18nUtil.resolveKey("cannery.fensu.1")}}, 200)
|
||||
.setColors(0xFFFDCA88, 0xFFD57C4F, 0xFFAB4223, 0xff1A1F22).setOrientation(Orientation.TOP)));
|
||||
scene0.add(new ActionWait(60));
|
||||
scene0.add(new ActionRemoveActor(1));
|
||||
|
||||
scene0.add(new ActionCreateActor(1, new ActorFancyPanel(Minecraft.getMinecraft().fontRenderer, 0, 20, new Object[][] {{"This is also the only place where the"
|
||||
+ " FEnSU can receive a redstone signal."}}, 200)
|
||||
scene0.add(new ActionCreateActor(1, new ActorFancyPanel(Minecraft.getMinecraft().fontRenderer, 0, 20, new Object[][] {{I18nUtil.resolveKey("cannery.fensu.2")}}, 200)
|
||||
.setColors(0xFFFDCA88, 0xFFD57C4F, 0xFFAB4223, 0xff1A1F22).setOrientation(Orientation.TOP)));
|
||||
scene0.add(new ActionWait(60));
|
||||
scene0.add(new ActionRemoveActor(1));
|
||||
|
||||
@ -6,6 +6,7 @@ import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.render.tileentity.RenderStirling;
|
||||
import com.hbm.util.I18nUtil;
|
||||
import com.hbm.wiaj.JarScene;
|
||||
import com.hbm.wiaj.JarScript;
|
||||
import com.hbm.wiaj.WorldInAJar;
|
||||
@ -18,7 +19,6 @@ import com.hbm.wiaj.actions.ActionUpdateActor;
|
||||
import com.hbm.wiaj.actions.ActionWait;
|
||||
import com.hbm.wiaj.actors.ActorFancyPanel;
|
||||
import com.hbm.wiaj.actors.ActorTileEntity;
|
||||
import com.hbm.wiaj.actors.ActorVillager;
|
||||
import com.hbm.wiaj.actors.ITileActorRenderer;
|
||||
import com.hbm.wiaj.actors.ActorFancyPanel.Orientation;
|
||||
|
||||
@ -30,9 +30,14 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.MathHelper;
|
||||
|
||||
public class CanneryFirebox {
|
||||
public class CanneryFirebox extends CanneryBase {
|
||||
|
||||
public static JarScript createScript() {
|
||||
@Override
|
||||
public ItemStack getIcon() {
|
||||
return new ItemStack(ModBlocks.heater_firebox);
|
||||
}
|
||||
|
||||
public JarScript createScript() {
|
||||
|
||||
WorldInAJar world = new WorldInAJar(5, 5, 5);
|
||||
JarScript script = new JarScript(world);
|
||||
@ -51,17 +56,16 @@ public class CanneryFirebox {
|
||||
scene0.add(new ActionWait(8));
|
||||
|
||||
NBTTagCompound firebox = new NBTTagCompound(); firebox.setDouble("x", 2); firebox.setDouble("y", 1); firebox.setDouble("z", 2); firebox.setInteger("rotation", 5);
|
||||
scene0.add(new ActionCreateActor(0, new ActorTileEntity(new ActorSILEX(), firebox)));
|
||||
scene0.add(new ActionCreateActor(0, new ActorTileEntity(new ActorFirebox(), firebox)));
|
||||
|
||||
scene0.add(new ActionWait(10));
|
||||
|
||||
scene0.add(new ActionCreateActor(1, new ActorFancyPanel(Minecraft.getMinecraft().fontRenderer, 0, -10, new Object[][] {{"The firebox burns flammable items to generate heat."}}, 150)
|
||||
scene0.add(new ActionCreateActor(1, new ActorFancyPanel(Minecraft.getMinecraft().fontRenderer, 0, -10, new Object[][] {{I18nUtil.resolveKey("cannery.firebox.0")}}, 150)
|
||||
.setColors(0xFFFDCA88, 0xFFD57C4F, 0xFFAB4223, 0xff1A1F22).setOrientation(Orientation.BOTTOM)));
|
||||
|
||||
scene0.add(new ActionWait(60));
|
||||
|
||||
scene0.add(new ActionCreateActor(1, new ActorFancyPanel(Minecraft.getMinecraft().fontRenderer, 0, -10, new Object[][] {{"It can burn any flammable item, although higher quality "
|
||||
+ "fuels such as coal, coke and solid fuel burn longer and hotter."}}, 250)
|
||||
scene0.add(new ActionCreateActor(1, new ActorFancyPanel(Minecraft.getMinecraft().fontRenderer, 0, -10, new Object[][] {{I18nUtil.resolveKey("cannery.firebox.1")}}, 250)
|
||||
.setColors(0xFFFDCA88, 0xFFD57C4F, 0xFFAB4223, 0xff1A1F22).setOrientation(Orientation.BOTTOM)));
|
||||
|
||||
scene0.add(new ActionWait(60));
|
||||
@ -92,14 +96,12 @@ public class CanneryFirebox {
|
||||
scene0.add(new ActionUpdateActor(0, "open", false));
|
||||
scene0.add(new ActionWait(30));
|
||||
|
||||
scene0.add(new ActionCreateActor(1, new ActorFancyPanel(Minecraft.getMinecraft().fontRenderer, 0, -10, new Object[][] {{"Heat is given off by the copper contact at the "
|
||||
+ "top of the firebox. Machines with an identical contact on the bottom can receive heat by being placed on top of the firebox."}}, 250)
|
||||
scene0.add(new ActionCreateActor(1, new ActorFancyPanel(Minecraft.getMinecraft().fontRenderer, 0, -10, new Object[][] {{I18nUtil.resolveKey("cannery.firebox.2")}}, 250)
|
||||
.setColors(0xFFFDCA88, 0xFFD57C4F, 0xFFAB4223, 0xff1A1F22).setOrientation(Orientation.BOTTOM)));
|
||||
|
||||
scene0.add(new ActionWait(80));
|
||||
|
||||
scene0.add(new ActionCreateActor(1, new ActorFancyPanel(Minecraft.getMinecraft().fontRenderer, 0, -10, new Object[][] {{"If heat isn't being used up and the heat buffer "
|
||||
+ "becomes full, the firebox will shut off to prevent wasting of fuel."}}, 250)
|
||||
scene0.add(new ActionCreateActor(1, new ActorFancyPanel(Minecraft.getMinecraft().fontRenderer, 0, -10, new Object[][] {{I18nUtil.resolveKey("cannery.firebox.3")}}, 250)
|
||||
.setColors(0xFFFDCA88, 0xFFD57C4F, 0xFFAB4223, 0xff1A1F22).setOrientation(Orientation.BOTTOM)));
|
||||
|
||||
scene0.add(new ActionWait(60));
|
||||
@ -109,12 +111,6 @@ public class CanneryFirebox {
|
||||
JarScene scene1 = new JarScene(script);
|
||||
|
||||
NBTTagCompound stirling = new NBTTagCompound();
|
||||
/*stirling.setDouble("x", 2.5);
|
||||
stirling.setDouble("y", 2);
|
||||
stirling.setDouble("z", 2.5);
|
||||
stirling.setDouble("yaw", 180);
|
||||
stirling.setBoolean("hasCog", true);
|
||||
scene1.add(new ActionCreateActor(1, new ActorVillager(stirling)));*/
|
||||
stirling.setDouble("x", 2);
|
||||
stirling.setDouble("y", 2);
|
||||
stirling.setDouble("z", 2);
|
||||
@ -124,8 +120,7 @@ public class CanneryFirebox {
|
||||
scene1.add(new ActionUpdateActor(1, "speed", 0F));
|
||||
|
||||
scene1.add(new ActionWait(10));
|
||||
scene1.add(new ActionCreateActor(2, new ActorFancyPanel(Minecraft.getMinecraft().fontRenderer, 0, -45, new Object[][] {{"One such machine is the stirling engine, which will "
|
||||
+ "turn heat directly into energy."}}, 250)
|
||||
scene1.add(new ActionCreateActor(2, new ActorFancyPanel(Minecraft.getMinecraft().fontRenderer, 0, -45, new Object[][] {{I18nUtil.resolveKey("cannery.firebox.4")}}, 250)
|
||||
.setColors(0xFFFDCA88, 0xFFD57C4F, 0xFFAB4223, 0xff1A1F22).setOrientation(Orientation.BOTTOM)));
|
||||
scene1.add(new ActionWait(60));
|
||||
scene1.add(new ActionRemoveActor(2));
|
||||
@ -151,7 +146,7 @@ public class CanneryFirebox {
|
||||
return script;
|
||||
}
|
||||
|
||||
public static class ActorSILEX implements ITileActorRenderer {
|
||||
public static class ActorFirebox implements ITileActorRenderer {
|
||||
|
||||
@Override
|
||||
public void renderActor(int ticks, float interp, NBTTagCompound data) {
|
||||
|
||||
@ -13,6 +13,7 @@ import com.hbm.render.util.BeamPronter;
|
||||
import com.hbm.render.util.BeamPronter.EnumBeamType;
|
||||
import com.hbm.render.util.BeamPronter.EnumWaveType;
|
||||
import com.hbm.tileentity.network.TileEntityPipeBaseNT;
|
||||
import com.hbm.util.I18nUtil;
|
||||
import com.hbm.wiaj.JarScene;
|
||||
import com.hbm.wiaj.JarScript;
|
||||
import com.hbm.wiaj.WorldInAJar;
|
||||
@ -34,9 +35,14 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.Vec3;
|
||||
|
||||
public class CannerySILEX {
|
||||
public class CannerySILEX extends CanneryBase{
|
||||
|
||||
public static JarScript createScript() {
|
||||
@Override
|
||||
public ItemStack getIcon() {
|
||||
return new ItemStack(ModBlocks.machine_silex);
|
||||
}
|
||||
|
||||
public JarScript createScript() {
|
||||
WorldInAJar world = new WorldInAJar(17, 5, 5);
|
||||
JarScript script = new JarScript(world);
|
||||
|
||||
@ -62,8 +68,7 @@ public class CannerySILEX {
|
||||
fel.setInteger("length", 11);
|
||||
scene0.add(new ActionCreateActor(0, new ActorTileEntity(new ActorFEL(), fel)));
|
||||
|
||||
scene0.add(new ActionCreateActor(3, new ActorFancyPanel(Minecraft.getMinecraft().fontRenderer, 15, -5, new Object[][] {{"The Free Electron Laser (FEL) uses energy and a "
|
||||
+ "laser crystal to create a powerful laser beam."}}, 100)
|
||||
scene0.add(new ActionCreateActor(3, new ActorFancyPanel(Minecraft.getMinecraft().fontRenderer, 15, -5, new Object[][] {{I18nUtil.resolveKey("cannery.silex.0")}}, 100)
|
||||
.setColors(0xFFFDCA88, 0xFFD57C4F, 0xFFAB4223, 0xff1A1F22).setOrientation(Orientation.LEFT)));
|
||||
|
||||
scene0.add(new ActionWait(80));
|
||||
@ -102,7 +107,7 @@ public class CannerySILEX {
|
||||
scene0.add(new ActionWait(5));
|
||||
}
|
||||
|
||||
scene0.add(new ActionCreateActor(3, new ActorFancyPanel(Minecraft.getMinecraft().fontRenderer, -7, -15, new Object[][] {{"Be careful, as the laser will burn/melt through weaker blocks..."}}, 150)
|
||||
scene0.add(new ActionCreateActor(3, new ActorFancyPanel(Minecraft.getMinecraft().fontRenderer, -7, -15, new Object[][] {{I18nUtil.resolveKey("cannery.silex.1")}}, 150)
|
||||
.setColors(0xFFFDCA88, 0xFFD57C4F, 0xFFAB4223, 0xff1A1F22).setOrientation(Orientation.BOTTOM)));
|
||||
scene0.add(new ActionUpdateActor(0, "mode", 3));
|
||||
scene0.add(new ActionUpdateActor(0, "length", 4));
|
||||
@ -126,7 +131,7 @@ public class CannerySILEX {
|
||||
scene0.add(new ActionWait(5));
|
||||
}
|
||||
|
||||
scene0.add(new ActionCreateActor(3, new ActorFancyPanel(Minecraft.getMinecraft().fontRenderer, -7, -15, new Object[][] {{"...but not blast-proof ones."}}, 150)
|
||||
scene0.add(new ActionCreateActor(3, new ActorFancyPanel(Minecraft.getMinecraft().fontRenderer, -7, -15, new Object[][] {{I18nUtil.resolveKey("cannery.silex.2")}}, 150)
|
||||
.setColors(0xFFFDCA88, 0xFFD57C4F, 0xFFAB4223, 0xff1A1F22).setOrientation(Orientation.BOTTOM)));
|
||||
scene0.add(new ActionWait(40));
|
||||
scene0.add(new ActionRemoveActor(3));
|
||||
@ -156,20 +161,17 @@ public class CannerySILEX {
|
||||
|
||||
scene1.add(new ActionWait(20));
|
||||
|
||||
scene1.add(new ActionCreateActor(3, new ActorFancyPanel(Minecraft.getMinecraft().fontRenderer, 42, -18, new Object[][] {{"The FEL is used to power the Laser Isotope "
|
||||
+ "Separation Chamber (SILEX). The FEL and SILEX have to be at least two blocks apart."}}, 150)
|
||||
scene1.add(new ActionCreateActor(3, new ActorFancyPanel(Minecraft.getMinecraft().fontRenderer, 42, -18, new Object[][] {{I18nUtil.resolveKey("cannery.silex.3")}}, 150)
|
||||
.setColors(0xFFFDCA88, 0xFFD57C4F, 0xFFAB4223, 0xff1A1F22).setOrientation(Orientation.BOTTOM)));
|
||||
|
||||
scene1.add(new ActionWait(80));
|
||||
|
||||
scene1.add(new ActionCreateActor(3, new ActorFancyPanel(Minecraft.getMinecraft().fontRenderer, 60, 32, new Object[][] {{"The laser has to enter through the glass openings "
|
||||
+ "of the SILEX. Aiming it wrong could destroy it."}}, 150)
|
||||
scene1.add(new ActionCreateActor(3, new ActorFancyPanel(Minecraft.getMinecraft().fontRenderer, 60, 32, new Object[][] {{I18nUtil.resolveKey("cannery.silex.4")}}, 150)
|
||||
.setColors(0xFFFDCA88, 0xFFD57C4F, 0xFFAB4223, 0xff1A1F22).setOrientation(Orientation.RIGHT)));
|
||||
|
||||
scene1.add(new ActionWait(60));
|
||||
|
||||
scene1.add(new ActionCreateActor(3, new ActorFancyPanel(Minecraft.getMinecraft().fontRenderer, 12, 32, new Object[][] {{"The openings on the sides can be used to connect "
|
||||
+ "fluid ducts to the SILEX."}}, 150)
|
||||
scene1.add(new ActionCreateActor(3, new ActorFancyPanel(Minecraft.getMinecraft().fontRenderer, 12, 32, new Object[][] {{I18nUtil.resolveKey("cannery.silex.5")}}, 150)
|
||||
.setColors(0xFFFDCA88, 0xFFD57C4F, 0xFFAB4223, 0xff1A1F22).setOrientation(Orientation.RIGHT)));
|
||||
|
||||
scene1.add(new ActionWait(60));
|
||||
@ -192,20 +194,17 @@ public class CannerySILEX {
|
||||
scene1.add(new ActionUpdateActor(0, "mode", 3));
|
||||
scene1.add(new ActionWait(10));
|
||||
|
||||
scene1.add(new ActionCreateActor(3, new ActorFancyPanel(Minecraft.getMinecraft().fontRenderer, 42, -18, new Object[][] {{"In addition to the two connectors on the sides, "
|
||||
+ "there is a third hidden connector at the bottom from which items can be extracted."}}, 150)
|
||||
scene1.add(new ActionCreateActor(3, new ActorFancyPanel(Minecraft.getMinecraft().fontRenderer, 42, -18, new Object[][] {{I18nUtil.resolveKey("cannery.silex.6")}}, 150)
|
||||
.setColors(0xFFFDCA88, 0xFFD57C4F, 0xFFAB4223, 0xff1A1F22).setOrientation(Orientation.BOTTOM)));
|
||||
|
||||
scene1.add(new ActionWait(80));
|
||||
|
||||
scene1.add(new ActionCreateActor(3, new ActorFancyPanel(Minecraft.getMinecraft().fontRenderer, 42, -18, new Object[][] {{"Each recipe requires a specific laser type. "
|
||||
+ "Using a stronger type than required will process items faster."}}, 150)
|
||||
scene1.add(new ActionCreateActor(3, new ActorFancyPanel(Minecraft.getMinecraft().fontRenderer, 42, -18, new Object[][] {{I18nUtil.resolveKey("cannery.silex.7")}}, 150)
|
||||
.setColors(0xFFFDCA88, 0xFFD57C4F, 0xFFAB4223, 0xff1A1F22).setOrientation(Orientation.BOTTOM)));
|
||||
|
||||
scene1.add(new ActionWait(60));
|
||||
|
||||
scene1.add(new ActionCreateActor(3, new ActorFancyPanel(Minecraft.getMinecraft().fontRenderer, -7, -15, new Object[][] {{"One FEL can supply up to 5 SILEX. Each SILEX has "
|
||||
+ "to be one block apart from one another."}}, 150)
|
||||
scene1.add(new ActionCreateActor(3, new ActorFancyPanel(Minecraft.getMinecraft().fontRenderer, -7, -15, new Object[][] {{I18nUtil.resolveKey("cannery.silex.8")}}, 150)
|
||||
.setColors(0xFFFDCA88, 0xFFD57C4F, 0xFFAB4223, 0xff1A1F22).setOrientation(Orientation.BOTTOM)));
|
||||
|
||||
scene1.add(new ActionWait(60));
|
||||
|
||||
188
src/main/java/com/hbm/wiaj/cannery/CanneryStirling.java
Normal file
@ -0,0 +1,188 @@
|
||||
package com.hbm.wiaj.cannery;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.render.tileentity.RenderStirling;
|
||||
import com.hbm.util.I18nUtil;
|
||||
import com.hbm.wiaj.JarScene;
|
||||
import com.hbm.wiaj.JarScript;
|
||||
import com.hbm.wiaj.WorldInAJar;
|
||||
import com.hbm.wiaj.actions.ActionCreateActor;
|
||||
import com.hbm.wiaj.actions.ActionRemoveActor;
|
||||
import com.hbm.wiaj.actions.ActionSetBlock;
|
||||
import com.hbm.wiaj.actions.ActionSetTile;
|
||||
import com.hbm.wiaj.actions.ActionSetZoom;
|
||||
import com.hbm.wiaj.actions.ActionUpdateActor;
|
||||
import com.hbm.wiaj.actions.ActionWait;
|
||||
import com.hbm.wiaj.actors.ActorFancyPanel;
|
||||
import com.hbm.wiaj.actors.ActorTileEntity;
|
||||
import com.hbm.wiaj.actors.ITileActorRenderer;
|
||||
import com.hbm.wiaj.actors.ActorFancyPanel.Orientation;
|
||||
import com.hbm.wiaj.cannery.CanneryFirebox.ActorFirebox;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
||||
public class CanneryStirling extends CanneryBase {
|
||||
|
||||
@Override
|
||||
public ItemStack getIcon() {
|
||||
return new ItemStack(ModBlocks.machine_stirling);
|
||||
}
|
||||
|
||||
@Override
|
||||
public JarScript createScript() {
|
||||
|
||||
WorldInAJar world = new WorldInAJar(5, 5, 5);
|
||||
JarScript script = new JarScript(world);
|
||||
|
||||
JarScene scene0 = new JarScene(script);
|
||||
|
||||
scene0.add(new ActionSetZoom(3, 0));
|
||||
|
||||
for(int x = world.sizeX - 1; x >= 0 ; x--) {
|
||||
for(int z = 0; z < world.sizeZ; z++) {
|
||||
scene0.add(new ActionSetBlock(x, 0, z, Blocks.brick_block));
|
||||
}
|
||||
scene0.add(new ActionWait(2));
|
||||
}
|
||||
|
||||
scene0.add(new ActionWait(8));
|
||||
|
||||
NBTTagCompound firebox = new NBTTagCompound(); firebox.setDouble("x", 2); firebox.setDouble("y", 1); firebox.setDouble("z", 2); firebox.setInteger("rotation", 5);
|
||||
scene0.add(new ActionCreateActor(0, new ActorTileEntity(new ActorFirebox(), firebox)));
|
||||
|
||||
scene0.add(new ActionWait(10));
|
||||
|
||||
NBTTagCompound stirling = new NBTTagCompound();
|
||||
stirling.setDouble("x", 2);
|
||||
stirling.setDouble("y", 2);
|
||||
stirling.setDouble("z", 2);
|
||||
stirling.setInteger("rotation", 2);
|
||||
stirling.setInteger("type", 0);
|
||||
stirling.setBoolean("hasCog", true);
|
||||
scene0.add(new ActionCreateActor(1, new ActorTileEntity(new RenderStirling(), stirling)));
|
||||
scene0.add(new ActionUpdateActor(1, "speed", 0F));
|
||||
scene0.add(new ActionUpdateActor(1, "y", 2D));
|
||||
|
||||
scene0.add(new ActionWait(10));
|
||||
|
||||
scene0.add(new ActionCreateActor(2, new ActorFancyPanel(Minecraft.getMinecraft().fontRenderer, 0, -45, new Object[][] {{I18nUtil.resolveKey("cannery.stirling.0")}}, 250)
|
||||
.setColors(0xFFFDCA88, 0xFFD57C4F, 0xFFAB4223, 0xff1A1F22).setOrientation(Orientation.BOTTOM)));
|
||||
|
||||
scene0.add(new ActionWait(60));
|
||||
|
||||
scene0.add(new ActionCreateActor(2, new ActorFancyPanel(Minecraft.getMinecraft().fontRenderer, 0, 40, new Object[][] {{I18nUtil.resolveKey("cannery.stirling.1")}}, 250)
|
||||
.setColors(0xFFFDCA88, 0xFFD57C4F, 0xFFAB4223, 0xff1A1F22).setOrientation(Orientation.BOTTOM)));
|
||||
|
||||
scene0.add(new ActionWait(60));
|
||||
scene0.add(new ActionRemoveActor(2));
|
||||
scene0.add(new ActionWait(5));
|
||||
scene0.add(new ActionUpdateActor(0, "open", true));
|
||||
scene0.add(new ActionWait(30));
|
||||
scene0.add(new ActionUpdateActor(0, "isOn", true));
|
||||
scene0.add(new ActionCreateActor(2, new ActorFancyPanel(Minecraft.getMinecraft().fontRenderer, -50, 40, new Object[][] {{new ItemStack(Items.coal)}}, 0)
|
||||
.setColors(0xFFFDCA88, 0xFFD57C4F, 0xFFAB4223, 0xff1A1F22).setOrientation(Orientation.RIGHT)));
|
||||
scene0.add(new ActionWait(20));
|
||||
scene0.add(new ActionRemoveActor(2));
|
||||
scene0.add(new ActionWait(10));
|
||||
scene0.add(new ActionUpdateActor(0, "open", false));
|
||||
scene0.add(new ActionWait(30));
|
||||
|
||||
for(int i = 0; i < 60; i++) {
|
||||
scene0.add(new ActionUpdateActor(1, "speed", i / 5F));
|
||||
scene0.add(new ActionWait(1));
|
||||
}
|
||||
|
||||
scene0.add(new ActionWait(20));
|
||||
|
||||
scene0.add(new ActionSetTile(1, 2, 2, new Dummies.JarDummyConnector()));
|
||||
scene0.add(new ActionSetTile(0, 2, 2, new Dummies.JarDummyConnector()));
|
||||
scene0.add(new ActionSetTile(0, 1, 2, new Dummies.JarDummyConnector()));
|
||||
scene0.add(new ActionSetTile(0, 1, 3, new Dummies.JarDummyConnector()));
|
||||
scene0.add(new ActionSetBlock(0, 2, 2, ModBlocks.red_cable));
|
||||
scene0.add(new ActionSetBlock(0, 1, 2, ModBlocks.red_cable));
|
||||
scene0.add(new ActionSetBlock(0, 1, 3, ModBlocks.machine_detector, 0));
|
||||
scene0.add(new ActionWait(10));
|
||||
scene0.add(new ActionSetBlock(0, 1, 3, ModBlocks.machine_detector, 1));
|
||||
scene0.add(new ActionWait(40));
|
||||
|
||||
JarScene scene1 = new JarScene(script);
|
||||
|
||||
scene1.add(new ActionCreateActor(2, new ActorFancyPanel(Minecraft.getMinecraft().fontRenderer, 0, -45, new Object[][] {{I18nUtil.resolveKey("cannery.stirling.2")}}, 250)
|
||||
.setColors(0xFFFDCA88, 0xFFD57C4F, 0xFFAB4223, 0xff1A1F22).setOrientation(Orientation.BOTTOM)));
|
||||
scene1.add(new ActionWait(60));
|
||||
scene1.add(new ActionRemoveActor(2));
|
||||
|
||||
NBTTagCompound burner = new NBTTagCompound(); burner.setDouble("x", 2); burner.setDouble("y", 1); burner.setDouble("z", 2); burner.setInteger("rotation", 5);
|
||||
scene1.add(new ActionCreateActor(0, new ActorTileEntity(new ActorBurner(), burner)));
|
||||
scene1.add(new ActionUpdateActor(1, "y", 3D));
|
||||
scene1.add(new ActionSetTile(1, 2, 2, null));
|
||||
scene1.add(new ActionSetTile(1, 3, 2, new Dummies.JarDummyConnector()));
|
||||
scene1.add(new ActionSetTile(0, 3, 2, new Dummies.JarDummyConnector()));
|
||||
scene1.add(new ActionSetBlock(0, 3, 2, ModBlocks.red_cable));
|
||||
|
||||
for(int i = 0; i < 100; i++) {
|
||||
scene1.add(new ActionUpdateActor(1, "speed", (i + 60) / 5F));
|
||||
scene1.add(new ActionWait(1));
|
||||
}
|
||||
|
||||
scene1.add(new ActionWait(20));
|
||||
scene1.add(new ActionUpdateActor(1, "hasCog", false));
|
||||
scene1.add(new ActionSetBlock(0, 1, 3, ModBlocks.machine_detector, 0));
|
||||
|
||||
for(int i = 0; i < 160; i += 10) {
|
||||
scene1.add(new ActionUpdateActor(1, "speed", (160 - i) / 5F));
|
||||
scene1.add(new ActionWait(1));
|
||||
}
|
||||
scene1.add(new ActionUpdateActor(1, "speed", 0F));
|
||||
|
||||
scene1.add(new ActionWait(20));
|
||||
|
||||
scene1.add(new ActionCreateActor(2, new ActorFancyPanel(Minecraft.getMinecraft().fontRenderer, 0, -45, new Object[][] {{I18nUtil.resolveKey("cannery.stirling.3")}}, 250)
|
||||
.setColors(0xFFFDCA88, 0xFFD57C4F, 0xFFAB4223, 0xff1A1F22).setOrientation(Orientation.BOTTOM)));
|
||||
scene1.add(new ActionWait(60));
|
||||
scene1.add(new ActionRemoveActor(2));
|
||||
scene1.add(new ActionWait(20));
|
||||
scene1.add(new ActionUpdateActor(1, "hasCog", true));
|
||||
scene1.add(new ActionUpdateActor(1, "type", 1));
|
||||
scene1.add(new ActionWait(20));
|
||||
|
||||
for(int i = 0; i < 60; i++) {
|
||||
scene1.add(new ActionUpdateActor(1, "speed", i / 5F));
|
||||
scene1.add(new ActionWait(1));
|
||||
}
|
||||
|
||||
scene1.add(new ActionSetBlock(0, 1, 3, ModBlocks.machine_detector, 1));
|
||||
scene1.add(new ActionWait(100));
|
||||
|
||||
script.addScene(scene0).addScene(scene1);
|
||||
return script;
|
||||
}
|
||||
|
||||
public static class ActorBurner implements ITileActorRenderer {
|
||||
|
||||
@Override
|
||||
public void renderActor(int ticks, float interp, NBTTagCompound data) {
|
||||
double x = data.getDouble("x");
|
||||
double y = data.getDouble("y");
|
||||
double z = data.getDouble("z");
|
||||
|
||||
GL11.glTranslated(x + 0.5D, y, z + 0.5D);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
|
||||
ITileActorRenderer.bindTexture(ResourceManager.heater_oilburner_tex);
|
||||
ResourceManager.heater_oilburner.renderAll();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateActor(int ticks, NBTTagCompound data) { }
|
||||
}
|
||||
}
|
||||
21
src/main/java/com/hbm/wiaj/cannery/Jars.java
Normal file
@ -0,0 +1,21 @@
|
||||
package com.hbm.wiaj.cannery;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.inventory.RecipesCommon.ComparableStack;
|
||||
|
||||
public class Jars {
|
||||
|
||||
public static HashMap<ComparableStack, CanneryBase> canneries = new HashMap();
|
||||
|
||||
static {
|
||||
canneries.put(new ComparableStack(ModBlocks.heater_firebox), new CanneryFirebox());
|
||||
canneries.put(new ComparableStack(ModBlocks.machine_stirling), new CanneryStirling());
|
||||
canneries.put(new ComparableStack(ModBlocks.machine_stirling_steel), new CanneryStirling());
|
||||
canneries.put(new ComparableStack(ModBlocks.machine_gascent), new CanneryCentrifuge());
|
||||
canneries.put(new ComparableStack(ModBlocks.machine_fensu), new CanneryFEnSU());
|
||||
canneries.put(new ComparableStack(ModBlocks.machine_fel), new CannerySILEX());
|
||||
canneries.put(new ComparableStack(ModBlocks.machine_silex), new CannerySILEX());
|
||||
}
|
||||
}
|
||||
@ -1,11 +1,17 @@
|
||||
package com.hbm.world.feature;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.blocks.generic.BlockDeadPlant.EnumDeadPlantType;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockBush;
|
||||
import net.minecraft.block.BlockDoublePlant;
|
||||
import net.minecraft.block.BlockFlower;
|
||||
import net.minecraft.block.BlockTallGrass;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.IPlantable;
|
||||
|
||||
public class OilSpot {
|
||||
|
||||
@ -17,9 +23,32 @@ public class OilSpot {
|
||||
int rY = world.getHeightValue(rX, rZ);
|
||||
|
||||
for(int y = rY; y > rY - 4; y--) {
|
||||
|
||||
|
||||
Block below = world.getBlock(rX, y - 1, rZ);
|
||||
Block ground = world.getBlock(rX, y, rZ);
|
||||
|
||||
if(below.isNormalCube() && ground != ModBlocks.plant_dead) {
|
||||
if(ground instanceof BlockTallGrass) {
|
||||
if(world.rand.nextInt(10) == 0) {
|
||||
if(world.getBlockMetadata(rX, y + 1, rZ) == 2) {
|
||||
world.setBlock(rX, y, rZ, ModBlocks.plant_dead, EnumDeadPlantType.FERN.ordinal(), 3);
|
||||
} else {
|
||||
world.setBlock(rX, y, rZ, ModBlocks.plant_dead, EnumDeadPlantType.GRASS.ordinal(), 3);
|
||||
}
|
||||
} else {
|
||||
world.setBlock(rX, y, rZ, Blocks.air);
|
||||
}
|
||||
} else if(ground instanceof BlockFlower) {
|
||||
world.setBlock(rX, y, rZ, ModBlocks.plant_dead, EnumDeadPlantType.FLOWER.ordinal(), 3);
|
||||
} else if(ground instanceof BlockDoublePlant) {
|
||||
world.setBlock(rX, y, rZ, ModBlocks.plant_dead, EnumDeadPlantType.BIGFLOWER.ordinal(), 3);
|
||||
} else if(ground instanceof BlockBush) {
|
||||
world.setBlock(rX, y, rZ, ModBlocks.plant_dead, EnumDeadPlantType.GENERIC.ordinal(), 3);
|
||||
} else if(ground instanceof IPlantable) {
|
||||
world.setBlock(rX, y, rZ, ModBlocks.plant_dead, EnumDeadPlantType.GENERIC.ordinal(), 3);
|
||||
}
|
||||
}
|
||||
|
||||
if(ground == Blocks.grass || ground == Blocks.dirt) {
|
||||
world.setBlock(rX, y, rZ, world.rand.nextInt(10) == 0 ? ModBlocks.dirt_oily : ModBlocks.dirt_dead);
|
||||
break;
|
||||
|
||||
@ -128,6 +128,40 @@ bomb.triggered=Erfolgreich ausgelöst!
|
||||
|
||||
book.test.page1=Testseite 1
|
||||
|
||||
cannery.f1=[ Drücke F1 für Hilfe ]
|
||||
|
||||
cannery.centrifuge.0=Gaszentrifugen können mit Flüssigkeitsrohren versorgt werden.
|
||||
cannery.centrifuge.1=Die meisten Rezepte benötigen mehrere Zentrifugen, Zwischenprodukte können nicht mit Rohren transportiert werden.
|
||||
cannery.centrifuge.2=Diese Seite dient als Verbindung, die Zwischenprodukte in anliegende Zentrifugen überträgt.
|
||||
cannery.centrifuge.3=Uranhexafluorid kann mit nur zwei Zentrifugen verarbeitet werden, jedoch erzeugt das Urankernbrennstoff und Uran-238.
|
||||
cannery.centrifuge.4=Mit vier Zentrifugen kann es vollständig in Uran-235 und Uran238 verarbeitet werden.
|
||||
cannery.centrifuge.5=Manche Rezepte benötigen das Zentrifugen-Geschwingidkeitsupgrade.
|
||||
|
||||
cannery.fensu.0=Die FEnSU kann absurde Mengen Energie speichern, über 9EHE (eine Neun gefolgt von 18 Nullen).
|
||||
cannery.fensu.1=Es gibt nur einen Kontakt auf der Unterseite.
|
||||
cannery.fensu.2=Das ist auch der einzige Ort, an dem die FEnSU ein Redstone-Signal empfangen kann.
|
||||
|
||||
cannery.firebox.0=Die Feuerbüchse verbrennt Gegenstände, um Hitze zu erzeugen.
|
||||
cannery.firebox.1=Sie kann alle brennbaren Gegenstände verwenden, aber hochwertigere Brennstoffe wie Kohle, Koks oder Festbrennstoff brennen länger und heißer.
|
||||
cannery.firebox.2=Hitze wird von dem Kupferkontakt an der Oberseite abgegeben. Maschinen mit einem identischen Kontakt an der Unterseite können Hitze annehmen, wenn sie darauf platziert werden.
|
||||
cannery.firebox.3=Wenn die Hitze nicht verbraucht wird hält die Feuerbüchse an, um keinen Brennstoff zu verschwenden.
|
||||
cannery.firebox.4=Eine solche Maschine ist der Stirlingmotor, welcher aus Hitze direkt Energie erzeugt.
|
||||
|
||||
cannery.silex.0=Der Freieilektonenlaser (FEL) verwendet Energie und einen Laserkristall um einen starken Laserstrahl zu erzeugen.
|
||||
cannery.silex.1=Vorsicht, der Laser kann sich durch schwächere Blöcke hindurchbrennen...
|
||||
cannery.silex.2=...aber nicht durch sprengsichere.
|
||||
cannery.silex.3=Der FEL betreibt den Laser-Isotopentrenner (SILEX). FEL und SILEX müssen dabei mindestens zwei Blöcke Abstand haben.
|
||||
cannery.silex.4=Der Laser muss durch die kleinen Fenster des SILEX durch. Eine falsche Ausrichtung könnte das SILEX zerstören.
|
||||
cannery.silex.5=Die Öffnungen an den Seiten können verwendet werden, um das SILEX mit Flüssigkeit zu versorgen.
|
||||
cannery.silex.6=Zusätzlich zu den zwei Öffnungen gibt es an der Unterseite eine versteckte Verbindung, über der Gegenstände herausgenommen werden kann.
|
||||
cannery.silex.7=Jedes Rezept benötigt einen speziellen Laser-Typ. Stärkere Typen beschleunigen den Vorgang.
|
||||
cannery.silex.8=Ein FEL kann bis zu fünf SILEX betreiben. Jedes SILEX muss einen Block Abstand halten.
|
||||
|
||||
cannery.stirling.0=Der Stirlingmotor verwendet Hitze aus einer externen Quelle um Energie zu erzeugen.
|
||||
cannery.stirling.1=Er muss auf einem Hitzeerzeuger platziert werden, zum Beispiel der Feuerbüchse.
|
||||
cannery.stirling.2=Die Hitze die maximal verwendet werden kann ist limitiert, Übergeschwindigkeit kann zu katastrophalen Fehlfunktionen führen.
|
||||
cannery.stirling.3=Die verbesserte Version kann wesentlich mehr Hitze aufnehmen, ohne kaputt zu werden.
|
||||
|
||||
chem.ARSENIC=Arsenextraktion
|
||||
chem.ASPHALT=Asphaltherstellung
|
||||
chem.BAKELITE=Bakelitherstellung
|
||||
@ -2824,6 +2858,7 @@ item.upgrade_ejector_3.name=Auswurfupgrade Mk.III
|
||||
item.upgrade_fortune_1.name=Glückupgrade Mk.I
|
||||
item.upgrade_fortune_2.name=Glückupgrade Mk.II
|
||||
item.upgrade_fortune_3.name=Glückupgrade Mk.III
|
||||
item.upgrade_gc_speed.name=Gaszentrifugen-Geschwindigkeitsupgrade
|
||||
item.upgrade_health.name=Kraftfeld-Resistenzupgrade
|
||||
item.upgrade_nullifier.name=Müllvernichter-Upgrade
|
||||
item.upgrade_overdrive_1.name=Overdrive-Upgrade Mk.I
|
||||
@ -3599,6 +3634,7 @@ tile.pink_log.name=Pinkes Holz
|
||||
tile.pink_planks.name=Pinke Holzbretter
|
||||
tile.pink_slab.name=Pinke Holzstufe
|
||||
tile.pink_stairs.name=Pinke Holztreppen
|
||||
tile.plant_dead.name=Tote Pflanze
|
||||
tile.plant_flower.foxglove.name=Roter Fingerhut
|
||||
tile.plant_flower.nightshade.name=Schwarze Tollkirsche
|
||||
tile.plant_flower.tobacco.name=Tabakpflanze
|
||||
|
||||
@ -314,6 +314,40 @@ book.starter.page18=vær is just a guy who has been trapped in the grey void fea
|
||||
#book.rbmk.title16=Meltdown
|
||||
#book.rbmk.page16=§4§lAvoid.
|
||||
|
||||
cannery.f1=[ Press F1 for help ]
|
||||
|
||||
cannery.centrifuge.0=Gas centrifuges can be supplied with fluid using regular fluid ducts.
|
||||
cannery.centrifuge.1=Most recipes require multiple centrifuges. The intermediate products cannot be transported via pipes.
|
||||
cannery.centrifuge.2=This side acts as a connector which outputs the intermediate product into an adjacent centrifuge.
|
||||
cannery.centrifuge.3=Uranium hexafluoride can be processed with just two centrifuges, this however will produce Uranium fuel and Uranium-238.
|
||||
cannery.centrifuge.4=Fully processing it into Uranium-235 and Uranium-238 requires a total of four centrifuges.
|
||||
cannery.centrifuge.5=Some recipes also require the centrifuge overclocking upgrade.
|
||||
|
||||
cannery.fensu.0=The FEnSU is capable of storing absurd amounts of energy, over 9EHE (that's a nine followed by 18 zeros).
|
||||
cannery.fensu.1=There is only one energy connector which can be found on the bottom.
|
||||
cannery.fensu.2=This is also the only place where the FEnSU can receive a redstone signal.
|
||||
|
||||
cannery.firebox.0=The firebox burns flammable items to generate heat.
|
||||
cannery.firebox.1=It can burn any flammable item, although higher quality fuels such as coal, coke and solid fuel burn longer and hotter.
|
||||
cannery.firebox.2=Heat is given off by the copper contact at the top of the firebox. Machines with an identical contact on the bottom can receive heat by being placed on top of the firebox.
|
||||
cannery.firebox.3=If heat isn't being used up and the heat buffer becomes full, the firebox will shut off to prevent wasting of fuel.
|
||||
cannery.firebox.4=One such machine is the stirling engine, which will turn heat directly into energy.
|
||||
|
||||
cannery.silex.0=The Free Electron Laser (FEL) uses energy and a laser crystal to create a powerful laser beam.
|
||||
cannery.silex.1=Be careful, as the laser will burn/melt through weaker blocks...
|
||||
cannery.silex.2=...but not blast-proof ones.
|
||||
cannery.silex.3=The FEL is used to power the Laser Isotope Separation Chamber (SILEX). The FEL and SILEX have to be at least two blocks apart.
|
||||
cannery.silex.4=The laser has to enter through the glass openings of the SILEX. Aiming it wrong could destroy it.
|
||||
cannery.silex.5=The openings on the sides can be used to connect fluid ducts to the SILEX.
|
||||
cannery.silex.6=In addition to the two connectors on the sides, there is a third hidden connector at the bottom from which items can be extracted.
|
||||
cannery.silex.7=Each recipe requires a specific laser type. Using a stronger type than required will process items faster.
|
||||
cannery.silex.8=One FEL can supply up to 5 SILEX. Each SILEX has to be one block apart from one another.
|
||||
|
||||
cannery.stirling.0=The Stirling engine uses heat energy from external sources to create power.
|
||||
cannery.stirling.1=It needs to be placed on top of a heat-producing machine, such as the firebox.
|
||||
cannery.stirling.2=The amount of heat it can utilize however is limited, overspinning can lead to catastrophic malfunction.
|
||||
cannery.stirling.3=The upgraded version can take significantly more heat without breaking.
|
||||
|
||||
chem.ARSENIC=Arsenic Extraction
|
||||
chem.ASPHALT=Asphalt Production
|
||||
chem.BAKELITE=Bakelite Production
|
||||
@ -4041,6 +4075,7 @@ tile.pink_log.name=Pink Log
|
||||
tile.pink_planks.name=Pink Wood Planks
|
||||
tile.pink_slab.name=Pink Wood Slab
|
||||
tile.pink_stairs.name=Pink Wood Stairs
|
||||
tile.plant_dead.name=Dead Plant
|
||||
tile.plant_flower.foxglove.name=Foxglove
|
||||
tile.plant_flower.nightshade.name=Deadly Nightshade
|
||||
tile.plant_flower.tobacco.name=Tobacco Plant
|
||||
|
||||
|
After Width: | Height: | Size: 243 B |
|
After Width: | Height: | Size: 219 B |
|
After Width: | Height: | Size: 224 B |
|
After Width: | Height: | Size: 198 B |
|
After Width: | Height: | Size: 196 B |
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.9 KiB |
@ -3,7 +3,7 @@
|
||||
"modid": "hbm",
|
||||
"name": "Hbm's Nuclear Tech",
|
||||
"description": "A mod that adds weapons, nuclear themed stuff and machines",
|
||||
"version":"1.0.27_X4336",
|
||||
"version":"1.0.27_X4347",
|
||||
"mcversion": "1.7.10",
|
||||
"url": "",
|
||||
"updateUrl": "",
|
||||
|
||||