Full Imports and Code Format Optimization

This commit is contained in:
Kam committed 2025-03-12 20:12:01 -04:00
1 parent 250edf099c
commit 6815f579a7
1192 files changed
+60344 -62167

No files matched your search

@@ -8,30 +8,29 @@ import noppes.npcs.controllers.data.SkinOverlay;
import noppes.npcs.entity.EntityNPCInterface;
import org.lwjgl.opengl.GL11;
public class GuiNpcTextureOverlays extends GuiNpcSelectionInterface{
public GuiNpcTextureOverlays(EntityNPCInterface npc,GuiScreen parent){
public class GuiNpcTextureOverlays extends GuiNpcSelectionInterface {
public GuiNpcTextureOverlays(EntityNPCInterface npc, GuiScreen parent) {
super(npc, parent, npc.display.skinOverlayData.overlayList.containsKey(0) ? !npc.display.skinOverlayData.overlayList.get(0).getTexture().isEmpty() ? npc.display.skinOverlayData.overlayList.get(0).getTexture() : "customnpcs:textures/overlays/" : "customnpcs:textures/overlays/");
title = "Select Overlay";
this.parent = parent;
this.parent = parent;
}
public void initGui(){
super.initGui();
public void initGui() {
super.initGui();
String str = npc.display.skinOverlayData.overlayList.containsKey(0) ? npc.display.skinOverlayData.overlayList.get(0).getTexture() : "";
int index = str.lastIndexOf("/");
if(index > 0){
String asset = str.substring(index + 1);
if(str.equals(assets.getAsset(asset)))
slot.selected = asset;
if (index > 0) {
String asset = str.substring(index + 1);
if (str.equals(assets.getAsset(asset)))
slot.selected = asset;
}
}
public void drawScreen(int i, int j, float f)
{
public void drawScreen(int i, int j, float f) {
npc.isDrawn = true;
int l = (width/2)-180;
int i1 = (height/2) - 90;
int l = (width / 2) - 180;
int i1 = (height / 2) - 90;
GL11.glEnable(32826 /*GL_RESCALE_NORMAL_EXT*/);
GL11.glEnable(2903 /*GL_COLOR_MATERIAL*/);
GL11.glPushMatrix();
@@ -43,15 +42,15 @@ public class GuiNpcTextureOverlays extends GuiNpcSelectionInterface{
float f3 = npc.rotationYaw;
float f4 = npc.rotationPitch;
float f7 = npc.rotationYawHead;
float f5 = (float)(l + 33) - i;
float f6 = (float)((i1 + 131) - 50) - j;
float f5 = (float) (l + 33) - i;
float f6 = (float) ((i1 + 131) - 50) - j;
GL11.glRotatef(135F, 0.0F, 1.0F, 0.0F);
RenderHelper.enableStandardItemLighting();
GL11.glRotatef(-135F, 0.0F, 1.0F, 0.0F);
GL11.glRotatef(-(float)Math.atan(f6 / 40F) * 20F, 1.0F, 0.0F, 0.0F);
npc.renderYawOffset = (float)Math.atan(f5 / 40F) * 20F;
npc.rotationYaw = (float)Math.atan(f5 / 40F) * 40F;
npc.rotationPitch = -(float)Math.atan(f6 / 40F) * 20F;
GL11.glRotatef(-(float) Math.atan(f6 / 40F) * 20F, 1.0F, 0.0F, 0.0F);
npc.renderYawOffset = (float) Math.atan(f5 / 40F) * 20F;
npc.rotationYaw = (float) Math.atan(f5 / 40F) * 40F;
npc.rotationPitch = -(float) Math.atan(f6 / 40F) * 20F;
npc.rotationYawHead = npc.rotationYaw;
//npc.updateCloak();
GL11.glTranslatef(0.0F, npc.yOffset, 0.0F);
@@ -74,22 +73,22 @@ public class GuiNpcTextureOverlays extends GuiNpcSelectionInterface{
}
@Override
public void elementClicked(){
if(dataTextures.contains(slot.selected) && slot.selected != null){
//npc.display.glowTexture = assets.getAsset(slot.selected);
//npc.textureGlowLocation = null;
public void elementClicked() {
if (dataTextures.contains(slot.selected) && slot.selected != null) {
//npc.display.glowTexture = assets.getAsset(slot.selected);
//npc.textureGlowLocation = null;
npc.display.skinOverlayData.overlayList.put(0,new SkinOverlay(assets.getAsset(slot.selected)));
}
npc.display.skinOverlayData.overlayList.put(0, new SkinOverlay(assets.getAsset(slot.selected)));
}
}
public void save() {
}
public void save() {
}
@Override
public String[] getExtension() {
return new String[]{"png"};
}
@Override
public String[] getExtension() {
return new String[]{"png"};
}
}