finished the port?

This commit is contained in:
Ell 2020-09-22 19:24:09 +02:00
parent 85d080cb3a
commit 9b36e0c444
4 changed files with 6 additions and 4 deletions

1
.gitignore vendored
View file

@ -12,6 +12,7 @@
/classes /classes
/bin/ /bin/
/run/ /run/
/logs
*.classpath *.classpath
*.project *.project

View file

@ -54,9 +54,10 @@ public class ItemTerminalWidget extends Widget {
renderer.renderItemAndEffectIntoGUI(mc.player, this.stack, this.x, this.y); renderer.renderItemAndEffectIntoGUI(mc.player, this.stack, this.x, this.y);
int amount = this.stack.getCount(); int amount = this.stack.getCount();
String amountStrg = this.stack.getCount() >= 1000 ? amount / 1000 + "k" : String.valueOf(amount); String amountStrg = this.stack.getCount() >= 1000 ? amount / 1000 + "k" : String.valueOf(amount);
// TODO figure out how to get the unicode font renderer for the terminal RenderSystem.pushMatrix();
FontRenderer font = mc.fontRenderer;//mc.getFontResourceManager().getFontRenderer(FONT); RenderSystem.scalef(0.8F, 0.8F, 1);
renderer.renderItemOverlayIntoGUI(font, this.stack, this.x, this.y, amountStrg); renderer.renderItemOverlayIntoGUI(mc.fontRenderer, this.stack, (int) (this.x / 0.8F) + 4, (int) (this.y / 0.8F) + 4, amountStrg);
RenderSystem.popMatrix();
renderer.zLevel = 0; renderer.zLevel = 0;
this.setBlitOffset(0); this.setBlitOffset(0);

View file

@ -390,7 +390,6 @@ public class PipeNetwork implements ICapabilitySerializable<CompoundNBT>, GraphL
} }
public int getItemsOnTheWay(BlockPos goalInv, ItemStack type, ItemEqualityType... equalityTypes) { public int getItemsOnTheWay(BlockPos goalInv, ItemStack type, ItemEqualityType... equalityTypes) {
// TODO pending auto-crafting requests should be marked as "on the way" here to allow over-sending prevention
return this.getPipeItemsOnTheWay(goalInv) return this.getPipeItemsOnTheWay(goalInv)
.filter(i -> type == null || ItemEqualityType.compareItems(i.stack, type, equalityTypes)) .filter(i -> type == null || ItemEqualityType.compareItems(i.stack, type, equalityTypes))
.mapToInt(i -> i.stack.getCount()).sum(); .mapToInt(i -> i.stack.getCount()).sum();

View file

@ -9,6 +9,7 @@ modLoader="javafml" #mandatory
loaderVersion="[28,)" #mandatory (28 is current forge version) loaderVersion="[28,)" #mandatory (28 is current forge version)
# A URL to refer people to when problems occur with this mod # A URL to refer people to when problems occur with this mod
issueTrackerURL="https://github.com/Ellpeck/PrettyPipes" #optional issueTrackerURL="https://github.com/Ellpeck/PrettyPipes" #optional
license="MIT"
# A list of mods - how many allowed here is determined by the individual mod loader # A list of mods - how many allowed here is determined by the individual mod loader
[[mods]] #mandatory [[mods]] #mandatory
# The modid of the mod # The modid of the mod