mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
and all that
This commit is contained in:
parent
a67faa99df
commit
c6450d78b2
@ -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
|
||||
|
||||
@ -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;
|
||||
|
||||
|
||||
@ -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) {
|
||||
|
||||
@ -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;
|
||||
|
||||
|
||||
@ -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) {
|
||||
|
||||
@ -16,6 +16,7 @@ public class ItemModCard extends ItemArmorMod {
|
||||
|
||||
public ItemModCard() {
|
||||
super(ArmorModHandler.helmet_only, true, false, false, false);
|
||||
this.setCreativeTab(null);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -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; }
|
||||
}
|
||||
|
||||
@ -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) {
|
||||
|
||||
@ -142,7 +142,7 @@ public class TileEntityMachineCombustionEngine extends TileEntityMachinePollutin
|
||||
} else if(!audio.isPlaying()) {
|
||||
audio = rebootAudio(audio);
|
||||
}
|
||||
|
||||
|
||||
audio.keepAlive();
|
||||
audio.updateVolume(this.getVolume(1F));
|
||||
|
||||
|
||||
@ -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 {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user