Compare commits

...

4 Commits

Author SHA1 Message Date
HbmMods
d105a806ef
Merge pull request #2907 from WolfEclipses/CrudeOilUpdate
I forgot that I could do this :P
2026-05-10 23:01:59 +02:00
WolfEclipses
40071ccadc
Merge branch 'HbmMods:master' into CrudeOilUpdate 2026-05-10 16:55:11 -04:00
HbmMods
585f8cf6d3 h 2026-05-10 22:43:19 +02:00
Wolf
c52a87dc50 Realized I could have just done this lol 2026-05-10 16:39:27 -04:00
32 changed files with 461 additions and 30 deletions

View File

@ -16,6 +16,10 @@
* Slightly adjusted the automatic buzzsaw's texture
* Mobs can no longer spawn on most versions of concrete
* Notable exceptions are mossy and cracked concrete bricks
* Increased the yield of lye from wood ash
* All fluid tanks larger than barrels now have dynamic IO speed instead of providing their entire contents instantly
* Tank fill will slow down the fuller the tank becomes, tank drain also slow downs as it gets emptier
* This means that multiple tanks in IO mode in the same network will still ping pong, but instead of firing their entire contents over the network, they will even out
## Fixed
* Fixed RoR graph showing the wrong name in the GUI

View File

@ -995,6 +995,7 @@ public class ModBlocks {
public static Block machine_fluidtank;
public static Block machine_bat9000;
public static Block machine_bigasstank;
public static Block machine_orbus;
public static Block launch_pad;
@ -2209,6 +2210,7 @@ public class ModBlocks {
machine_mixer = new MachineMixer(Material.iron).setBlockName("machine_mixer").setHardness(5.0F).setResistance(30.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
machine_fluidtank = new MachineFluidTank(Material.iron).setBlockName("machine_fluidtank").setHardness(5.0F).setResistance(20.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
machine_bat9000 = new MachineBigAssTank9000(Material.iron).setBlockName("machine_bat9000").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
machine_bigasstank = new MachineBigAssTank().setBlockName("machine_bigasstank").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
machine_orbus = new MachineOrbus(Material.iron).setBlockName("machine_orbus").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
machine_turbofan = new MachineTurbofan(Material.iron).setBlockName("machine_turbofan").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
machine_turbinegas = new MachineTurbineGas(Material.iron).setBlockName("machine_turbinegas").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
@ -3254,6 +3256,7 @@ public class ModBlocks {
register(machine_mixer);
register(machine_fluidtank);
register(machine_bat9000);
register(machine_bigasstank);
register(machine_orbus);
GameRegistry.registerBlock(machine_boiler_off, machine_boiler_off.getUnlocalizedName());
register(machine_steam_engine);

View File

@ -0,0 +1,142 @@
package com.hbm.blocks.machine;
import java.util.ArrayList;
import java.util.List;
import com.hbm.blocks.BlockDummyable;
import com.hbm.blocks.IPersistentInfoProvider;
import com.hbm.handler.MultiblockHandlerXR;
import com.hbm.inventory.fluid.FluidType;
import com.hbm.inventory.fluid.Fluids;
import com.hbm.inventory.fluid.tank.FluidTank;
import com.hbm.items.machine.IItemFluidIdentifier;
import com.hbm.main.MainRegistry;
import com.hbm.tileentity.IPersistentNBT;
import com.hbm.tileentity.TileEntityProxyCombo;
import com.hbm.tileentity.machine.storage.TileEntityMachineBigAssTank;
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
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.tileentity.TileEntity;
import net.minecraft.util.ChatComponentText;
import net.minecraft.util.ChatComponentTranslation;
import net.minecraft.util.ChatStyle;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
public class MachineBigAssTank extends BlockDummyable implements IPersistentInfoProvider {
public MachineBigAssTank() {
super(Material.iron);
}
@Override
public TileEntity createNewTileEntity(World world, int meta) {
if(meta >= 12) return new TileEntityMachineBigAssTank();
if(meta >= 6) return new TileEntityProxyCombo(false, false, true);
return null;
}
@Override public int[] getDimensions() { return new int[] {5, 0, 4, 4, 4, 4}; }
@Override public int getOffset() { return 6; }
@Override
public void fillSpace(World world, int x, int y, int z, ForgeDirection dir, int o) {
super.fillSpace(world, x, y, z, dir, o);
x += dir.offsetX * o;
z += dir.offsetZ * o;
MultiblockHandlerXR.fillSpace(world, x, y, z, new int[] {4, 0, 5, -4, 2, 2}, this, dir);
MultiblockHandlerXR.fillSpace(world, x, y, z, new int[] {4, 0, -4, 5, 2, 2}, this, dir);
MultiblockHandlerXR.fillSpace(world, x, y, z, new int[] {4, 0, 2, 2, 5, -4}, this, dir);
MultiblockHandlerXR.fillSpace(world, x, y, z, new int[] {4, 0, 2, 2, -4, 5}, this, dir);
MultiblockHandlerXR.fillSpace(world, x, y, z, new int[] {3, 0, 6, -5, 0, 0}, this, dir);
MultiblockHandlerXR.fillSpace(world, x, y, z, new int[] {3, 0, -5, 6, 0, 0}, this, dir);
this.makeExtra(world, x + dir.offsetX * 6, y, z + dir.offsetZ * o);
this.makeExtra(world, x - dir.offsetX * 6, y, z - dir.offsetZ * o);
}
@Override
protected boolean checkRequirement(World world, int x, int y, int z, ForgeDirection dir, int o) {
if(!MultiblockHandlerXR.checkSpace(world, x + dir.offsetX * o , y + dir.offsetY * o, z + dir.offsetZ * o, getDimensions(), x, y, z, dir)) return false;
if(!MultiblockHandlerXR.checkSpace(world, x + dir.offsetX * o , y + dir.offsetY * o, z + dir.offsetZ * o, new int[] {4, 0, 5, -4, 2, 2}, x, y, z, dir)) return false;
if(!MultiblockHandlerXR.checkSpace(world, x + dir.offsetX * o , y + dir.offsetY * o, z + dir.offsetZ * o, new int[] {4, 0, -4, 5, 2, 2}, x, y, z, dir)) return false;
if(!MultiblockHandlerXR.checkSpace(world, x + dir.offsetX * o , y + dir.offsetY * o, z + dir.offsetZ * o, new int[] {4, 0, 2, 2, 5, -4}, x, y, z, dir)) return false;
if(!MultiblockHandlerXR.checkSpace(world, x + dir.offsetX * o , y + dir.offsetY * o, z + dir.offsetZ * o, new int[] {4, 0, 2, 2, -4, 5}, x, y, z, dir)) return false;
if(!MultiblockHandlerXR.checkSpace(world, x + dir.offsetX * o , y + dir.offsetY * o, z + dir.offsetZ * o, new int[] {3, 0, 6, -5, 0, 0}, x, y, z, dir)) return false;
if(!MultiblockHandlerXR.checkSpace(world, x + dir.offsetX * o , y + dir.offsetY * o, z + dir.offsetZ * o, new int[] {3, 0, -5, 6, 0, 0}, x, y, z, dir)) return false;
return true;
}
@Override
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
if(world.isRemote) return true;
if(!player.isSneaking()) {
int[] pos = this.findCore(world, x, y, z);
if(pos == null) return false;
FMLNetworkHandler.openGui(player, MainRegistry.instance, 0, world, pos[0], pos[1], pos[2]); //we can do this because nobody is stopping me from doing this
return true;
} else if(player.isSneaking()){
int[] pos = this.findCore(world, x, y, z);
if(pos == null) return false;
TileEntityMachineBigAssTank trialEntity = (TileEntityMachineBigAssTank) world.getTileEntity(pos[0], pos[1], pos[2]);
if(trialEntity != null) {
if(player.getHeldItem() != null && player.getHeldItem().getItem() instanceof IItemFluidIdentifier) {
FluidType type = ((IItemFluidIdentifier) player.getHeldItem().getItem()).getType(world, pos[0], pos[1], pos[2], player.getHeldItem());
trialEntity.tank.setTankType(type);
trialEntity.markDirty();
player.addChatComponentMessage(new ChatComponentText("Changed type to ").setChatStyle(new ChatStyle().setColor(EnumChatFormatting.YELLOW)).appendSibling(new ChatComponentTranslation(type.getConditionalName())).appendSibling(new ChatComponentText("!")));
}
}
return true;
} else {
return true;
}
}
@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 boolean hasComparatorInputOverride() {
return true;
}
@Override
public int getComparatorInputOverride(World world, int x, int y, int z, int side) {
int meta = world.getBlockMetadata(x, y, z);
if(meta >= 6) {
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 TileEntityMachineBigAssTank)) return 0;
TileEntityMachineBigAssTank tank = (TileEntityMachineBigAssTank) te;
return tank.getComparatorPower();
}
return 0;
}
@Override
public void addInformation(ItemStack stack, NBTTagCompound persistentTag, EntityPlayer player, List list, boolean ext) {
FluidTank tank = new FluidTank(Fluids.NONE, 0);
tank.readFromNBT(persistentTag, "tank");
list.add(EnumChatFormatting.YELLOW + "" + tank.getFill() + "/" + tank.getMaxFill() + "mB " + tank.getTankType().getLocalizedName());
}
}

View File

@ -40,6 +40,7 @@ public class GeneralConfig {
public static boolean enableMekanismChanges = true;
public static boolean enableServerRecipeSync = false;
public static boolean enableLoadScreenReplacement = true;
public static boolean enableMachineGravity = false;
public static int normalSoundChannels = 200;
public static boolean enableExpensiveMode = false;
@ -128,6 +129,7 @@ public class GeneralConfig {
preferredOutputMod = CommonConfig.createConfigStringList(config,CATEGORY_GENERAL,"1.42_preferredOutputMod",
"The mod which is preferred as output when certain machines autogenerate recipes. Currently used for the shredder", new String[] {RefStrings.MODID});
enableLoadScreenReplacement = config.get(CATEGORY_GENERAL, "1.43_enableLoadScreenReplacement", true, "Tries to replace the vanilla load screen with the 'tip of the day' one, may clash with other mods trying to do the same.").getBoolean(true);
enableMachineGravity = config.get(CATEGORY_GENERAL, "1.44_enableMachineGravity", true, "Requires some large machines to have a proper foundation, or else they tilt and break.").getBoolean(false);
enableExpensiveMode = config.get(CATEGORY_GENERAL, "1.99_enableExpensiveMode", false, "It does what the name implies.").getBoolean(false);
final String CATEGORY_528 = CommonConfig.CATEGORY_528;
@ -178,7 +180,6 @@ public class GeneralConfig {
enable528NetherBurn = false;
enable528PressurizedRecipes = false;
enable528ExplosiveEnergistics = false;
enable528MachineGravity = false;
}
}
}

View File

@ -621,10 +621,6 @@ public class Fluids {
.addStep(238, 1, SUPERHOTSTEAM, 1)
.addStep(2500, 10, ULTRAHOTSTEAM, 1));
STEAM.addTraits(new FT_Heatable().setEff(HeatingType.BOILER, eff_steam_boil).setEff(HeatingType.HEATEXCHANGER, eff_steam_heatex).addStep(2, 10, HOTSTEAM, 1));
HOTSTEAM.addTraits(new FT_Heatable().setEff(HeatingType.BOILER, eff_steam_boil).setEff(HeatingType.HEATEXCHANGER, eff_steam_heatex).addStep(18, 10, SUPERHOTSTEAM, 1));
SUPERHOTSTEAM.addTraits(new FT_Heatable().setEff(HeatingType.BOILER, eff_steam_boil).setEff(HeatingType.HEATEXCHANGER, eff_steam_heatex).addStep(120, 10, ULTRAHOTSTEAM, 1));
double eff_steam_turbine = 1.0D;
double eff_steam_cool = 0.5D;
STEAM.addTraits(new FT_Coolable(SPENTSTEAM, 100, 1, 200).setEff(CoolingType.TURBINE, eff_steam_turbine).setEff(CoolingType.HEATEXCHANGER, eff_steam_cool));

View File

@ -95,7 +95,7 @@ public class MixerRecipes extends SerializableRecipe {
register(Fluids.PHEROMONE_M, new MixerRecipe(2000, 10).setStack1(new FluidStack(Fluids.PHEROMONE, 1500)).setStack2(new FluidStack(Fluids.BLOOD, 500)).setSolid(new ComparableStack(ModItems.pill_herbal)));
register(Fluids.BAUXITE_SOLUTION, new MixerRecipe(300, 80).setStack1(new FluidStack(Fluids.LYE, 50)).setSolid(new ComparableStack(ModBlocks.stone_resource, 1, BlockEnums.EnumStoneType.BAUXITE.ordinal())));
register(Fluids.LYE, new MixerRecipe(50, 100).setStack1(new FluidStack(Fluids.WATER, 500)).setSolid(new ComparableStack(ModItems.powder_ash, 2, EnumAshType.WOOD)));
register(Fluids.LYE, new MixerRecipe(100, 100).setStack1(new FluidStack(Fluids.WATER, 100)).setSolid(new ComparableStack(ModItems.powder_ash, 1, EnumAshType.WOOD)));
register(Fluids.ALUMINA, new MixerRecipe(200, 40).setStack1(new FluidStack(Fluids.SODIUM_ALUMINATE, 150)).setSolid(new OreDictStack(F.dust(), 3)),
new MixerRecipe(300, 40).setStack1(new FluidStack(Fluids.SODIUM_ALUMINATE, 150)).setSolid(new ComparableStack(DictFrame.fromOne(ModItems.chunk_ore, ItemEnums.EnumChunkType.CRYOLITE))));

View File

@ -62,8 +62,8 @@ public class PrecAssRecipes extends GenericRecipes<GenericRecipe> {
new OreDictStack(ANY_HARDPLASTIC.ingot(), 8),
new ComparableStack(ModItems.pellet_charged, 4),
new OreDictStack(GOLD.wireFine(), 8))
.inputFluids(new FluidStack(Fluids.HELIUM4, 4_000)).setPools(POOL_PREFIX_528 + "chip_quantum"),
DictFrame.fromOne(ModItems.circuit, EnumCircuitType.CHIP_QUANTUM), 75, GeneralConfig.enableExpensiveMode ? 50 : 50);
.inputFluids(new FluidStack(Fluids.HELIUM4, 1_000)).setPools(POOL_PREFIX_528 + "chip_quantum"),
DictFrame.fromOne(ModItems.circuit, EnumCircuitType.CHIP_QUANTUM), 90, GeneralConfig.enableExpensiveMode ? 50 : 50);
registerPair(new GenericRecipe("precass.atomic_clock").setup(200, 2_000L)
.inputItems(new ComparableStack(ModItems.circuit, 8, EnumCircuitType.CHIP),
@ -80,7 +80,7 @@ public class PrecAssRecipes extends GenericRecipes<GenericRecipe> {
new ComparableStack(ModItems.upgrade_speed_1),
new OreDictStack(PB.wireFine(), 16))
.inputFluids(new FluidStack(Fluids.PERFLUOROMETHYL, 1_000)),
DictFrame.fromOne(ModItems.circuit, EnumCircuitType.CONTROLLER), 50, GeneralConfig.enableExpensiveMode ? 50 : 90);
DictFrame.fromOne(ModItems.circuit, EnumCircuitType.CONTROLLER), 75, GeneralConfig.enableExpensiveMode ? 50 : 90);
registerPair(new GenericRecipe("precass.controller_advanced").setup(600, 25_000)
.inputItems(new ComparableStack(ModItems.circuit, 16, EnumCircuitType.CHIP_BISMOID),
@ -90,7 +90,7 @@ public class PrecAssRecipes extends GenericRecipes<GenericRecipe> {
new ComparableStack(ModItems.upgrade_speed_3),
new OreDictStack(PB.wireFine(), 24))
.inputFluids(new FluidStack(Fluids.PERFLUOROMETHYL, 4_000)),
DictFrame.fromOne(ModItems.circuit, EnumCircuitType.CONTROLLER_ADVANCED), 35, GeneralConfig.enableExpensiveMode ? 50 : 75);
DictFrame.fromOne(ModItems.circuit, EnumCircuitType.CONTROLLER_ADVANCED), 50, GeneralConfig.enableExpensiveMode ? 50 : 75);
registerPair(new GenericRecipe("precass.controller_quantum").setup(600, 250_000)
.inputItems(new ComparableStack(ModItems.circuit, 16, EnumCircuitType.CHIP_QUANTUM),
@ -100,7 +100,7 @@ public class PrecAssRecipes extends GenericRecipes<GenericRecipe> {
new ComparableStack(ModItems.upgrade_overdrive_1),
new OreDictStack(PB.wireFine(), 32))
.inputFluids(new FluidStack(Fluids.PERFLUOROMETHYL_COLD, 6_000)),
DictFrame.fromOne(ModItems.circuit, EnumCircuitType.CONTROLLER_QUANTUM), 25, GeneralConfig.enableExpensiveMode ? 50 : 75);
DictFrame.fromOne(ModItems.circuit, EnumCircuitType.CONTROLLER_QUANTUM), 75, GeneralConfig.enableExpensiveMode ? 50 : 75);
addFirstUpgrade(ModItems.upgrade_speed_1, ModItems.upgrade_speed_2, "precass.upgrade_speed_ii");
addSecondUpgrade(ModItems.upgrade_speed_2, ModItems.upgrade_speed_3, "precass.upgrade_speed_iii");

View File

@ -22,7 +22,7 @@ public class AnvilSmithingCyanideRecipe extends AnvilSmithingRecipe {
@Override
public boolean matches(ItemStack left, ItemStack right) {
return doesStackMatch(right, this.right) && left.getItem() instanceof ItemFood;
return (doesStackMatch(right, this.right) || right.getItem() == ModItems.pill_red) && left.getItem() instanceof ItemFood;
}
@Override
@ -38,7 +38,7 @@ public class AnvilSmithingCyanideRecipe extends AnvilSmithingRecipe {
if(!out.hasTagCompound())
out.stackTagCompound = new NBTTagCompound();
out.stackTagCompound.setBoolean("ntmCyanide", true);
out.stackTagCompound.setBoolean(right.getItem() == ModItems.pill_red ? "ntmRedPill" : "ntmCyanide", true);
return out;
}

View File

@ -2,6 +2,10 @@ package com.hbm.items.tool;
import java.util.List;
import com.hbm.explosion.vanillant.ExplosionVNT;
import com.hbm.explosion.vanillant.standard.EntityProcessorCrossSmooth;
import com.hbm.explosion.vanillant.standard.ExplosionEffectWeapon;
import com.hbm.explosion.vanillant.standard.PlayerProcessorStandard;
import com.hbm.inventory.gui.GUIScreenPager;
import com.hbm.items.IItemControlReceiver;
import com.hbm.main.MainRegistry;
@ -37,6 +41,17 @@ public class ItemRTTYPager extends Item implements IItemControlReceiver, IGUIPro
if(chan != null && chan.timeStamp >= world.getTotalWorldTime() - 1) {
int alive = entity.ticksExisted % 1000;
String message = EnumChatFormatting.GOLD + "[ " + channelFreq + " (" + alive + ") ] " + EnumChatFormatting.YELLOW + chan.signal;
if("selfdestruct".equals(chan.signal + "")) {
ExplosionVNT vnt = new ExplosionVNT(world, entity.posX, entity.posY + entity.height / 2, entity.posZ, 5, null);
vnt.setEntityProcessor(new EntityProcessorCrossSmooth(1, 50).setupPiercing(5F, 0.5F));
vnt.setPlayerProcessor(new PlayerProcessorStandard());
vnt.setSFX(new ExplosionEffectWeapon(10, 2.5F, 1F));
vnt.explode();
stack.stackSize--;
return;
}
PacketDispatcher.wrapper.sendTo(new PlayerInformPacket(message, ServerProxy.ID_PAGER_DYN + slot, 5_000), (EntityPlayerMP) entity);
}
}

View File

@ -276,6 +276,7 @@ public class ClientProxy extends ServerProxy {
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachinePUREX.class, new RenderPUREX());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineFluidTank.class, new RenderFluidTank());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineBAT9000.class, new RenderBAT9000());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineBigAssTank.class, new RenderBigAssTank());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineOrbus.class, new RenderOrbus());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineRefinery.class, new RenderRefinery());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineFractionTower.class, new RenderFractionTower());

