Merge remote-tracking branch 'origin/master'

This commit is contained in:
BallOfEnergy 2023-08-13 18:39:57 -05:00
commit 5205c57deb
40 changed files with 666 additions and 58 deletions

View File

@ -1,30 +1,33 @@
## Added
* Electrolysis machine
* A large machine that can do the chemical plant's electrolysis recipes, as well as crystal processing
* Crystals are turned into molten metals as well as byproducts, the metal can be cast using foundry blocks
* Processing crystals requires nitric acid and yields more than what the centrifuge would give
* Environment suit
* An airtight suit for diving with high radiation resistance
* Relatively cheap, but protection is comparatively low
* Has sprint assist and accelerated diving
* Analysis tool
* A more universal version of the power net analyzer
* Currently only works on fluid networks though
* In addition to seeing links and subscribers, the analysis tool also displays subscriber positions as well as a log (up to 50 entries) of what block received how much fluid
* This should finally give more insight in the bug that rarely causes fluids to disappear
* Leadburster
* A 40mm launcher grenade that doesn't explode, instead it attaches itself to a block and starts firing bullets
* Fires in circles for 2 seconds before it self-destructs
* Congo lake
* A 40mm pump-action grenade launcher with a capacity of 4 rounds
* Lantern
* Cheap and fancy illumination
* Will blind glyphids in a small radius
* Glyphids don't actually have eyes, just don't think about it too much
* Ashpit
* An optional part that can be placed under fireboxes and heating ovens
* Collects ashes, producing one ash pile for every 10 furnace operations worth of fuel
* Ash comes in different types like wood (from planks, logs and saplings), coal (coal, lignite and coke) and generic (everything else)
* Ashes can be used as dyes, for making industrial fertilizer, as low-efficiency furnace fuel or for carbon in the crucible
* Coal ashes can also be centrifuged, returning the flammable content as unburned coal dust as well as a small amount of boron
## Changed
* Bedrock ores now spawn in the nether
* Nether bedrock ores include red phosphorus, quartz and glowstone, all yielding the items directly instead of ores
* All current nether bedrock ores are tier 1 and do not require any bore fluid
* Custom machines now show their recipes in NEI
* All it took was battling NEI's source code for 3 hours and my sanity
* Changed energy OC compatibility
* Make sure to update your programs, as the getEnergyStored and getMaxEnergy have been deprecated.
* The chlorocalcite centrifugation process now requires 8,000mB of sulfuric acid instead of 100mB of water
* Mixed chlorocalcite solution now requires flux as a reducing agent
* All chlorine producing electrolysis recipes have been moved to the electrolysis machine and can no longer be done in the chemical plant
* If only there was a much simpler recipe that may have existed at some point, life could be a dream
* Zirconium and lithium are now recognized crucible materials
* Glowstone now yields 100mB of chlorine in the combination oven instead of the initial 50mB
* Updated polish and chinese localization
* Flechettes now get stuck in blocks for a few seconds
* NBT kits now display the amount of items in a stack
* Removed the special nuclear meteorite
## Fixed
* Fixed custom machines not sending fluid
* Fixed custom machine item IO not working beyond the first slot
* Fixed target designators not accepting coordinates when not designated first (OC compatibility)
* Fixed the player's arms clipping through the armor model when punching
* Fixed thermos craching config hitting before the config is saved, resulting in an empty config the first time the server is launched
* Fixed heating oven not visually connecting to exhaust pipes
* Fixed loot blocks not correctly rendering items that require multiple render passes
* Fixed special meteorites spawning in worldgen

View File

@ -1,6 +1,6 @@
mod_version=1.0.27
# Empty build number makes a release type
mod_build_number=4683
mod_build_number=4690
credits=HbMinecraft, rodolphito (explosion algorithms), grangerave (explosion algorithms),\
\ Hoboy (textures, models), Doctor17 (russian localization), Drillgon200 (effects, models,\

View File

@ -668,6 +668,7 @@ public class ModBlocks {
public static Block heater_oilburner;
public static Block heater_electric;
public static Block heater_heatex;
public static Block machine_ashpit;
public static Block furnace_iron;
public static Block furnace_steel;
@ -1549,8 +1550,8 @@ public class ModBlocks {
lamp_uv_off = new UVLamp(false).setBlockName("lamp_uv_off").setCreativeTab(MainRegistry.blockTab);
lamp_uv_on = new UVLamp(true).setBlockName("lamp_uv_on").setCreativeTab(null);
lamp_demon = new DemonLamp().setBlockName("lamp_demon").setStepSound(Block.soundTypeMetal).setCreativeTab(MainRegistry.blockTab).setLightLevel(1F).setHardness(3.0F).setBlockTextureName(RefStrings.MODID + ":lamp_demon");
lantern = new BlockLantern().setBlockName("lantern").setStepSound(Block.soundTypeMetal).setCreativeTab(MainRegistry.blockTab).setLightLevel(1F).setHardness(3.0F).setBlockTextureName(RefStrings.MODID + ":lantern");
lantern_behemoth = new BlockLanternBehemoth().setBlockName("lantern_behemoth").setStepSound(Block.soundTypeMetal).setCreativeTab(MainRegistry.blockTab).setHardness(3.0F).setBlockTextureName(RefStrings.MODID + ":lantern");
lantern = new BlockLantern().setBlockName("lantern").setStepSound(Block.soundTypeMetal).setCreativeTab(MainRegistry.blockTab).setLightLevel(1F).setHardness(3.0F).setBlockTextureName(RefStrings.MODID + ":block_steel");
lantern_behemoth = new BlockLanternBehemoth().setBlockName("lantern_behemoth").setStepSound(Block.soundTypeMetal).setCreativeTab(null).setHardness(3.0F).setBlockTextureName(RefStrings.MODID + ":block_rust");
reinforced_stone = new BlockGeneric(Material.rock).setBlockName("reinforced_stone").setCreativeTab(MainRegistry.blockTab).setHardness(15.0F).setResistance(3000.0F).setBlockTextureName(RefStrings.MODID + ":reinforced_stone");
concrete_smooth = new BlockRadResistant(Material.rock).setBlockName("concrete_smooth").setCreativeTab(MainRegistry.blockTab).setHardness(15.0F).setResistance(4000.0F).setBlockTextureName(RefStrings.MODID + ":concrete");
@ -1816,6 +1817,7 @@ public class ModBlocks {
heater_oilburner = new HeaterOilburner().setBlockName("heater_oilburner").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
heater_electric = new HeaterElectric().setBlockName("heater_electric").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
heater_heatex = new HeaterHeatex().setBlockName("heater_heatex").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
machine_ashpit = new MachineAshpit().setBlockName("machine_ashpit").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName("stonebrick");
furnace_iron = new FurnaceIron().setBlockName("furnace_iron").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_aluminium");
furnace_steel = new FurnaceSteel().setBlockName("furnace_steel").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
@ -3066,6 +3068,7 @@ public class ModBlocks {
GameRegistry.registerBlock(machine_epress, machine_epress.getUnlocalizedName());
register(heater_firebox);
register(heater_oven);
register(machine_ashpit);
register(heater_oilburner);
register(heater_electric);
register(heater_heatex);

View File

@ -0,0 +1,47 @@
package com.hbm.blocks.machine;
import java.util.List;
import com.hbm.blocks.BlockDummyable;
import com.hbm.blocks.ITooltipProvider;
import com.hbm.tileentity.TileEntityProxyCombo;
import com.hbm.tileentity.machine.TileEntityAshpit;
import net.minecraft.block.material.Material;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
public class MachineAshpit extends BlockDummyable implements ITooltipProvider {
public MachineAshpit() {
super(Material.iron);
}
@Override
public TileEntity createNewTileEntity(World world, int meta) {
if(meta >= 12) return new TileEntityAshpit();
return new TileEntityProxyCombo().inventory();
}
@Override
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
return this.standardOpenBehavior(world, x, y, z, player, 0);
}
@Override
public int[] getDimensions() {
return new int[] {0, 0, 1, 1, 1, 1};
}
@Override
public int getOffset() {
return 1;
}
@Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
this.addStandardInfo(stack, player, list, ext);
}
}

View File

@ -63,8 +63,9 @@ public class PowderRecipes {
CraftingManager.addShapelessAuto(new ItemStack(ModItems.powder_flux, 8), new Object[] { PB.dust(), S.dust(), KEY_SAND });
CraftingManager.addShapelessAuto(new ItemStack(ModItems.powder_flux, 12), new Object[] { CA.dust(), KEY_SAND });
CraftingManager.addShapelessAuto(new ItemStack(ModItems.powder_flux, 16), new Object[] { BORAX.dust(), KEY_SAND });
CraftingManager.addShapelessAuto(new ItemStack(ModItems.powder_fertilizer, 4), new Object[] { CA.dust(), P_RED.dust(), KNO.dust(), S.dust() });
CraftingManager.addShapelessAuto(new ItemStack(ModItems.powder_fertilizer, 4), new Object[] { ANY_ASH.any(), P_RED.dust(), KNO.dust(), S.dust() });
if(GeneralConfig.enableLBSM && GeneralConfig.enableLBSMSimpleCrafting) {
CraftingManager.addShapelessAuto(new ItemStack(ModItems.powder_advanced_alloy, 4), new Object[] { REDSTONE.dust(), IRON.dust(), COAL.dust(), CU.dust() });

View File

@ -129,6 +129,7 @@ public class ToolRecipes {
CraftingManager.addRecipeAuto(new ItemStack(ModItems.mirror_tool), new Object[] { " A ", " IA", "I ", 'A', AL.ingot(), 'I', IRON.ingot() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.rbmk_tool), new Object[] { " A ", " IA", "I ", 'A', PB.ingot(), 'I', IRON.ingot() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.power_net_tool), new Object[] { "WRW", " I ", " B ", 'W', ModItems.wire_red_copper, 'R', REDSTONE.dust(), 'I', IRON.ingot(), 'B', ModItems.battery_su });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.analysis_tool), new Object[] { " G", " S ", "S ", 'G', KEY_ANYPANE, 'S', STEEL.ingot() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.kit_toolbox_empty), new Object[] { "CCC", "CIC", 'C', CU.plate(), 'I', IRON.ingot() });

View File

@ -75,6 +75,7 @@ public class WeaponRecipes {
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_karl, 1), new Object[] { "SSW", " MW", 'S', ModItems.hull_small_steel, 'W', ALLOY.plate(), 'M', ModItems.mechanism_launcher_2 });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_quadro, 1), new Object[] { "SSS", "SSS", "CM ", 'S', ModItems.hull_small_steel, 'C', ModItems.circuit_targeting_tier3, 'M', ModItems.mechanism_launcher_2 });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_hk69, 1), new Object[] { "SSI", " MB", 'S', ModItems.hull_small_steel, 'I', IRON.ingot(), 'M', ModItems.mechanism_launcher_1, 'B', ModItems.bolt_tungsten });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_congolake, 1), new Object[] { "HHR", "WLW", 'H', ModItems.hull_small_aluminium, 'R', ModItems.mechanism_rifle_1, 'W', KEY_LOG, 'L', ModItems.mechanism_launcher_1 });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_stinger, 1), new Object[] { "SSW", "CMW", 'S', STEEL.plate(), 'W', TI.plate(), 'C', ModItems.circuit_red_copper, 'M', ModItems.mechanism_launcher_2 });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_stinger_rocket, 4), new Object[] { "SS ", "STI", " IR", 'S', STEEL.plate(), 'T', Item.getItemFromBlock(Blocks.tnt), 'I', AL.plate(), 'R', REDSTONE.dust() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_revolver, 1), new Object[] { "SSM", " RW", 'S', STEEL.plate(), 'W', KEY_PLANKS, 'R', ModItems.wire_aluminium, 'M', ModItems.mechanism_revolver_1 });
@ -261,6 +262,7 @@ public class WeaponRecipes {
CraftingManager.addRecipeAuto(ModItems.ammo_grenade.stackFromEnum(2, AmmoGrenade.NUCLEAR), new Object[] { " P ", "GIG", " P ", 'G', ModItems.ammo_grenade.stackFromEnum(AmmoGrenade.HE), 'I', ModItems.neutron_reflector, 'P', PU239.nugget() });
CraftingManager.addRecipeAuto(ModItems.ammo_grenade.stackFromEnum(AmmoGrenade.FINNED), new Object[] { "G", "R", 'G', Items.feather, 'R', ModItems.ammo_grenade });
CraftingManager.addRecipeAuto(ModItems.ammo_grenade.stackFromEnum(AmmoGrenade.KAMPF), new Object[] { "G", "R", 'G', ModItems.ammo_rocket, 'R', ModItems.ammo_grenade });
CraftingManager.addRecipeAuto(ModItems.ammo_grenade.stackFromEnum(AmmoGrenade.LEADBURSTER), new Object[] { "LCL", "CHC", "LML", 'L', ModItems.pellet_buckshot, 'C', ANY_SMOKELESS.dust(), 'H', ModItems.hull_small_aluminium, 'M', ModItems.motor });
//240mm Shells
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_shell, 4), new Object[] { " T ", "GHG", "CCC", 'T', ModBlocks.tnt, 'G', Items.gunpowder, 'H', ModItems.hull_small_steel, 'C', CU.ingot() });

View File

@ -19,6 +19,7 @@ import net.minecraft.entity.monster.EntityMob;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.potion.Potion;
import net.minecraft.util.DamageSource;
import net.minecraft.util.ResourceLocation;
import net.minecraft.world.World;
@ -68,6 +69,7 @@ public class EntityGlyphid extends EntityMob {
@Override
protected Entity findPlayerToAttack() {
if(this.isPotionActive(Potion.blindness)) return null;
EntityPlayer entityplayer = this.worldObj.getClosestVulnerablePlayerToEntity(this, useExtendedTargeting() ? 128D : 16D);
return entityplayer != null && this.canEntityBeSeen(entityplayer) ? entityplayer : null;
}
@ -75,11 +77,18 @@ public class EntityGlyphid extends EntityMob {
@Override
protected void updateEntityActionState() {
super.updateEntityActionState();
// hell yeah!!
if(useExtendedTargeting() && this.entityToAttack != null && !this.hasPath()) {
this.setPathToEntity(PathFinderUtils.getPathEntityToEntityPartial(worldObj, this, this.entityToAttack, 16F, true, false, false, true));
if(this.isPotionActive(Potion.blindness)) {
this.entityToAttack = null;
this.setPathToEntity(null);
} else {
// hell yeah!!
if(useExtendedTargeting() && this.entityToAttack != null && !this.hasPath()) {
this.setPathToEntity(PathFinderUtils.getPathEntityToEntityPartial(worldObj, this, this.entityToAttack, 16F, true, false, false, true));
}
}
}
public boolean useExtendedTargeting() {

View File

@ -51,6 +51,15 @@ public class FuelHandler implements IFuelHandler {
}
}
if(fuel.getItem() == ModItems.powder_ash) {
int meta = fuel.getItemDamage();
switch(meta) {
case 0: return single / 2;
case 1: return single;
case 2: return single / 2;
}
}
return 0;
}

View File

@ -23,6 +23,7 @@ import com.hbm.inventory.material.Mats;
import com.hbm.inventory.material.NTMMaterial;
import com.hbm.inventory.material.NTMMaterial.SmeltingBehavior;
import com.hbm.items.ModItems;
import com.hbm.items.ItemEnums.EnumAshType;
import com.hbm.items.ItemEnums.EnumBriquetteType;
import com.hbm.items.ItemEnums.EnumCokeType;
import com.hbm.items.ItemEnums.EnumTarType;
@ -291,6 +292,7 @@ public class OreDictManager {
public static final DictGroup ANY_TAR = new DictGroup("Tar", KEY_OIL_TAR, KEY_COAL_TAR, KEY_CRACK_TAR, KEY_WOOD_TAR);
/** Any special post-RBMK gating material, namely bismuth and arsenic */
public static final DictFrame ANY_BISMOID = new DictFrame("AnyBismoid");
public static final DictFrame ANY_ASH = new DictFrame("Ash");
public static void registerOres() {
@ -458,6 +460,7 @@ public class OreDictManager {
for(int i = 0; i < 16; i++) { ANY_CONCRETE.any(new ItemStack(ModBlocks.concrete_colored_ext, 1, i)); }
ANY_COKE .gem(fromAll(coke, EnumCokeType.class)).block(fromAll(block_coke, EnumCokeType.class));
ANY_BISMOID .ingot(ingot_bismuth, ingot_arsenic).nugget(nugget_bismuth, nugget_arsenic).block(block_bismuth);
ANY_ASH .any(fromOne(ModItems.powder_ash, EnumAshType.WOOD), fromOne(ModItems.powder_ash, EnumAshType.COAL), fromOne(ModItems.powder_ash, EnumAshType.MISC));
/*
* TAR
@ -563,6 +566,10 @@ public class OreDictManager {
OreDictionary.registerOre("dye", new ItemStack(oil_tar, 1, OreDictionary.WILDCARD_VALUE));
OreDictionary.registerOre("dyeOrange", powder_cadmium);
OreDictionary.registerOre("dye", powder_cadmium);
OreDictionary.registerOre("dyeLightGray", fromOne(powder_ash, EnumAshType.WOOD));
OreDictionary.registerOre("dyeBlack", fromOne(powder_ash, EnumAshType.COAL));
OreDictionary.registerOre("dyeGray", fromOne(powder_ash, EnumAshType.MISC));
OreDictionary.registerOre("dye", new ItemStack(powder_ash, 1, OreDictionary.WILDCARD_VALUE));
OreDictionary.registerOre("blockGlass", glass_boron);
OreDictionary.registerOre("blockGlass", glass_lead);

View File

@ -0,0 +1,73 @@
package com.hbm.inventory.container;
import com.hbm.inventory.SlotTakeOnly;
import com.hbm.tileentity.machine.TileEntityAshpit;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.Container;
import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack;
public class ContainerAshpit extends Container {
protected TileEntityAshpit ashpit;
public ContainerAshpit(InventoryPlayer invPlayer, TileEntityAshpit ashpit) {
this.ashpit = ashpit;
this.ashpit.openInventory();
for(int i = 0; i < 5; i++) this.addSlotToContainer(new SlotTakeOnly(ashpit, i, 44 + i * 18, 27));
for(int i = 0; i < 3; i++) {
for(int j = 0; j < 9; j++) {
this.addSlotToContainer(new Slot(invPlayer, j + i * 9 + 9, 8 + j * 18, 86 + i * 18));
}
}
for(int i = 0; i < 9; i++) {
this.addSlotToContainer(new Slot(invPlayer, i, 8 + i * 18, 144));
}
}
@Override
public ItemStack transferStackInSlot(EntityPlayer player, int index) {
ItemStack stack = null;
Slot slot = (Slot) this.inventorySlots.get(index);
if(slot != null && slot.getHasStack()) {
ItemStack originalStack = slot.getStack();
stack = originalStack.copy();
if(index <= 4) {
if(!this.mergeItemStack(originalStack, 5, this.inventorySlots.size(), true)) {
return null;
}
slot.onSlotChange(originalStack, stack);
} else {
return null;
}
if(originalStack.stackSize == 0) {
slot.putStack((ItemStack) null);
} else {
slot.onSlotChanged();
}
}
return stack;
}
@Override
public boolean canInteractWith(EntityPlayer player) {
return ashpit.isUseableByPlayer(player);
}
@Override
public void onContainerClosed(EntityPlayer player) {
super.onContainerClosed(player);
this.ashpit.closeInventory();
}
}

View File

@ -0,0 +1,41 @@
package com.hbm.inventory.gui;
import org.lwjgl.opengl.GL11;
import com.hbm.inventory.container.ContainerAshpit;
import com.hbm.lib.RefStrings;
import com.hbm.tileentity.machine.TileEntityAshpit;
import net.minecraft.client.Minecraft;
import net.minecraft.client.resources.I18n;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.util.ResourceLocation;
public class GUIAshpit extends GuiInfoContainer {
private TileEntityAshpit firebox;
private final ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/machine/gui_ashpit.png");
public GUIAshpit(InventoryPlayer invPlayer, TileEntityAshpit tedf) {
super(new ContainerAshpit(invPlayer, tedf));
firebox = tedf;
this.xSize = 176;
this.ySize = 168;
}
@Override
protected void drawGuiContainerForegroundLayer(int i, int j) {
String name = this.firebox.hasCustomInventoryName() ? this.firebox.getInventoryName() : I18n.format(this.firebox.getInventoryName());
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
this.fontRendererObj.drawString(I18n.format("container.inventory"), 8, this.ySize - 96 + 2, 4210752);
}
@Override
protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
}
}

View File

@ -22,6 +22,7 @@ import com.hbm.inventory.RecipesCommon.OreDictStack;
import com.hbm.inventory.material.Mats.MaterialStack;
import com.hbm.inventory.recipes.loader.SerializableRecipe;
import com.hbm.items.ModItems;
import com.hbm.items.ItemEnums.EnumAshType;
import com.hbm.util.Compat;
import net.minecraft.block.Block;
@ -85,6 +86,10 @@ public class MatDistribution extends SerializableRecipe {
registerEntry(DictFrame.fromOne(ModBlocks.stone_resource, EnumStoneType.LIMESTONE), MAT_FLUX, DUST.q(10));
registerEntry(ModItems.powder_flux, MAT_FLUX, DUST.q(1));
registerEntry(new ItemStack(Items.coal, 1, 1), MAT_CARBON, NUGGET.q(3));
registerEntry(DictFrame.fromOne(ModItems.powder_ash, EnumAshType.WOOD), MAT_CARBON, NUGGET.q(1));
registerEntry(DictFrame.fromOne(ModItems.powder_ash, EnumAshType.COAL), MAT_CARBON, NUGGET.q(2));
registerEntry(DictFrame.fromOne(ModItems.powder_ash, EnumAshType.MISC), MAT_CARBON, NUGGET.q(1));
}
public static void registerEntry(Object key, Object... matDef) {

View File

@ -19,6 +19,7 @@ import com.hbm.inventory.RecipesCommon.AStack;
import com.hbm.inventory.RecipesCommon.ComparableStack;
import com.hbm.inventory.RecipesCommon.OreDictStack;
import com.hbm.inventory.recipes.loader.SerializableRecipe;
import com.hbm.items.ItemEnums.EnumAshType;
import com.hbm.items.ModItems;
import com.hbm.items.machine.ItemWatzPellet.EnumWatzType;
import com.hbm.items.special.ItemBedrockOre.EnumBedrockOre;
@ -368,9 +369,14 @@ public class CentrifugeRecipes extends SerializableRecipe {
recipes.put(new ComparableStack(ModBlocks.block_slag), new ItemStack[] {
new ItemStack(Blocks.gravel, 1),
new ItemStack(ModItems.powder_fire, 1),
new ItemStack(ModItems.powder_calcium), //temp
new ItemStack(ModItems.powder_calcium),
new ItemStack(ModItems.dust) });
recipes.put(new ComparableStack(ModItems.powder_ash, 1, EnumAshType.COAL.ordinal()), new ItemStack[] {
new ItemStack(ModItems.powder_coal_tiny, 2),
new ItemStack(ModItems.powder_boron_tiny, 1),
new ItemStack(ModItems.dust_tiny, 6)});
for(EnumBedrockOre ore : EnumBedrockOre.values()) {
int i = ore.ordinal();

View File

@ -18,6 +18,7 @@ import com.hbm.inventory.RecipesCommon.ComparableStack;
import com.hbm.inventory.RecipesCommon.OreDictStack;
import com.hbm.inventory.fluid.Fluids;
import com.hbm.inventory.recipes.loader.SerializableRecipe;
import com.hbm.items.ItemEnums.EnumAshType;
import com.hbm.items.ItemEnums.EnumBriquetteType;
import com.hbm.items.ItemEnums.EnumCokeType;
import com.hbm.items.ItemEnums.EnumTarType;
@ -47,9 +48,9 @@ public class CombinationRecipes extends SerializableRecipe {
recipes.put(new ComparableStack(Items.glowstone_dust), new Pair(new ItemStack(ModItems.sulfur), new FluidStack(Fluids.CHLORINE, 100)));
recipes.put(new ComparableStack(DictFrame.fromOne(ModBlocks.stone_resource, EnumStoneType.BAUXITE)), new Pair(new ItemStack(ModItems.ingot_aluminium, 2), new FluidStack(Fluids.REDMUD, 250)));
recipes.put(KEY_LOG, new Pair(new ItemStack(Items.coal, 1 ,1), new FluidStack(Fluids.WOODOIL, 250)));
recipes.put(KEY_SAPLING, new Pair(null, new FluidStack(Fluids.WOODOIL, 50)));
recipes.put(new ComparableStack(DictFrame.fromOne(ModItems.briquette, EnumBriquetteType.WOOD)), new Pair(new ItemStack(Items.coal, 1 ,1), new FluidStack(Fluids.WOODOIL, 500)));
recipes.put(KEY_LOG, new Pair(new ItemStack(Items.coal, 1 ,1), new FluidStack(Fluids.WOODOIL, 250)));
recipes.put(KEY_SAPLING, new Pair(DictFrame.fromOne(ModItems.powder_ash, EnumAshType.WOOD), new FluidStack(Fluids.WOODOIL, 50)));
recipes.put(new ComparableStack(DictFrame.fromOne(ModItems.briquette, EnumBriquetteType.WOOD)), new Pair(new ItemStack(Items.coal, 1 ,1), new FluidStack(Fluids.WOODOIL, 500)));
recipes.put(new ComparableStack(DictFrame.fromOne(ModItems.oil_tar, EnumTarType.CRUDE)), new Pair(DictFrame.fromOne(ModItems.coke, EnumCokeType.PETROLEUM), null));
recipes.put(new ComparableStack(DictFrame.fromOne(ModItems.oil_tar, EnumTarType.CRACK)), new Pair(DictFrame.fromOne(ModItems.coke, EnumCokeType.PETROLEUM), null));

View File

@ -237,6 +237,13 @@ public class AnvilRecipes {
new OreDictStack(CU.ingot(), 8)
}, new AnvilOutput(new ItemStack(ModBlocks.heater_oven))).setTier(2));
constructionRecipes.add(new AnvilConstructionRecipe(
new AStack[] {
new ComparableStack(Blocks.stone, 8),
new OreDictStack(STEEL.plate(), 2),
new OreDictStack(IRON.ingot(), 4)
}, new AnvilOutput(new ItemStack(ModBlocks.machine_ashpit))).setTier(2));
constructionRecipes.add(new AnvilConstructionRecipe(
new AStack[] {
new ComparableStack(ModItems.tank_steel, 4),

View File

@ -23,6 +23,12 @@ public class ItemEnums {
PARAFFIN
}
public static enum EnumAshType {
WOOD,
COAL,
MISC
}
public static enum EnumBriquetteType {
COAL,
LIGNITE,

View File

@ -109,6 +109,7 @@ public class ModItems {
public static Item briquette;
public static Item coal_infernal;
public static Item cinnebar;
public static Item powder_ash;
public static Item niter;
public static Item ingot_copper;
@ -2724,6 +2725,7 @@ public class ModItems {
powder_lignite = new Item().setUnlocalizedName("powder_lignite").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":powder_lignite");
coal_infernal = new Item().setUnlocalizedName("coal_infernal").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":coal_infernal");
cinnebar = new Item().setUnlocalizedName("cinnebar").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":cinnebar");
powder_ash = new ItemEnumMulti(EnumAshType.class, true, true).setUnlocalizedName("powder_ash").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":powder_ash");
ingot_gh336 = new ItemCustomLore().setRarity(EnumRarity.epic).setUnlocalizedName("ingot_gh336").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":ingot_gh336");
nugget_gh336 = new ItemCustomLore().setRarity(EnumRarity.epic).setUnlocalizedName("nugget_gh336").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":nugget_gh336");
@ -5812,6 +5814,7 @@ public class ModItems {
GameRegistry.registerItem(dust, dust.getUnlocalizedName());
GameRegistry.registerItem(dust_tiny, dust_tiny.getUnlocalizedName());
GameRegistry.registerItem(fallout, fallout.getUnlocalizedName());
GameRegistry.registerItem(powder_ash, powder_ash.getUnlocalizedName());
//Powders
GameRegistry.registerItem(powder_fire, powder_fire.getUnlocalizedName());

View File

@ -9,11 +9,14 @@ import com.hbm.blocks.generic.BlockNTMFlower.EnumFlowerType;
import com.hbm.config.GeneralConfig;
import com.hbm.config.MobConfig;
import com.hbm.config.WorldConfig;
import com.hbm.handler.MultiblockHandlerXR;
import com.hbm.items.ModItems;
import com.hbm.main.MainRegistry;
import com.hbm.saveddata.TomSaveData;
import com.hbm.tileentity.deco.TileEntityLanternBehemoth;
import com.hbm.tileentity.machine.storage.TileEntitySafe;
import com.hbm.tileentity.machine.storage.TileEntitySoyuzCapsule;
import com.hbm.util.LootGenerator;
import com.hbm.util.WeightedRandomGeneric;
import com.hbm.world.dungeon.AncientTomb;
import com.hbm.world.dungeon.Antenna;
@ -59,6 +62,7 @@ import net.minecraft.world.biome.BiomeGenJungle;
import net.minecraft.world.biome.BiomeGenRiver;
import net.minecraft.world.chunk.IChunkProvider;
import net.minecraft.world.gen.feature.WorldGenMinable;
import net.minecraftforge.common.util.ForgeDirection;
import cpw.mods.fml.common.IWorldGenerator;
public class HbmWorldGen implements IWorldGenerator {
@ -389,6 +393,29 @@ public class HbmWorldGen implements IWorldGenerator {
}
}
if(rand.nextInt(1000) == 0) {
int x = i + rand.nextInt(16);
int z = j + rand.nextInt(16);
int y = world.getHeightValue(x, z);
if(world.getBlock(x, y - 1, z).canPlaceTorchOnTop(world, x, y - 1, z) && world.getBlock(x, y, z).isReplaceable(world, x, y, z)) {
world.setBlock(x, y, z, ModBlocks.lantern_behemoth, 12, 3);
MultiblockHandlerXR.fillSpace(world, x, y, z, new int[] {4, 0, 0, 0, 0, 0}, ModBlocks.lantern_behemoth, ForgeDirection.NORTH);
TileEntityLanternBehemoth lantern = (TileEntityLanternBehemoth) world.getTileEntity(x, y, z);
lantern.isBroken = true;
if(rand.nextInt(2) == 0) {
LootGenerator.setBlock(world, x, y, z - 2);
LootGenerator.lootBooklet(world, x, y, z - 2);
}
if(GeneralConfig.enableDebugMode)
MainRegistry.logger.info("[Debug] Successfully spawned lantern at " + x + " " + (y) + " " + z);
}
}
if(GeneralConfig.enable528 && GeneralConfig.enable528BosniaSimulator && rand.nextInt(16) == 0) {
int x = i + rand.nextInt(16);
int z = j + rand.nextInt(16);
@ -629,7 +656,7 @@ public class HbmWorldGen implements IWorldGenerator {
int x = i + rand.nextInt(16);
int z = j + rand.nextInt(16);
int y = world.getHeightValue(x, z) - rand.nextInt(10);
(new Meteorite()).generate(world, rand, x, y, z, false, true, false);
(new Meteorite()).generate(world, rand, x, y, z, false, false, false);
}
if (GeneralConfig.enableNITAN) {

View File

@ -3,7 +3,7 @@ package com.hbm.lib;
public class RefStrings {
public static final String MODID = "hbm";
public static final String NAME = "Hbm's Nuclear Tech Mod";
public static final String VERSION = "1.0.27 BETA (4683)";
public static final String VERSION = "1.0.27 BETA (4690)";
//HBM's Beta Naming Convention:
//V T (X)
//V -> next release version

View File

@ -266,6 +266,7 @@ public class ClientProxy extends ServerProxy {
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityFurnaceCombination.class, new RenderFurnaceCombination());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityHeaterFirebox.class, new RenderFirebox());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityHeaterOven.class, new RenderHeatingOven());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityAshpit.class, new RenderAshpit());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityHeaterOilburner.class, new RenderOilburner());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityHeaterElectric.class, new RenderElectricHeater());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityHeaterHeatex.class, new RenderHeaterHeatex());

View File

@ -450,6 +450,7 @@ public class CraftingManager {
addRecipeAuto(new ItemStack(ModBlocks.lamp_tritium_green_off, 1), new Object[] { "GPG", "1T2", "GPG", 'G', KEY_ANYGLASS, 'P', P_RED.dust(), 'T', ModItems.cell_tritium, '1', "dustSulfur", '2', CU.dust() });
addRecipeAuto(new ItemStack(ModBlocks.lamp_tritium_blue_off, 1), new Object[] { "GPG", "1T2", "GPG", 'G', KEY_ANYGLASS, 'P',P_RED.dust(), 'T', ModItems.cell_tritium, '1', AL.dust(), '2', ST.dust() });
addRecipeAuto(new ItemStack(ModBlocks.lantern, 1), new Object[] { "PGP", " S ", " S ", 'P', KEY_ANYPANE, 'G', Items.glowstone_dust, 'S', ModBlocks.steel_beam });
addRecipeAuto(new ItemStack(ModBlocks.barbed_wire, 16), new Object[] { "AIA", "I I", "AIA", 'A', ModItems.wire_aluminium, 'I', IRON.ingot() });
addRecipeAuto(new ItemStack(ModBlocks.barbed_wire_fire, 8), new Object[] { "BBB", "BIB", "BBB", 'B', ModBlocks.barbed_wire, 'I', P_RED.dust() });

View File

@ -390,6 +390,7 @@ public class ResourceManager {
//Heaters
public static final ResourceLocation heater_firebox_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/firebox.png");
public static final ResourceLocation heater_oven_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/heating_oven.png");
public static final ResourceLocation ashpit_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/ashpit.png");
public static final ResourceLocation heater_oilburner_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/oilburner.png");
public static final ResourceLocation heater_electric_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/electric_heater.png");
public static final ResourceLocation heater_heatex_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/heater_heatex.png");

View File

@ -0,0 +1,71 @@
package com.hbm.render.tileentity;
import org.lwjgl.opengl.GL11;
import com.hbm.blocks.BlockDummyable;
import com.hbm.blocks.ModBlocks;
import com.hbm.main.ResourceManager;
import com.hbm.render.item.ItemRenderBase;
import com.hbm.tileentity.machine.TileEntityAshpit;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.item.Item;
import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.client.IItemRenderer;
public class RenderAshpit extends TileEntitySpecialRenderer implements IItemRendererProvider {
@Override
public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float interp) {
GL11.glPushMatrix();
GL11.glTranslated(x + 0.5D, y, z + 0.5D);
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glEnable(GL11.GL_CULL_FACE);
switch(tile.getBlockMetadata() - BlockDummyable.offset) {
case 3: GL11.glRotatef(0, 0F, 1F, 0F); break;
case 5: GL11.glRotatef(90, 0F, 1F, 0F); break;
case 2: GL11.glRotatef(180, 0F, 1F, 0F); break;
case 4: GL11.glRotatef(270, 0F, 1F, 0F); break;
}
GL11.glRotatef(-90, 0F, 1F, 0F);
TileEntityAshpit oven = (TileEntityAshpit) tile;
bindTexture(ResourceManager.ashpit_tex);
ResourceManager.heater_oven.renderPart("Main");
GL11.glPushMatrix();
float door = oven.prevDoorAngle + (oven.doorAngle - oven.prevDoorAngle) * interp;
GL11.glTranslated(0, 0, door * 0.75D / 135D);
ResourceManager.heater_oven.renderPart("Door");
GL11.glPopMatrix();
if(oven.isFull) {
ResourceManager.heater_oven.renderPart("InnerBurning");
} else {
ResourceManager.heater_oven.renderPart("Inner");
}
GL11.glPopMatrix();
}
@Override
public Item getItemForRenderer() {
return Item.getItemFromBlock(ModBlocks.machine_ashpit);
}
@Override
public IItemRenderer getRenderer() {
return new ItemRenderBase() {
public void renderInventory() {
GL11.glTranslated(0, -1, 0);
GL11.glScaled(3.25, 3.25, 3.25);
}
public void renderCommon() {
bindTexture(ResourceManager.ashpit_tex);
ResourceManager.heater_oven.renderPart("Main");
ResourceManager.heater_oven.renderPart("Door");
}};
}
}

View File

@ -2,13 +2,17 @@ package com.hbm.render.tileentity;
import org.lwjgl.opengl.GL11;
import com.hbm.blocks.ModBlocks;
import com.hbm.main.ResourceManager;
import com.hbm.render.item.ItemRenderBase;
import net.minecraft.client.renderer.OpenGlHelper;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.item.Item;
import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.client.IItemRenderer;
public class RenderLantern extends TileEntitySpecialRenderer {
public class RenderLantern extends TileEntitySpecialRenderer implements IItemRendererProvider {
@Override
public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float interp) {
@ -37,4 +41,29 @@ public class RenderLantern extends TileEntitySpecialRenderer {
GL11.glPopMatrix();
}
@Override
public Item getItemForRenderer() {
return Item.getItemFromBlock(ModBlocks.lantern);
}
@Override
public IItemRenderer getRenderer() {
return new ItemRenderBase() {
public void renderInventory() {
GL11.glTranslated(0, -5, 0);
double scale = 2.75;
GL11.glScaled(scale, scale, scale);
}
public void renderCommon() {
bindTexture(ResourceManager.lantern_tex);
ResourceManager.lantern.renderPart("Lantern");
GL11.glDisable(GL11.GL_TEXTURE_2D);
float mult = (float) (Math.sin(System.currentTimeMillis() / 200D) / 2 + 0.5) * 0.1F + 0.9F;
GL11.glColor3f(1F * mult, 1F * mult, 0.7F * mult);
ResourceManager.lantern.renderPart("Light");
GL11.glColor3f(1F, 1F, 1F);
GL11.glEnable(GL11.GL_TEXTURE_2D);
}};
}
}

View File

@ -100,11 +100,22 @@ public class RenderLoot extends TileEntitySpecialRenderer {
GL11.glRotated(90, 1, 0, 0);
bindTexture(TextureMap.locationItemsTexture);
IIcon icon = stack.getIconIndex();
float f14 = icon.getMinU();
float f15 = icon.getMaxU();
float f4 = icon.getMinV();
float f5 = icon.getMaxV();
ItemRenderer.renderItemIn2D(Tessellator.instance, f15, f4, f14, f5, icon.getIconWidth(), icon.getIconHeight(), 0.0625F);
for(int i = 0; i < stack.getItem().getRenderPasses(stack.getItemDamage()); i++) {
IIcon icon = stack.getItem().getIcon(stack, i);
float f14 = icon.getMinU();
float f15 = icon.getMaxU();
float f4 = icon.getMinV();
float f5 = icon.getMaxV();
int k1 = stack.getItem().getColorFromItemStack(stack, i);
float f10 = (float) (k1 >> 16 & 255) / 255.0F;
float f11 = (float) (k1 >> 8 & 255) / 255.0F;
float f12 = (float) (k1 & 255) / 255.0F;
GL11.glColor4f(1.0F * f10, 1.0F * f11, 1.0F * f12, 1.0F);
ItemRenderer.renderItemIn2D(Tessellator.instance, f15, f4, f14, f5, icon.getIconWidth(), icon.getIconHeight(), 0.0625F);
}
}
}

View File

@ -259,6 +259,7 @@ public class TileMappings {
private static void putMachines() {
put(TileEntityHeaterFirebox.class, "tileentity_firebox");
put(TileEntityHeaterOven.class, "tileentity_heating_oven");
put(TileEntityAshpit.class, "tileentity_ashpit");
put(TileEntityHeaterOilburner.class, "tileentity_oilburner");
put(TileEntityHeaterElectric.class, "tileentity_electric_heater");
put(TileEntityHeaterHeatex.class, "tileentity_heater_heatex");

View File

@ -1,12 +1,31 @@
package com.hbm.tileentity.deco;
import java.util.List;
import com.hbm.entity.mob.EntityGlyphid;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.AxisAlignedBB;
public class TileEntityLantern extends TileEntity {
@Override
public void updateEntity() {
if(!worldObj.isRemote && worldObj.getTotalWorldTime() % 20 == 0) {
List<EntityGlyphid> glyphids = worldObj.getEntitiesWithinAABB(EntityGlyphid.class, AxisAlignedBB.getBoundingBox(xCoord + 0.5, yCoord + 5.5, zCoord + 0.5, xCoord + 0.5, yCoord + 5.5, zCoord + 0.5).expand(7.5, 7.5, 7.5));
for(EntityGlyphid glyphid : glyphids) {
glyphid.addPotionEffect(new PotionEffect(Potion.blindness.id, 100, 0));
}
}
}
AxisAlignedBB bb = null;
@Override

View File

@ -48,9 +48,8 @@ public class TileEntityLanternBehemoth extends TileEntity implements INBTPacketR
new ItemStack(ModItems.circuit_copper, 4 + worldObj.rand.nextInt(2)),
new ItemStack(ModItems.circuit_red_copper, 2 + worldObj.rand.nextInt(3)),
new ItemStack(ModItems.circuit_gold, 1 + worldObj.rand.nextInt(2)),
new ItemStack(Items.diamond, 6 + worldObj.rand.nextInt(6)),
new ItemStack(Blocks.red_flower)/*,
ItemBookLore.createBook("beacon", 12, 0x808080, 0xDFBE26)*/);
worldObj.rand.nextInt(3) == 0 ? new ItemStack(ModItems.gem_alexandrite) : new ItemStack(Items.diamond, 6 + worldObj.rand.nextInt(6)),
new ItemStack(Blocks.red_flower));
shuttle.payload = payload;
worldObj.spawnEntityInWorld(shuttle);
@ -62,7 +61,7 @@ public class TileEntityLanternBehemoth extends TileEntity implements INBTPacketR
NBTTagCompound data = new NBTTagCompound();
data.setBoolean("isBroken", isBroken);
INBTPacketReceiver.networkPack(this, data, 150);
INBTPacketReceiver.networkPack(this, data, 250);
}
}

View File

@ -0,0 +1,175 @@
package com.hbm.tileentity.machine;
import com.hbm.inventory.OreDictManager.DictFrame;
import com.hbm.inventory.container.ContainerAshpit;
import com.hbm.inventory.gui.GUIAshpit;
import com.hbm.items.ItemEnums.EnumAshType;
import com.hbm.items.ModItems;
import com.hbm.tileentity.IGUIProvider;
import com.hbm.tileentity.TileEntityMachineBase;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.Container;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.MathHelper;
import net.minecraft.world.World;
public class TileEntityAshpit extends TileEntityMachineBase implements IGUIProvider {
private int playersUsing = 0;
public float doorAngle = 0;
public float prevDoorAngle = 0;
public boolean isFull;
public int ashLevelWood;
public int ashLevelCoal;
public int ashLevelMisc;
public TileEntityAshpit() {
super(5);
}
@Override
public void openInventory() {
if(!worldObj.isRemote) this.playersUsing++;
}
@Override
public void closeInventory() {
if(!worldObj.isRemote) this.playersUsing--;
}
@Override
public String getName() {
return "container.ashpit";
}
@Override
public void updateEntity() {
if(!worldObj.isRemote) {
int threshold = 2000;
if(processAsh(ashLevelWood, EnumAshType.WOOD, threshold)) ashLevelWood -= threshold;
if(processAsh(ashLevelCoal, EnumAshType.COAL, threshold)) ashLevelCoal -= threshold;
if(processAsh(ashLevelMisc, EnumAshType.MISC, threshold)) ashLevelMisc -= threshold;
isFull = false;
for(int i = 0; i < 5; i++) {
if(slots[i] != null) isFull = true;
}
NBTTagCompound data = new NBTTagCompound();
data.setInteger("playersUsing", this.playersUsing);
data.setBoolean("isFull", this.isFull);
this.networkPack(data, 50);
} else {
this.prevDoorAngle = this.doorAngle;
float swingSpeed = (doorAngle / 10F) + 3;
if(this.playersUsing > 0) {
this.doorAngle += swingSpeed;
} else {
this.doorAngle -= swingSpeed;
}
this.doorAngle = MathHelper.clamp_float(this.doorAngle, 0F, 135F);
}
}
protected boolean processAsh(int level, EnumAshType type, int threshold) {
if(level >= threshold) {
for(int i = 0; i < 5; i++) {
if(slots[i] == null) {
slots[i] = DictFrame.fromOne(ModItems.powder_ash, type);
ashLevelWood -= threshold;
return true;
} else if(slots[i].stackSize < slots[i].getMaxStackSize() && slots[i].getItem() == ModItems.powder_ash && slots[i].getItemDamage() == type.ordinal()) {
slots[i].stackSize++;
return true;
}
}
}
return false;
}
@Override
public void networkUnpack(NBTTagCompound nbt) {
this.playersUsing = nbt.getInteger("playersUsing");
this.isFull = nbt.getBoolean("isFull");
}
@Override
public int[] getAccessibleSlotsFromSide(int meta) {
return new int[] { 0, 1, 2, 3, 4 };
}
@Override
public boolean canExtractItem(int i, ItemStack itemStack, int j) {
return true;
}
@Override
public void readFromNBT(NBTTagCompound nbt) {
super.readFromNBT(nbt);
this.ashLevelWood = nbt.getInteger("ashLevelWood");
this.ashLevelCoal = nbt.getInteger("ashLevelCoal");
this.ashLevelMisc = nbt.getInteger("ashLevelMisc");
}
@Override
public void writeToNBT(NBTTagCompound nbt) {
super.writeToNBT(nbt);
nbt.setInteger("ashLevelWood", ashLevelWood);
nbt.setInteger("ashLevelCoal", ashLevelCoal);
nbt.setInteger("ashLevelMisc", ashLevelMisc);
}
AxisAlignedBB bb = null;
@Override
public AxisAlignedBB getRenderBoundingBox() {
if(bb == null) {
bb = AxisAlignedBB.getBoundingBox(
xCoord - 1,
yCoord,
zCoord - 1,
xCoord + 2,
yCoord + 1,
zCoord + 2
);
}
return bb;
}
@Override
@SideOnly(Side.CLIENT)
public double getMaxRenderDistanceSquared() {
return 65536.0D;
}
@Override
public Container provideContainer(int ID, EntityPlayer player, World world, int x, int y, int z) {
return new ContainerAshpit(player.inventory, this);
}
@Override
@SideOnly(Side.CLIENT)
public GuiScreen provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) {
return new GUIAshpit(player.inventory, this);
}
}

