been thinking about that yaoi

This commit is contained in:
Bob 2026-01-10 21:31:09 +01:00
parent 4bfce2ba92
commit 8bdce3a4b3
26 changed files with 193 additions and 250 deletions

View File

@ -1,22 +1,18 @@
## Added
* Creative klystron
* Always outputs as much KyU as the most demanding existing recipe needs
## Changed
* Updated chinese and russian localization
* Increased density of osmiridium ores in tom craters considerably (from 1:500 to 1:200)
* Added a new server setting called `ENABLE_MKU` to toggle contageon effects, spread and save (part of `/ntmserver`)
* Extended logging now logs uses of MKU
* Mass storage units now display their held item on a display
* Improved HUD gauges, electric chestplates with jetpacks installed now two gauges side by side
* Material autogen now creates redstone in ingot form, allowing smaller than block quantities to be cast
* Removed the ancient ZPE blocks
* Drone hitboxes are now way smaller, which should cause them to get stuck when flying less
* The new FENSU now keeps its charge and installed muffler when broken
* Battery sockets are now compatible with comparator output
## Fixed
* Fixed missing battery socket tooltip
* Potentially fixed an issue in regards to some hidden structures spawning
* Fixed FEnSU not immediately applying the muffler effect when used
* Fixed fluid counter valve not having a recipe
* Fixed issue where `/ntmreload` would break registered fluids from addons
* Fixed yet another issue regarding crates
* Fixed RBMK fluid heaters losing their tank types when unable to boil anything
* Fixed the FEnSU, cyclotron and reliant robin missile being uncraftable due to stacksize limitations
* The system for detecting impossible recipe has been improved, instead of a fixed 64 item limit, it now uses the actual limit of the item (or 64 for ore dictionary inputs)
* The system for detecting impossible recipe has been improved, instead of a fixed 64 item limit, it now uses the actual limit of the item (or 64 for ore dictionary inputs)
* Fixed yet another issue regarding addon fluids breaking on recipe reload
* Fixed YET ANOTHER issue regarding crates, AGAIN
* Fixed a rare issue where the fusion reactor could have negative fuel
* Fixed battery socket priority tooltip offset
* Fixed enchantability on many armor sets being incorrect
* Most power armors are intended to not be enchantable at all
* Fixed crash caused by the balefire bomb
* Fixed JSON gun reload animations becoming faster and faster with the trenchmaster set

View File

@ -1062,9 +1062,6 @@ public class ModBlocks {
public static Block machine_controller;
public static Block machine_spp_bottom;
public static Block machine_spp_top;
public static Block radiobox;
public static Block radiorec;
@ -2307,9 +2304,6 @@ public class ModBlocks {
machine_siren = new MachineSiren(Material.iron).setBlockName("machine_siren").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_siren");
machine_spp_bottom = new SPPBottom(Material.iron).setBlockName("machine_spp_bottom").setHardness(5.0F).setResistance(10.0F);
machine_spp_top = new SPPTop(Material.iron).setBlockName("machine_spp_top").setHardness(5.0F).setResistance(10.0F);
radiobox = new Radiobox(Material.iron).setBlockName("radiobox").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":radiobox");
radiorec = new RadioRec(Material.iron).setBlockName("radiorec").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":radiorec");
@ -3126,8 +3120,6 @@ public class ModBlocks {
GameRegistry.registerBlock(machine_powerrtg, machine_powerrtg.getUnlocalizedName());
GameRegistry.registerBlock(machine_radiolysis, machine_radiolysis.getUnlocalizedName());
GameRegistry.registerBlock(machine_hephaestus, machine_hephaestus.getUnlocalizedName());
GameRegistry.registerBlock(machine_spp_bottom, machine_spp_bottom.getUnlocalizedName());
GameRegistry.registerBlock(machine_spp_top, machine_spp_top.getUnlocalizedName());
GameRegistry.registerBlock(hadron_plating, hadron_plating.getUnlocalizedName());
GameRegistry.registerBlock(hadron_plating_blue, hadron_plating_blue.getUnlocalizedName());

View File

@ -1,31 +0,0 @@
package com.hbm.blocks.machine;
import com.hbm.lib.RefStrings;
import com.hbm.tileentity.machine.TileEntityMachineSPP;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
public class SPPBottom extends BlockContainer {
public SPPBottom(Material p_i45386_1_) {
super(p_i45386_1_);
}
@Override
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
return new TileEntityMachineSPP();
}
@Override
@SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister iconRegister) {
this.blockIcon = iconRegister.registerIcon(RefStrings.MODID + ":block_deprecated");
}
}

View File

@ -1,22 +0,0 @@
package com.hbm.blocks.machine;
import com.hbm.lib.RefStrings;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
public class SPPTop extends Block {
public SPPTop(Material p_i45394_1_) {
super(p_i45394_1_);
}
@Override
@SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister iconRegister) {
this.blockIcon = iconRegister.registerIcon(RefStrings.MODID + ":block_deprecated");
}
}

View File

@ -1,16 +1,27 @@
package com.hbm.blocks.network;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.List;
import com.hbm.blocks.BlockDummyable;
import com.hbm.blocks.IPersistentInfoProvider;
import com.hbm.tileentity.IPersistentNBT;
import com.hbm.tileentity.TileEntityProxyCombo;
import com.hbm.tileentity.machine.storage.TileEntityBatteryREDD;
import com.hbm.util.BobMathUtil;
import net.minecraft.block.material.Material;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.stats.StatList;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
public class MachineBatteryREDD extends BlockDummyable {
public class MachineBatteryREDD extends BlockDummyable implements IPersistentInfoProvider {
public MachineBatteryREDD() {
super(Material.iron);
@ -47,4 +58,31 @@ public class MachineBatteryREDD extends BlockDummyable {
this.makeExtra(world, x + rot.offsetX * 4, y, z + rot.offsetZ * 4);
this.makeExtra(world, x - rot.offsetX * 4, y, z - rot.offsetZ * 4);
}
@Override
public ArrayList<ItemStack> getDrops(World world, int x, int y, int z, int metadata, int fortune) {
return IPersistentNBT.getDrops(world, x, y, z, this);
}
@Override
public void onBlockHarvested(World world, int x, int y, int z, int meta, EntityPlayer player) {
if(!player.capabilities.isCreativeMode) {
harvesters.set(player);
this.dropBlockAsItem(world, x, y, z, meta, 0);
harvesters.set(null);
}
}
@Override
public void harvestBlock(World world, EntityPlayer player, int x, int y, int z, int meta) {
player.addStat(StatList.mineBlockStatArray[getIdFromBlock(this)], 1);
player.addExhaustion(0.025F);
}
@Override
public void addInformation(ItemStack stack, NBTTagCompound persistentTag, EntityPlayer player, List list, boolean ext) {
if(persistentTag != null && persistentTag.hasKey("power"))
list.add(EnumChatFormatting.YELLOW + "" + BobMathUtil.format(new BigInteger(persistentTag.getByteArray("power"))) + " HE");
}
}

View File

@ -1,20 +1,24 @@
package com.hbm.blocks.network;
import java.util.ArrayList;
import java.util.List;
import com.hbm.blocks.BlockDummyable;
import com.hbm.blocks.ILookOverlay;
import com.hbm.blocks.ITooltipProvider;
import com.hbm.tileentity.TileEntityProxyCombo;
import com.hbm.tileentity.machine.storage.TileEntityBatterySocket;
import com.hbm.util.BobMathUtil;
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;
import net.minecraftforge.client.event.RenderGameOverlayEvent.Pre;
import net.minecraftforge.common.util.ForgeDirection;
public class MachineBatterySocket extends BlockDummyable implements ITooltipProvider {
public class MachineBatterySocket extends BlockDummyable implements ITooltipProvider, ILookOverlay {
public MachineBatterySocket() {
super(Material.iron);
@ -49,4 +53,43 @@ public class MachineBatterySocket extends BlockDummyable implements ITooltipProv
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
addStandardInfo(stack, player, list, ext);
}
@Override
public boolean hasComparatorInputOverride() {
return true;
}
@Override
public int getComparatorInputOverride(World world, int x, int y, int z, int side) {
if(world.getBlockMetadata(x, y, z) < 6) return 0;
int[] pos = this.findCore(world, x, y, z);
if(pos == null) return 0;
TileEntity te = world.getTileEntity(pos[0], pos[1], pos[2]);
if(!(te instanceof TileEntityBatterySocket)) return 0;
TileEntityBatterySocket battery = (TileEntityBatterySocket) te;
return battery.getComparatorPower();
}
@Override
public void printHook(Pre event, World world, int x, int y, int z) {
int[] pos = this.findCore(world, x, y, z);
if(pos == null) return;
TileEntity te = world.getTileEntity(pos[0], pos[1], pos[2]);
if(!(te instanceof TileEntityBatterySocket)) return;
TileEntityBatterySocket socket = (TileEntityBatterySocket) te;
if(socket.syncStack == null) return;
List<String> text = new ArrayList();
text.add(BobMathUtil.getShortNumber(socket.powerFromStack(socket.syncStack)) + " / " + BobMathUtil.getShortNumber(socket.maxPowerFromStack(socket.syncStack)) + "HE");
double percent = (double) socket.powerFromStack(socket.syncStack) / (double) socket.maxPowerFromStack(socket.syncStack);
int charge = (int) Math.floor(percent * 10_000D);
int color = ((int) (0xFF - 0xFF * percent)) << 16 | ((int)(0xFF * percent) << 8);
text.add("&[" + color + "&]" + (charge / 100D) + "%");
ILookOverlay.printGeneric(event, socket.syncStack.getDisplayName(), 0xffff00, 0x404000, text);
}
}

View File

@ -24,7 +24,7 @@ public abstract class EntityDroneBase extends Entity {
public EntityDroneBase(World world) {
super(world);
this.setSize(1.5F, 2.0F);
this.setSize(0.75F, 0.75F);
}
public void setTarget(double x, double y, double z) {

View File

@ -104,9 +104,6 @@ public class FluidType {
/** For CompatFluidRegistry */
public FluidType(String name, int id, int color, int p, int f, int r, EnumSymbol symbol, ResourceLocation texture) {
setupForeign(name, id, color, p, f, r, symbol, texture);
Fluids.foreignFluids.add(this);
Fluids.metaOrder.add(this);
}
public FluidType setupForeign(String name, int id, int color, int p, int f, int r, EnumSymbol symbol, ResourceLocation texture) {
@ -121,6 +118,7 @@ public class FluidType {
this.renderWithTint = true;
this.id = id;
Fluids.foreignFluids.add(this);
Fluids.register(this, id);
return this;
}

View File

@ -418,6 +418,8 @@ public class Fluids {
if(!customTypes.exists()) initDefaultFluids(customTypes);
readCustomFluids(customTypes);
for(IFluidRegisterListener listener : additionalListeners) listener.onFluidsLoad();
//AND DON'T FORGET THE META DOWN HERE
// V V V V V V V V
@ -601,6 +603,7 @@ public class Fluids {
ACID = PEROXIDE;
for(FluidType custom : customFluids) metaOrder.add(custom);
for(FluidType custom : foreignFluids) metaOrder.add(custom);
CHLORINE.addTraits(new FT_Toxin().addEntry(new ToxinDirectDamage(ModDamageSource.cloud, 2F, 20, HazardClass.GAS_LUNG, false)));
PHOSGENE.addTraits(new FT_Toxin().addEntry(new ToxinDirectDamage(ModDamageSource.cloud, 4F, 20, HazardClass.GAS_LUNG, false)));
@ -670,7 +673,6 @@ public class Fluids {
throw new IllegalStateException("A severe error has occoured during NTM's fluid registering process! The MetaOrder and Mappings are inconsistent! Mapping size: " + idMapping.size()+ " / MetaOrder size: " + metaOrder.size());
}
/// FINAL ///
long baseline = 100_000L; //we do not know
@ -921,6 +923,7 @@ public class Fluids {
}
for(IFluidRegisterListener listener : additionalListeners) listener.onFluidsLoad();
for(FluidType custom : foreignFluids) metaOrder.add(custom);
}
private static void registerCalculatedFuel(FluidType type, double base, double combustMult, FuelGrade grade) {

View File

@ -67,7 +67,7 @@ public class GUIBatterySocket extends GuiInfoContainer {
String[] desc = I18nUtil.resolveKeyArray("battery.priority." + lang + ".desc");
for(String s : desc) priority.add(s);
this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 152, guiTop + 35, 16, 16, mouseX, mouseY, priority);
this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 125, guiTop + 35, 16, 16, mouseX, mouseY, priority);
}
protected void mouseClicked(int x, int y, int i) {

View File

@ -60,7 +60,7 @@ public class Mats {
public static final NTMMaterial MAT_DIAMOND = makeNonSmeltable(1430, DIAMOND, 0xFFFFFF, 0x1B7B6B, 0x8CF4E2).setConversion(MAT_CARBON, 1, 1).setAutogen(FRAGMENT).n();
public static final NTMMaterial MAT_IRON = makeSmeltable(2600, IRON, 0xFFFFFF, 0x353535, 0xFFA259).setAutogen(FRAGMENT, DUST, PIPE, CASTPLATE, WELDEDPLATE, BLOCK).m();
public static final NTMMaterial MAT_GOLD = makeSmeltable(7900, GOLD, 0xFFFF8B, 0xC26E00, 0xE8D754).setAutogen(FRAGMENT, WIRE, NUGGET, DUST, DENSEWIRE, CASTPLATE, BLOCK).m();
public static final NTMMaterial MAT_REDSTONE = makeSmeltable(_VS + 01, REDSTONE, 0xE3260C, 0x700E06, 0xFF1000).setAutogen(FRAGMENT).n();
public static final NTMMaterial MAT_REDSTONE = makeSmeltable(_VS + 01, REDSTONE, 0xE3260C, 0x700E06, 0xFF1000).setAutogen(FRAGMENT, INGOT).n();
public static final NTMMaterial MAT_OBSIDIAN = makeSmeltable(_VS + 02, df("Obsidian"), 0x3D234D).n();
public static final NTMMaterial MAT_HEMATITE = makeAdditive( 2601, HEMATITE, 0xDFB7AE, 0x5F372E, 0x6E463D).m();
public static final NTMMaterial MAT_WROUGHTIRON = makeSmeltable(2602, df("WroughtIron"), 0xFAAB89).m();

View File

@ -4206,7 +4206,7 @@ public class ModItems {
public static void initializeItem2() {
ArmorMaterial aMatZirconium = EnumHelper.addArmorMaterial("HBM_ZIRCONIUM", 1000, new int[] { 2, 5, 3, 1 }, 100);
ArmorMaterial aMatZirconium = EnumHelper.addArmorMaterial("HBM_ZIRCONIUM", 1000, new int[] { 2, 5, 3, 1 }, 1000);
aMatZirconium.customCraftingMaterial = ModItems.ingot_zirconium;
zirconium_legs = new ArmorFSB(aMatZirconium, 2, RefStrings.MODID + ":textures/armor/zirconium_2.png").setUnlocalizedName("zirconium_legs").setTextureName(RefStrings.MODID + ":zirconium_legs");
@ -4268,7 +4268,7 @@ public class ModItems {
dieselsuit_legs = new ArmorDiesel(aMatDiesel, 2, RefStrings.MODID + ":textures/armor/starmetal_2.png", Fluids.DIESEL, 64_000, 500, 50, 1).cloneStats((ArmorFSB) dieselsuit_helmet).setUnlocalizedName("dieselsuit_legs").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":dieselsuit_legs");
dieselsuit_boots = new ArmorDiesel(aMatDiesel, 3, RefStrings.MODID + ":textures/armor/starmetal_1.png", Fluids.DIESEL, 64_000, 500, 50, 1).cloneStats((ArmorFSB) dieselsuit_helmet).setUnlocalizedName("dieselsuit_boots").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":dieselsuit_boots");
ArmorMaterial aMatAJR = EnumHelper.addArmorMaterial("HBM_T45AJR", 150, new int[] { 3, 8, 6, 3 }, 100);
ArmorMaterial aMatAJR = EnumHelper.addArmorMaterial("HBM_T45AJR", 150, new int[] { 3, 8, 6, 3 }, 0);
aMatAJR.customCraftingMaterial = ModItems.plate_armor_ajr;
ajr_helmet = new ArmorAJR(aMatAJR, 0, RefStrings.MODID + ":textures/armor/starmetal_1.png", 2500000, 10000, 2000, 25)
.enableVATS(true)
@ -4310,7 +4310,7 @@ public class ModItems {
rpa_legs = new ArmorRPA(aMatAJR, 2, RefStrings.MODID + ":textures/armor/starmetal_2.png", 2500000, 10000, 2000, 25).cloneStats((ArmorFSB) rpa_helmet).setUnlocalizedName("rpa_legs").setTextureName(RefStrings.MODID + ":rpa_legs");
rpa_boots = new ArmorRPA(aMatAJR, 3, RefStrings.MODID + ":textures/armor/starmetal_1.png", 2500000, 10000, 2000, 25).cloneStats((ArmorFSB) rpa_helmet).setUnlocalizedName("rpa_boots").setTextureName(RefStrings.MODID + ":rpa_boots");
ArmorMaterial aMatBJ = EnumHelper.addArmorMaterial("HBM_BLACKJACK", 150, new int[] { 3, 8, 6, 3 }, 100);
ArmorMaterial aMatBJ = EnumHelper.addArmorMaterial("HBM_BLACKJACK", 150, new int[] { 3, 8, 6, 3 }, 0);
aMatBJ.customCraftingMaterial = ModItems.plate_armor_lunar;
bj_helmet = new ArmorBJ(aMatBJ, 0, RefStrings.MODID + ":textures/armor/starmetal_1.png", 10000000, 10000, 1000, 100)
.enableVATS(true)
@ -4329,7 +4329,7 @@ public class ModItems {
bj_legs = new ArmorBJ(aMatBJ, 2, RefStrings.MODID + ":textures/armor/starmetal_2.png", 10000000, 10000, 1000, 100).cloneStats((ArmorFSB) bj_helmet).setUnlocalizedName("bj_legs").setTextureName(RefStrings.MODID + ":bj_legs");
bj_boots = new ArmorBJ(aMatBJ, 3, RefStrings.MODID + ":textures/armor/starmetal_1.png", 10000000, 10000, 1000, 100).cloneStats((ArmorFSB) bj_helmet).setUnlocalizedName("bj_boots").setTextureName(RefStrings.MODID + ":bj_boots");
ArmorMaterial aMatEnv = EnumHelper.addArmorMaterial("HBM_ENV", 150, new int[] { 3, 8, 6, 3 }, 100);
ArmorMaterial aMatEnv = EnumHelper.addArmorMaterial("HBM_ENV", 150, new int[] { 3, 8, 6, 3 }, 10);
aMatEnv.customCraftingMaterial = ModItems.plate_armor_hev;
envsuit_helmet = new ArmorEnvsuit(aMatEnv, 0, RefStrings.MODID + ":textures/armor/starmetal_1.png", 100_000, 1_000, 250, 0)
.addEffect(new PotionEffect(Potion.moveSpeed.id, 20, 1))
@ -4340,7 +4340,7 @@ public class ModItems {
envsuit_legs = new ArmorEnvsuit(aMatEnv, 2, RefStrings.MODID + ":textures/armor/starmetal_2.png", 100_000, 1_000, 250, 0).cloneStats((ArmorFSB) envsuit_helmet).setUnlocalizedName("envsuit_legs").setTextureName(RefStrings.MODID + ":envsuit_legs");
envsuit_boots = new ArmorEnvsuit(aMatEnv, 3, RefStrings.MODID + ":textures/armor/starmetal_1.png", 100_000, 1_000, 250, 0).cloneStats((ArmorFSB) envsuit_helmet).setUnlocalizedName("envsuit_boots").setTextureName(RefStrings.MODID + ":envsuit_boots");
ArmorMaterial aMatHEV = EnumHelper.addArmorMaterial("HBM_HEV", 150, new int[] { 3, 8, 6, 3 }, 100);
ArmorMaterial aMatHEV = EnumHelper.addArmorMaterial("HBM_HEV", 150, new int[] { 3, 8, 6, 3 }, 0);
aMatHEV.customCraftingMaterial = ModItems.plate_armor_hev;
hev_helmet = new ArmorHEV(aMatHEV, 0, RefStrings.MODID + ":textures/armor/starmetal_1.png", 1000000, 10000, 2500, 0)
.addEffect(new PotionEffect(Potion.moveSpeed.id, 20, 1))
@ -4356,7 +4356,7 @@ public class ModItems {
jackt = new ModArmor(MainRegistry.aMatSteel, 1).setUnlocalizedName("jackt").setTextureName(RefStrings.MODID + ":jackt");
jackt2 = new ModArmor(MainRegistry.aMatSteel, 1).setUnlocalizedName("jackt2").setTextureName(RefStrings.MODID + ":jackt2");
ArmorMaterial aMatFau = EnumHelper.addArmorMaterial("HBM_DIGAMMA", 150, new int[] { 3, 8, 6, 3 }, 100);
ArmorMaterial aMatFau = EnumHelper.addArmorMaterial("HBM_DIGAMMA", 150, new int[] { 3, 8, 6, 3 }, 0);
aMatFau.customCraftingMaterial = ModItems.plate_armor_fau;
fau_helmet = new ArmorDigamma(aMatFau, 0, RefStrings.MODID + ":textures/armor/starmetal_1.png", 10000000, 10000, 2500, 0)
.addEffect(new PotionEffect(Potion.jump.id, 20, 1))
@ -4372,7 +4372,7 @@ public class ModItems {
fau_legs = new ArmorDigamma(aMatFau, 2, RefStrings.MODID + ":textures/armor/starmetal_2.png", 10000000, 10000, 2500, 0).cloneStats((ArmorFSB) fau_helmet).hides(EnumPlayerPart.LEFT_LEG, EnumPlayerPart.RIGHT_LEG).setFullSetForHide().setUnlocalizedName("fau_legs").setTextureName(RefStrings.MODID + ":fau_legs");
fau_boots = new ArmorDigamma(aMatFau, 3, RefStrings.MODID + ":textures/armor/starmetal_1.png", 10000000, 10000, 2500, 0).cloneStats((ArmorFSB) fau_helmet).setUnlocalizedName("fau_boots").setTextureName(RefStrings.MODID + ":fau_boots");
ArmorMaterial aMatDNS = EnumHelper.addArmorMaterial("HBM_DNT_NANO", 150, new int[] { 3, 8, 6, 3 }, 100);
ArmorMaterial aMatDNS = EnumHelper.addArmorMaterial("HBM_DNT_NANO", 150, new int[] { 3, 8, 6, 3 }, 0);
aMatDNS.customCraftingMaterial = ModItems.plate_armor_dnt;
dns_helmet = new ArmorDNT(aMatDNS, 0, RefStrings.MODID + ":textures/armor/starmetal_1.png", 1000000000, 1000000, 100000, 115)
.addEffect(new PotionEffect(Potion.damageBoost.id, 20, 9))
@ -4391,7 +4391,7 @@ public class ModItems {
dns_legs = new ArmorDNT(aMatDNS, 2, RefStrings.MODID + ":textures/armor/starmetal_2.png", 1000000000, 1000000, 100000, 115).cloneStats((ArmorFSB) dns_helmet).setUnlocalizedName("dns_legs").setTextureName(RefStrings.MODID + ":dns_legs");
dns_boots = new ArmorDNT(aMatDNS, 3, RefStrings.MODID + ":textures/armor/starmetal_1.png", 1000000000, 1000000, 100000, 115).cloneStats((ArmorFSB) dns_helmet).setUnlocalizedName("dns_boots").setTextureName(RefStrings.MODID + ":dns_boots");
ArmorMaterial aMatTaurun = EnumHelper.addArmorMaterial("HBM_TRENCH", 150, new int[] { 3, 8, 6, 3 }, 100);
ArmorMaterial aMatTaurun = EnumHelper.addArmorMaterial("HBM_TRENCH", 150, new int[] { 3, 8, 6, 3 }, 10);
aMatTaurun.customCraftingMaterial = ModItems.plate_iron;
taurun_helmet = new ArmorTaurun(aMatTaurun, 0, RefStrings.MODID + ":textures/armor/starmetal_1.png")
.addEffect(new PotionEffect(Potion.damageBoost.id, 20, 0))
@ -4401,7 +4401,7 @@ public class ModItems {
taurun_plate = new ArmorTaurun(aMatTaurun, 1, RefStrings.MODID + ":textures/armor/starmetal_1.png").cloneStats((ArmorFSB) taurun_helmet).setUnlocalizedName("taurun_plate").setTextureName(RefStrings.MODID + ":taurun_plate");
taurun_legs = new ArmorTaurun(aMatTaurun, 2, RefStrings.MODID + ":textures/armor/starmetal_2.png").cloneStats((ArmorFSB) taurun_helmet).setUnlocalizedName("taurun_legs").setTextureName(RefStrings.MODID + ":taurun_legs");
taurun_boots = new ArmorTaurun(aMatTaurun, 3, RefStrings.MODID + ":textures/armor/starmetal_1.png").cloneStats((ArmorFSB) taurun_helmet).setUnlocalizedName("taurun_boots").setTextureName(RefStrings.MODID + ":taurun_boots");
ArmorMaterial aMatTrench = EnumHelper.addArmorMaterial("HBM_TRENCH", 150, new int[] { 3, 8, 6, 3 }, 100);
ArmorMaterial aMatTrench = EnumHelper.addArmorMaterial("HBM_TRENCH", 150, new int[] { 3, 8, 6, 3 }, 0);
aMatTrench.customCraftingMaterial = ModItems.plate_iron;
trenchmaster_helmet = new ArmorTrenchmaster(aMatTrench, 0, RefStrings.MODID + ":textures/armor/starmetal_1.png")
.addEffect(new PotionEffect(Potion.damageBoost.id, 20, 2))

View File

@ -164,12 +164,9 @@ public class ItemBlockStorageCrate extends ItemBlockBase implements IGUIProvider
stack.writeToNBT(slot);
nbt.setTag("slot" + i, slot);
}
if(nbt.hasNoTags()) {
nbt = null;
} else {
nbt.setLong("stacklock", rand.nextLong()); // add shit that prevents crates from stacking
}
// never, ever fucking ever remove the tag compound here, lack of tack compound makes the crate stackable
nbt.setLong("stacklock", rand.nextLong()); // add shit that prevents crates from stacking
target.setTagCompound(nbt);
}
@ -181,6 +178,16 @@ public class ItemBlockStorageCrate extends ItemBlockBase implements IGUIProvider
// Check for 6kb item vomit
target.setTagCompound(checkNBT(target.getTagCompound()));
player.inventoryContainer.detectAndSendChanges();
if(target.stackTagCompound != null) {
target.stackTagCompound.removeTag("stacklock");
if(target.stackTagCompound.hasNoTags()) {
target.setTagCompound(null); // if there's no tags left, clear compound to make the crate stackable again
} else {
target.stackTagCompound.setLong("stacklock", rand.nextLong()); // add shit that prevents crates from stacking
}
}
}
}
}

View File

@ -1469,6 +1469,8 @@ public class MainRegistry {
ignoreMappings.add("hbm:tile.fusion_conductor");
ignoreMappings.add("hbm:tile.fusion_center");
ignoreMappings.add("hbm:tile.fusion_motor");
ignoreMappings.add("hbm:tile.machine_spp_bottom");
ignoreMappings.add("hbm:tile.machine_spp_top");
/// REMAP ///
remapItems.put("hbm:item.gadget_explosive8", ModItems.early_explosive_lenses);

View File

@ -64,7 +64,7 @@ public class ModuleMachineFusion extends ModuleMachineBase {
// fusion reactor is the only machine as of now that consumes input while not having finished the output
if(recipe.inputFluid != null) {
for(int i = 0; i < Math.min(recipe.inputFluid.length, inputTanks.length); i++) {
inputTanks[i].setFill(inputTanks[i].getFill() - (int) Math.ceil(recipe.inputFluid[i].fill * processSpeed));
inputTanks[i].setFill(Math.max(inputTanks[i].getFill() - (int) Math.ceil(recipe.inputFluid[i].fill * processSpeed), 0));
}
}

View File

@ -58,6 +58,7 @@ public class BusAnimationKeyframe {
public double value;
public IType interpolationType;
public EType easingType;
public int originalDuration;
public int duration;
// bezier handles
@ -78,7 +79,7 @@ public class BusAnimationKeyframe {
// this one can be used for "reset" type keyframes
public BusAnimationKeyframe() {
this.value = 0;
this.duration = 1;
this.originalDuration = this.duration = 1;
this.interpolationType = IType.LINEAR;
this.easingType = EType.AUTO;
}
@ -86,7 +87,7 @@ public class BusAnimationKeyframe {
public BusAnimationKeyframe(double value, int duration) {
this();
this.value = value;
this.duration = (int) (duration / Math.max(0.001D, ClientConfig.GUN_ANIMATION_SPEED.get()));
this.originalDuration = this.duration = (int) (duration / Math.max(0.001D, ClientConfig.GUN_ANIMATION_SPEED.get()));
}
public BusAnimationKeyframe(double value, int duration, IType interpolation) {

View File

@ -90,7 +90,9 @@ public class BusAnimationSequence {
for(Dimension dim : Dimension.values()) {
List<BusAnimationKeyframe> keyframes = transformKeyframes.get(dim.ordinal());
for(BusAnimationKeyframe keyframe : keyframes) keyframe.duration *= mult;
for(BusAnimationKeyframe keyframe : keyframes) {
keyframe.duration = (int) (keyframe.originalDuration * mult);
}
}
return this;
}

View File

@ -3,6 +3,7 @@ package com.hbm.render.tileentity;
import org.lwjgl.opengl.GL11;
import com.hbm.blocks.ModBlocks;
import com.hbm.items.ModItems;
import com.hbm.items.machine.ItemBatteryPack.EnumBatteryPack;
import com.hbm.main.ResourceManager;
import com.hbm.render.item.ItemRenderBase;
@ -11,6 +12,7 @@ import com.hbm.util.EnumUtil;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.client.IItemRenderer;
@ -38,10 +40,14 @@ public class RenderBatterySocket extends TileEntitySpecialRenderer implements II
bindTexture(ResourceManager.battery_socket_tex);
ResourceManager.battery_socket.renderPart("Socket");
if(socket.renderPack >= 0) {
EnumBatteryPack pack = EnumUtil.grabEnumSafely(EnumBatteryPack.class, socket.renderPack);
bindTexture(pack.texture);
ResourceManager.battery_socket.renderPart(pack.isCapacitor() ? "Capacitor" : "Battery");
ItemStack render = socket.syncStack;
if(render != null) {
if(render.getItem() == ModItems.battery_pack) {
EnumBatteryPack pack = EnumUtil.grabEnumSafely(EnumBatteryPack.class, render.getItemDamage());
bindTexture(pack.texture);
ResourceManager.battery_socket.renderPart(pack.isCapacitor() ? "Capacitor" : "Battery");
}
}
GL11.glShadeModel(GL11.GL_FLAT);

View File

@ -123,7 +123,6 @@ public class TileMappings {
put(TileEntityMachinePress.class, "tileentity_press");
put(TileEntityMachineAmmoPress.class, "tileentity_ammo_press");
put(TileEntityMachineSiren.class, "tileentity_siren");
put(TileEntityMachineSPP.class, "tileentity_spp");
put(TileEntityMachineRadGen.class, "tileentity_radgen");
put(TileEntityMachineRadarNT.class, "tileentity_radar");
put(TileEntityMachineRadarLarge.class, "tileentity_radar_large");

View File

@ -8,7 +8,6 @@ import com.hbm.items.ModItems;
import com.hbm.tileentity.IGUIProvider;
import com.hbm.tileentity.TileEntityMachineBase;
import api.hbm.energymk2.IBatteryItem;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import io.netty.buffer.ByteBuf;
@ -104,17 +103,8 @@ public class TileEntityNukeBalefire extends TileEntityMachineBase implements IGU
}
public int getBattery() {
if(slots[1] != null && slots[1].getItem() == ModItems.battery_spark &&
((IBatteryItem)ModItems.battery_spark).getCharge(slots[1]) == ((IBatteryItem)ModItems.battery_spark).getMaxCharge(slots[1])) {
return 1;
}
if(slots[1] != null && slots[1].getItem() == ModItems.battery_trixite &&
((IBatteryItem)ModItems.battery_trixite).getCharge(slots[1]) == ((IBatteryItem)ModItems.battery_trixite).getMaxCharge(slots[1])) {
return 2;
}
if(slots[1] != null && slots[1].getItem() == ModItems.battery_spark) return 1;
if(slots[1] != null && slots[1].getItem() == ModItems.battery_trixite) return 2;
return 0;
}

View File

@ -1,97 +0,0 @@
package com.hbm.tileentity.machine;
import com.hbm.blocks.ModBlocks;
import com.hbm.lib.Library;
import com.hbm.tileentity.TileEntityLoadedBase;
import com.hbm.util.CompatEnergyControl;
import api.hbm.energymk2.IEnergyProviderMK2;
import api.hbm.tile.IInfoProviderEC;
import net.minecraft.init.Blocks;
import net.minecraft.nbt.NBTTagCompound;
public class TileEntityMachineSPP extends TileEntityLoadedBase implements IEnergyProviderMK2, IInfoProviderEC {
public long power;
public static final long maxPower = 100000;
public int age = 0;
public int gen = 0;
@Override
public void updateEntity() {
if(!worldObj.isRemote) {
this.tryProvide(worldObj, xCoord + 1, yCoord, zCoord, Library.POS_X);
this.tryProvide(worldObj, xCoord - 1, yCoord, zCoord, Library.NEG_X);
this.tryProvide(worldObj, xCoord, yCoord, zCoord + 1, Library.POS_Z);
this.tryProvide(worldObj, xCoord, yCoord, zCoord - 1, Library.NEG_Z);
this.tryProvide(worldObj, xCoord, yCoord - 1, zCoord, Library.NEG_Y);
if(worldObj.getTotalWorldTime() % 20 == 0)
gen = checkStructure() * 15;
if(gen > 0)
power += gen;
if(power > maxPower)
power = maxPower;
}
}
public int checkStructure() {
int h = 0;
for(int i = yCoord + 1; i < 254; i++)
if(worldObj.getBlock(xCoord, i, zCoord) == ModBlocks.machine_spp_top) {
h = i;
break;
}
for(int i = yCoord + 1; i < h; i++)
if(!checkSegment(i))
return 0;
return h - yCoord - 1;
}
public boolean checkSegment(int y) {
// BBB
// BAB
// BBB
return (worldObj.getBlock(xCoord + 1, y, zCoord) != Blocks.air &&
worldObj.getBlock(xCoord + 1, y, zCoord + 1) != Blocks.air &&
worldObj.getBlock(xCoord + 1, y, zCoord - 1) != Blocks.air &&
worldObj.getBlock(xCoord - 1, y, zCoord + 1) != Blocks.air &&
worldObj.getBlock(xCoord - 1, y, zCoord) != Blocks.air &&
worldObj.getBlock(xCoord - 1, y, zCoord - 1) != Blocks.air &&
worldObj.getBlock(xCoord, y, zCoord + 1) != Blocks.air &&
worldObj.getBlock(xCoord, y, zCoord - 1) != Blocks.air &&
worldObj.getBlock(xCoord, y, zCoord) == Blocks.air);
}
@Override
public long getPower() {
return this.power;
}
@Override
public void setPower(long i) {
this.power = i;
}
@Override
public long getMaxPower() {
return this.maxPower;
}
@Override
public void provideExtraInfo(NBTTagCompound data) {
data.setBoolean(CompatEnergyControl.B_ACTIVE, this.gen > 0);
data.setDouble(CompatEnergyControl.D_OUTPUT_HE, this.gen);
}
}

View File

@ -4,6 +4,7 @@ import com.hbm.interfaces.IControlReceiver;
import com.hbm.tileentity.IGUIProvider;
import com.hbm.tileentity.TileEntityMachineBase;
import com.hbm.uninos.UniNodespace;
import com.hbm.util.Compat;
import com.hbm.util.EnumUtil;
import com.hbm.util.fauxpointtwelve.BlockPos;
import com.hbm.util.fauxpointtwelve.DirPos;
@ -20,6 +21,7 @@ import io.netty.buffer.ByteBuf;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.MathHelper;
public abstract class TileEntityBatteryBase extends TileEntityMachineBase implements IEnergyConductorMK2, IEnergyProviderMK2, IEnergyReceiverMK2, IControlReceiver, IGUIProvider {
@ -67,7 +69,13 @@ public abstract class TileEntityBatteryBase extends TileEntityMachineBase implem
}
byte comp = this.getComparatorPower();
if(comp != this.lastRedstone) this.markDirty();
if(comp != this.lastRedstone) {
System.out.println(comp);
for(BlockPos port : this.getPortPos()) {
TileEntity tile = Compat.getTileStandard(worldObj, port.getX(), port.getY(), port.getZ());
if(tile != null) tile.markDirty();
}
}
this.lastRedstone = comp;
prevPowerState = this.getPower();
@ -77,8 +85,8 @@ public abstract class TileEntityBatteryBase extends TileEntityMachineBase implem
}
public byte getComparatorPower() {
double frac = (double) this.getPower() / (double) this.getMaxPower() * 15D;
return (byte) (MathHelper.clamp_int((int) frac + 1, 0, 15)); //to combat eventual rounding errors with the FEnSU's stupid maxPower
double frac = (double) this.getPower() / (double) Math.max(this.getMaxPower(), 1) * 15D;
return (byte) (MathHelper.clamp_int((int) Math.round(frac), 0, 15)); //to combat eventual rounding errors with the FEnSU's stupid maxPower
}
@Override

View File

@ -7,6 +7,7 @@ import com.hbm.inventory.gui.GUIBatteryREDD;
import com.hbm.lib.Library;
import com.hbm.main.MainRegistry;
import com.hbm.sound.AudioWrapper;
import com.hbm.tileentity.IPersistentNBT;
import com.hbm.util.fauxpointtwelve.BlockPos;
import com.hbm.util.fauxpointtwelve.DirPos;
@ -18,7 +19,7 @@ import net.minecraft.util.AxisAlignedBB;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
public class TileEntityBatteryREDD extends TileEntityBatteryBase {
public class TileEntityBatteryREDD extends TileEntityBatteryBase implements IPersistentNBT {
public float prevRotation = 0F;
public float rotation = 0F;
@ -151,7 +152,6 @@ public class TileEntityBatteryREDD extends TileEntityBatteryBase {
super.writeToNBT(nbt);
nbt.setByteArray("power", this.power.toByteArray());
}
@Override
@ -218,4 +218,19 @@ public class TileEntityBatteryREDD extends TileEntityBatteryBase {
return bb;
}
@Override
public void writeNBT(NBTTagCompound nbt) {
NBTTagCompound data = new NBTTagCompound();
data.setByteArray("power", this.power.toByteArray());
data.setBoolean("muffled", muffled);
nbt.setTag(NBT_PERSISTENT_KEY, data);
}
@Override
public void readNBT(NBTTagCompound nbt) {
NBTTagCompound data = nbt.getCompoundTag(NBT_PERSISTENT_KEY);
this.power = new BigInteger(data.getByteArray("power"));
this.muffled = data.getBoolean("muffled");
}
}

View File

@ -2,7 +2,7 @@ package com.hbm.tileentity.machine.storage;
import com.hbm.inventory.container.ContainerBatterySocket;
import com.hbm.inventory.gui.GUIBatterySocket;
import com.hbm.items.ModItems;
import com.hbm.util.BufferUtil;
import com.hbm.util.CompatEnergyControl;
import com.hbm.util.EnumUtil;
import com.hbm.util.fauxpointtwelve.BlockPos;
@ -26,7 +26,7 @@ public class TileEntityBatterySocket extends TileEntityBatteryBase implements IR
public long[] log = new long[20];
public long delta = 0;
public int renderPack = -1;
public ItemStack syncStack;
public TileEntityBatterySocket() {
super(1);
@ -56,20 +56,15 @@ public class TileEntityBatterySocket extends TileEntityBatteryBase implements IR
@Override
public void serialize(ByteBuf buf) {
super.serialize(buf);
int renderPack = -1;
if(slots[0] != null && slots[0].getItem() == ModItems.battery_pack) {
renderPack = slots[0].getItemDamage();
}
buf.writeInt(renderPack);
buf.writeLong(delta);
BufferUtil.writeItemStack(buf, this.slots[0]);
}
@Override
public void deserialize(ByteBuf buf) {
super.deserialize(buf);
renderPack = buf.readInt();
delta = buf.readLong();
this.syncStack = BufferUtil.readItemStack(buf);
}
@Override
@ -83,22 +78,23 @@ public class TileEntityBatterySocket extends TileEntityBatteryBase implements IR
@Override public int[] getAccessibleSlotsFromSide(int side) { return new int[] {0}; }
@Override
public long getPower() {
if(slots[0] == null || !(slots[0].getItem() instanceof IBatteryItem)) return 0;
return ((IBatteryItem) slots[0].getItem()).getCharge(slots[0]);
}
@Override public long getPower() { return powerFromStack(slots[0]); }
@Override public long getMaxPower() { return maxPowerFromStack(slots[0]); }
@Override
public void setPower(long power) {
if(slots[0] == null || !(slots[0].getItem() instanceof IBatteryItem)) return;
((IBatteryItem) slots[0].getItem()).setCharge(slots[0], power);
}
@Override
public long getMaxPower() {
if(slots[0] == null || !(slots[0].getItem() instanceof IBatteryItem)) return 0;
return ((IBatteryItem) slots[0].getItem()).getMaxCharge(slots[0]);
public static long powerFromStack(ItemStack stack) {
if(stack == null || !(stack.getItem() instanceof IBatteryItem)) return 0;
return ((IBatteryItem) stack.getItem()).getCharge(stack);
}
public static long maxPowerFromStack(ItemStack stack) {
if(stack == null || !(stack.getItem() instanceof IBatteryItem)) return 0;
return ((IBatteryItem) stack.getItem()).getMaxCharge(stack);
}
@Override public long getProviderSpeed() {

View File

@ -184,10 +184,7 @@ public class BobMathUtil {
* @param amount
* @return the number as a string with thousand group commas
*/
public static String format(int amount) {
return String.format(Locale.US, "%,d", amount);
}
public static String format(long amount) {
public static String format(Number amount) {
return String.format(Locale.US, "%,d", amount);
}

View File

@ -5740,7 +5740,7 @@ tile.machine_battery.name=Energy Storage Block (LEGACY)
tile.machine_battery_potato.name=Potato Battery Block (LEGACY)
tile.machine_battery_redd.name=FEnSU
tile.machine_battery_socket.name=Battery Socket
tile.machine_battery_socket.desc=Allows battery items to be connected$to the power grid directly.$Acts as a cable, all ports are connected$to the same netowrk.
tile.machine_battery_socket.desc=Allows battery items to be connected$to the power grid directly.$Acts as a cable, all ports are connected$to the same network.
tile.machine_boiler.name=Boiler
tile.machine_boiler.desc=Large boiler that can boil water or heat up oil.$Requires external heat source.$Heat transfer rate: ΔT*0.01 TU/t
tile.machine_boiler_electric_off.name=Electric Oil Heater