Skip to content

Commit

Permalink
2 actual
Browse files Browse the repository at this point in the history
  • Loading branch information
jrbudda committed Jul 23, 2016
1 parent 849b17e commit 33a1fa2
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 16 deletions.
2 changes: 1 addition & 1 deletion patches/net/minecraft/client/Minecraft.java.patch
Original file line number Diff line number Diff line change
Expand Up @@ -893,7 +893,7 @@
- {
- this.leftClickCounter = 10;
- }
+ this.leftClickCounter = this.playerController.isNotCreative() ? 10 : 0;
+ this.leftClickCounter = 10;

this.thePlayer.resetCooldown();
}
Expand Down
23 changes: 18 additions & 5 deletions patches/net/minecraft/client/gui/GuiScreen.java.patch
Original file line number Diff line number Diff line change
Expand Up @@ -88,16 +88,29 @@
if (Mouse.getEventButtonState())
{
if (this.mc.gameSettings.touchscreen && this.touchValue++ > 0)
@@ -629,6 +666,8 @@
@@ -622,13 +659,20 @@
*/
public void handleKeyboardInput() throws IOException
{
- char c0 = Keyboard.getEventCharacter();
+ if(Keyboard.getEventKey()==1 && MCOpenVR.keyboardShowing){
+ MCOpenVR.setKeyboardOverlayShowing(false, null);
+ return;
+ }
+
+ char c0 = Keyboard.getEventCharacter();

if (Keyboard.getEventKey() == 0 && c0 >= 32 || Keyboard.getEventKeyState())
{
this.keyTyped(c0, Keyboard.getEventKey());
}

+ if(Keyboard.getEventKey()==1) MCOpenVR.setKeyboardOverlayShowing(false, null);
+
+
this.mc.dispatchKeypresses();
}

@@ -658,7 +697,16 @@
@@ -658,7 +702,16 @@
{
if (this.mc.theWorld != null)
{
Expand All @@ -115,7 +128,7 @@
}
else
{
@@ -736,7 +784,7 @@
@@ -736,7 +789,7 @@
*/
public static boolean isShiftKeyDown()
{
Expand All @@ -124,7 +137,7 @@
}

/**
@@ -774,4 +822,93 @@
@@ -774,4 +827,93 @@
{
this.setWorldAndResolution(mcIn, w, h);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2298,7 +2298,7 @@
public boolean setFxaaShader(int p_setFxaaShader_1_)
{
if (!OpenGlHelper.isFramebufferEnabled())
@@ -2858,4 +2903,2152 @@
@@ -2858,4 +2903,2151 @@
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
GlStateManager.popMatrix();
}
Expand Down Expand Up @@ -3016,8 +3016,7 @@
+ GlStateManager.enableDepth();
+ GlStateManager.depthMask(true);
+ }
+ if(shaders) Shaders.useProgram(0);
+
+
+ GlStateManager.disableCull();
+
+ //Render framebuffer onto world projection
Expand Down
16 changes: 9 additions & 7 deletions patches/net/minecraft/client/renderer/RenderItem.java.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/net/minecraft/client/renderer/RenderItem.java
+++ b/net/minecraft/client/renderer/RenderItem.java
@@ -166,16 +166,25 @@
@@ -166,16 +166,27 @@
}
}

Expand All @@ -14,7 +14,9 @@
GlStateManager.pushMatrix();
GlStateManager.translate(-0.5F, -0.5F, -0.5F);

+ float fade = Minecraft.getMinecraft().thePlayer.getCooledAttackStrength(par1);
+ float fade = 1;
+ if(Minecraft.getMinecraft().thePlayer!=null)
+ fade= Minecraft.getMinecraft().thePlayer.getCooledAttackStrength(par1);
+
+ if(fade < 0.1) fade = 0.1f;
+ if(!ismainhand) fade = 1;
Expand All @@ -28,7 +30,7 @@
GlStateManager.enableRescaleNormal();
TileEntityItemStackRenderer.instance.renderByItem(stack);
}
@@ -187,7 +196,13 @@
@@ -187,7 +198,13 @@
this.modelLocation = null;
}

Expand All @@ -43,7 +45,7 @@

if (stack.hasEffect() && (!Config.isCustomItems() || !CustomItems.renderCustomEffect(this, stack, model)))
{
@@ -304,7 +319,7 @@
@@ -304,7 +321,7 @@
if (stack != null)
{
IBakedModel ibakedmodel = this.getItemModelWithOverrides(stack, (World)null, (EntityLivingBase)null);
Expand All @@ -52,7 +54,7 @@
}
}

@@ -333,16 +348,16 @@
@@ -333,16 +350,16 @@
}
}

Expand All @@ -72,7 +74,7 @@
{
if (stack.getItem() != null)
{
@@ -370,7 +385,7 @@
@@ -370,7 +387,7 @@
}
}

Expand All @@ -81,7 +83,7 @@
GlStateManager.cullFace(GlStateManager.CullFace.BACK);
GlStateManager.popMatrix();
GlStateManager.disableRescaleNormal();
@@ -415,7 +430,7 @@
@@ -415,7 +432,7 @@
bakedmodel.getItemCameraTransforms().applyTransform(ItemCameraTransforms.TransformType.GUI);
}

Expand Down
2 changes: 2 additions & 0 deletions src/com/mtbs3d/minecrift/provider/OpenVRPlayer.java
Original file line number Diff line number Diff line change
Expand Up @@ -826,6 +826,8 @@ private boolean checkAndSetTeleportDestination(Minecraft mc, Entity player, Vec3
}

private boolean canStand(World w, BlockPos bp){
if(w.getBlockState(bp).getBlock().isPassable(w, bp) && !w.getBlockState(bp).isFullBlock())
bp = bp.down(); //raytrace hit snow or something...
return !w.getBlockState(bp).getBlock().isPassable(w, bp) && w.getBlockState(bp.up()).getBlock().isPassable(w, bp.up()) && w.getBlockState(bp.up(2)).getBlock().isPassable(w, bp.up(2));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,14 @@ public byte[] transform(String name, String transformedName, byte[] bytes)
else {
// Perform any additional mods using ASM
minecriftClass = performAsmModification(minecriftClass, transformedName);

if(bytes.length != minecriftClass.length)
debug(String.format("Minecrift: Overwrite " + name +" "+ transformedName + " " + bytes.length + " > " + minecriftClass.length));

//writeToFile("original", transformedName, name, bytes);
//writeToFile("transformed", transformedName, name, minecriftClass);
}

return minecriftClass != null ? minecriftClass : bytes;
}

Expand Down

0 comments on commit 33a1fa2

Please sign in to comment.