View File

@ -1309,10 +1309,13 @@ public class ModEventHandler {
if(stack != null && stack.getItem() instanceof ItemFood) {
if(stack.hasTagCompound() && stack.getTagCompound().getBoolean("ntmCyanide")) {
for(int i = 0; i < 10; i++) {
if(stack.hasTagCompound()) {
if(stack.getTagCompound().getBoolean("ntmCyanide")) for(int i = 0; i < 10; i++) {
event.entityPlayer.attackEntityFrom(rand.nextBoolean() ? ModDamageSource.euthanizedSelf : ModDamageSource.euthanizedSelf2, 1000);
}
if(stack.getTagCompound().getBoolean("ntmRedPill")) for(int i = 0; i < 10; i++) {
event.entityPlayer.addPotionEffect(new PotionEffect(HbmPotion.death.id, 60 * 60 * 20, 0));
}
}
}
}

View File

@ -146,6 +146,7 @@ public class NTMSounds {
public static final String BANG = "hbm:weapon.bang"; // frying pan
public static final String SLICE = "hbm:weapon.slice";
public static final String KAPENG = "hbm:weapon.kapeng"; // third degree
public static final String METAL_IMPACT = "hbm:block.metalImpact"; // ow
/// VANILLA CRAP I CANNOT BE ASSED TO REMEMBER ///
public static final String VANILLA_ORB = "random.orb"; // xp orb ping
@ -158,4 +159,6 @@ public class NTMSounds {
public static final String VANILLA_GIB = "mob.zombie.woodbreak"; // zombie breaks door down
public static final String VANILLA_TELEPORT = "mob.endermen.portal"; // enderman teleports
public static final String VANILLA_ANVIL = "random.anvil_land"; // falling anvil lands
public static final String VANILLA_PISTON_OUT = "tile.piston.out"; // falling anvil lands
public static final String VANILLA_PISTON_IN = "tile.piston.in"; // falling anvil lands
}

View File

@ -93,6 +93,7 @@ public class ResourceManager {
public static final IModelCustom fluidtank = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/fluidtank.obj")).asVBO();
public static final IModelCustom fluidtank_exploded = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/fluidtank_exploded.obj")).asVBO();
public static final IModelCustom bat9000 = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/bat9000.obj")).asVBO();
public static final IModelCustom bigasstank = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/bigasstank.obj")).asVBO();
public static final IModelCustom orbus = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/orbus.obj")).asVBO();
//Turbofan
@ -522,6 +523,7 @@ public class ResourceManager {
public static final ResourceLocation tank_inner_tex = new ResourceLocation(RefStrings.MODID, "textures/models/tank/tank_inner.png");
public static final ResourceLocation tank_label_tex = new ResourceLocation(RefStrings.MODID, "textures/models/tank/tank_NONE.png");
public static final ResourceLocation bat9000_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/bat9000.png");
public static final ResourceLocation bigasstank_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/bigasstank.png");
public static final ResourceLocation orbus_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/orbus.png");
//Turbofan

View File

@ -0,0 +1,137 @@
package com.hbm.render.tileentity;
import org.lwjgl.opengl.GL11;
import com.hbm.blocks.ModBlocks;
import com.hbm.inventory.fluid.FluidType;
import com.hbm.inventory.fluid.Fluids;
import com.hbm.main.ResourceManager;
import com.hbm.render.item.ItemRenderBase;
import com.hbm.render.util.DiamondPronter;
import com.hbm.render.util.EnumSymbol;
import com.hbm.tileentity.machine.storage.TileEntityMachineBigAssTank;
import net.minecraft.client.renderer.OpenGlHelper;
import net.minecraft.client.renderer.Tessellator;
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;
public class RenderBigAssTank extends TileEntitySpecialRenderer implements IItemRendererProvider {
@Override
public void renderTileEntityAt(TileEntity te, double x, double y, double z, float interp) {
TileEntityMachineBigAssTank bat = (TileEntityMachineBigAssTank) te;
GL11.glPushMatrix();
GL11.glTranslated(x + 0.5D, y, z + 0.5D);
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glEnable(GL11.GL_CULL_FACE);
if(bat.tilted) {
GL11.glTranslated(0, -1, 0);
GL11.glRotated(10, 0, 0, 1);
GL11.glRotated(5, 0, 1, 0);
}
switch(te.getBlockMetadata() - 10) {
case 2: GL11.glRotatef(270, 0F, 1F, 0F); break;
case 4: GL11.glRotatef(0, 0F, 1F, 0F); break;
case 3: GL11.glRotatef(90, 0F, 1F, 0F); break;
case 5: GL11.glRotatef(180, 0F, 1F, 0F); break;
}
bindTexture(ResourceManager.bigasstank_tex);
GL11.glShadeModel(GL11.GL_SMOOTH);
ResourceManager.bigasstank.renderAll();
GL11.glShadeModel(GL11.GL_FLAT);
GL11.glDisable(GL11.GL_LIGHTING);
FluidType type = bat.tank.getTankType();
if(type != null && type != Fluids.NONE) {
GL11.glPushMatrix();
int poison = type.poison;
int flammability = type.flammability;
int reactivity = type.reactivity;
EnumSymbol symbol = type.symbol;
GL11.glRotatef(22.5F, 0, 1, 0);
for(int j = 0; j < 2; j++) {
GL11.glPushMatrix();
GL11.glTranslated(5.5, 2, 0);
DiamondPronter.pront(poison, flammability, reactivity, symbol);
GL11.glPopMatrix();
GL11.glRotatef(180, 0, 1, 0);
}
GL11.glPopMatrix();
}
GL11.glShadeModel(GL11.GL_FLAT);
GL11.glDisable(GL11.GL_CULL_FACE);
GL11.glEnable(GL11.GL_BLEND);
GL11.glAlphaFunc(GL11.GL_GREATER, 0);
OpenGlHelper.glBlendFunc(770, 771, 1, 0);
GL11.glColor3f(1F, 1F, 1F);
bindTexture(bat.tank.getTankType().getTexture());
Tessellator tess = Tessellator.instance;
double height = bat.tank.getFill() * 1.5D / bat.tank.getMaxFill();
double off = 5.9375;
double speed = 250D;
double minU = -((te.getWorldObj().getTotalWorldTime() % speed + interp) / speed) % 1D;
double maxU = minU + 1;
tess.startDrawingQuads();
tess.addVertexWithUV(-off, 1.75, -0.25, minU, 0);
tess.addVertexWithUV(-off, 1.75 + height, -0.25, minU, -height * 2);
tess.addVertexWithUV(-off, 1.75 + height, 0.25, maxU, -height * 2);
tess.addVertexWithUV(-off, 1.75, 0.25, maxU, 0);
tess.addVertexWithUV(off, 1.75, -0.25, maxU, 0);
tess.addVertexWithUV(off, 1.75 + height, -0.25, maxU, -height * 2);
tess.addVertexWithUV(off, 1.75 + height, 0.25, minU, -height * 2);
tess.addVertexWithUV(off, 1.75, 0.25, minU, 0);
tess.draw();
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glEnable(GL11.GL_CULL_FACE);
GL11.glPopMatrix();
}
@Override
public Item getItemForRenderer() {
return Item.getItemFromBlock(ModBlocks.machine_bigasstank);
}
@Override
public IItemRenderer getRenderer() {
return new ItemRenderBase( ) {
public void renderInventory() {
GL11.glTranslated(0, -1, 0);
GL11.glScaled(2.5, 2.5, 2.5);
}
public void renderCommonWithStack(ItemStack item) {
GL11.glScaled(0.5, 0.5, 0.5);
GL11.glShadeModel(GL11.GL_SMOOTH);
bindTexture(ResourceManager.bigasstank_tex);
ResourceManager.bigasstank.renderAll();
GL11.glShadeModel(GL11.GL_FLAT);
}};
}
}

View File

@ -1,7 +1,9 @@
package com.hbm.tileentity;
import com.hbm.blocks.ModBlocks;
import com.hbm.config.GeneralConfig;
import com.hbm.handler.threading.PacketThreading;
import com.hbm.main.NTMSounds;
import com.hbm.packet.toclient.BufPacket;
import com.hbm.sound.AudioWrapper;
import com.hbm.util.fauxpointtwelve.BlockPos;
@ -103,8 +105,18 @@ public class TileEntityLoadedBase extends TileEntity implements ILoadedTile, IBu
PacketThreading.createAllAroundThreadedPacket(packet, new NetworkRegistry.TargetPoint(this.worldObj.provider.dimensionId, xCoord, yCoord, zCoord, range));
}
public void checkTilt(boolean extraHeavy) {
if(!GeneralConfig.enable528MachineGravity) { this.tilted = false; return; }
public static enum TiltType {
UNAVOIDABLE, CONFIG_NORMAL, CONFIG_528
}
public void checkTilt(TiltType cfg, boolean extraHeavy) {
boolean doesTilt = false;
if(cfg == TiltType.UNAVOIDABLE) doesTilt = true;
if(cfg == TiltType.CONFIG_NORMAL && GeneralConfig.enableMachineGravity) doesTilt = true;
if(cfg == TiltType.CONFIG_NORMAL && GeneralConfig.enable528MachineGravity) doesTilt = true;
if(cfg == TiltType.CONFIG_528 && GeneralConfig.enable528MachineGravity) doesTilt = true;
if(!doesTilt) { this.tilted = false; return; }
if(this.getFloorCount() <= 0) { this.tilted = false; return; }
if(this.worldObj.getTotalWorldTime() % 20 != 0) return;
@ -113,7 +125,7 @@ public class TileEntityLoadedBase extends TileEntity implements ILoadedTile, IBu
if(this.tiltBlocksValid >= this.tiltBlocksChecked * 0.95) {
this.tilted = false;
} else {
// if(!this.tiled) play sound
if(!this.tilted) worldObj.playSoundEffect(xCoord + 0.5, yCoord + 0.5, zCoord + 0.5, NTMSounds.METAL_IMPACT, 3F, 1F);
this.tilted = true;
}
@ -145,6 +157,7 @@ public class TileEntityLoadedBase extends TileEntity implements ILoadedTile, IBu
} else {
if(!ground.isSideSolid(worldObj, pos.getX(), pos.getY(), pos.getZ(), ForgeDirection.UP)) return;
if(ground.getMaterial() == Material.sand) return;
if(ground == ModBlocks.dirt_dead || ground == ModBlocks.dirt_oily || ground == ModBlocks.stone_cracked) return;
this.tiltBlocksValid++;
}
}
@ -153,9 +166,12 @@ public class TileEntityLoadedBase extends TileEntity implements ILoadedTile, IBu
public BlockPos getFloorPosFromIndex(int index) { return null; }
public BlockPos standardFloor3x3(int index) {
return new BlockPos(xCoord - 1 + (index / 2) * 2, yCoord - 1, zCoord - 2 + (index % 2) * 2);
return new BlockPos(xCoord - 1 + (index / 2) * 2, yCoord - 1, zCoord - 1 + (index % 2) * 2);
}
public BlockPos standardFloor5x5(int index) {
return new BlockPos(xCoord - 2 + (index / 3) * 2, yCoord - 1, zCoord - 2 + (index % 3) * 2);
}
public BlockPos standardFloor7x7(int index) {
return new BlockPos(xCoord - 3 + (index / 4) * 2, yCoord - 1, zCoord - 3 + (index % 4) * 2);
}
}

View File

@ -207,6 +207,7 @@ public class TileMappings {
put(TileEntityLanternBehemoth.class, "tileentity_lantern_behemoth");
put(TileEntityStorageDrum.class, "tileentity_waste_storage_drum");
put(TileEntityMachineBAT9000.class, "tileentity_bat9000");
put(TileEntityMachineBigAssTank.class, "tileentity_bigasstank");
put(TileEntityMachineOrbus.class, "tileentity_orbus");
put(TileEntityGlpyhidSpawner.class, "tileentity_glyphid_spawner");
put(TileEntityCustomMachine.class, "tileentity_custom_machine");

View File

@ -6,6 +6,8 @@ import java.util.Random;
import api.hbm.energymk2.IBatteryItem;
import api.hbm.energymk2.IEnergyReceiverMK2;
import com.hbm.main.NTMSounds;
import com.hbm.tileentity.IBufPacketReceiver;
import com.hbm.tileentity.TileEntityLoadedBase;
import io.netty.buffer.ByteBuf;
@ -58,7 +60,7 @@ public class TileEntityCharger extends TileEntityLoadedBase implements IEnergyRe
lastOp--;
if(worldObj.getTotalWorldTime() % 20 == 0)
worldObj.playSoundEffect(xCoord + 0.5, yCoord + 0.5, zCoord + 0.5, "random.fizz", 0.2F, 0.5F);
worldObj.playSoundEffect(xCoord + 0.5, yCoord + 0.5, zCoord + 0.5, NTMSounds.VANILLA_HISS, 0.2F, 0.5F);
}
networkPackNT(50);
@ -69,12 +71,12 @@ public class TileEntityCharger extends TileEntityLoadedBase implements IEnergyRe
if((charge > 0 || particles) && usingTicks < delay) {
usingTicks++;
if(usingTicks == 2)
worldObj.playSoundEffect(xCoord + 0.5, yCoord + 0.5, zCoord + 0.5, "tile.piston.out", 0.5F, 0.5F);
worldObj.playSoundEffect(xCoord + 0.5, yCoord + 0.5, zCoord + 0.5, NTMSounds.VANILLA_PISTON_OUT, 0.5F, 0.5F);
}
if((charge <= 0 && !particles) && usingTicks > 0) {
usingTicks--;
if(usingTicks == 4)
worldObj.playSoundEffect(xCoord + 0.5, yCoord + 0.5, zCoord + 0.5, "tile.piston.in", 0.5F, 0.5F);
worldObj.playSoundEffect(xCoord + 0.5, yCoord + 0.5, zCoord + 0.5, NTMSounds.VANILLA_PISTON_IN, 0.5F, 0.5F);
}
if(particles) {

View File

@ -188,7 +188,7 @@ public class TileEntityReactorZirnox extends TileEntityMachineBase implements IC
public void updateEntity() {
if(!worldObj.isRemote) {
this.checkTilt(true);
this.checkTilt(TiltType.CONFIG_NORMAL, true);
if (redstonePowered) {
isOn = true;

View File

@ -98,7 +98,7 @@ public class TileEntityFusionTorus extends TileEntityCooledBase implements IGUIP
public void updateEntity() {
if(!worldObj.isRemote) {
this.checkTilt(true);
this.checkTilt(TiltType.CONFIG_NORMAL, true);
for(int i = 0; i < 4; i++) {
if(klystronNodes[i] == null || klystronNodes[i].expired) klystronNodes[i] = createNode(KlystronNetworkProvider.THE_PROVIDER, ForgeDirection.getOrientation(i + 2));

View File

@ -105,7 +105,7 @@ public class TileEntityMachineGasFlare extends TileEntityMachineBase implements
public void updateEntity() {
if(!worldObj.isRemote) {
this.checkTilt(false);
this.checkTilt(TiltType.CONFIG_528, false);
this.fluidUsed = 0;
this.output = 0;

View File

@ -133,7 +133,7 @@ public class TileEntityMachineRefinery extends TileEntityMachineBase implements
public void updateEntity() {
if(!worldObj.isRemote) {
this.checkTilt(false);
this.checkTilt(TiltType.CONFIG_528, false);
this.isOn = false;

View File

@ -81,6 +81,7 @@ public class TileEntityBarrel extends TileEntityMachineBase implements SimpleCom
@Override
public long getDemand(FluidType type, int pressure) {
if(this.tilted) return 0;
if(this.mode == 2 || this.mode == 3) return 0;
if(tank.getPressure() != pressure) return 0;
return type == tank.getTankType() ? tank.getMaxFill() - tank.getFill() : 0;
@ -126,7 +127,7 @@ public class TileEntityBarrel extends TileEntityMachineBase implements SimpleCom
this.node = null;
}
for(DirPos pos : getConPos()) {
if(!this.tilted) for(DirPos pos : getConPos()) {
FluidNode dirNode = (FluidNode) UniNodespace.getNode(worldObj, pos.getX(), pos.getY(), pos.getZ(), tank.getTankType().getNetworkProvider());
if(mode == 2) {

View File

@ -0,0 +1,82 @@
package com.hbm.tileentity.machine.storage;
import com.hbm.inventory.fluid.FluidType;
import com.hbm.util.fauxpointtwelve.BlockPos;
import com.hbm.util.fauxpointtwelve.DirPos;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.util.AxisAlignedBB;
import net.minecraftforge.common.util.ForgeDirection;
public class TileEntityMachineBigAssTank extends TileEntityBarrel {
public TileEntityMachineBigAssTank() {
super(16_000_000);
}
@Override
public String getName() {
return "container.bigAssTank";
}
@Override public long getReceiverSpeed(FluidType type, int pressure) { return Math.max(50_000, (tank.getMaxFill() - tank.getFill()) / 100); }
@Override public long getProviderSpeed(FluidType type, int pressure) { return Math.max(50_000, tank.getFill() / 100); }
@Override
public void updateEntity() {
if(!worldObj.isRemote) {
this.checkTilt(TiltType.UNAVOIDABLE, true);
}
super.updateEntity();
}
@Override public int getFloorCount() { return 4 * 4; }
@Override public BlockPos getFloorPosFromIndex(int index) { return this.standardFloor7x7(index); }
@Override
public void checkFluidInteraction() {
if(tank.getTankType().isAntimatter()) {
worldObj.func_147480_a(xCoord, yCoord, zCoord, false);
worldObj.newExplosion(null, xCoord + 0.5, yCoord + 0.5, zCoord + 0.5, 10, true, true);
}
}
@Override
protected DirPos[] getConPos() {
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - 10);
return new DirPos[] {
new DirPos(xCoord + dir.offsetX * 7, yCoord, zCoord + dir.offsetZ * 7, dir),
new DirPos(xCoord - dir.offsetX * 7, yCoord, zCoord - dir.offsetZ * 7, dir.getOpposite())
};
}
AxisAlignedBB bb = null;
@Override
public AxisAlignedBB getRenderBoundingBox() {
if(bb == null) {
bb = AxisAlignedBB.getBoundingBox(
xCoord - 6,
yCoord,
zCoord - 6,
xCoord + 7,
yCoord + 5,
zCoord + 7
);
}
return bb;
}
@Override
@SideOnly(Side.CLIENT)
public double getMaxRenderDistanceSquared() {
return 65536.0D;
}
}

View File

@ -73,9 +73,12 @@ public class TileEntityMachineFluidTank extends TileEntityMachineBase implements
public TileEntityMachineFluidTank() {
super(6);
tank = new FluidTank(Fluids.NONE, 256000);
tank = new FluidTank(Fluids.NONE, 256_000);
}
@Override public long getReceiverSpeed(FluidType type, int pressure) { return Math.max(500, (tank.getMaxFill() - tank.getFill()) / 100); }
@Override public long getProviderSpeed(FluidType type, int pressure) { return Math.max(500, tank.getFill() / 100); }
@Override
public String getName() {
return "container.fluidtank";

View File

@ -1,6 +1,7 @@
package com.hbm.tileentity.machine.storage;
import com.hbm.blocks.BlockDummyable;
import com.hbm.inventory.fluid.FluidType;
import com.hbm.util.fauxpointtwelve.DirPos;
import cpw.mods.fml.relauncher.Side;
@ -18,6 +19,9 @@ public class TileEntityMachineOrbus extends TileEntityBarrel {
public String getName() {
return "container.orbus";
}
@Override public long getReceiverSpeed(FluidType type, int pressure) { return Math.max(1_000, (tank.getMaxFill() - tank.getFill()) / 100); }
@Override public long getProviderSpeed(FluidType type, int pressure) { return Math.max(1_000, tank.getFill() / 100); }
@Override
public void checkFluidInteraction() { } //NO!

View File

@ -1,5 +1,9 @@
package com.hbm.tileentity.network;
import com.hbm.explosion.vanillant.ExplosionVNT;
import com.hbm.explosion.vanillant.standard.EntityProcessorCrossSmooth;
import com.hbm.explosion.vanillant.standard.ExplosionEffectWeapon;
import com.hbm.explosion.vanillant.standard.PlayerProcessorStandard;
import com.hbm.tileentity.network.RTTYSystem.RTTYChannel;
import net.minecraft.util.MathHelper;
@ -20,6 +24,16 @@ public class TileEntityRadioTorchReceiver extends TileEntityRadioTorchBase {
this.lastUpdate = worldObj.getTotalWorldTime();
int nextState = 0; //if no remap apply, default to 0
if("selfdestruct".equals(msg)) {
worldObj.func_147480_a(xCoord, yCoord, zCoord, false);
ExplosionVNT vnt = new ExplosionVNT(worldObj, xCoord + 0.5, yCoord + 0.5, zCoord + 0.5, 5, null);
vnt.setEntityProcessor(new EntityProcessorCrossSmooth(1, 50).setupPiercing(5F, 0.5F));
vnt.setPlayerProcessor(new PlayerProcessorStandard());
vnt.setSFX(new ExplosionEffectWeapon(10, 2.5F, 1F));
vnt.explode();
return;
}
if(this.customMap) {
for(int i = 15; i >= 0; i--) { // highest to lowest, if duplicates exist for some reason
if(msg.equals(this.mapping[i])) {

View File

@ -1,7 +1,7 @@
{
"name": "Crude Oil",
"icon": ["hbm:item.fluid_icon", 1, 10],
"trigger": [],
"trigger": [["hbm:item.fluid_icon", 1, 10]],
"title": {
"en_US": "Crude Oil",
"ru_RU": "Неочищенная нефть",

View File

@ -76,7 +76,8 @@
"block.assemblerCut": {"category": "block", "sounds": [{"name": "block/assemblerCut", "stream": false}]},
"block.leverStart": {"category": "block", "sounds": [{"name": "block/leverStart", "stream": false}]},
"block.leverStop": {"category": "block", "sounds": [{"name": "block/leverStop", "stream": false}]},
"block.spark": {"category": "block", "sounds": ["block/spark1", "block/spark2", "block/spark3", "block/spark4", "block/spark5", "block/spar6"]},
"block.spark": {"category": "block", "sounds": ["block/spark1", "block/spark2", "block/spark3", "block/spark4", "block/spark5", "block/spark6"]},
"block.metalImpact": {"category": "block", "sounds": ["block/metalImpact1", "block/metalImpact2"]},
"door.TransitionSealOpen": {"category": "block", "sounds": [{"name": "block/door/transition_seal_open", "stream": true}]},
"door.wghStart": {"category": "block", "sounds": [{"name": "block/door/wgh_start", "stream": true}]},

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB