and all that

This commit is contained in:
Bob 2024-01-22 21:05:09 +01:00
parent a67faa99df
commit c6450d78b2
10 changed files with 13 additions and 6 deletions

View File

@ -2,8 +2,9 @@
* Muffler
* An upgrade-like item that replaces the old muffler block
* Creates 16 when crafted, however it is not returned when the muffled machine is broken
* Should work with pretty much all machines that use looped sounds, as well as a few other noisy ones (copressors, diesel generators, presses)
* Should work with pretty much all machines that use looped sounds, as well as a few other noisy ones (compressors, diesel generators, presses)
* Simply right-click to install, doesn't need to be inserted into an upgrade slot, in fact it works on a few machines that have no GUI at all
## Fixed
* Fixed basalt ores dropping their items with invalid metadata
* Fixed creative infinite fluid tanks not being able to fill fluid gauges at >0PU

View File

@ -16,6 +16,8 @@ public class FluidLoaderFillableItem extends FluidLoadingHandler {
public boolean fill(ItemStack stack, FluidTank tank) {
if(tank.pressure != 0) return false;
if(stack == null)
return false;

View File

@ -18,6 +18,7 @@ public class FluidLoaderInfinite extends FluidLoadingHandler {
ItemInfiniteFluid item = (ItemInfiniteFluid) slots[in].getItem();
if(!item.allowPressure(tank.pressure)) return false;
if(item.getType() != null && tank.type != item.getType()) return false;
if(item.getChance() <= 1 || rand.nextInt(item.getChance()) == 0) {

View File

@ -10,6 +10,8 @@ public class FluidLoaderStandard extends FluidLoadingHandler {
@Override
public boolean fillItem(ItemStack[] slots, int in, int out, FluidTank tank) {
if(tank.pressure != 0) return false;
if(slots[in] == null)
return true;

View File

@ -126,8 +126,6 @@ public class FluidTank {
if(slots[in] == null)
return false;
if(this.pressure != 0) return false; //for now, canisters can only be loaded from high-pressure tanks, not unloaded
int prev = this.getFill();
for(FluidLoadingHandler handler : loadingHandlers) {

View File

@ -16,6 +16,7 @@ public class ItemModCard extends ItemArmorMod {
public ItemModCard() {
super(ArmorModHandler.helmet_only, true, false, false, false);
this.setCreativeTab(null);
}
@Override

View File

@ -1,6 +1,7 @@
package com.hbm.items.machine;
import com.hbm.inventory.fluid.FluidType;
import com.hbm.items.ModItems;
import net.minecraft.item.Item;
@ -23,4 +24,5 @@ public class ItemInfiniteFluid extends Item {
public FluidType getType() { return this.type; }
public int getAmount() { return this.amount; }
public int getChance() { return this.chance; }
public boolean allowPressure(int pressure) { return this == ModItems.fluid_barrel_infinite || pressure == 0; }
}

View File

@ -62,7 +62,7 @@ public class AudioDynamic extends MovingSound {
}
public void setVolume(float volume) {
this.volume = volume;
this.maxVolume = volume;
}
public void setRange(float range) {

View File

@ -142,7 +142,7 @@ public class TileEntityMachineCombustionEngine extends TileEntityMachinePollutin
} else if(!audio.isPlaying()) {
audio = rebootAudio(audio);
}
audio.keepAlive();
audio.updateVolume(this.getVolume(1F));

View File

@ -318,7 +318,7 @@ public class TileEntityMachineTurbofan extends TileEntityMachinePolluting implem
}
audio.keepAlive();
audio.updateVolume(getVolume(momentum));
audio.updateVolume(getVolume(momentum / 50F));
audio.updatePitch(momentum / 200F + 0.5F + this.afterburner * 0.16F);
} else {