Utils, icons
This commit is contained in:
4
README.md
Normal file
4
README.md
Normal file
@@ -0,0 +1,4 @@
|
||||
# Mechanical Lemon UI
|
||||
- This library mod is a stripped version of Create ui foundation which is licensed under the MIT license. See Create's license for more information.
|
||||
- All the credits go to the Creators of Create team.
|
||||
- https://github.com/Creators-of-Create/Create
|
||||
@@ -14,7 +14,7 @@ mixin_version = 0.8.5
|
||||
modid=mechanical_lemon_ui
|
||||
mod_name=Mechanical Lemon UI
|
||||
mod_license=MIT
|
||||
mod_version=0.1.3
|
||||
mod_version=0.1.8
|
||||
mod_group_id=com.oierbravo
|
||||
author=oierbravo
|
||||
mod_description=Library
|
||||
|
||||
@@ -37,7 +37,7 @@ public class EnergyDisplay extends AbstractSimiWidget {
|
||||
drawBg(pGuiGraphics, LibGuiTextures.RF_VERTIVAL_BAR);
|
||||
|
||||
int stored = (int)(height * (energy.getEnergyStored() / (float)energy.getMaxEnergyStored()));
|
||||
pGuiGraphics.fillGradient(xPos,yPos + (height - stored),xPos + width, yPos + height,0xffb51500, 0xff600b00);
|
||||
pGuiGraphics.fillGradient(xPos +1,yPos + 1 + (height - stored),xPos +1 + width, yPos - 1 + height,0xffb51500, 0xff600b00);
|
||||
if(isHovered()) {
|
||||
Font font = Minecraft.getInstance().font;
|
||||
pGuiGraphics.renderTooltip(font, getTooltips(),
|
||||
@@ -46,8 +46,8 @@ public class EnergyDisplay extends AbstractSimiWidget {
|
||||
}
|
||||
|
||||
}
|
||||
protected void drawBg(GuiGraphics graphics, LibGuiTextures button) {
|
||||
graphics.blit(button.location, getX(), getY(), button.startX, button.startY, button.width, button.height);
|
||||
protected void drawBg(GuiGraphics graphics, LibGuiTextures background) {
|
||||
graphics.blit(background.location, getX(), getY(), background.startX, background.startY, background.width, background.height);
|
||||
}
|
||||
|
||||
public List<Component> getTooltips() {
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
package com.oierbravo.mechanical_lemon_ui.foundation.utility;
|
||||
|
||||
/*
|
||||
* Credits: Creators of create
|
||||
* https://github.com/Creators-of-Create/Create
|
||||
* License: MIT
|
||||
*/
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.core.Direction.Axis;
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
package com.oierbravo.mechanical_lemon_ui.foundation.utility;
|
||||
|
||||
/*
|
||||
* Credits: Creators of create
|
||||
* https://github.com/Creators-of-Create/Create
|
||||
* License: MIT
|
||||
*/
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.network.chat.MutableComponent;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
package com.oierbravo.mechanical_lemon_ui.foundation.utility;
|
||||
|
||||
/*
|
||||
* Credits: Creators of create
|
||||
* https://github.com/Creators-of-Create/Create
|
||||
* License: MIT
|
||||
*/
|
||||
import joptsimple.internal.Strings;
|
||||
import net.minecraft.ChatFormatting;
|
||||
import net.minecraft.client.Minecraft;
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
package com.oierbravo.mechanical_lemon_ui.foundation.utility;
|
||||
|
||||
/*
|
||||
* Credits: Creators of create
|
||||
* https://github.com/Creators-of-Create/Create
|
||||
* License: MIT
|
||||
*/
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.util.Mth;
|
||||
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
package com.oierbravo.mechanical_lemon_ui.foundation.utility;
|
||||
|
||||
/*
|
||||
* Credits: Creators of create
|
||||
* https://github.com/Creators-of-Create/Create
|
||||
* License: MIT
|
||||
*/
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.phys.shapes.BooleanOp;
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
package com.oierbravo.mechanical_lemon_ui.foundation.utility;
|
||||
|
||||
/*
|
||||
* Credits: Creators of create
|
||||
* https://github.com/Creators-of-Create/Create
|
||||
* License: MIT
|
||||
*/
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.core.Direction.Axis;
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
package com.oierbravo.mechanical_lemon_ui.foundation.utility;
|
||||
|
||||
/*
|
||||
* Credits: Creators of create
|
||||
* https://github.com/Creators-of-Create/Create
|
||||
* License: MIT
|
||||
*/
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.core.Direction.Axis;
|
||||
import net.minecraft.core.Direction.AxisDirection;
|
||||
|
||||
@@ -18,7 +18,7 @@ public enum LibGuiTextures implements ScreenElement {
|
||||
BUTTON_HOVER("widgets", 18, 0, 18, 18),
|
||||
BUTTON_DOWN("widgets", 36, 0, 18, 18),
|
||||
SLOT_EMPTY("widgets", 36, 0, 18, 18),
|
||||
RF_VERTIVAL_BAR("widgets",0,18,10,30),
|
||||
RF_VERTIVAL_BAR("widgets",0,18,11,32),
|
||||
PROGRESS_ARROW_EMPTY("widgets",0,48,32,8),
|
||||
PROGRESS_ARROW_FULL("widgets",0,56,32,8)
|
||||
;
|
||||
|
||||
@@ -29,6 +29,10 @@ public class LibIcons implements ScreenElement {
|
||||
public static final LibIcons REDSTONE_IGNORE = next();
|
||||
public static final LibIcons SEARCH = next();
|
||||
public static final LibIcons CHECK = next();
|
||||
public static final LibIcons LOCK_OPEN = next();
|
||||
public static final LibIcons LOCK_CLOSE = next();
|
||||
public static final LibIcons TRIANGLE_EXCLAMATION_ORANGE = next();
|
||||
public static final LibIcons TRIANGLE_EXCLAMATION_MONO = next();
|
||||
|
||||
public LibIcons(int x, int y) {
|
||||
this.iconX = x * 16;
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 638 B After Width: | Height: | Size: 809 B |
Reference in New Issue
Block a user