-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BTWaila integration shows fluids now.
Added Automatic Miner. Added External I/O. Added Reinforced Casings. Added Reinforced Glass (with connected textures!). Added Signalum Drills (Basic & Reinforced). New worldgen for Eternity dim. First achievements. Arrows shot from blood moon enraged monsters deal the proper amount of damage now. Other small fixes.
- Loading branch information
1 parent
80107e4
commit 8f31795
Showing
125 changed files
with
4,792 additions
and
614 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
443 changes: 275 additions & 168 deletions
443
src/main/java/sunsetsatellite/signalindustries/SignalIndustries.java
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
54 changes: 54 additions & 0 deletions
54
src/main/java/sunsetsatellite/signalindustries/api/impl/btwaila/tooltips/FluidTooltip.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
package sunsetsatellite.signalindustries.api.impl.btwaila.tooltips; | ||
|
||
import net.minecraft.client.render.block.color.BlockColorWater; | ||
import net.minecraft.core.block.Block; | ||
import net.minecraft.core.block.entity.TileEntity; | ||
import net.minecraft.core.lang.I18n; | ||
import net.minecraft.core.util.helper.Side; | ||
import sunsetsatellite.fluidapi.template.tiles.TileEntityMassFluidItemContainer; | ||
import sunsetsatellite.fluidapi.template.tiles.TileEntityMultiFluidTank; | ||
import sunsetsatellite.signalindustries.SignalIndustries; | ||
import toufoumaster.btwaila.BTWaila; | ||
import toufoumaster.btwaila.IBTWailaCustomBlockTooltip; | ||
import toufoumaster.btwaila.TooltipGroup; | ||
import toufoumaster.btwaila.TooltipRegistry; | ||
import toufoumaster.btwaila.gui.GuiBlockOverlay; | ||
import toufoumaster.btwaila.util.ProgressBarOptions; | ||
import toufoumaster.btwaila.util.TextureOptions; | ||
|
||
|
||
//TODO: Move to fluidapi eventually | ||
public class FluidTooltip implements IBTWailaCustomBlockTooltip { | ||
|
||
@Override | ||
public void addTooltip() { | ||
BTWaila.LOGGER.info("Adding tooltips for: " + this.getClass().getSimpleName()); | ||
TooltipGroup tooltipGroup = new TooltipGroup(SignalIndustries.MOD_ID, TileEntityMassFluidItemContainer.class, this); | ||
tooltipGroup.addTooltip(TileEntityMultiFluidTank.class); | ||
TooltipRegistry.tooltipMap.add(tooltipGroup); | ||
} | ||
|
||
@Override | ||
public void drawAdvancedTooltip(TileEntity tileEntity, GuiBlockOverlay guiBlockOverlay) { | ||
TileEntityMassFluidItemContainer tile = (TileEntityMassFluidItemContainer) tileEntity; | ||
for (int i = 0; i < tile.fluidContents.size(); i++) { | ||
if (tile.fluidContents.get(i) != null && tile.fluidContents.get(i).liquid != null && tile.fluidContents.get(i).liquid != SignalIndustries.energyFlowing) { | ||
String name = I18n.getInstance().translateNameKey(tile.fluidContents.get(i).liquid.getLanguageKey(0)).replace("Flowing ",""); | ||
TextureOptions bgOptions = new TextureOptions().setBlockId(SignalIndustries.realityFabric.id).setSide(Side.BOTTOM).setMetadata(0); | ||
TextureOptions fgOptions = new TextureOptions().setBlockId(tile.fluidContents.get(i).liquid.id).setSide(Side.BOTTOM).setMetadata(0); | ||
if(tile.fluidContents.get(i).liquid == Block.fluidWaterFlowing){ | ||
fgOptions.setColor(new BlockColorWater().getWorldColor(tile.worldObj, tile.xCoord, tile.yCoord, tile.zCoord)); | ||
} | ||
ProgressBarOptions options = new ProgressBarOptions().setValues(true).setPercentage(false).setBackgroundOptions(bgOptions).setForegroundOptions(fgOptions).setText(name+": "); | ||
guiBlockOverlay.drawProgressBarTextureWithText(tile.fluidContents.get(i).amount,tile.fluidCapacity,options,0); | ||
} | ||
} | ||
/*TileEntityMassFluidItemContainer tile = (TileEntityMassFluidItemContainer) tileEntity; | ||
guiBlockOverlay.addOffY(12); | ||
for (int i = 0; i < tile.fluidContents.size(); i++) { | ||
String name = I18n.getInstance().translateNameKey(tile.fluidContents.get(i).liquid.getLanguageKey(0)); | ||
guiBlockOverlay.drawProgressBarWithText(name+": ",99,tile.fluidCapacity,true,false,0); | ||
}*/ | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.