MCPcopy Create free account
hub / github.com/5zig/The-5zig-Mod / setBackgroundTexture

Method setBackgroundTexture

Minecraft-Utils/1.13/src/GuiList.java:682–703  ·  view source on GitHub ↗
(Object backgroundTexture, int imageWidth, int imageHeight)

Source from the content-addressed store, hash-verified

680 }
681
682 @Override
683 public void setBackgroundTexture(Object backgroundTexture, int imageWidth, int imageHeight) {
684 this.backgroundTexture = backgroundTexture;
685
686 if (backgroundTexture != null) {
687 double w = imageWidth;
688 double h = imageHeight;
689 int listWidth = getRight() - getLeft();
690 int listHeight = getBottom() - getTop();
691
692 while (w > listWidth && h > listHeight) {
693 w -= 1;
694 h -= h / w;
695 }
696 while (w < listWidth || h < listHeight) {
697 w += 1;
698 h += h / w;
699 }
700 this.backgroundWidth = (int) w;
701 this.backgroundHeight = (int) h;
702 }
703 }
704
705 @Override
706 public List<E> getRows() {

Callers

nothing calls this directly

Calls 4

getRightMethod · 0.95
getLeftMethod · 0.95
getBottomMethod · 0.95
getTopMethod · 0.95

Tested by

no test coverage detected