View File

@ -1,13 +1,17 @@
package com.hbm.tileentity.machine;
import java.util.List;
import com.hbm.blocks.BlockDummyable;
import com.hbm.handler.pollution.PollutionHandler;
import com.hbm.handler.pollution.PollutionHandler.PollutionType;
import com.hbm.inventory.fluid.FluidType;
import com.hbm.inventory.fluid.tank.FluidTank;
import com.hbm.items.ItemEnums.EnumAshType;
import com.hbm.module.ModuleBurnTime;
import com.hbm.tileentity.IGUIProvider;
import com.hbm.tileentity.TileEntityMachinePolluting;
import com.hbm.util.ItemStackUtil;
import api.hbm.fluid.IFluidStandardSender;
import api.hbm.tile.IHeatSource;
@ -15,6 +19,7 @@ import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.MathHelper;
import net.minecraftforge.common.util.ForgeDirection;
@ -68,9 +73,21 @@ public abstract class TileEntityFireboxBase extends TileEntityMachinePolluting i
for(int i = 0; i < 2; i++) {
if(slots[i] != null) {
int fuel = (int) (getModule().getBurnTime(slots[i]) * getTimeMult());
int baseTime = getModule().getBurnTime(slots[i]);
if(fuel > 0) {
if(baseTime > 0) {
int fuel = (int) (baseTime * getTimeMult());
TileEntity below = worldObj.getTileEntity(xCoord, yCoord - 1, zCoord);
if(below instanceof TileEntityAshpit) {
TileEntityAshpit ashpit = (TileEntityAshpit) below;
EnumAshType type = this.getAshFromFuel(slots[i]);
if(type == EnumAshType.WOOD) ashpit.ashLevelWood += baseTime;
if(type == EnumAshType.COAL) ashpit.ashLevelCoal += baseTime;
if(type == EnumAshType.MISC) ashpit.ashLevelMisc += baseTime;
}
this.maxBurnTime = this.burnTime = fuel;
this.burnHeat = getModule().getBurnHeat(getBaseHeat(), slots[i]);
slots[i].stackSize--;
@ -133,6 +150,22 @@ public abstract class TileEntityFireboxBase extends TileEntityMachinePolluting i
}
}
}
public EnumAshType getAshFromFuel(ItemStack stack) {
List<String> names = ItemStackUtil.getOreDictNames(stack);
for(String name : names) {
if(name.contains("Coke")) return EnumAshType.COAL;
if(name.contains("Coal")) return EnumAshType.COAL;
if(name.contains("Lignite")) return EnumAshType.COAL;
if(name.startsWith("log")) return EnumAshType.WOOD;
if(name.contains("Wood")) return EnumAshType.WOOD;
if(name.contains("Sapling")) return EnumAshType.WOOD;
}
return EnumAshType.MISC;
}
public abstract ModuleBurnTime getModule();
public abstract int getBaseHeat();

View File

@ -5,6 +5,7 @@ import java.util.Random;
import com.hbm.blocks.ModBlocks;
import com.hbm.blocks.generic.BlockLoot.TileEntityLoot;
import com.hbm.items.ModItems;
import com.hbm.items.special.ItemBookLore;
import com.hbm.items.ItemAmmoEnums.AmmoFatman;
import net.minecraft.item.Item;
@ -21,6 +22,15 @@ public class LootGenerator {
loot.addItem(stack, x + rand.nextGaussian() * 0.02, y, z + rand.nextGaussian() * 0.02);
}
public static void lootBooklet(World world, int x, int y, int z) {
TileEntityLoot loot = (TileEntityLoot) world.getTileEntity(x, y, z);
if(loot != null && loot.items.isEmpty()) {
loot.addItem(ItemBookLore.createBook("beacon", 12, 0x404040, 0xD637B3), 0, 0, 0);;
}
}
public static void lootCapNuke(World world, int x, int y, int z) {
TileEntityLoot loot = (TileEntityLoot) world.getTileEntity(x, y, z);

View File

@ -8,7 +8,6 @@ import java.util.Random;
import com.hbm.blocks.ModBlocks;
import com.hbm.config.WorldConfig;
import com.hbm.explosion.ExplosionLarge;
import com.hbm.explosion.ExplosionNukeSmall;
import com.hbm.interfaces.Spaghetti;
import com.hbm.items.ModItems;
import com.hbm.lib.ModDamageSource;
@ -121,11 +120,6 @@ public class Meteorite {
generateSphere5x5(world, rand, x, y, z, list10);
setBlock(world, x, y, z, ModBlocks.taint, 9, 2);
return;
case 11:
// Atomic meteorite
ExplosionNukeSmall.explode(world, x + 0.5, y + 0.5, z + 0.5, safe ? ExplosionNukeSmall.PARAMS_SAFE : ExplosionNukeSmall.PARAMS_MEDIUM);
return;
case 12:
// Star Blaster
world.createExplosion(null, x + 0.5, y + 0.5, z + 0.5, 10F, !safe);

View File

@ -3943,6 +3943,8 @@ tile.lamp_tritium_blue_off.name=Blaue Tritiumlampe
tile.lamp_tritium_blue_on.name=Blaue Tritiumlampe
tile.lamp_tritium_green_off.name=Grüne Tritiumlampe
tile.lamp_tritium_green_on.name=Grüne Tritiumlampe
tile.lantern.name=Laterne
tile.lantern_behemoth.name=Alte Laterne
tile.launch_pad.name=Raketenabschussrampe
tile.launch_table.name=Große Startrampe
tile.leaves_layer.name=Totes Laub
@ -3951,6 +3953,8 @@ tile.machine_amgen.name=Umgebungsstrahlungs-Generator
tile.machine_arc_furnace_off.name=Lichtbogenofen
tile.machine_arc_furnace_on.name=Lichtbogenofen
tile.machine_armor_table.name=Rüstungsmodifikationstisch
tile.machine_ashpit.name=Ashekasten
tile.machine_ashpit.desc=Sammelt Asche von Feuerbüchsen und Heizöfen
tile.machine_assembler.name=Fertigungsmaschine
tile.machine_assemfac.name=Fertigungsfabrik
tile.machine_autocrafter.name=Automatische Werkbank

View File

@ -1740,6 +1740,7 @@ item.ams_focus_limiter.desc=Maximum performance for restriction field:$Standard
item.ams_lens.name=Stabilizer Lens
item.ams_muzzle.name=Ray-Emission Muzzle
item.ams_muzzle.desc=...it emits an energy-beam thingy.
item.analysis_tool.name=Analysis Tool
item.analyzer.name=Analyzer
item.anchor_remote.name=Recall Device
item.antiknock.name=Tetraethyllead Antiknock Agent
@ -3481,6 +3482,9 @@ item.powder_advanced_alloy.name=Advanced Alloy Powder
item.powder_aluminium.name=Aluminium Powder
item.powder_asbestos.name=Asbestos Powder
item.powder_asbestos.desc=§o\"Sniffffffff- MHHHHHHMHHHHHHHHH\"§r
item.powder_ash.coal.name=Coal Ash
item.powder_ash.misc.name=Ash
item.powder_ash.wood.name=Wood Ash
item.powder_astatine.name=Astatine Powder
item.powder_at209.name=Astatine-209 Powder
item.powder_au198.name=Gold-198 Powder
@ -4871,6 +4875,8 @@ tile.lamp_tritium_blue_off.name=Blue Tritium Lamp
tile.lamp_tritium_blue_on.name=Blue Tritium Lamp
tile.lamp_tritium_green_off.name=Green Tritium Lamp
tile.lamp_tritium_green_on.name=Green Tritium Lamp
tile.lantern.name=Lantern
tile.lantern_behemoth.name=Old Lantern
tile.launch_pad.name=Missile Launch Pad
tile.launch_table.name=Large Launch Pad
tile.leaves_layer.name=Fallen Leaves
@ -4879,6 +4885,8 @@ tile.machine_amgen.name=Ambience Radiation Generator
tile.machine_arc_furnace_off.name=Arc Furnace
tile.machine_arc_furnace_on.name=Arc Furnace
tile.machine_armor_table.name=Armor Modification Table
tile.machine_ashpit.name=Ashpit
tile.machine_ashpit.desc=Collects ashes from fireboxes and heating ovens
tile.machine_assembler.name=Assembly Machine
tile.machine_assemfac.name=Assembly Factory
tile.machine_autocrafter.name=Automatic Crafting Table

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 260 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 236 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 277 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB