diff --git a/src/main/java/com/hbm/sound/nt/ISoundSourceTE.java b/src/main/java/com/hbm/sound/nt/ISoundSourceTE.java new file mode 100644 index 000000000..a3aa01260 --- /dev/null +++ b/src/main/java/com/hbm/sound/nt/ISoundSourceTE.java @@ -0,0 +1,17 @@ +package com.hbm.sound.nt; + +import net.minecraft.util.Vec3; + +public interface ISoundSourceTE { + + public Vec3 getSoundLocation(); + public boolean isPlaying(); + + public default float getVolume() { + return 1F; + } + + public default float getPitch() { + return 1F; + } +} diff --git a/src/main/java/com/hbm/sound/nt/SoundTE.java b/src/main/java/com/hbm/sound/nt/SoundTE.java new file mode 100644 index 000000000..d6cc4b345 --- /dev/null +++ b/src/main/java/com/hbm/sound/nt/SoundTE.java @@ -0,0 +1,90 @@ +package com.hbm.sound.nt; + +import net.minecraft.client.audio.ITickableSound; +import net.minecraft.util.ResourceLocation; +import net.minecraft.util.Vec3; + +public class SoundTE implements ITickableSound { + + ISoundSourceTE source; + + private ResourceLocation sound; + private boolean canRepeat = true; + private int repeatDelay = 0; + private boolean donePlaying = true; + private float soundX; + private float soundY; + private float soundZ; + private float volume; + private float pitch; + + public SoundTE(String sound) { + this.sound = new ResourceLocation(sound); + } + + @Override + public ResourceLocation getPositionedSoundLocation() { + return this.sound; + } + + @Override + public boolean canRepeat() { + return this.canRepeat; + } + + @Override + public int getRepeatDelay() { + return this.repeatDelay; + } + + @Override + public float getVolume() { + return this.volume; + } + + @Override + public float getPitch() { + return this.pitch; + } + + @Override + public float getXPosF() { + return this.soundX; + } + + @Override + public float getYPosF() { + return this.soundY; + } + + @Override + public float getZPosF() { + return this.soundZ; + } + + @Override + public AttenuationType getAttenuationType() { + return AttenuationType.LINEAR; + } + + @Override + public void update() { + + if(this.source == null) + return; + + this.volume = this.source.getVolume(); + this.pitch = this.source.getPitch(); + + Vec3 pos = this.source.getSoundLocation(); + this.soundX = (float) pos.xCoord; + this.soundY = (float) pos.yCoord; + this.soundZ = (float) pos.zCoord; + + } + + @Override + public boolean isDonePlaying() { + return this.donePlaying; + } +} diff --git a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineChemplant.java b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineChemplant.java index 24a59581e..17beab8fc 100644 --- a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineChemplant.java +++ b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineChemplant.java @@ -411,10 +411,9 @@ public class TileEntityMachineChemplant extends TileEntityMachineBase implements @Override public int getMaxFluidFill(FluidType type) { - for(FluidTank tank : tanks) { - if(tank.getTankType() == type) { - - return tank.getMaxFill(); + for(int i = 0; i < 2; i++) { + if(tanks[i].getTankType() == type) { + return tanks[i].getMaxFill(); } } diff --git a/src/main/resources/assets/hbm/textures/armor/wings_black.png b/src/main/resources/assets/hbm/textures/armor/wings_black.png new file mode 100644 index 000000000..134a08b53 Binary files /dev/null and b/src/main/resources/assets/hbm/textures/armor/wings_black.png differ