Merge remote-tracking branch 'HbmMods/master'

This commit is contained in:
Vaern 2022-04-14 20:04:42 -07:00
commit 26e74562bc
69 changed files with 593 additions and 289 deletions

View File

@ -54,6 +54,13 @@ public interface IFluidUser extends IFluidConnector {
}
}
public default void sendFluidToAll(FluidType type, TileEntity te) {
for(ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) {
sendFluid(type, te.getWorldObj(), te.xCoord + dir.offsetX, te.yCoord + dir.offsetY, te.zCoord + dir.offsetZ, dir);
}
}
public default long getTotalFluidForSend(FluidType type) { return 0; }
public default void removeFluidForTransfer(FluidType type, long amount) { }

View File

@ -27,7 +27,11 @@ public class BarbedWire extends Block {
public void onEntityCollidedWithBlock(World p_149670_1_, int x, int y, int z, Entity ent) {
ent.setInWeb();
//ent.setInWeb();
ent.motionX *= 0.25D;
ent.motionY *= 0.1D;
ent.motionZ *= 0.25D;
if(this == ModBlocks.barbed_wire) {
ent.attackEntityFrom(DamageSource.cactus, 2.0F);
@ -72,25 +76,21 @@ public class BarbedWire extends Block {
}
}
public boolean isOpaqueCube()
{
public boolean isOpaqueCube() {
return false;
}
public AxisAlignedBB getCollisionBoundingBoxFromPool(World p_149668_1_, int p_149668_2_, int p_149668_3_, int p_149668_4_)
{
public AxisAlignedBB getCollisionBoundingBoxFromPool(World p_149668_1_, int p_149668_2_, int p_149668_3_, int p_149668_4_) {
return null;
}
public static int renderID = RenderingRegistry.getNextAvailableRenderId();
public int getRenderType()
{
public int getRenderType() {
return renderID;
}
public boolean renderAsNormalBlock()
{
public boolean renderAsNormalBlock() {
return false;
}

View File

@ -29,7 +29,6 @@ import cpw.mods.fml.relauncher.SideOnly;
public class MachineCoal extends BlockContainer {
private final Random field_149933_a = new Random();
private Random rand;
private final boolean isActive;
private static boolean keepInventory;
@ -38,7 +37,6 @@ public class MachineCoal extends BlockContainer {
public MachineCoal(boolean blockState) {
super(Material.iron);
rand = new Random();
isActive = blockState;
}

View File

@ -23,6 +23,7 @@ public class CommonConfig {
public static final String CATEGORY_HAZARD = "14_hazard";
public static final String CATEGORY_528 = "528";
public static final String CATEGORY_LBSM = "LESS BULLSHIT MODE";
public static int setDefZero(int value, int def) {

View File

@ -21,7 +21,6 @@ public class GeneralConfig {
public static boolean enableGuns = true;
public static boolean enableVirus = true;
public static boolean enableCrosshairs = true;
public static boolean enableBabyMode = false;
public static boolean enableReflectorCompat = false;
public static boolean enableRenderDistCheck = true;
public static boolean enableCustomDashKeybind = false;
@ -35,6 +34,19 @@ public class GeneralConfig {
public static int coltanRate = 2;
public static int bedrockRate = 50;
public static boolean enableLBSM = false;
public static boolean enableLBSMFullSchrab = true;
public static boolean enableLBSMShorterDecay = true;
public static boolean enableLBSMSimpleArmorRecipes = true;
public static boolean enableLBSMSimpleToolRecipes = true;
public static boolean enableLBSMSimpleAlloy = true;
public static boolean enableLBSMSimpleChemsitry = true;
public static boolean enableLBSMSimpleCentrifuge = true;
public static boolean enableLBSMUnlockAnvil = true;
public static boolean enableLBSMSimpleCrafting = true;
public static boolean enableLBSMSimpleMedicineRecipes = true;
public static int schrabRate = 20;
public static void loadFromConfig(Configuration config) {
final String CATEGORY_GENERAL = CommonConfig.CATEGORY_GENERAL;
@ -55,7 +67,6 @@ public class GeneralConfig {
enableGuns = config.get(CATEGORY_GENERAL, "1.20_enableGuns", true).getBoolean(true);
enableVirus = config.get(CATEGORY_GENERAL, "1.21_enableVirus", false).getBoolean(false);
enableCrosshairs = config.get(CATEGORY_GENERAL, "1.22_enableCrosshairs", true).getBoolean(true);
enableBabyMode = config.get(CATEGORY_GENERAL, "1.23_enableBabyMode", false).getBoolean(false);
enableReflectorCompat = config.get(CATEGORY_GENERAL, "1.24_enableReflectorCompat", false).getBoolean(false);
enableRenderDistCheck = config.get(CATEGORY_GENERAL, "1.25_enableRenderDistCheck", true).getBoolean(true);
enableCustomDashKeybind = config.get(CATEGORY_GENERAL, "1.26_enableCustomDashKeybind", false).getBoolean(false);
@ -76,6 +87,27 @@ public class GeneralConfig {
coltanRate = CommonConfig.createConfigInt(config, CATEGORY_528, "X528_oreColtanFrequency", "Determines how many coltan ore veins are to be expected in a chunk. These values do not affect the frequency in deposits, and only apply if random coltan spanwing is enabled.", 2);
bedrockRate = CommonConfig.createConfigInt(config, CATEGORY_528, "X528_bedrockColtanFrequency", "Determines how often (1 in X) bedrock coltan ores spawn. Applies for both the bedrock ores in the coltan deposit (if applicable) and the random bedrock ores (if applicable)", 50);
if(enable528) enableBabyMode = false;
final String CATEGORY_LBSM = CommonConfig.CATEGORY_LBSM;
config.addCustomCategoryComment(CATEGORY_528,
"Will most likely break standard progression!\n"
+ "However, the game gets generally easier and more enjoyable for casual players.\n"
+ "Progression-braking recipes are usually not too severe, so the mode is generally server-friendly!");
enableLBSM = CommonConfig.createConfigBool(config, CATEGORY_LBSM, "enableLessBullshitMode", "The central toggle for LBS mode. Forced OFF when 528 is enabled!", false);
enableLBSMFullSchrab = CommonConfig.createConfigBool(config, CATEGORY_LBSM, "LBSM_fullSchrab", "When enabled, this will replace schraranium with full schrabidium ingots in the transmutator's output", true);
enableLBSMShorterDecay = CommonConfig.createConfigBool(config, CATEGORY_LBSM, "LBSM_shortDecay", "When enabled, this will highly accelerate the speed at which nuclear waste disposal drums decay their contents. 60x faster than 528 mode and 5-12x faster than on normal mode.", true);
enableLBSMSimpleArmorRecipes = CommonConfig.createConfigBool(config, CATEGORY_LBSM, "LBSM_recipeSimpleArmor", "When enabled, simplifies the recipe for armor sets like starmetal or schrabidium.", true);
enableLBSMSimpleToolRecipes = CommonConfig.createConfigBool(config, CATEGORY_LBSM, "LBSM_recipeSimpleTool", "When enabled, simplifies the recipe for tool sets like starmetal or scrhabidium", true);
enableLBSMSimpleAlloy = CommonConfig.createConfigBool(config, CATEGORY_LBSM, "LBSM_recipeSimpleAlloy", "When enabled, adds some blast furnace recipes to make certain things cheaper", true);
enableLBSMSimpleChemsitry = CommonConfig.createConfigBool(config, CATEGORY_LBSM, "LBSM_recipeSimpleChemistry", "When enabled, simplifies some chemical plant recipes", true);
enableLBSMSimpleCentrifuge = CommonConfig.createConfigBool(config, CATEGORY_LBSM, "LBSM_recipeSimpleCentrifuge", "When enabled, enhances centrifuge outputs to make rare materials more common", true);
enableLBSMUnlockAnvil = CommonConfig.createConfigBool(config, CATEGORY_LBSM, "LBSM_recipeUnlockAnvil", "When enabled, all anvil recipes are available at tier 1", true);
enableLBSMSimpleCrafting = CommonConfig.createConfigBool(config, CATEGORY_LBSM, "LBSM_recipeSimpleCrafting", "When enabled, some uncraftable or more expansive items get simple crafting recipes. Scorched uranium also becomes washable", true);
enableLBSMSimpleMedicineRecipes = CommonConfig.createConfigBool(config, CATEGORY_LBSM, "LBSM_recipeSimpleMedicine", "When enabled, makes some medicine recipes (line ones that require bismuth) much more affordable", true);
schrabRate = CommonConfig.createConfigInt(config, CATEGORY_528, "LBSM_schrabOreRate", "Changes the amount of uranium ore needed on average to create one schrabidium ore using nukes. Standard mode value is 100", 20);
if(enable528) enableLBSM = false;
}
}

View File

@ -11,7 +11,7 @@ public class VersatileConfig {
public static Item getTransmutatorItem() {
if(GeneralConfig.enableBabyMode)
if(GeneralConfig.enableLBSM && GeneralConfig.enableLBSMFullSchrab)
return ModItems.ingot_schrabidium;
return ModItems.ingot_schraranium;
@ -19,8 +19,8 @@ public class VersatileConfig {
public static int getSchrabOreChance() {
if(GeneralConfig.enableBabyMode)
return 20;
if(GeneralConfig.enableLBSM)
return GeneralConfig.schrabRate;
return 100;
}
@ -52,10 +52,10 @@ public class VersatileConfig {
static int hour = 60 * minute;
public static int getLongDecayChance() {
return GeneralConfig.enable528 ? 15 * hour : 3 * hour;
return GeneralConfig.enable528 ? 15 * hour : (GeneralConfig.enableLBSM && GeneralConfig.enableLBSMShorterDecay) ? 15 * minute : 3 * hour;
}
public static int getShortDecayChance() {
return GeneralConfig.enable528 ? 3 * hour : 15 * minute;
return GeneralConfig.enable528 ? 3 * hour : (GeneralConfig.enableLBSM && GeneralConfig.enableLBSMShorterDecay) ? 3 * minute : 15 * minute;
}
}

View File

@ -168,7 +168,7 @@ public class ArmorRecipes {
CraftingManager.addRecipeAuto(new ItemStack(ModItems.cape_schrabidium, 1), new Object[] { "W W", "WIW", "WDW", 'W', SA326.ingot(), 'D', KEY_BLACK, 'I', ModItems.circuit_red_copper });
//Configged
if(GeneralConfig.enableBabyMode) {
if(GeneralConfig.enableLBSM && GeneralConfig.enableLBSMSimpleArmorRecipes) {
addHelmet( STAR.ingot(), ModItems.starmetal_helmet);
addChest( STAR.ingot(), ModItems.starmetal_plate);
addLegs( STAR.ingot(), ModItems.starmetal_legs);

View File

@ -1,6 +1,7 @@
package com.hbm.crafting;
import com.hbm.blocks.ModBlocks;
import com.hbm.config.GeneralConfig;
import com.hbm.inventory.fluid.Fluids;
import com.hbm.items.ModItems;
import com.hbm.main.CraftingManager;
@ -113,13 +114,20 @@ public class ConsumableRecipes {
CraftingManager.addRecipeAuto(new ItemStack(ModItems.pill_iodine, 8), new Object[] { "IF", 'I', I.dust(), 'F', F.dust() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.plan_c, 1), new Object[] { "PFP", 'P', ModItems.powder_poison, 'F', F.dust() });
CraftingManager.addShapelessAuto(new ItemStack(ModItems.radx, 1), new Object[] { COAL.dust(), COAL.dust(), F.dust() });
CraftingManager.addShapelessAuto(new ItemStack(ModItems.siox, 8), new Object[] { COAL.dust(), ASBESTOS.dust(), ModItems.nugget_bismuth });
CraftingManager.addShapelessAuto(new ItemStack(ModItems.xanax, 1), new Object[] { COAL.dust(), KNO.dust(), BR.dust() });
CraftingManager.addShapelessAuto(new ItemStack(ModItems.fmn, 1), new Object[] { COAL.dust(), PO210.dust(), ST.dust() });
CraftingManager.addShapelessAuto(new ItemStack(ModItems.pirfenidone, 1), new Object[] {COAL.dust(), KNO.dust(), ModItems.nugget_bismuth });
CraftingManager.addShapelessAuto(new ItemStack(ModItems.five_htp, 1), new Object[] { COAL.dust(), EUPH.dust(), ModItems.canteen_fab });
CraftingManager.addShapelessAuto(new ItemStack(ModItems.cigarette, 16), new Object[] { ASBESTOS.ingot(), ANY_TAR.any(), PO210.nugget() });
if(GeneralConfig.enableLBSM && GeneralConfig.enableLBSMSimpleMedicineRecipes) {
CraftingManager.addShapelessAuto(new ItemStack(ModItems.siox, 8), new Object[] { COAL.dust(), ASBESTOS.dust(), GOLD.nugget() });
CraftingManager.addShapelessAuto(new ItemStack(ModItems.xanax, 1), new Object[] { COAL.dust(), KNO.dust(), NETHERQUARTZ.dust() });
CraftingManager.addShapelessAuto(new ItemStack(ModItems.pirfenidone, 1), new Object[] {COAL.dust(), KNO.dust(), GOLD.nugget() });
} else {
CraftingManager.addShapelessAuto(new ItemStack(ModItems.siox, 8), new Object[] { COAL.dust(), ASBESTOS.dust(), ModItems.nugget_bismuth });
CraftingManager.addShapelessAuto(new ItemStack(ModItems.xanax, 1), new Object[] { COAL.dust(), KNO.dust(), BR.dust() });
CraftingManager.addShapelessAuto(new ItemStack(ModItems.pirfenidone, 1), new Object[] {COAL.dust(), KNO.dust(), ModItems.nugget_bismuth });
}
//Med bags
CraftingManager.addRecipeAuto(new ItemStack(ModItems.med_bag, 1), new Object[] { "LLL", "SIS", "LLL", 'L', Items.leather, 'S', ModItems.syringe_metal_stimpak, 'I', ModItems.syringe_antidote });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.med_bag, 1), new Object[] { "LLL", "SIS", "LLL", 'L', Items.leather, 'S', ModItems.syringe_metal_stimpak, 'I', ModItems.pill_iodine });

View File

@ -62,17 +62,6 @@ public class ToolRecipes {
CraftingManager.addRecipeAuto(new ItemStack(ModItems.smashing_hammer, 1), new Object[] { "STS", "SPS", " P ", 'S', STEEL.block(), 'T', W.block(), 'P', POLYMER.ingot() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.meteorite_sword, 1), new Object[] { " B", "GB ", "SG ", 'B', ModItems.blade_meteorite, 'G', GOLD.plate(), 'S', KEY_STICK });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.cobalt_decorated_sword, 1), new Object[] { " I ", " I ", "SBS", 'I', CO.ingot(), 'S', ModItems.ingot_meteorite_forged, 'B', ModItems.cobalt_sword });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.cobalt_decorated_pickaxe, 1), new Object[] { "III", " B ", " S ", 'I', CO.ingot(), 'S', ModItems.ingot_meteorite_forged, 'B', ModItems.cobalt_pickaxe });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.cobalt_decorated_axe, 1), new Object[] { "II", "IB", " S", 'I', CO.ingot(), 'S', ModItems.ingot_meteorite_forged, 'B', ModItems.cobalt_axe });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.cobalt_decorated_shovel, 1), new Object[] { "I", "B", "S", 'I', CO.ingot(), 'S', ModItems.ingot_meteorite_forged, 'B', ModItems.cobalt_shovel });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.cobalt_decorated_hoe, 1), new Object[] { "II", " B", " S", 'I', CO.ingot(), 'S', ModItems.ingot_meteorite_forged, 'B', ModItems.cobalt_hoe });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.starmetal_sword, 1), new Object[] { " I ", " I ", "SBS", 'I', STAR.ingot(), 'S', CO.ingot(), 'B', ModItems.cobalt_decorated_sword });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.starmetal_pickaxe, 1), new Object[] { "III", " B ", " S ", 'I', STAR.ingot(), 'S', CO.ingot(), 'B', ModItems.cobalt_decorated_pickaxe });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.starmetal_axe, 1), new Object[] { "II", "IB", " S", 'I', STAR.ingot(), 'S', CO.ingot(), 'B', ModItems.cobalt_decorated_axe });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.starmetal_shovel, 1), new Object[] { "I", "B", "S", 'I', STAR.ingot(), 'S', CO.ingot(), 'B', ModItems.cobalt_decorated_shovel });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.starmetal_hoe, 1), new Object[] { "II", " B", " S", 'I', STAR.ingot(), 'S', CO.ingot(), 'B', ModItems.cobalt_decorated_hoe });
//Drax
CraftingManager.addRecipeAuto(new ItemStack(ModItems.drax, 1), new Object[] { "BDS", "CDC", "FMF", 'B', ModItems.starmetal_pickaxe, 'S', ModItems.starmetal_shovel, 'C', CO.ingot(), 'F', ModItems.fusion_core, 'D', DESH.ingot(), 'M', ModItems.motor_desh });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.drax_mk2, 1), new Object[] { "SCS", "IDI", "FEF", 'S', STAR.ingot(), 'C', ModItems.crystal_trixite, 'I', BIGMT.ingot(), 'D', ModItems.drax, 'F', ModItems.fusion_core, 'E', ModItems.circuit_targeting_tier5 });
@ -155,13 +144,33 @@ public class ToolRecipes {
CraftingManager.addShapelessAuto(new ItemStack(ModItems.bobmazon_tools), new Object[] { Items.book, Items.gold_nugget, KEY_GREEN });
//Configged
if(GeneralConfig.enableBabyMode) {
if(GeneralConfig.enableLBSM && GeneralConfig.enableLBSMSimpleToolRecipes) {
addSword( CO.block(), ModItems.cobalt_decorated_sword);
addPickaxe( CO.block(), ModItems.cobalt_decorated_pickaxe);
addAxe( CO.block(), ModItems.cobalt_decorated_axe);
addShovel( CO.block(), ModItems.cobalt_decorated_shovel);
addHoe( CO.block(), ModItems.cobalt_decorated_hoe);
addSword( STAR.ingot(), ModItems.starmetal_sword);
addPickaxe( STAR.ingot(), ModItems.starmetal_pickaxe);
addAxe( STAR.ingot(), ModItems.starmetal_axe);
addShovel( STAR.ingot(), ModItems.starmetal_shovel);
addHoe( STAR.ingot(), ModItems.starmetal_hoe);
addSword( SA326.ingot(), ModItems.schrabidium_sword);
addPickaxe( SA326.ingot(), ModItems.schrabidium_pickaxe);
addAxe( SA326.ingot(), ModItems.schrabidium_axe);
addShovel( SA326.ingot(), ModItems.schrabidium_shovel);
addHoe( SA326.ingot(), ModItems.schrabidium_hoe);
} else {
CraftingManager.addRecipeAuto(new ItemStack(ModItems.cobalt_decorated_sword, 1), new Object[] { " I ", " I ", "SBS", 'I', CO.ingot(), 'S', ModItems.ingot_meteorite_forged, 'B', ModItems.cobalt_sword });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.cobalt_decorated_pickaxe, 1), new Object[] { "III", " B ", " S ", 'I', CO.ingot(), 'S', ModItems.ingot_meteorite_forged, 'B', ModItems.cobalt_pickaxe });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.cobalt_decorated_axe, 1), new Object[] { "II", "IB", " S", 'I', CO.ingot(), 'S', ModItems.ingot_meteorite_forged, 'B', ModItems.cobalt_axe });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.cobalt_decorated_shovel, 1), new Object[] { "I", "B", "S", 'I', CO.ingot(), 'S', ModItems.ingot_meteorite_forged, 'B', ModItems.cobalt_shovel });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.cobalt_decorated_hoe, 1), new Object[] { "II", " B", " S", 'I', CO.ingot(), 'S', ModItems.ingot_meteorite_forged, 'B', ModItems.cobalt_hoe });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.starmetal_sword, 1), new Object[] { " I ", " I ", "SBS", 'I', STAR.ingot(), 'S', CO.ingot(), 'B', ModItems.cobalt_decorated_sword });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.starmetal_pickaxe, 1), new Object[] { "III", " B ", " S ", 'I', STAR.ingot(), 'S', CO.ingot(), 'B', ModItems.cobalt_decorated_pickaxe });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.starmetal_axe, 1), new Object[] { "II", "IB", " S", 'I', STAR.ingot(), 'S', CO.ingot(), 'B', ModItems.cobalt_decorated_axe });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.starmetal_shovel, 1), new Object[] { "I", "B", "S", 'I', STAR.ingot(), 'S', CO.ingot(), 'B', ModItems.cobalt_decorated_shovel });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.starmetal_hoe, 1), new Object[] { "II", " B", " S", 'I', STAR.ingot(), 'S', CO.ingot(), 'B', ModItems.cobalt_decorated_hoe });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.schrabidium_sword, 1), new Object[] { "I", "W", "S", 'I', SA326.block(), 'W', ModItems.desh_sword, 'S', POLYMER.ingot() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.schrabidium_pickaxe, 1), new Object[] { "SWS", " P ", " P ", 'S', ModItems.blades_schrabidium, 'W', ModItems.desh_pickaxe, 'P', POLYMER.ingot() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.schrabidium_axe, 1), new Object[] { "SW", "SP", " P", 'S', ModItems.blades_schrabidium, 'W', ModItems.desh_axe, 'P', POLYMER.ingot() });

View File

@ -59,7 +59,6 @@ public class HbmKeybinds {
if(last != current) {
PacketDispatcher.wrapper.sendToServer(new KeybindPacket(key, current));
props.setKeyPressed(key, current);
System.out.println(key);
}
}
}

View File

@ -78,11 +78,16 @@ public class FluidTank {
//Called on TE update
public void updateTank(TileEntity te) {
updateTank(te.xCoord, te.yCoord, te.zCoord, te.getWorldObj().provider.dimensionId);
updateTank(te, 100);
}
public void updateTank(TileEntity te, int range) {
updateTank(te.xCoord, te.yCoord, te.zCoord, te.getWorldObj().provider.dimensionId, range);
}
public void updateTank(int x, int y, int z, int dim) {
PacketDispatcher.wrapper.sendToAllAround(new TEFluidPacket(x, y, z, fluid, index, type), new TargetPoint(dim, x, y, z, 100));
updateTank(x, y, z, dim, 100);
}
public void updateTank(int x, int y, int z, int dim, int range) {
PacketDispatcher.wrapper.sendToAllAround(new TEFluidPacket(x, y, z, fluid, index, type), new TargetPoint(dim, x, y, z, range));
}
//Fills tank from canisters

View File

@ -162,6 +162,7 @@ public class OreDictManager {
/** LEAD */
public static final DictFrame PB = new DictFrame("Lead");
//public static final DictFrame BI = new DictFrame("Bismuth");
public static final DictFrame AS = new DictFrame("Arsenic");
/** TANTALUM */
public static final DictFrame TA = new DictFrame("Tantalum");
public static final DictFrame COLTAN = new DictFrame("Coltan");
@ -327,6 +328,7 @@ public class OreDictManager {
TCALLOY .ingot(ingot_tcalloy) .dust(powder_tcalloy);
PB .nugget(nugget_lead) .ingot(ingot_lead) .dust(powder_lead) .plate(plate_lead) .block(block_lead) .ore(ore_lead, ore_meteor_lead);
//BI .nugget(nugget_bismuth) .ingot(ingot_bismuth); THAT'S WHAT YOU THOUGHT!
AS .nugget(nugget_arsenic) .ingot(ingot_arsenic);
TA .nugget(nugget_tantalium) .gem(gem_tantalium) .ingot(ingot_tantalium) .dust(powder_tantalium) .block(block_tantalium);
COLTAN .ingot(fragment_coltan) .dust(powder_coltan_ore) .block(block_coltan) .ore(ore_coltan);
NB .nugget(fragment_niobium) .ingot(ingot_niobium) .dustSmall(powder_niobium_tiny) .dust(powder_niobium) .block(block_niobium);

View File

@ -1,5 +1,8 @@
package com.hbm.inventory.gui;
import java.util.ArrayList;
import java.util.List;
import org.lwjgl.opengl.GL11;
import com.hbm.inventory.container.ContainerHadron;
@ -14,6 +17,7 @@ import net.minecraft.client.Minecraft;
import net.minecraft.client.audio.PositionedSoundRecord;
import net.minecraft.client.resources.I18n;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.ResourceLocation;
public class GUIHadron extends GuiInfoContainer {
@ -44,8 +48,16 @@ public class GUIHadron extends GuiInfoContainer {
this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 142, guiTop + 107, 18, 18, mouseX, mouseY, I18nUtil.resolveKeyArray("hadron.modeLine"));
else
this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 142, guiTop + 107, 18, 18, mouseX, mouseY, I18nUtil.resolveKeyArray("hadron.modeCircular"));
List<String> stats = new ArrayList();
stats.add(EnumChatFormatting.YELLOW + I18nUtil.resolveKey("hadron.stats"));
stats.add((hadron.stat_success ? EnumChatFormatting.GREEN : EnumChatFormatting.RED) + I18n.format("hadron." + this.hadron.state.name().toLowerCase()));
if(this.hadron.state.showCoord) stats.add(EnumChatFormatting.RED + I18nUtil.resolveKey("hadron.stats_coord", hadron.stat_x, hadron.stat_y, hadron.stat_z));
stats.add(EnumChatFormatting.GRAY + I18nUtil.resolveKey("hadron.stats_momentum", hadron.stat_charge));
this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 41, guiTop + 92, 25, 11, mouseX, mouseY, stats.toArray(new String[0]));
}
@Override
protected void mouseClicked(int x, int y, int i) {
super.mouseClicked(x, y, i);

View File

@ -190,14 +190,14 @@ public class AssemblerRecipes {
makeRecipe(new ComparableStack(ModItems.thruster_large, 1), new AStack[] {new ComparableStack(ModItems.thruster_medium, 1), new OreDictStack(STEEL.plate(), 4), new ComparableStack(ModItems.hull_big_steel, 2), new ComparableStack(ModItems.wire_red_copper, 4), },200);
makeRecipe(new ComparableStack(ModItems.thruster_nuclear, 1), new AStack[] {new ComparableStack(ModItems.thruster_large, 1), new ComparableStack(ModItems.tank_steel, 2), new ComparableStack(ModBlocks.deco_pipe_quad, 3), new ComparableStack(ModItems.board_copper, 6), new ComparableStack(ModItems.motor, 1), new ComparableStack(ModItems.circuit_targeting_tier4, 2), new ComparableStack(ModBlocks.reactor_research, 1), },600);
makeRecipe(new ComparableStack(ModItems.sat_base, 1), new AStack[] {new ComparableStack(ModItems.thruster_large, 1), new OreDictStack(STEEL.plate(), 6), new ComparableStack(ModItems.plate_desh, 4), new ComparableStack(ModItems.hull_big_titanium, 3), new ComparableStack(ModItems.fluid_barrel_full, 1, Fluids.KEROSENE.getID()), new ComparableStack(ModItems.photo_panel, 24), new ComparableStack(ModItems.board_copper, 12), new ComparableStack(ModItems.circuit_gold, 6), new ComparableStack(ModItems.battery_lithium_cell_6, 1), },500);
makeRecipe(new ComparableStack(ModItems.sat_head_mapper, 1), new AStack[] {new OreDictStack(STEEL.ingot(), 4), new OreDictStack(STEEL.plate(), 6), new ComparableStack(ModItems.hull_small_steel, 3), new ComparableStack(ModItems.plate_desh, 2), new ComparableStack(ModItems.circuit_gold, 2), new ComparableStack(ModItems.plate_polymer, 12), new OreDictStack(REDSTONE.dust(), 6), new ComparableStack(Items.diamond, 1), new ComparableStack(Blocks.glass_pane, 6), },400);
makeRecipe(new ComparableStack(ModItems.sat_head_scanner, 1), new AStack[] {new OreDictStack(STEEL.ingot(), 6), new OreDictStack(TI.plate(), 32), new ComparableStack(ModItems.plate_desh, 6), new ComparableStack(ModItems.magnetron, 6), new ComparableStack(ModItems.coil_advanced_torus, 2), new ComparableStack(ModItems.circuit_gold, 6), new ComparableStack(ModItems.plate_polymer, 6), new ComparableStack(Items.diamond, 1), },400);
makeRecipe(new ComparableStack(ModItems.sat_head_radar, 1), new AStack[] {new OreDictStack(STEEL.ingot(), 4), new OreDictStack(TI.plate(), 32), new ComparableStack(ModItems.magnetron, 12), new ComparableStack(ModItems.plate_polymer, 16), new ComparableStack(ModItems.wire_red_copper, 16), new ComparableStack(ModItems.coil_gold, 3), new ComparableStack(ModItems.circuit_gold, 5), new ComparableStack(Items.diamond, 1), },400);
makeRecipe(new ComparableStack(ModItems.sat_head_laser, 1), new AStack[] {new OreDictStack(STEEL.ingot(), 12), new OreDictStack(W.ingot(), 16), new OreDictStack(ANY_PLASTIC.ingot(), 6), new ComparableStack(ModItems.plate_polymer, 16), new ComparableStack(ModItems.board_copper, 24), new ComparableStack(ModItems.circuit_targeting_tier5, 2), new OreDictStack(REDSTONE.dust(), 16), new ComparableStack(Items.diamond, 5), new ComparableStack(Blocks.glass_pane, 16), },450);
makeRecipe(new ComparableStack(ModItems.sat_head_resonator, 1), new AStack[] {new OreDictStack(STEEL.ingot(), 32), new OreDictStack(ANY_PLASTIC.ingot(), 48), new ComparableStack(ModItems.plate_polymer, 8), new ComparableStack(ModItems.crystal_xen, 1), new OreDictStack(STAR.ingot(), 7), new ComparableStack(ModItems.circuit_targeting_tier5, 6), new ComparableStack(ModItems.circuit_targeting_tier6, 2), },1000);
makeRecipe(new ComparableStack(ModItems.sat_head_mapper, 1), new AStack[] {new OreDictStack(STEEL.ingot(), 4), new OreDictStack(STEEL.plate(), 6), new ComparableStack(ModItems.hull_small_steel, 3), new ComparableStack(ModItems.plate_desh, 2), new ComparableStack(ModItems.circuit_gold, 2), new OreDictStack(RUBBER.ingot(), 12), new OreDictStack(REDSTONE.dust(), 6), new ComparableStack(Items.diamond, 1), new ComparableStack(Blocks.glass_pane, 6), },400);
makeRecipe(new ComparableStack(ModItems.sat_head_scanner, 1), new AStack[] {new OreDictStack(STEEL.ingot(), 6), new OreDictStack(TI.plate(), 32), new ComparableStack(ModItems.plate_desh, 6), new ComparableStack(ModItems.magnetron, 6), new ComparableStack(ModItems.coil_advanced_torus, 2), new ComparableStack(ModItems.circuit_gold, 6), new OreDictStack(RUBBER.ingot(), 6), new ComparableStack(Items.diamond, 1), },400);
makeRecipe(new ComparableStack(ModItems.sat_head_radar, 1), new AStack[] {new OreDictStack(STEEL.ingot(), 4), new OreDictStack(TI.plate(), 32), new ComparableStack(ModItems.magnetron, 12), new OreDictStack(RUBBER.ingot(), 16), new ComparableStack(ModItems.wire_red_copper, 16), new ComparableStack(ModItems.coil_gold, 3), new ComparableStack(ModItems.circuit_gold, 5), new ComparableStack(Items.diamond, 1), },400);
makeRecipe(new ComparableStack(ModItems.sat_head_laser, 1), new AStack[] {new OreDictStack(STEEL.ingot(), 12), new OreDictStack(W.ingot(), 16), new OreDictStack(ANY_PLASTIC.ingot(), 6), new OreDictStack(RUBBER.ingot(), 16), new ComparableStack(ModItems.board_copper, 24), new ComparableStack(ModItems.circuit_targeting_tier5, 2), new OreDictStack(REDSTONE.dust(), 16), new ComparableStack(Items.diamond, 5), new ComparableStack(Blocks.glass_pane, 16), },450);
makeRecipe(new ComparableStack(ModItems.sat_head_resonator, 1), new AStack[] {new OreDictStack(STEEL.ingot(), 32), new OreDictStack(ANY_PLASTIC.ingot(), 48), new OreDictStack(RUBBER.ingot(), 8), new ComparableStack(ModItems.crystal_xen, 1), new OreDictStack(STAR.ingot(), 7), new ComparableStack(ModItems.circuit_targeting_tier5, 6), new ComparableStack(ModItems.circuit_targeting_tier6, 2), },1000);
makeRecipe(new ComparableStack(ModItems.sat_foeq, 1), new AStack[] {new OreDictStack(STEEL.plate(), 8), new OreDictStack(TI.plate(), 12), new ComparableStack(ModItems.plate_desh, 8), new ComparableStack(ModItems.hull_big_titanium, 3), new ComparableStack(ModItems.fluid_barrel_full, 1, Fluids.HYDROGEN.getID()), new ComparableStack(ModItems.photo_panel, 16), new ComparableStack(ModItems.thruster_nuclear, 1), new ComparableStack(ModItems.ingot_uranium_fuel, 6), new ComparableStack(ModItems.circuit_targeting_tier5, 6), new ComparableStack(ModItems.magnetron, 3), new ComparableStack(ModItems.battery_lithium_cell_6, 1), },1200);
makeRecipe(new ComparableStack(ModItems.sat_miner, 1), new AStack[] {new OreDictStack(BIGMT.plate(), 24), new ComparableStack(ModItems.plate_desh, 8), new ComparableStack(ModItems.motor, 2), new ComparableStack(ModItems.drill_titanium, 2), new ComparableStack(ModItems.circuit_targeting_tier4, 2), new ComparableStack(ModItems.fluid_barrel_full, 1, Fluids.KEROSENE.getID()), new ComparableStack(ModItems.thruster_small, 1), new ComparableStack(ModItems.photo_panel, 12), new ComparableStack(ModItems.centrifuge_element, 4), new ComparableStack(ModItems.magnetron, 3), new ComparableStack(ModItems.plate_polymer, 12), new ComparableStack(ModItems.battery_lithium_cell_6, 1), },600);
makeRecipe(new ComparableStack(ModItems.sat_lunar_miner, 1), new AStack[] {new ComparableStack(ModItems.ingot_meteorite, 4), new ComparableStack(ModItems.plate_desh, 4), new ComparableStack(ModItems.motor_desh, 2), new ComparableStack(ModItems.drill_titanium, 2), new ComparableStack(ModItems.circuit_targeting_tier4, 2), new ComparableStack(ModItems.fluid_barrel_full, 1, Fluids.KEROSENE.getID()), new ComparableStack(ModItems.thruster_small, 1), new ComparableStack(ModItems.photo_panel, 12), new ComparableStack(ModItems.magnetron, 3), new ComparableStack(ModItems.plate_polymer, 12), new ComparableStack(ModItems.battery_lithium_cell_6, 1), },600);
makeRecipe(new ComparableStack(ModItems.sat_miner, 1), new AStack[] {new OreDictStack(BIGMT.plate(), 24), new ComparableStack(ModItems.plate_desh, 8), new ComparableStack(ModItems.motor, 2), new ComparableStack(ModItems.drill_titanium, 2), new ComparableStack(ModItems.circuit_targeting_tier4, 2), new ComparableStack(ModItems.fluid_barrel_full, 1, Fluids.KEROSENE.getID()), new ComparableStack(ModItems.thruster_small, 1), new ComparableStack(ModItems.photo_panel, 12), new ComparableStack(ModItems.centrifuge_element, 4), new ComparableStack(ModItems.magnetron, 3), new OreDictStack(RUBBER.ingot(), 12), new ComparableStack(ModItems.battery_lithium_cell_6, 1), },600);
makeRecipe(new ComparableStack(ModItems.sat_lunar_miner, 1), new AStack[] {new ComparableStack(ModItems.ingot_meteorite, 4), new ComparableStack(ModItems.plate_desh, 4), new ComparableStack(ModItems.motor_desh, 2), new ComparableStack(ModItems.drill_titanium, 2), new ComparableStack(ModItems.circuit_targeting_tier4, 2), new ComparableStack(ModItems.fluid_barrel_full, 1, Fluids.KEROSENE.getID()), new ComparableStack(ModItems.thruster_small, 1), new ComparableStack(ModItems.photo_panel, 12), new ComparableStack(ModItems.magnetron, 3), new OreDictStack(RUBBER.ingot(), 12), new ComparableStack(ModItems.battery_lithium_cell_6, 1), },600);
makeRecipe(new ComparableStack(ModItems.chopper_head, 1), new AStack[] {new ComparableStack(ModBlocks.reinforced_glass, 2), new ComparableStack(ModBlocks.fwatz_computer, 1), new OreDictStack(CMB.ingot(), 22), new ComparableStack(ModItems.wire_magnetized_tungsten, 4), },300);
makeRecipe(new ComparableStack(ModItems.chopper_gun, 1), new AStack[] {new OreDictStack(CMB.plate(), 4), new OreDictStack(CMB.ingot(), 2), new ComparableStack(ModItems.wire_tungsten, 6), new ComparableStack(ModItems.coil_magnetized_tungsten, 1), new ComparableStack(ModItems.motor, 1), },150);
makeRecipe(new ComparableStack(ModItems.chopper_torso, 1), new AStack[] {new OreDictStack(CMB.ingot(), 26), new ComparableStack(ModBlocks.fwatz_computer, 1), new ComparableStack(ModItems.wire_magnetized_tungsten, 4), new ComparableStack(ModItems.motor, 2), new ComparableStack(ModItems.chopper_blades, 2), },350);
@ -283,7 +283,7 @@ public class AssemblerRecipes {
makeRecipe(new ComparableStack(ModBlocks.machine_mining_laser, 1), new AStack[] {new ComparableStack(ModItems.tank_steel, 3), new OreDictStack(STEEL.plate(), 16), new ComparableStack(ModItems.crystal_redstone, 3), new ComparableStack(Items.diamond, 3), new OreDictStack(ANY_PLASTIC.ingot(), 4), new ComparableStack(ModItems.motor, 3), new OreDictStack(DURA.ingot(), 4), new ComparableStack(ModItems.bolt_dura_steel, 6), new ComparableStack(ModBlocks.machine_battery, 3), },400);
makeRecipe(new ComparableStack(ModBlocks.machine_turbofan, 1), new AStack[] {new ComparableStack(ModItems.hull_big_steel, 1), new ComparableStack(ModItems.hull_big_titanium, 3), new ComparableStack(ModItems.hull_small_steel, 2), new ComparableStack(ModItems.turbine_tungsten, 1), new ComparableStack(ModItems.turbine_titanium, 7), new ComparableStack(ModItems.bolt_compound, 8), new OreDictStack(MINGRADE.ingot(), 12), new ComparableStack(ModItems.wire_red_copper, 24), },500);
makeRecipe(new ComparableStack(ModBlocks.machine_teleporter, 1), new AStack[] {new OreDictStack(TI.ingot(), 6), new OreDictStack(ALLOY.plate(), 12), new OreDictStack(CMB.plate(), 4), new ComparableStack(ModItems.telepad, 1), new ComparableStack(ModItems.entanglement_kit, 1), new ComparableStack(ModBlocks.machine_battery, 2), new ComparableStack(ModItems.coil_magnetized_tungsten, 4), },300);
makeRecipe(new ComparableStack(ModBlocks.machine_schrabidium_transmutator, 1), new AStack[] {new OreDictStack(MAGTUNG.ingot(), 1), new OreDictStack(TI.ingot(), 24), new OreDictStack(ALLOY.plate(), 18), new OreDictStack(STEEL.plate(), 12), new ComparableStack(ModItems.plate_desh, 6), new ComparableStack(ModItems.plate_polymer, 8), new ComparableStack(ModBlocks.machine_battery, 5), new ComparableStack(ModItems.circuit_gold, 5), },500);
makeRecipe(new ComparableStack(ModBlocks.machine_schrabidium_transmutator, 1), new AStack[] {new OreDictStack(MAGTUNG.ingot(), 1), new OreDictStack(TI.ingot(), 24), new OreDictStack(ALLOY.plate(), 18), new OreDictStack(STEEL.plate(), 12), new ComparableStack(ModItems.plate_desh, 6), new OreDictStack(RUBBER.ingot(), 8), new ComparableStack(ModBlocks.machine_battery, 5), new ComparableStack(ModItems.circuit_gold, 5), },500);
makeRecipe(new ComparableStack(ModBlocks.machine_combine_factory, 1), new AStack[] {new OreDictStack(STEEL.ingot(), 8), new OreDictStack(ANY_PLASTIC.ingot(), 6), new OreDictStack(TI.plate(), 4), new OreDictStack(CU.plate(), 6), new ComparableStack(ModItems.circuit_gold, 6), new ComparableStack(ModItems.coil_advanced_alloy, 8), new ComparableStack(ModItems.coil_tungsten, 4), new OreDictStack(MAGTUNG.ingot(), 12), },150);
makeRecipe(new ComparableStack(ModBlocks.factory_advanced_hull, 1), new AStack[] {new OreDictStack(ALLOY.ingot(), 4), new OreDictStack(ALLOY.plate(), 4), new ComparableStack(ModItems.wire_advanced_alloy, 6), },50);
makeRecipe(new ComparableStack(ModBlocks.factory_advanced_furnace, 1), new AStack[] {new OreDictStack(ALLOY.ingot(), 4), new OreDictStack(ALLOY.plate(), 4), new OreDictStack(STEEL.plate(), 8), new ComparableStack(ModItems.coil_advanced_alloy, 2), },100);
@ -435,7 +435,7 @@ public class AssemblerRecipes {
makeRecipe(new ComparableStack(ModItems.mp_warhead_15_nuclear, 1), new AStack[] {new ComparableStack(ModItems.seg_15, 1), new OreDictStack(STEEL.plate(), 24), new OreDictStack(TI.plate(), 12), new OreDictStack(PU239.ingot(), 3), new ComparableStack(ModBlocks.det_charge, 6), new ComparableStack(ModItems.circuit_targeting_tier4, 1), },500);
makeRecipe(new ComparableStack(ModItems.mp_warhead_15_n2, 1), new AStack[] {new ComparableStack(ModItems.seg_15, 1), new OreDictStack(STEEL.plate(), 8), new OreDictStack(TI.plate(), 20), new ComparableStack(ModBlocks.det_charge, 24), new ComparableStack(Blocks.redstone_block, 12), new OreDictStack(MAGTUNG.dust(), 6), new ComparableStack(ModItems.circuit_targeting_tier4, 1), },400);
makeRecipe(new ComparableStack(ModItems.mp_warhead_15_balefire, 1), new AStack[] {new ComparableStack(ModItems.seg_15, 1), new OreDictStack(OreDictManager.getReflector(), 16), new ComparableStack(ModItems.powder_magic, 6), new ComparableStack(ModItems.egg_balefire_shard, 4), new OreDictStack(ANY_HIGHEXPLOSIVE.ingot(), 8), new ComparableStack(ModItems.circuit_targeting_tier4, 1), }, 60);
makeRecipe(new ComparableStack(ModItems.missile_soyuz, 1), new AStack[] {new ComparableStack(ModItems.rocket_fuel, 40), new ComparableStack(ModBlocks.det_cord, 20), new ComparableStack(ModItems.thruster_medium, 12), new ComparableStack(ModItems.thruster_small, 12), new ComparableStack(ModItems.tank_steel, 10), new ComparableStack(ModItems.circuit_targeting_tier4, 4), new ComparableStack(ModItems.circuit_targeting_tier3, 8), new ComparableStack(ModItems.plate_polymer, 64), new ComparableStack(ModItems.fins_small_steel, 4), new ComparableStack(ModItems.hull_big_titanium, 40), new ComparableStack(ModItems.hull_big_steel, 24), new OreDictStack(FIBER.ingot(), 64), },600);
makeRecipe(new ComparableStack(ModItems.missile_soyuz, 1), new AStack[] {new ComparableStack(ModItems.rocket_fuel, 40), new ComparableStack(ModBlocks.det_cord, 20), new ComparableStack(ModItems.thruster_medium, 12), new ComparableStack(ModItems.thruster_small, 12), new ComparableStack(ModItems.tank_steel, 10), new ComparableStack(ModItems.circuit_targeting_tier4, 2), new ComparableStack(ModItems.circuit_targeting_tier3, 8), new OreDictStack(RUBBER.ingot(), 64), new ComparableStack(ModItems.fins_small_steel, 4), new ComparableStack(ModItems.hull_big_titanium, 32), new ComparableStack(ModItems.hull_big_steel, 18), new OreDictStack(FIBER.ingot(), 64), },600);
makeRecipe(new ComparableStack(ModItems.missile_soyuz_lander, 1), new AStack[] {new ComparableStack(ModItems.rocket_fuel, 10), new ComparableStack(ModItems.thruster_small, 3), new ComparableStack(ModItems.tank_steel, 2), new ComparableStack(ModItems.circuit_targeting_tier3, 4), new ComparableStack(ModItems.plate_polymer, 32), new ComparableStack(ModItems.hull_big_aluminium, 2), new ComparableStack(ModItems.sphere_steel, 1), new OreDictStack(FIBER.ingot(), 12), },600);
makeRecipe(new ComparableStack(ModItems.fusion_shield_tungsten, 1), new AStack[] {new OreDictStack(W.block(), 32), new OreDictStack(OreDictManager.getReflector(), 96)}, 600);
makeRecipe(new ComparableStack(ModItems.fusion_shield_desh, 1), new AStack[] {new OreDictStack(DESH.block(), 16), new OreDictStack(CO.block(), 16), new OreDictStack(BIGMT.plate(), 96)}, 600);
@ -508,7 +508,7 @@ public class AssemblerRecipes {
new OreDictStack(STEEL.plate(), 32),
new OreDictStack(AL.plate(), 32),
new OreDictStack(ANY_PLASTIC.ingot(), 24),
new ComparableStack(ModItems.plate_polymer, 64),
new OreDictStack(RUBBER.ingot(), 24),
new ComparableStack(ModItems.board_copper, 8),
new ComparableStack(ModItems.circuit_red_copper, 8),
new ComparableStack(ModItems.circuit_gold, 3),
@ -855,7 +855,7 @@ public class AssemblerRecipes {
new OreDictStack(STEEL.plate(), 32),
new OreDictStack(AL.plate(), 32),
new OreDictStack(ANY_PLASTIC.ingot(), 24),
new ComparableStack(ModItems.plate_polymer, 64),
new OreDictStack(RUBBER.ingot(), 24),
new ComparableStack(ModItems.board_copper, 8),
new ComparableStack(ModItems.circuit_red_copper, 8),
new ComparableStack(ModItems.circuit_gold, 3),

View File

@ -6,6 +6,7 @@ import java.util.Map;
import java.util.Map.Entry;
import com.hbm.blocks.ModBlocks;
import com.hbm.config.GeneralConfig;
import com.hbm.handler.imc.IMCCentrifuge;
import com.hbm.inventory.RecipesCommon;
import com.hbm.inventory.RecipesCommon.ComparableStack;
@ -23,6 +24,8 @@ public class CentrifugeRecipes {
public static void register() {
boolean lbs = GeneralConfig.enableLBSM && GeneralConfig.enableLBSMSimpleCentrifuge;
recipes.put(new ComparableStack(ModItems.waste_natural_uranium), new ItemStack[] {
new ItemStack(ModItems.nugget_u238, 1),
new ItemStack(ModItems.nugget_pu_mix, 2),
@ -138,9 +141,9 @@ public class CentrifugeRecipes {
new ItemStack(Blocks.gravel, 1) });
recipes.put("oreGold", new ItemStack[] {
lbs ? new ItemStack(ModItems.powder_gold, 2) : new ItemStack(ModItems.powder_gold, 1),
new ItemStack(ModItems.powder_gold, 1),
new ItemStack(ModItems.powder_gold, 1),
new ItemStack(ModItems.powder_gold, 1),
lbs ? new ItemStack(ModItems.nugget_bismuth, 1) : new ItemStack(ModItems.powder_gold, 1),
new ItemStack(Blocks.gravel, 1) });
recipes.put("oreDiamond", new ItemStack[] {
@ -156,8 +159,8 @@ public class CentrifugeRecipes {
new ItemStack(Blocks.gravel, 1) });
recipes.put("oreTitanium", new ItemStack[] {
new ItemStack(ModItems.powder_titanium, 1),
new ItemStack(ModItems.powder_titanium, 1),
lbs ? new ItemStack(ModItems.powder_titanium, 2) : new ItemStack(ModItems.powder_titanium, 1),
lbs ? new ItemStack(ModItems.powder_titanium, 2) : new ItemStack(ModItems.powder_titanium, 1),
new ItemStack(ModItems.powder_iron, 1),
new ItemStack(Blocks.gravel, 1) });
@ -168,13 +171,13 @@ public class CentrifugeRecipes {
new ItemStack(Blocks.netherrack, 1) });
recipes.put("oreTungsten", new ItemStack[] {
new ItemStack(ModItems.powder_tungsten, 1),
lbs ? new ItemStack(ModItems.powder_tungsten, 2) : new ItemStack(ModItems.powder_tungsten, 1),
new ItemStack(ModItems.powder_tungsten, 1),
new ItemStack(ModItems.powder_iron, 1),
new ItemStack(Blocks.gravel, 1) });
recipes.put("oreCopper", new ItemStack[] {
new ItemStack(ModItems.powder_copper, 1),
lbs ? new ItemStack(ModItems.powder_copper, 2) : new ItemStack(ModItems.powder_copper, 1),
new ItemStack(ModItems.powder_copper, 1),
new ItemStack(ModItems.powder_gold, 1),
new ItemStack(Blocks.gravel, 1) });
@ -186,8 +189,8 @@ public class CentrifugeRecipes {
new ItemStack(Blocks.gravel, 1) });
recipes.put("oreLead", new ItemStack[] {
new ItemStack(ModItems.powder_lead, 1),
new ItemStack(ModItems.powder_lead, 1),
lbs ? new ItemStack(ModItems.powder_lead, 2) : new ItemStack(ModItems.powder_lead, 1),
lbs ? new ItemStack(ModItems.nugget_bismuth, 1) : new ItemStack(ModItems.powder_lead, 1),
new ItemStack(ModItems.powder_gold, 1),
new ItemStack(Blocks.gravel, 1) });
@ -210,9 +213,9 @@ public class CentrifugeRecipes {
new ItemStack(Blocks.gravel, 1) });
recipes.put("oreUranium", new ItemStack[] {
new ItemStack(ModItems.powder_uranium, 1),
new ItemStack(ModItems.powder_uranium, 1),
new ItemStack(ModItems.nugget_ra226, 1),
lbs ? new ItemStack(ModItems.powder_uranium, 2) : new ItemStack(ModItems.powder_uranium, 1),
lbs ? new ItemStack(ModItems.nugget_technetium, 2) : new ItemStack(ModItems.powder_uranium, 1),
lbs ? new ItemStack(ModItems.nugget_ra226, 2) : new ItemStack(ModItems.nugget_ra226, 1),
new ItemStack(Blocks.gravel, 1) });
recipes.put("oreThorium", new ItemStack[] {
@ -230,7 +233,7 @@ public class CentrifugeRecipes {
recipes.put("oreRedstone", new ItemStack[] {
new ItemStack(Items.redstone, 3),
new ItemStack(Items.redstone, 3),
new ItemStack(ModItems.ingot_mercury, 1),
lbs ? new ItemStack(ModItems.ingot_mercury, 3) : new ItemStack(ModItems.ingot_mercury, 1),
new ItemStack(Blocks.gravel, 1) });
recipes.put(new ComparableStack(ModBlocks.ore_tikite), new ItemStack[] {

View File

@ -45,7 +45,7 @@ public class ChemplantRecipes {
recipes.add(new ChemRecipe(38, "DESH", 300)
.inputItems(new ComparableStack(ModItems.powder_desh_mix))
.inputFluids(
GeneralConfig.enableBabyMode ?
(GeneralConfig.enableLBSM && GeneralConfig.enableLBSMSimpleChemsitry) ?
new FluidStack[] {new FluidStack(Fluids.LIGHTOIL, 200)} :
new FluidStack[] {new FluidStack(Fluids.MERCURY, 200), new FluidStack(Fluids.LIGHTOIL, 200)})
.outputItems(new ItemStack(ModItems.ingot_desh)));
@ -171,7 +171,10 @@ public class ChemplantRecipes {
new OreDictStack(KNO.dust(), 2),
new OreDictStack(KEY_PLANKS),
new ComparableStack(Items.sugar))
.inputFluids(new FluidStack(Fluids.HEATINGOIL, 200))
.inputFluids(
(GeneralConfig.enableLBSM && GeneralConfig.enableLBSMSimpleChemsitry) ?
new FluidStack(Fluids.HEATINGOIL, 200) :
new FluidStack(Fluids.GAS, 200))
.outputItems(new ItemStack(ModItems.cordite, 4)));
recipes.add(new ChemRecipe(54, "KEVLAR", 40)
.inputItems(
@ -190,6 +193,8 @@ public class ChemplantRecipes {
.inputItems(
new ComparableStack(Blocks.gravel, 2),
new ComparableStack(Blocks.sand, 2),
(GeneralConfig.enableLBSM && GeneralConfig.enableLBSMSimpleChemsitry) ?
new OreDictStack(ASBESTOS.ingot(), 1) :
new OreDictStack(ASBESTOS.ingot(), 4))
.inputFluids(new FluidStack(Fluids.WATER, 2000))
.outputItems(new ItemStack(ModBlocks.concrete_asbestos, 16)));
@ -224,6 +229,8 @@ public class ChemplantRecipes {
new OreDictStack(P_RED.dust()))
.inputFluids(
new FluidStack(Fluids.ACID, 100),
(GeneralConfig.enableLBSM && GeneralConfig.enableLBSMSimpleChemsitry) ?
new FluidStack(Fluids.WATER, 200) :
new FluidStack(Fluids.MERCURY, 50))
.outputItems(new ItemStack(ModItems.ingot_saturnite, 2)));
recipes.add(new ChemRecipe(62, "BALEFIRE", 100)

View File

@ -6,6 +6,7 @@ import java.util.List;
import com.hbm.inventory.RecipesCommon;
import com.hbm.inventory.RecipesCommon.ComparableStack;
import com.hbm.items.ModItems;
import com.hbm.tileentity.machine.TileEntityHadron.EnumHadronState;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
@ -112,6 +113,8 @@ public class HadronRecipes {
));
}
public static EnumHadronState returnCode = EnumHadronState.NORESULT;
/**
* Resolves recipes, simple enough.
* @param in1
@ -127,11 +130,15 @@ public class HadronRecipes {
if((r.in1.isApplicable(in1) && r.in2.isApplicable(in2)) ||
(r.in1.isApplicable(in2) && r.in2.isApplicable(in1))) {
if(analysisOnly != r.analysisOnly) returnCode = EnumHadronState.NORESULT_WRONG_MODE;
if(momentum < r.momentum) returnCode = EnumHadronState.NORESULT_TOO_SLOW;
if(momentum >= r.momentum && analysisOnly == r.analysisOnly)
return new ItemStack[] {r.out1, r.out2};
}
}
returnCode = EnumHadronState.NORESULT_WRONG_INGREDIENT;
return null;
}

View File

@ -115,11 +115,16 @@ public class MachineRecipes {
return new ItemStack(ModItems.ingot_starmetal, 2);
}
if(GeneralConfig.enableBabyMode) {
if(GeneralConfig.enableLBSM && GeneralConfig.enableLBSMSimpleAlloy) {
if(mODE(item, new String[] { "gemCoal", "dustCoal" }) && item2.getItem() == ModItems.canister_empty
|| item.getItem() == ModItems.canister_empty && mODE(item2, new String[] { "gemCoal", "dustCoal" })) {
return new ItemStack(ModItems.canister_full, 1, Fluids.OIL.getID());
}
if(item.getItem() == Item.getItemFromBlock(ModBlocks.block_meteor_cobble) && mODE(item2, new String[] { "ingotSteel", "dustSteel" })
|| mODE(item, new String[] { "ingotSteel", "dustSteel" }) && item2.getItem() == Item.getItemFromBlock(ModBlocks.block_meteor_cobble)) {
return new ItemStack(ModItems.ingot_meteorite);
}
}
if (item.getItem() == Item.getItemFromBlock(ModBlocks.block_meteor) && mODE(item2, new String[] {"ingotCobalt", "dustCobalt"})
@ -431,9 +436,11 @@ public class MachineRecipes {
recipes.put(new ItemStack[] { new ItemStack(ModItems.ingot_cobalt), new ItemStack(ModBlocks.block_meteor) },
getFurnaceOutput(new ItemStack(ModItems.ingot_cobalt), new ItemStack(ModBlocks.block_meteor)).copy());
if(GeneralConfig.enableBabyMode) {
if(GeneralConfig.enableLBSMFullSchrab && GeneralConfig.enableLBSMSimpleAlloy) {
recipes.put(new ItemStack[] { new ItemStack(ModItems.canister_empty), new ItemStack(Items.coal) },
getFurnaceOutput(new ItemStack(ModItems.canister_empty), new ItemStack(Items.coal)).copy());
recipes.put(new ItemStack[] { new ItemStack(ModBlocks.block_meteor_cobble), new ItemStack(ModItems.ingot_steel) },
getFurnaceOutput(new ItemStack(ModBlocks.block_meteor_cobble), new ItemStack(ModItems.ingot_steel)).copy());
}
} catch (Exception x) {

View File

@ -286,7 +286,7 @@ public class AnvilRecipes {
pullFromAssembler(new ComparableStack(ModItems.plate_mixed, 4), 3);
constructionRecipes.add(new AnvilConstructionRecipe(
new AStack[] {new ComparableStack(ModItems.ingot_arsenic), new OreDictStack(REDSTONE.dust(), 4), new OreDictStack(ASBESTOS.ingot(), 2)},
new AStack[] {new OreDictStack(AS.ingot()), new OreDictStack(REDSTONE.dust(), 4), new OreDictStack(ASBESTOS.ingot(), 2)},
new AnvilOutput(new ItemStack(ModItems.circuit_arsenic_raw))).setTier(5));
constructionRecipes.add(new AnvilConstructionRecipe(new ComparableStack(ModItems.ingot_u233, 1), new AnvilOutput(new ItemStack(ModItems.plate_fuel_u233))).setTier(4));
@ -737,14 +737,14 @@ public class AnvilRecipes {
public AnvilConstructionRecipe setTier(int tier) {
this.tierLower = tier;
if(GeneralConfig.enableBabyMode) this.tierLower = 1;
if(GeneralConfig.enableLBSM && GeneralConfig.enableLBSMUnlockAnvil) this.tierLower = 1;
return this;
}
public AnvilConstructionRecipe setTierRange(int lower, int upper) {
this.tierLower = lower;
this.tierUpper = upper;
if(GeneralConfig.enableBabyMode) this.tierLower = this.tierUpper = 1;
if(GeneralConfig.enableLBSM && GeneralConfig.enableLBSMUnlockAnvil) this.tierLower = this.tierUpper = 1;
return this;
}

View File

@ -21,7 +21,7 @@ public class AnvilSmithingRecipe {
this.output = out;
this.left = left;
this.right = right;
if(GeneralConfig.enableBabyMode) this.tier = 1;
if(GeneralConfig.enableLBSMShorterDecay && GeneralConfig.enableLBSMUnlockAnvil) this.tier = 1;
}
public AnvilSmithingRecipe makeShapeless() {

View File

@ -5631,6 +5631,7 @@ public class ModItems {
FluidContainerRegistry.registerFluidContainer(new FluidStack(ModBlocks.acid_fluid, 1000), new ItemStack(ModItems.bucket_acid));
FluidContainerRegistry.registerFluidContainer(new FluidStack(ModBlocks.toxic_fluid, 1000), new ItemStack(ModItems.bucket_toxic));
FluidContainerRegistry.registerFluidContainer(new FluidStack(ModBlocks.schrabidic_fluid, 1000), new ItemStack(ModItems.bucket_schrabidic_acid));
FluidContainerRegistry.registerFluidContainer(new FluidStack(ModBlocks.sulfuric_acid_fluid, 1000), new ItemStack(ModItems.bucket_sulfuric_acid));
BucketHandler.INSTANCE.buckets.put(ModBlocks.mud_block, ModItems.bucket_mud);
BucketHandler.INSTANCE.buckets.put(ModBlocks.acid_block, ModItems.bucket_acid);
BucketHandler.INSTANCE.buckets.put(ModBlocks.toxic_block, ModItems.bucket_toxic);

View File

@ -85,6 +85,11 @@ public class ItemFluidIdentifier extends Item implements IItemFluidIdentifier {
return Fluids.fromID(stack.getItemDamage());
}
@Override
public boolean doesSneakBypassUse(World world, int x, int y, int z, EntityPlayer player) {
return true;
}
@Override
public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int i, float f1, float f2, float f3) {
TileEntity te = world.getTileEntity(x, y, z);
@ -139,7 +144,7 @@ public class ItemFluidIdentifier extends Item implements IItemFluidIdentifier {
if (te instanceof TileEntityFluidDuctSimple && ((TileEntityFluidDuctSimple) te).getType() == oldType) {
TileEntityFluidDuctSimple nextDuct = (TileEntityFluidDuctSimple) te;
long connectionsCount = Arrays.stream(nextDuct.connections).filter(Objects::nonNull).count();
long connectionsCount = Arrays.stream(nextDuct.connections).filter(Objects::nonNull).count(); // (o -> Objects.nonNull(o))
if (connectionsCount > 1) {
markDuctsRecursively(world, nextX, nextY, nextZ, type, maxRecursion - currentRecursion);

View File

@ -9,7 +9,6 @@ import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
@ -26,14 +25,14 @@ public class ItemSchraranium extends ItemCustomLore {
@SideOnly(Side.CLIENT)
public IIcon getIconFromDamage(int meta) {
if(GeneralConfig.enableBabyMode)
if(GeneralConfig.enableLBSM && GeneralConfig.enableLBSMFullSchrab)
return this.nikonium;
return this.itemIcon;
}
public String getItemStackDisplayName(ItemStack stack) {
if(GeneralConfig.enableBabyMode)
if(GeneralConfig.enableLBSM && GeneralConfig.enableLBSMFullSchrab)
return "Nikonium Ingot";
else
return super.getItemStackDisplayName(stack);
@ -41,8 +40,8 @@ public class ItemSchraranium extends ItemCustomLore {
@Override
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) {
if(GeneralConfig.enableBabyMode)
list.add("shut up peer please for the love of god shut up i can't stand it any longer shut up shut up shut up shut up shut up");
if(GeneralConfig.enableLBSM && GeneralConfig.enableLBSMFullSchrab)
list.add("pankæk");
else
super.addInformation(itemstack, player, list, bool);
}

View File

@ -899,7 +899,7 @@ public class CraftingManager {
addShapelessAuto(DictFrame.fromOne(ModItems.parts_legendary, EnumLegendaryType.TIER2, 3), new Object[] { DictFrame.fromOne(ModItems.parts_legendary, EnumLegendaryType.TIER3) });
addShapelessAuto(DictFrame.fromOne(ModItems.parts_legendary, EnumLegendaryType.TIER3), new Object[] { ModItems.ingot_chainsteel, ModItems.ingot_smore, ModItems.gem_alexandrite, ModItems.gem_alexandrite, ModItems.gem_alexandrite });
if(GeneralConfig.enableBabyMode) {
if(GeneralConfig.enableLBSM && GeneralConfig.enableLBSMSimpleCrafting) {
addShapelessAuto(new ItemStack(ModItems.cordite, 3), new Object[] { ModItems.ballistite, Items.gunpowder, new ItemStack(Blocks.wool, 1, OreDictionary.WILDCARD_VALUE) });
addShapelessAuto(new ItemStack(ModItems.ingot_semtex, 3), new Object[] { Items.slime_ball, Blocks.tnt, KNO.dust() });
addShapelessAuto(new ItemStack(ModItems.canister_full, 1, Fluids.DIESEL.getID()), new Object[] { new ItemStack(ModItems.canister_full, 1, Fluids.OIL.getID()), REDSTONE.dust(), ModItems.canister_empty });

View File

@ -585,7 +585,7 @@ public class ModEventHandlerClient {
private ResourceLocation ashes = new ResourceLocation(RefStrings.MODID + ":textures/misc/overlay_ash.png");
@SideOnly(Side.CLIENT)
@SubscribeEvent
//@SubscribeEvent
public void onRenderStorm(RenderHandEvent event) {
if(BlockAshes.ashes == 0)

View File

@ -1,15 +1,26 @@
package com.hbm.main;
import org.lwjgl.opengl.GL11;
import com.hbm.blocks.generic.BlockAshes;
import com.hbm.items.armor.IArmorDisableModel;
import com.hbm.items.armor.IArmorDisableModel.EnumPlayerPart;
import com.hbm.lib.RefStrings;
import cpw.mods.fml.common.eventhandler.EventPriority;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.ScaledResolution;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.client.renderer.OpenGlHelper;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.entity.RenderPlayer;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.event.RenderGameOverlayEvent;
import net.minecraftforge.client.event.RenderPlayerEvent;
import net.minecraftforge.client.event.RenderGameOverlayEvent.ElementType;
public class ModEventHandlerRenderer {
@ -69,4 +80,74 @@ public class ModEventHandlerRenderer {
default: return null;
}
}
private ResourceLocation ashes = new ResourceLocation(RefStrings.MODID + ":textures/misc/overlay_ash.png");
public static int currentBrightness = 0;
public static int lastBrightness = 0;
@SubscribeEvent
public void onOverlayRender(RenderGameOverlayEvent.Pre event) {
if(event.type == ElementType.AIR) {
Minecraft mc = Minecraft.getMinecraft();
ScaledResolution resolution = new ScaledResolution(mc, mc.displayWidth, mc.displayHeight);
GL11.glPushMatrix();
GL11.glDisable(GL11.GL_DEPTH_TEST);
GL11.glDepthMask(false);
GL11.glEnable(GL11.GL_BLEND);
OpenGlHelper.glBlendFunc(770, 771, 1, 0);
GL11.glEnable(GL11.GL_ALPHA_TEST);
GL11.glAlphaFunc(GL11.GL_GEQUAL, 0.0F);
int w = resolution.getScaledWidth();
int h = resolution.getScaledHeight();
double off = System.currentTimeMillis() / 10000D % 10000D;
double aw = 1;
Tessellator tessellator = Tessellator.instance;
int cX = currentBrightness % 65536;
int cY = currentBrightness / 65536;
int lX = lastBrightness % 65536;
int lY = lastBrightness / 65536;
float interp = (mc.theWorld.getTotalWorldTime() % 20) * 0.05F;
if(mc.theWorld.getTotalWorldTime() == 1)
lastBrightness = currentBrightness;
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float)(lX + (cX - lX) * interp) / 1.0F, (float)(lY + (cY - lY) * interp) / 1.0F);
//mc.entityRenderer.enableLightmap((double)event.partialTicks);
mc.getTextureManager().bindTexture(ashes);
for(int i = 1; i < 3; i++) {
GL11.glTranslated(w, h, 0);
GL11.glRotatef(-15, 0, 0, 1);
GL11.glTranslated(-w, -h, 0);
GL11.glColor4f(1.0F, 1.0F, 1.0F, BlockAshes.ashes / 256F * 0.98F / i);
tessellator.startDrawingQuads();
tessellator.addVertexWithUV(-w * 1.25, h * 1.25, aw, 0.0D + off * i, 1.0D);
tessellator.addVertexWithUV(w * 1.25, h * 1.25, aw, 1.0D + off * i, 1.0D);
tessellator.addVertexWithUV(w * 1.25, -h * 1.25, aw, 1.0D + off * i, 0.0D);
tessellator.addVertexWithUV(-w * 1.25, -h * 1.25, aw, 0.0D + off * i, 0.0D);
tessellator.draw();
}
mc.entityRenderer.disableLightmap((double)event.partialTicks);
GL11.glDepthMask(true);
GL11.glEnable(GL11.GL_DEPTH_TEST);
GL11.glDisable(GL11.GL_BLEND);
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
GL11.glAlphaFunc(GL11.GL_GEQUAL, 0.1F);
GL11.glPopMatrix();
}
}
}

View File

@ -5,14 +5,12 @@ import com.hbm.packet.AuxGaugePacket;
import com.hbm.packet.NBTPacket;
import com.hbm.packet.PacketDispatcher;
import api.hbm.energy.ILoadedTile;
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.ISidedInventory;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.common.util.ForgeDirection;
import net.minecraftforge.fluids.FluidTank;

View File

@ -30,7 +30,7 @@ public class TileEntityDeuteriumExtractor extends TileEntityMachineBase implemen
super(0);
tanks = new FluidTank[2];
tanks[0] = new FluidTank(Fluids.WATER, 1000, 0);
tanks[1] = new FluidTank(Fluids.HEAVYWATER, 100, 0);
tanks[1] = new FluidTank(Fluids.HEAVYWATER, 100, 1);
}
@Override
@ -45,7 +45,8 @@ public class TileEntityDeuteriumExtractor extends TileEntityMachineBase implemen
this.updateConnections();
this.tanks[0].updateTank(xCoord, yCoord, zCoord, worldObj.provider.dimensionId);
this.tanks[0].updateTank(this, 25);
this.tanks[1].updateTank(this, 25);
age++;
if(age >= 10) {

View File

@ -43,6 +43,13 @@ public class TileEntityHadron extends TileEntityMachineBase implements IEnergyUs
private static final int delayNoResult = 60;
private static final int delayError = 100;
public boolean stat_success = false;
public EnumHadronState stat_state = EnumHadronState.IDLE;
public int stat_charge = 0;
public int stat_x = 0;
public int stat_y = 0;
public int stat_z = 0;
public TileEntityHadron() {
super(5);
}
@ -110,6 +117,13 @@ public class TileEntityHadron extends TileEntityMachineBase implements IEnergyUs
data.setBoolean("analysis", analysisOnly);
data.setBoolean("hopperMode", hopperMode);
data.setByte("state", (byte) state.ordinal());
data.setBoolean("stat_success", stat_success);
data.setByte("stat_state", (byte) stat_state.ordinal());
data.setInteger("stat_charge", stat_charge);
data.setInteger("stat_x", stat_x);
data.setInteger("stat_y", stat_y);
data.setInteger("stat_z", stat_z);
this.networkPack(data, 50);
}
}
@ -119,9 +133,10 @@ public class TileEntityHadron extends TileEntityMachineBase implements IEnergyUs
ItemStack[] result = HadronRecipes.getOutput(p.item1, p.item2, p.momentum, analysisOnly);
if(result == null) {
this.state = EnumHadronState.NORESULT;
this.state = HadronRecipes.returnCode;
this.delay = delayNoResult;
worldObj.playSoundEffect(p.posX, p.posY, p.posZ, "random.orb", 2, 0.5F);
this.setStats(this.state, p.momentum, false);
return;
}
@ -150,6 +165,7 @@ public class TileEntityHadron extends TileEntityMachineBase implements IEnergyUs
worldObj.playSoundEffect(p.posX, p.posY, p.posZ, "random.orb", 2, 1F);
this.delay = delaySuccess;
this.state = EnumHadronState.SUCCESS;
this.setStats(this.state, p.momentum, true);
}
@Override
@ -159,6 +175,13 @@ public class TileEntityHadron extends TileEntityMachineBase implements IEnergyUs
this.analysisOnly = data.getBoolean("analysis");
this.hopperMode = data.getBoolean("hopperMode");
this.state = EnumHadronState.values()[data.getByte("state")];
this.stat_success = data.getBoolean("stat_success");
this.stat_state = EnumHadronState.values()[data.getByte("stat_state")];
this.stat_charge = data.getInteger("stat_charge");
this.stat_x = data.getInteger("stat_x");
this.stat_y = data.getInteger("stat_y");
this.stat_z = data.getInteger("stat_z");
}
@Override
@ -261,6 +284,21 @@ public class TileEntityHadron extends TileEntityMachineBase implements IEnergyUs
return false;
}
private void setStats(EnumHadronState state, int count, boolean success) {
this.stat_state = state;
this.stat_charge = count;
this.stat_success = success;
}
private void setExpireStats(EnumHadronState state, int count, int x, int y, int z) {
this.stat_state = state;
this.stat_charge = count;
this.stat_x = x;
this.stat_y = y;
this.stat_z = z;
this.stat_success = false;
}
public class Particle {
//Starting values
@ -307,6 +345,7 @@ public class TileEntityHadron extends TileEntityMachineBase implements IEnergyUs
TileEntityHadron.this.state = reason;
TileEntityHadron.this.delay = delayError;
TileEntityHadron.this.setExpireStats(reason, this.charge, posX, posY, posZ);
}
public boolean isExpired() {
@ -673,22 +712,31 @@ public class TileEntityHadron extends TileEntityMachineBase implements IEnergyUs
PROGRESS(0xffff00),
ANALYSIS(0xffff00),
NORESULT(0xff8000),
NORESULT_TOO_SLOW(0xff8000),
NORESULT_WRONG_INGREDIENT(0xff8000),
NORESULT_WRONG_MODE(0xff8000),
SUCCESS(0x00ff00),
ERROR_NO_CHARGE(0xff0000),
ERROR_NO_ANALYSIS(0xff0000),
ERROR_OBSTRUCTED_CHANNEL(0xff0000),
ERROR_EXPECTED_COIL(0xff0000),
ERROR_MALFORMED_SEGMENT(0xff0000),
ERROR_ANALYSIS_TOO_LONG(0xff0000),
ERROR_ANALYSIS_TOO_SHORT(0xff0000),
ERROR_DIODE_COLLISION(0xff0000),
ERROR_BRANCHING_TURN(0xff0000),
ERROR_GENERIC(0xff0000);
ERROR_NO_CHARGE(0xff0000, true),
ERROR_NO_ANALYSIS(0xff0000, true),
ERROR_OBSTRUCTED_CHANNEL(0xff0000, true),
ERROR_EXPECTED_COIL(0xff0000, true),
ERROR_MALFORMED_SEGMENT(0xff0000, true),
ERROR_ANALYSIS_TOO_LONG(0xff0000, true),
ERROR_ANALYSIS_TOO_SHORT(0xff0000, true),
ERROR_DIODE_COLLISION(0xff0000, true),
ERROR_BRANCHING_TURN(0xff0000, true),
ERROR_GENERIC(0xff0000, true);
public int color;
public boolean showCoord;
private EnumHadronState(int color) {
this(color, false);
}
private EnumHadronState(int color, boolean showCoord) {
this.color = color;
this.showCoord = showCoord;
}
}
}

View File

@ -389,7 +389,7 @@ public class TileEntityMachineChemplant extends TileEntityMachineBase implements
for(int j = 0; j < inv.getSizeInventory(); j++) {
if(inv.getStackInSlot(j) == null) {
if(inv.getStackInSlot(j) == null && inv.isItemValidForSlot(j, out)) {
ItemStack copy = out.copy();
copy.stackSize = 1;
inv.setInventorySlotContents(j, copy);

View File

@ -286,7 +286,7 @@ public abstract class TileEntityMachineChemplantBase extends TileEntityMachineBa
for(int j = 0; j < inv.getSizeInventory(); j++) {
if(inv.getStackInSlot(j) == null) {
if(inv.getStackInSlot(j) == null && inv.isItemValidForSlot(j, out)) {
ItemStack copy = out.copy();
copy.stackSize = 1;
inv.setInventorySlotContents(j, copy);

View File

@ -1,8 +1,6 @@
package com.hbm.tileentity.machine;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import com.hbm.interfaces.IFluidAcceptor;
import com.hbm.interfaces.IFluidContainer;
@ -18,11 +16,12 @@ import com.hbm.tileentity.TileEntityMachineBase;
import api.hbm.energy.IBatteryItem;
import api.hbm.energy.IEnergyGenerator;
import api.hbm.fluid.IFluidStandardReceiver;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraftforge.common.util.ForgeDirection;
public class TileEntityMachineDiesel extends TileEntityMachineBase implements IEnergyGenerator, IFluidContainer, IFluidAcceptor {
public class TileEntityMachineDiesel extends TileEntityMachineBase implements IEnergyGenerator, IFluidContainer, IFluidAcceptor, IFluidStandardReceiver {
public long power;
public int soundCycle = 0;
@ -103,6 +102,8 @@ public class TileEntityMachineDiesel extends TileEntityMachineBase implements IE
for(ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS)
this.sendPower(worldObj, xCoord + dir.offsetX, yCoord + dir.offsetY, zCoord + dir.offsetZ, dir);
this.updateStandardPipes(Fluids.WATER, worldObj, xCoord, yCoord, zCoord);
//Tank Management
tank.setType(3, 4, slots);
tank.loadTank(0, 1, slots);
@ -229,4 +230,9 @@ public class TileEntityMachineDiesel extends TileEntityMachineBase implements IE
if(type == tank.getTankType())
tank.setFill(i);
}
@Override
public FluidTank[] getReceivingTanks() {
return new FluidTank[] {tank};
}
}

View File

@ -14,14 +14,13 @@ import com.hbm.lib.Library;
import com.hbm.main.ModEventHandler;
import com.hbm.tileentity.TileEntityMachineBase;
import api.hbm.fluid.IFluidStandardSender;
import api.hbm.fluid.IFluidUser;
import net.minecraft.block.Block;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.EnumSkyBlock;
import net.minecraftforge.common.util.ForgeDirection;
public class TileEntityBarrel extends TileEntityMachineBase implements IFluidAcceptor, IFluidSource, IFluidStandardSender {
public class TileEntityBarrel extends TileEntityMachineBase implements IFluidAcceptor, IFluidSource, IFluidUser {
public FluidTank tank;
public short mode = 0;
@ -54,7 +53,13 @@ public class TileEntityBarrel extends TileEntityMachineBase implements IFluidAcc
tank.unloadTank(4, 5, slots);
tank.updateTank(xCoord, yCoord, zCoord, worldObj.provider.dimensionId);
this.sendFluid(tank.getTankType(), worldObj, xCoord, yCoord - 1, zCoord, ForgeDirection.DOWN);
if(this.mode == 1 || this.mode == 2) {
this.sendFluidToAll(tank.getTankType(), this);
}
/*
* TODO: these don't work as receivers yet, don't forget how the subscription system works
*/
age++;
if(age >= 20)
@ -206,7 +211,18 @@ public class TileEntityBarrel extends TileEntityMachineBase implements IFluidAcc
}
@Override
public FluidTank[] getSendingTanks() {
return new FluidTank[] {tank};
public long transferFluid(FluidType type, long fluid) {
long toTransfer = Math.min(getDemand(type), fluid);
tank.setFill(tank.getFill() + (int) toTransfer);
return fluid - toTransfer;
}
@Override
public long getDemand(FluidType type) {
if(this.mode == 2 || this.mode == 3)
return 0;
return type == tank.getTankType() ? tank.getMaxFill() - tank.getFill() : 0;
}
}

View File

@ -1,9 +1,11 @@
package com.hbm.tileentity.machine.storage;
import com.hbm.inventory.fluid.FluidType;
import com.hbm.lib.Library;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.AxisAlignedBB;
public class TileEntityMachineBAT9000 extends TileEntityBarrel {
@ -38,6 +40,17 @@ public class TileEntityMachineBAT9000 extends TileEntityBarrel {
fillFluid(this.xCoord - 3, this.yCoord, this.zCoord - 1, getTact(), type);
}
public void sendFluidToAll(FluidType type, TileEntity te) {
sendFluid(type, worldObj, xCoord + 1, yCoord, zCoord + 3, Library.POS_Z);
sendFluid(type, worldObj, xCoord - 1, yCoord, zCoord + 3, Library.POS_Z);
sendFluid(type, worldObj, xCoord + 1, yCoord, zCoord - 3, Library.NEG_Z);
sendFluid(type, worldObj, xCoord - 1, yCoord, zCoord - 3, Library.NEG_Z);
sendFluid(type, worldObj, xCoord + 3, yCoord, zCoord + 1, Library.POS_X);
sendFluid(type, worldObj, xCoord - 3, yCoord, zCoord + 1, Library.POS_X);
sendFluid(type, worldObj, xCoord + 3, yCoord, zCoord - 1, Library.NEG_X);
sendFluid(type, worldObj, xCoord - 3, yCoord, zCoord - 1, Library.NEG_X);
}
AxisAlignedBB bb = null;
@Override

View File

@ -14,13 +14,14 @@ import com.hbm.inventory.fluid.Fluids;
import com.hbm.lib.Library;
import com.hbm.tileentity.TileEntityMachineBase;
import api.hbm.fluid.IFluidUser;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.AxisAlignedBB;
public class TileEntityMachineFluidTank extends TileEntityMachineBase implements IFluidContainer, IFluidSource, IFluidAcceptor {
public class TileEntityMachineFluidTank extends TileEntityMachineBase implements IFluidContainer, IFluidSource, IFluidAcceptor, IFluidUser {
public FluidTank tank;
public short mode = 0;
@ -49,6 +50,18 @@ public class TileEntityMachineFluidTank extends TileEntityMachineBase implements
if(age >= 20)
age = 0;
if(this.mode == 1 || this.mode == 2) {
FluidType type = tank.getTankType();
sendFluid(type, worldObj, xCoord + 2, yCoord, zCoord - 1, Library.POS_X);
sendFluid(type, worldObj, xCoord + 2, yCoord, zCoord + 1, Library.POS_X);
sendFluid(type, worldObj, xCoord - 2, yCoord, zCoord - 1, Library.NEG_X);
sendFluid(type, worldObj, xCoord - 2, yCoord, zCoord + 1, Library.NEG_X);
sendFluid(type, worldObj, xCoord - 1, yCoord, zCoord + 2, Library.POS_Z);
sendFluid(type, worldObj, xCoord + 1, yCoord, zCoord + 2, Library.POS_Z);
sendFluid(type, worldObj, xCoord - 1, yCoord, zCoord - 2, Library.NEG_Z);
sendFluid(type, worldObj, xCoord + 1, yCoord, zCoord - 2, Library.NEG_Z);
}
if((mode == 1 || mode == 2) && (age == 9 || age == 19))
fillFluidInit(tank.getTankType());
@ -179,4 +192,20 @@ public class TileEntityMachineFluidTank extends TileEntityMachineBase implements
nbt.setShort("mode", mode);
tank.writeToNBT(nbt, "tank");
}
@Override
public long transferFluid(FluidType type, long fluid) {
long toTransfer = Math.min(getDemand(type), fluid);
tank.setFill(tank.getFill() + (int) toTransfer);
return fluid - toTransfer;
}
@Override
public long getDemand(FluidType type) {
if(this.mode == 2 || this.mode == 3)
return 0;
return type == tank.getTankType() ? tank.getMaxFill() - tank.getFill() : 0;
}
}

View File

@ -5,6 +5,7 @@ import com.hbm.inventory.fluid.FluidType;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.AxisAlignedBB;
import net.minecraftforge.common.util.ForgeDirection;
@ -26,13 +27,27 @@ public class TileEntityMachineOrbus extends TileEntityBarrel {
public void fillFluidInit(FluidType type) {
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - BlockDummyable.offset).getOpposite();
ForgeDirection d2 = dir.getRotation(ForgeDirection.DOWN);
ForgeDirection rot = dir.getRotation(ForgeDirection.DOWN);
for(int i = -1; i < 7; i += 7) {
this.fillFluid(xCoord, yCoord + i, zCoord, this.getTact(), this.tank.getTankType());
this.fillFluid(xCoord + dir.offsetX, yCoord + i, zCoord + dir.offsetZ, this.getTact(), this.tank.getTankType());
this.fillFluid(xCoord + d2.offsetX, yCoord + i, zCoord + d2.offsetZ, this.getTact(), this.tank.getTankType());
this.fillFluid(xCoord + dir.offsetX + d2.offsetX, yCoord + i, zCoord + dir.offsetZ + d2.offsetZ, this.getTact(), this.tank.getTankType());
this.fillFluid(xCoord + rot.offsetX, yCoord + i, zCoord + rot.offsetZ, this.getTact(), this.tank.getTankType());
this.fillFluid(xCoord + dir.offsetX + rot.offsetX, yCoord + i, zCoord + dir.offsetZ + rot.offsetZ, this.getTact(), this.tank.getTankType());
}
}
public void sendFluidToAll(FluidType type, TileEntity te) {
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - BlockDummyable.offset).getOpposite();
ForgeDirection rot = dir.getRotation(ForgeDirection.DOWN);
for(int i = -1; i < 7; i += 7) {
ForgeDirection out = i == -1 ? ForgeDirection.DOWN : ForgeDirection.UP;
sendFluid(type, worldObj, xCoord, yCoord + i, zCoord, out);
sendFluid(type, worldObj, xCoord + dir.offsetX, yCoord + i, zCoord + dir.offsetZ, out);
sendFluid(type, worldObj, xCoord + rot.offsetX, yCoord + i, zCoord + rot.offsetZ, out);
sendFluid(type, worldObj, xCoord + dir.offsetX + rot.offsetX, yCoord + i, zCoord + dir.offsetZ + rot.offsetZ, out);
}
}

View File

@ -4,7 +4,6 @@ import java.util.Random;
import com.hbm.blocks.ModBlocks;
import com.hbm.config.GeneralConfig;
import com.hbm.main.MainRegistry;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
@ -12,18 +11,16 @@ import net.minecraft.init.Blocks;
import net.minecraft.world.World;
import net.minecraft.world.gen.feature.WorldGenerator;
public class Dud extends WorldGenerator
{
public class Dud extends WorldGenerator {
Block Block1 = ModBlocks.steel_scaffold;
Block Block2 = ModBlocks.machine_difurnace_off;
Block Block3 = ModBlocks.factory_titanium_core;
Block Block4 = ModBlocks.steel_wall;
Block Block5 = ModBlocks.reinforced_light;
protected Block[] GetValidSpawnBlocks()
{
return new Block[]
{
protected Block[] GetValidSpawnBlocks() {
return new Block[] {
Blocks.grass,
Blocks.dirt,
Blocks.stone,
@ -32,29 +29,21 @@ public class Dud extends WorldGenerator
};
}
public boolean LocationIsValidSpawn(World world, int x, int y, int z)
{
public boolean LocationIsValidSpawn(World world, int x, int y, int z) {
Block checkBlock = world.getBlock(x, y - 1, z);
Block blockAbove = world.getBlock(x, y, z);
Block blockBelow = world.getBlock(x, y - 2, z);
for (Block i : GetValidSpawnBlocks())
{
if (blockAbove != Blocks.air)
{
for(Block i : GetValidSpawnBlocks()) {
if(blockAbove != Blocks.air) {
return false;
}
if (checkBlock == i)
{
if(checkBlock == i) {
return true;
}
else if (checkBlock == Blocks.snow_layer && blockBelow == i)
{
} else if(checkBlock == Blocks.snow_layer && blockBelow == i) {
return true;
}
else if (checkBlock.getMaterial() == Material.plants && blockBelow == i)
{
} else if(checkBlock.getMaterial() == Material.plants && blockBelow == i) {
return true;
}
}
@ -62,12 +51,10 @@ public class Dud extends WorldGenerator
}
@Override
public boolean generate(World world, Random rand, int x, int y, int z)
{
public boolean generate(World world, Random rand, int x, int y, int z) {
int i = rand.nextInt(1);
if(i == 0)
{
if(i == 0) {
generate_r0(world, rand, x, y, z);
}
@ -75,8 +62,7 @@ public class Dud extends WorldGenerator
}
public boolean generate_r0(World world, Random rand, int x, int y, int z)
{
public boolean generate_r0(World world, Random rand, int x, int y, int z) {
if(!LocationIsValidSpawn(world, x, y, z))
return false;

View File

@ -5,26 +5,17 @@ import java.util.List;
import java.util.Random;
import com.hbm.blocks.ModBlocks;
import com.hbm.config.GeneralConfig;
import com.hbm.config.WorldConfig;
import com.hbm.explosion.ExplosionLarge;
import com.hbm.explosion.ExplosionNT;
import com.hbm.explosion.ExplosionNukeGeneric;
import com.hbm.explosion.ExplosionNukeSmall;
import com.hbm.explosion.ExplosionNT.ExAttrib;
import com.hbm.items.ModItems;
import com.hbm.lib.ModDamageSource;
import com.hbm.main.MainRegistry;
import com.hbm.packet.AuxParticlePacketNT;
import com.hbm.packet.PacketDispatcher;
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
import net.minecraft.block.Block;
import net.minecraft.entity.Entity;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.world.World;
@ -117,7 +108,7 @@ public class Meteorite {
List<ItemStack> list10 = new ArrayList<ItemStack>();
list10.add(new ItemStack(ModBlocks.block_meteor_broken));
generateSphere5x5(world, rand, x, y, z, list10);
world.setBlock(x, y, z, ModBlocks.taint, 9, 2);
setBlock(world, x, y, z, ModBlocks.taint, 9, 2);
return;
case 11:
// Atomic meteorite
@ -433,7 +424,7 @@ public class Meteorite {
generateBox(world, rand, x, y, z, hullL);
ItemStack stack = sCore.get(rand.nextInt(sCore.size()));
world.setBlock(x, y, z, Block.getBlockFromItem(stack.getItem()), stack.getItemDamage(), 2);
setBlock(world, x, y, z, Block.getBlockFromItem(stack.getItem()), stack.getItemDamage(), 2);
}
public void genL1(World world, Random rand, int x, int y, int z, List<ItemStack> hull, List<ItemStack> op, List<ItemStack> ip, List<ItemStack> core) {
@ -441,7 +432,7 @@ public class Meteorite {
generateStar5x5(world, rand, x, y, z, op);
generateStar3x3(world, rand, x, y, z, ip);
ItemStack stack = core.get(rand.nextInt(core.size()));
world.setBlock(x, y, z, Block.getBlockFromItem(stack.getItem()), stack.getItemDamage(), 2);
setBlock(world, x, y, z, Block.getBlockFromItem(stack.getItem()), stack.getItemDamage(), 2);
}
public void genL2(World world, Random rand, int x, int y, int z, List<ItemStack> hull, List<ItemStack> op, List<ItemStack> ip, List<ItemStack> core) {
@ -449,7 +440,7 @@ public class Meteorite {
generateSphere5x5(world, rand, x, y, z, op);
generateStar3x3(world, rand, x, y, z, ip);
ItemStack stack = core.get(rand.nextInt(core.size()));
world.setBlock(x, y, z, Block.getBlockFromItem(stack.getItem()), stack.getItemDamage(), 2);
setBlock(world, x, y, z, Block.getBlockFromItem(stack.getItem()), stack.getItemDamage(), 2);
}
public void genL3(World world, Random rand, int x, int y, int z, List<ItemStack> hull, List<ItemStack> op, List<ItemStack> ip, List<ItemStack> core) {
@ -457,7 +448,7 @@ public class Meteorite {
generateSphere5x5(world, rand, x, y, z, op);
generateBox(world, rand, x, y, z, ip);
ItemStack stack = core.get(rand.nextInt(core.size()));
world.setBlock(x, y, z, Block.getBlockFromItem(stack.getItem()), stack.getItemDamage(), 2);
setBlock(world, x, y, z, Block.getBlockFromItem(stack.getItem()), stack.getItemDamage(), 2);
}
public void genL4(World world, Random rand, int x, int y, int z, List<ItemStack> hull, List<ItemStack> op, List<ItemStack> ip, List<ItemStack> core) {
@ -466,7 +457,7 @@ public class Meteorite {
generateBox(world, rand, x, y, z, ip);
generateStar3x3(world, rand, x, y, z, this.getRandomOre(rand));
ItemStack stack = core.get(rand.nextInt(core.size()));
world.setBlock(x, y, z, Block.getBlockFromItem(stack.getItem()), stack.getItemDamage(), 2);
setBlock(world, x, y, z, Block.getBlockFromItem(stack.getItem()), stack.getItemDamage(), 2);
}
public void genL5(World world, Random rand, int x, int y, int z, List<ItemStack> hull, List<ItemStack> op, List<ItemStack> ip, List<ItemStack> core) {
@ -475,27 +466,27 @@ public class Meteorite {
generateStar5x5(world, rand, x, y, z, ip);
generateStar3x3(world, rand, x, y, z, this.getRandomOre(rand));
ItemStack stack = core.get(rand.nextInt(core.size()));
world.setBlock(x, y, z, Block.getBlockFromItem(stack.getItem()), stack.getItemDamage(), 2);
setBlock(world, x, y, z, Block.getBlockFromItem(stack.getItem()), stack.getItemDamage(), 2);
}
public void genM1(World world, Random rand, int x, int y, int z, List<ItemStack> hull, List<ItemStack> op, List<ItemStack> ip, List<ItemStack> core) {
generateSphere5x5(world, rand, x, y, z, hull);
ItemStack stack = core.get(rand.nextInt(core.size()));
world.setBlock(x, y, z, Block.getBlockFromItem(stack.getItem()), stack.getItemDamage(), 2);
setBlock(world, x, y, z, Block.getBlockFromItem(stack.getItem()), stack.getItemDamage(), 2);
}
public void genM2(World world, Random rand, int x, int y, int z, List<ItemStack> hull, List<ItemStack> op, List<ItemStack> ip, List<ItemStack> core) {
generateSphere5x5(world, rand, x, y, z, hull);
generateStar3x3(world, rand, x, y, z, op);
ItemStack stack = core.get(rand.nextInt(core.size()));
world.setBlock(x, y, z, Block.getBlockFromItem(stack.getItem()), stack.getItemDamage(), 2);
setBlock(world, x, y, z, Block.getBlockFromItem(stack.getItem()), stack.getItemDamage(), 2);
}
public void genM3(World world, Random rand, int x, int y, int z, List<ItemStack> hull, List<ItemStack> op, List<ItemStack> ip, List<ItemStack> core) {
generateSphere5x5(world, rand, x, y, z, hull);
generateBox(world, rand, x, y, z, op);
ItemStack stack = core.get(rand.nextInt(core.size()));
world.setBlock(x, y, z, Block.getBlockFromItem(stack.getItem()), stack.getItemDamage(), 2);
setBlock(world, x, y, z, Block.getBlockFromItem(stack.getItem()), stack.getItemDamage(), 2);
}
public void genM4(World world, Random rand, int x, int y, int z, List<ItemStack> hull, List<ItemStack> op, List<ItemStack> ip, List<ItemStack> core) {
@ -503,14 +494,14 @@ public class Meteorite {
generateBox(world, rand, x, y, z, op);
generateStar3x3(world, rand, x, y, z, ip);
ItemStack stack = core.get(rand.nextInt(core.size()));
world.setBlock(x, y, z, Block.getBlockFromItem(stack.getItem()), stack.getItemDamage(), 2);
setBlock(world, x, y, z, Block.getBlockFromItem(stack.getItem()), stack.getItemDamage(), 2);
}
public void genM5(World world, Random rand, int x, int y, int z, List<ItemStack> hull, List<ItemStack> op, List<ItemStack> ip, List<ItemStack> core) {
generateSphere5x5(world, rand, x, y, z, hull);
generateBox(world, rand, x, y, z, ip);
ItemStack stack = core.get(rand.nextInt(core.size()));
world.setBlock(x, y, z, Block.getBlockFromItem(stack.getItem()), stack.getItemDamage(), 2);
setBlock(world, x, y, z, Block.getBlockFromItem(stack.getItem()), stack.getItemDamage(), 2);
}
public void genM6(World world, Random rand, int x, int y, int z, List<ItemStack> hull, List<ItemStack> op, List<ItemStack> ip, List<ItemStack> core) {
@ -518,7 +509,7 @@ public class Meteorite {
generateBox(world, rand, x, y, z, ip);
generateStar3x3(world, rand, x, y, z, this.getRandomOre(rand));
ItemStack stack = core.get(rand.nextInt(core.size()));
world.setBlock(x, y, z, Block.getBlockFromItem(stack.getItem()), stack.getItemDamage(), 2);
setBlock(world, x, y, z, Block.getBlockFromItem(stack.getItem()), stack.getItemDamage(), 2);
}
public void generateSphere7x7(World world, Random rand, int x, int y, int z, List<ItemStack> set) {
@ -526,38 +517,38 @@ public class Meteorite {
for(int b = -1; b < 2; b++)
for(int c = -1; c < 2; c++) {
ItemStack stack = set.get(rand.nextInt(set.size()));
world.setBlock(x + a, y + b, z + c, Block.getBlockFromItem(stack.getItem()), stack.getItemDamage(), 2);
setBlock(world, x + a, y + b, z + c, Block.getBlockFromItem(stack.getItem()), stack.getItemDamage(), 2);
}
for(int a = -1; a < 2; a++)
for(int b = -3; b < 4; b++)
for(int c = -1; c < 2; c++) {
ItemStack stack = set.get(rand.nextInt(set.size()));
world.setBlock(x + a, y + b, z + c, Block.getBlockFromItem(stack.getItem()), stack.getItemDamage(), 2);
setBlock(world, x + a, y + b, z + c, Block.getBlockFromItem(stack.getItem()), stack.getItemDamage(), 2);
}
for(int a = -1; a < 2; a++)
for(int b = -1; b < 2; b++)
for(int c = -3; c < 4; c++) {
ItemStack stack = set.get(rand.nextInt(set.size()));
world.setBlock(x + a, y + b, z + c, Block.getBlockFromItem(stack.getItem()), stack.getItemDamage(), 2);
setBlock(world, x + a, y + b, z + c, Block.getBlockFromItem(stack.getItem()), stack.getItemDamage(), 2);
}
for(int a = -2; a < 3; a++)
for(int b = -2; b < 3; b++)
for(int c = -1; c < 2; c++) {
ItemStack stack = set.get(rand.nextInt(set.size()));
world.setBlock(x + a, y + b, z + c, Block.getBlockFromItem(stack.getItem()), stack.getItemDamage(), 2);
setBlock(world, x + a, y + b, z + c, Block.getBlockFromItem(stack.getItem()), stack.getItemDamage(), 2);
}
for(int a = -1; a < 2; a++)
for(int b = -2; b < 3; b++)
for(int c = -2; c < 3; c++) {
ItemStack stack = set.get(rand.nextInt(set.size()));
world.setBlock(x + a, y + b, z + c, Block.getBlockFromItem(stack.getItem()), stack.getItemDamage(), 2);
setBlock(world, x + a, y + b, z + c, Block.getBlockFromItem(stack.getItem()), stack.getItemDamage(), 2);
}
for(int a = -2; a < 3; a++)
for(int b = -1; b < 2; b++)
for(int c = -2; c < 3; c++) {
ItemStack stack = set.get(rand.nextInt(set.size()));
world.setBlock(x + a, y + b, z + c, Block.getBlockFromItem(stack.getItem()), stack.getItemDamage(), 2);
setBlock(world, x + a, y + b, z + c, Block.getBlockFromItem(stack.getItem()), stack.getItemDamage(), 2);
}
}
@ -566,19 +557,19 @@ public class Meteorite {
for(int b = -1; b < 2; b++)
for(int c = -1; c < 2; c++) {
ItemStack stack = set.get(rand.nextInt(set.size()));
world.setBlock(x + a, y + b, z + c, Block.getBlockFromItem(stack.getItem()), stack.getItemDamage(), 2);
setBlock(world, x + a, y + b, z + c, Block.getBlockFromItem(stack.getItem()), stack.getItemDamage(), 2);
}
for(int a = -1; a < 2; a++)
for(int b = -2; b < 3; b++)
for(int c = -1; c < 2; c++) {
ItemStack stack = set.get(rand.nextInt(set.size()));
world.setBlock(x + a, y + b, z + c, Block.getBlockFromItem(stack.getItem()), stack.getItemDamage(), 2);
setBlock(world, x + a, y + b, z + c, Block.getBlockFromItem(stack.getItem()), stack.getItemDamage(), 2);
}
for(int a = -1; a < 2; a++)
for(int b = -1; b < 2; b++)
for(int c = -2; c < 3; c++) {
ItemStack stack = set.get(rand.nextInt(set.size()));
world.setBlock(x + a, y + b, z + c, Block.getBlockFromItem(stack.getItem()), stack.getItemDamage(), 2);
setBlock(world, x + a, y + b, z + c, Block.getBlockFromItem(stack.getItem()), stack.getItemDamage(), 2);
}
}
@ -587,57 +578,57 @@ public class Meteorite {
for(int b = -1; b < 2; b++)
for(int c = -1; c < 2; c++) {
ItemStack stack = set.get(rand.nextInt(set.size()));
world.setBlock(x + a, y + b, z + c, Block.getBlockFromItem(stack.getItem()), stack.getItemDamage(), 2);
setBlock(world, x + a, y + b, z + c, Block.getBlockFromItem(stack.getItem()), stack.getItemDamage(), 2);
}
for(int a = -1; a < 2; a++)
for(int b = -4; b < 5; b++)
for(int c = -1; c < 2; c++) {
ItemStack stack = set.get(rand.nextInt(set.size()));
world.setBlock(x + a, y + b, z + c, Block.getBlockFromItem(stack.getItem()), stack.getItemDamage(), 2);
setBlock(world, x + a, y + b, z + c, Block.getBlockFromItem(stack.getItem()), stack.getItemDamage(), 2);
}
for(int a = -1; a < 2; a++)
for(int b = -1; b < 2; b++)
for(int c = -4; c < 5; c++) {
ItemStack stack = set.get(rand.nextInt(set.size()));
world.setBlock(x + a, y + b, z + c, Block.getBlockFromItem(stack.getItem()), stack.getItemDamage(), 2);
setBlock(world, x + a, y + b, z + c, Block.getBlockFromItem(stack.getItem()), stack.getItemDamage(), 2);
}
for(int a = -1; a < 2; a++)
for(int b = -3; b < 4; b++)
for(int c = -3; c < 4; c++) {
ItemStack stack = set.get(rand.nextInt(set.size()));
world.setBlock(x + a, y + b, z + c, Block.getBlockFromItem(stack.getItem()), stack.getItemDamage(), 2);
setBlock(world, x + a, y + b, z + c, Block.getBlockFromItem(stack.getItem()), stack.getItemDamage(), 2);
}
for(int a = -3; a < 4; a++)
for(int b = -1; b < 2; b++)
for(int c = -3; c < 4; c++) {
ItemStack stack = set.get(rand.nextInt(set.size()));
world.setBlock(x + a, y + b, z + c, Block.getBlockFromItem(stack.getItem()), stack.getItemDamage(), 2);
setBlock(world, x + a, y + b, z + c, Block.getBlockFromItem(stack.getItem()), stack.getItemDamage(), 2);
}
for(int a = -3; a < 4; a++)
for(int b = -3; b < 4; b++)
for(int c = -1; c < 2; c++) {
ItemStack stack = set.get(rand.nextInt(set.size()));
world.setBlock(x + a, y + b, z + c, Block.getBlockFromItem(stack.getItem()), stack.getItemDamage(), 2);
setBlock(world, x + a, y + b, z + c, Block.getBlockFromItem(stack.getItem()), stack.getItemDamage(), 2);
}
for(int a = -3; a < 4; a++)
for(int b = -2; b < 3; b++)
for(int c = -2; c < 3; c++) {
ItemStack stack = set.get(rand.nextInt(set.size()));
world.setBlock(x + a, y + b, z + c, Block.getBlockFromItem(stack.getItem()), stack.getItemDamage(), 2);
setBlock(world, x + a, y + b, z + c, Block.getBlockFromItem(stack.getItem()), stack.getItemDamage(), 2);
}
for(int a = -2; a < 3; a++)
for(int b = -3; b < 4; b++)
for(int c = -2; c < 3; c++) {
ItemStack stack = set.get(rand.nextInt(set.size()));
world.setBlock(x + a, y + b, z + c, Block.getBlockFromItem(stack.getItem()), stack.getItemDamage(), 2);
setBlock(world, x + a, y + b, z + c, Block.getBlockFromItem(stack.getItem()), stack.getItemDamage(), 2);
}
for(int a = -2; a < 3; a++)
for(int b = -2; b < 3; b++)
for(int c = -3; c < 4; c++) {
ItemStack stack = set.get(rand.nextInt(set.size()));
world.setBlock(x + a, y + b, z + c, Block.getBlockFromItem(stack.getItem()), stack.getItemDamage(), 2);
setBlock(world, x + a, y + b, z + c, Block.getBlockFromItem(stack.getItem()), stack.getItemDamage(), 2);
}
}
@ -646,7 +637,7 @@ public class Meteorite {
for(int b = -1; b < 2; b++)
for(int c = -1; c < 2; c++) {
ItemStack stack = set.get(rand.nextInt(set.size()));
world.setBlock(x + a, y + b, z + c, Block.getBlockFromItem(stack.getItem()), stack.getItemDamage(), 2);
setBlock(world, x + a, y + b, z + c, Block.getBlockFromItem(stack.getItem()), stack.getItemDamage(), 2);
}
}
@ -655,39 +646,39 @@ public class Meteorite {
for(int b = -1; b < 2; b++)
for(int c = -1; c < 2; c++) {
ItemStack stack = set.get(rand.nextInt(set.size()));
world.setBlock(x + a, y + b, z + c, Block.getBlockFromItem(stack.getItem()), stack.getItemDamage(), 2);
setBlock(world, x + a, y + b, z + c, Block.getBlockFromItem(stack.getItem()), stack.getItemDamage(), 2);
}
ItemStack stack = set.get(rand.nextInt(set.size()));
world.setBlock(x + 2, y, z, Block.getBlockFromItem(stack.getItem()), stack.getItemDamage(), 2);
setBlock(world, x + 2, y, z, Block.getBlockFromItem(stack.getItem()), stack.getItemDamage(), 2);
stack = set.get(rand.nextInt(set.size()));
world.setBlock(x - 2, y, z, Block.getBlockFromItem(stack.getItem()), stack.getItemDamage(), 2);
setBlock(world, x - 2, y, z, Block.getBlockFromItem(stack.getItem()), stack.getItemDamage(), 2);
stack = set.get(rand.nextInt(set.size()));
world.setBlock(x, y + 2, z, Block.getBlockFromItem(stack.getItem()), stack.getItemDamage(), 2);
setBlock(world, x, y + 2, z, Block.getBlockFromItem(stack.getItem()), stack.getItemDamage(), 2);
stack = set.get(rand.nextInt(set.size()));
world.setBlock(x, y - 2, z, Block.getBlockFromItem(stack.getItem()), stack.getItemDamage(), 2);
setBlock(world, x, y - 2, z, Block.getBlockFromItem(stack.getItem()), stack.getItemDamage(), 2);
stack = set.get(rand.nextInt(set.size()));
world.setBlock(x, y, z + 2, Block.getBlockFromItem(stack.getItem()), stack.getItemDamage(), 2);
setBlock(world, x, y, z + 2, Block.getBlockFromItem(stack.getItem()), stack.getItemDamage(), 2);
stack = set.get(rand.nextInt(set.size()));
world.setBlock(x, y, z - 2, Block.getBlockFromItem(stack.getItem()), stack.getItemDamage(), 2);
setBlock(world, x, y, z - 2, Block.getBlockFromItem(stack.getItem()), stack.getItemDamage(), 2);
}
public void generateStar3x3(World world, Random rand, int x, int y, int z, List<ItemStack> set) {
ItemStack stack = set.get(rand.nextInt(set.size()));
world.setBlock(x, y, z, Block.getBlockFromItem(stack.getItem()), stack.getItemDamage(), 2);
setBlock(world, x, y, z, Block.getBlockFromItem(stack.getItem()), stack.getItemDamage(), 2);
stack = set.get(rand.nextInt(set.size()));
world.setBlock(x + 1, y, z, Block.getBlockFromItem(stack.getItem()), stack.getItemDamage(), 2);
setBlock(world, x + 1, y, z, Block.getBlockFromItem(stack.getItem()), stack.getItemDamage(), 2);
stack = set.get(rand.nextInt(set.size()));
world.setBlock(x - 1, y, z, Block.getBlockFromItem(stack.getItem()), stack.getItemDamage(), 2);
setBlock(world, x - 1, y, z, Block.getBlockFromItem(stack.getItem()), stack.getItemDamage(), 2);
stack = set.get(rand.nextInt(set.size()));
world.setBlock(x, y + 1, z, Block.getBlockFromItem(stack.getItem()), stack.getItemDamage(), 2);
setBlock(world, x, y + 1, z, Block.getBlockFromItem(stack.getItem()), stack.getItemDamage(), 2);
stack = set.get(rand.nextInt(set.size()));
world.setBlock(x, y - 1, z, Block.getBlockFromItem(stack.getItem()), stack.getItemDamage(), 2);
setBlock(world, x, y - 1, z, Block.getBlockFromItem(stack.getItem()), stack.getItemDamage(), 2);
stack = set.get(rand.nextInt(set.size()));
world.setBlock(x, y, z + 1, Block.getBlockFromItem(stack.getItem()), stack.getItemDamage(), 2);
setBlock(world, x, y, z + 1, Block.getBlockFromItem(stack.getItem()), stack.getItemDamage(), 2);
stack = set.get(rand.nextInt(set.size()));
world.setBlock(x, y, z - 1, Block.getBlockFromItem(stack.getItem()), stack.getItemDamage(), 2);
setBlock(world, x, y, z - 1, Block.getBlockFromItem(stack.getItem()), stack.getItemDamage(), 2);
}
public List<ItemStack> getRandomOre(Random rand) {
@ -718,4 +709,10 @@ public class Meteorite {
return ores;
}
private void setBlock(World world, int x, int y, int z, Block b, int meta, int flag) {
Block target = world.getBlock(x, y, z);
float hardness = target.getBlockHardness(world, x, y, z);
if(hardness != -1 && hardness < 10_000)
world.setBlock(x, y, z, b, meta, flag);
}
}

View File

@ -437,7 +437,13 @@ hadron.idle=Leerlauf
hadron.modeCircular=§eRingbeschleuniger:$Magnete bilden eine Schleife.$Schaltet mehr Rezepte frei.
hadron.modeLine=§eLinearbeschleuniger:$Beschleuniger ended mit Analysekammer.$Weniger Rezepte.
hadron.noresult=Kein Ergebnis.
hadron.noresult_too_slow=Momentum unz.!
hadron.noresult_wrong_ingredient=Falsches Rezept!
hadron.noresult_wrong_mode=Falscher Modus!
hadron.progress=Verarbeite...
hadron.stats=Letztes Ergebnis:
hadron.stats_coord=Position des Fehlers: %s / %s / %s
hadron.stats_momentum=Momentum: %s
hadron.success=Abgeschlossen!
hazard.prot=Schützt vor Gefahren:
@ -3482,7 +3488,7 @@ tile.pink_stairs.name=Pinke Holztreppen
tile.plant_flower.foxglove.name=Roter Fingerhut
tile.plant_flower.nightshade.name=Schwarze Tollkirsche
tile.plant_flower.tobacco.name=Tabakpflanze
tile.plant_flower.weed.name=Weed Version 420(0)
tile.plant_flower.weed.name=Hanf
tile.plasma.name=Plasma
tile.plasma_heater.name=Plasmaerhitzer
tile.pole_satellite_receiver.name=Satellitenschüssel

View File

@ -630,7 +630,13 @@ hadron.idle=Idle
hadron.modeCircular=§eCircular Accelerator Mode:$Magnets must loop back into core.$Unlocks more recipes.
hadron.modeLine=§eLinear Accelerator Mode:$Accelerator ends with analysis chamber.$Fewer Recipes.
hadron.noresult=No Result.
hadron.noresult_too_slow=Insuff. momentum!
hadron.noresult_wrong_ingredient=Invalid recipe!
hadron.noresult_wrong_mode=Wrong mode!
hadron.progress=In Progress...
hadron.stats=Previous results:
hadron.stats_coord=Erroring position: %s / %s / %s
hadron.stats_momentum=Momentum: %s
hadron.success=Completed!
hazard.prot=Protects against hazards:
@ -3856,7 +3862,7 @@ tile.pink_stairs.name=Pink Wood Stairs
tile.plant_flower.foxglove.name=Foxglove
tile.plant_flower.nightshade.name=Deadly Nightshade
tile.plant_flower.tobacco.name=Tobacco Plant
tile.plant_flower.weed.name=Weed Version 420(0)
tile.plant_flower.weed.name=Hemp
tile.plasma.name=Plasma
tile.plasma_heater.name=Plasma Heater
tile.pole_satellite_receiver.name=Satellite Dish

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.3 KiB

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 480 B

After

Width:  |  Height:  |  Size: 483 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 290 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 338 B

After

Width:  |  Height:  |  Size: 398 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 339 B

After

Width:  |  Height:  |  Size: 394 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 323 B

After

Width:  |  Height:  |  Size: 380 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 353 B

After

Width:  |  Height:  |  Size: 382 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 359 B

After

Width:  |  Height:  |  Size: 376 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 361 B

After

Width:  |  Height:  |  Size: 397 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 353 B

After

Width:  |  Height:  |  Size: 400 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 345 B

After

Width:  |  Height:  |  Size: 365 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 360 B

After

Width:  |  Height:  |  Size: 390 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 351 B

After

Width:  |  Height:  |  Size: 386 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 338 B

After

Width:  |  Height:  |  Size: 373 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 287 B

After

Width:  |  Height:  |  Size: 382 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 340 B

After

Width:  |  Height:  |  Size: 393 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 345 B

After

Width:  |  Height:  |  Size: 342 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 314 B

After

Width:  |  Height:  |  Size: 338 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 310 B

After

Width:  |  Height:  |  Size: 316 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 295 B

After

Width:  |  Height:  |  Size: 303 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 360 B

After

Width:  |  Height:  |  Size: 376 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 356 B

After

Width:  |  Height:  |  Size: 359 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 331 B

After

Width:  |  Height:  |  Size: 344 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 327 B

After

Width:  |  Height:  |  Size: 388 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 286 B

After

Width:  |  Height:  |  Size: 311 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 344 B

After

Width:  |  Height:  |  Size: 375 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 359 B

After

Width:  |  Height:  |  Size: 369 B