Everything is done almost
This commit is contained in:
parent
1473044456
commit
d15ceecfca
|
|
@ -235,35 +235,35 @@ public class GuiServer extends WDScreen {
|
|||
public boolean handleKeyboardInput(int keyCode, boolean keyState, Supplier<Boolean> booleanSupplier) throws IOException {
|
||||
if(uploadWizard) {
|
||||
if(keyState) {
|
||||
if(keyCode == Keyboard.KEY_UP) {
|
||||
if(keyCode == GLFW.GLFW_KEY_UP) {
|
||||
if(selectedLine > 3)
|
||||
selectedLine--;
|
||||
else if(uploadOffset > 0) {
|
||||
uploadOffset--;
|
||||
updateUploadScreen();
|
||||
}
|
||||
} else if(keyCode == Keyboard.KEY_DOWN) {
|
||||
} else if(keyCode == GLFW.GLFW_KEY_DOWN) {
|
||||
if(selectedLine < MAX_LINES - 1)
|
||||
selectedLine++;
|
||||
else if(uploadOffset + selectedLine - 2 < uploadFiles.size()) {
|
||||
uploadOffset++;
|
||||
updateUploadScreen();
|
||||
}
|
||||
} else if(keyCode == Keyboard.KEY_PRIOR) {
|
||||
} else if(keyCode == GLFW.GLFW_KEY_PAGE_DOWN) {
|
||||
selectedLine = 3;
|
||||
int dst = uploadOffset - (MAX_LINES - 3);
|
||||
if(dst < 0)
|
||||
dst = 0;
|
||||
|
||||
selectFile(dst);
|
||||
} else if(keyCode == Keyboard.KEY_NEXT) {
|
||||
} else if(keyCode == GLFW.GLFW_KEY_PAGE_UP) {
|
||||
selectedLine = 3;
|
||||
int dst = uploadOffset + (MAX_LINES - 3);
|
||||
if(dst >= uploadFiles.size())
|
||||
dst = uploadFiles.size() - 1;
|
||||
|
||||
selectFile(dst);
|
||||
} else if(keyCode == Keyboard.KEY_RETURN || keyCode == Keyboard.KEY_NUMPADENTER) {
|
||||
} else if(keyCode == GLFW.GLFW_KEY_ENTER || keyCode == GLFW.GLFW_KEY_KP_ENTER) {
|
||||
File file = uploadFiles.get(uploadOffset + selectedLine - 3);
|
||||
|
||||
if(file.isDirectory()) {
|
||||
|
|
@ -271,13 +271,13 @@ public class GuiServer extends WDScreen {
|
|||
updateUploadScreen();
|
||||
} else
|
||||
startFileUpload(file, true);
|
||||
} else if(keyCode == Keyboard.KEY_F5) {
|
||||
} else if(keyCode == GLFW.GLFW_KEY_F5) {
|
||||
uploadCD(uploadDir);
|
||||
updateUploadScreen();
|
||||
}
|
||||
}
|
||||
|
||||
if(keyCode == Keyboard.KEY_ESCAPE) {
|
||||
if(keyCode == GLFW.GLFW_KEY_ESCAPE) {
|
||||
quitUploadWizard();
|
||||
return true; //Don't let the screen handle this
|
||||
}
|
||||
|
|
@ -291,12 +291,12 @@ public class GuiServer extends WDScreen {
|
|||
|
||||
if(keyCode == GLFW.GLFW_KEY_L && ctrl)
|
||||
lines.clear();
|
||||
else if(keyCode == Keyboard.KEY_V && ctrl) {
|
||||
else if(keyCode == GLFW.GLFW_KEY_V && ctrl) {
|
||||
prompt += minecraft.keyboardHandler.getClipboard();
|
||||
|
||||
if(prompt.length() > MAX_LINE_LEN)
|
||||
prompt = prompt.substring(0, MAX_LINE_LEN);
|
||||
} else if(keyCode == Keyboard.KEY_UP) {
|
||||
} else if(keyCode == GLFW.GLFW_KEY_UP) {
|
||||
if(lastCmd != null) {
|
||||
String tmp = prompt;
|
||||
prompt = lastCmd;
|
||||
|
|
@ -337,10 +337,10 @@ public class GuiServer extends WDScreen {
|
|||
} else if(promptLocked)
|
||||
return;
|
||||
|
||||
if(keyCode == Keyboard.KEY_BACK) {
|
||||
if(keyCode == GLFW.GLFW_KEY_BACKSPACE) {
|
||||
if(prompt.length() > 0)
|
||||
prompt = prompt.substring(0, prompt.length() - 1);
|
||||
} else if(keyCode == Keyboard.KEY_RETURN || keyCode == Keyboard.KEY_NUMPADENTER) {
|
||||
} else if(keyCode == GLFW.GLFW_KEY_ENTER || keyCode == GLFW.GLFW_KEY_KP_ENTER) {
|
||||
if(prompt.length() > 0) {
|
||||
writeLine(userPrompt + prompt);
|
||||
evaluateCommand(prompt);
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ public final class MinePadRenderer implements IItemRenderer {
|
|||
private static final float PI = (float) Math.PI;
|
||||
private final Minecraft mc = Minecraft.getInstance();
|
||||
private final ResourceLocation tex = new ResourceLocation("webdisplays", "textures/models/minepad.png");
|
||||
private final ModelMinePad model = new ModelMinePad();
|
||||
// private final ModelMinePad model = new ModelMinePad();
|
||||
private final ClientProxy clientProxy = (ClientProxy) WebDisplays.PROXY;
|
||||
|
||||
private float sinSqrtSwingProg1;
|
||||
|
|
@ -87,7 +87,7 @@ public final class MinePadRenderer implements IItemRenderer {
|
|||
glRotatef(-90.0f, 1.0f, 0.0f, 0.0f);
|
||||
glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
|
||||
RenderSystem.setShaderTexture(0, tex);
|
||||
model.render(1.f / 16.f);
|
||||
// model.render(1.f / 16.f);
|
||||
glPopMatrix();
|
||||
|
||||
//Render web view
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
package net.montoyo.wd.client.renderers;
|
||||
|
||||
import com.mojang.blaze3d.vertex.PoseStack;
|
||||
/*import com.mojang.blaze3d.vertex.PoseStack;
|
||||
import com.mojang.blaze3d.vertex.VertexConsumer;
|
||||
import net.minecraft.client.model.Model;
|
||||
import net.minecraft.client.model.geom.ModelPart;
|
||||
|
|
@ -60,4 +60,4 @@ public final class ModelMinePad extends Model {
|
|||
public void renderToBuffer(PoseStack poseStack, VertexConsumer buffer, int packedLight, int packedOverlay, float red, float green, float blue, float alpha) {
|
||||
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
|
|
|||
|
|
@ -1,6 +1,56 @@
|
|||
{
|
||||
"parent": "item/generated",
|
||||
"textures": {
|
||||
"layer0": "webdisplays:items/minepad"
|
||||
}
|
||||
}
|
||||
"credit": "Made with Blockbench",
|
||||
"texture_size": [64, 32],
|
||||
"textures": {
|
||||
"0": "webdisplays:models/minepad"
|
||||
},
|
||||
"elements": [
|
||||
{
|
||||
"from": [1, 0, 0],
|
||||
"to": [15, 1, 9],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [1, 0, 3.5]},
|
||||
"faces": {
|
||||
"north": {"uv": [2.25, 4.5, 5.75, 5], "texture": "#0"},
|
||||
"east": {"uv": [0, 4.5, 2.25, 5], "texture": "#0"},
|
||||
"south": {"uv": [8, 4.5, 11.5, 5], "texture": "#0"},
|
||||
"west": {"uv": [5.75, 4.5, 8, 5], "texture": "#0"},
|
||||
"up": {"uv": [5.75, 4.5, 2.25, 0], "texture": "#0"},
|
||||
"down": {"uv": [9.25, 0, 5.75, 4.5], "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [0, 0, 1],
|
||||
"to": [1, 1, 8],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [0, 0, 4.5]},
|
||||
"faces": {
|
||||
"north": {"uv": [1.75, 8.5, 2, 9], "texture": "#0"},
|
||||
"east": {"uv": [0, 8.5, 1.75, 9], "texture": "#0"},
|
||||
"south": {"uv": [3.75, 8.5, 4, 9], "texture": "#0"},
|
||||
"west": {"uv": [2, 8.5, 3.75, 9], "texture": "#0"},
|
||||
"up": {"uv": [2, 8.5, 1.75, 5], "texture": "#0"},
|
||||
"down": {"uv": [2.25, 5, 2, 8.5], "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [15, 0, 1],
|
||||
"to": [16, 1, 8],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [15, 0, 4.5]},
|
||||
"faces": {
|
||||
"north": {"uv": [9.25, 8.5, 9.5, 9], "texture": "#0"},
|
||||
"east": {"uv": [7.5, 8.5, 9.25, 9], "texture": "#0"},
|
||||
"south": {"uv": [11.25, 8.5, 11.5, 9], "texture": "#0"},
|
||||
"west": {"uv": [9.5, 8.5, 11.25, 9], "texture": "#0"},
|
||||
"up": {"uv": [9.5, 8.5, 9.25, 5], "texture": "#0"},
|
||||
"down": {"uv": [9.75, 5, 9.5, 8.5], "texture": "#0"}
|
||||
}
|
||||
}
|
||||
],
|
||||
"groups": [
|
||||
{
|
||||
"name": "bone",
|
||||
"origin": [0, 0, 0],
|
||||
"color": 0,
|
||||
"children": [0, 1, 2]
|
||||
}
|
||||
]
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user