Skip to content

Commit

Permalink
1.16.2 beta update
Browse files Browse the repository at this point in the history
  • Loading branch information
jrbudda committed Aug 21, 2020
1 parent e065987 commit 5c091dc
Show file tree
Hide file tree
Showing 8 changed files with 126 additions and 90 deletions.
18 changes: 4 additions & 14 deletions install.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,25 +214,13 @@ def download_deps( mcp_dir, download_mc, forgedep=False ):
optifine_jar = "OptiFine-"+of_file_name+".jar"
optifine_dest_file = os.path.join( optifine_dest_dir, optifine_jar )

download_optifine = False
optifine_md5 = ''
if not is_non_zero_file( optifine_dest_file ):
print 'Optifine not Found at' + optifine_dest_file
download_optifine = True
else:
optifine_md5 = get_md5( optifine_dest_file )
print 'Optifine md5: %s' % optifine_md5
if optifine_md5 != of_build_md5:
download_optifine = True
print 'Bad MD5!'
else:
print 'MD5 good!'
download_optifine = True

if download_optifine:
# Use optifine filename for URL
optifine_url = "http://vivecraft.org/jar/build/OptiFine-"+of_file_name+of_file_extension
print 'Downloading Optifine from ' + optifine_url
if not download_file( optifine_url, optifine_dest_file):
if not download_file( optifine_url, optifine_dest_file, of_build_md5):
print 'FAILED to download Optifine!'
sys.exit(1)
else:
Expand Down Expand Up @@ -567,6 +555,8 @@ def reallyrmtree(path):
if os.path.exists(path):
shutil.rmtree(path)
else:
os.rename(path, path + "temp")
path = path + "temp"
i = 0
try:
while os.stat(path) and i < 20:
Expand Down
6 changes: 3 additions & 3 deletions installer/Installer.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ public class Installer extends JPanel implements PropertyChangeListener
private static final String MINECRAFT_VERSION = "1.16.2";
private static final String MC_VERSION = "1.16.2";
private static final String MC_MD5 = "114f460c5ba72d0dd66a16ed399c0f6d";
private static final String OF_FILE_NAME = "1.16.2_HD_U_G3_pre1";
private static final String OF_MD5 = "a061306600eefbc9b3053d91bd94db71";
private static final String OF_FILE_NAME = "1.16.2_HD_U_G3_pre2";
private static final String OF_MD5 = "4a9988e83f85782cd40c80038c9b42b9";
private static final String OF_VERSION_EXT = ".jar";
private static String FORGE_VERSION = "33.0.5";
private static final String HOMEPAGE_LINK = "http://www.vivecraft.org";
Expand Down Expand Up @@ -824,7 +824,7 @@ else if (!optOnDiskMd5.equalsIgnoreCase(OF_MD5)) {
}

// Need to attempt download...
success = downloadFile("http://vivecraft.org/jar/Optifine/OptiFine_" + OF_FILE_NAME + "_LIB" + OF_VERSION_EXT, fo);
success = downloadFile("http://vivecraft.org/jar/Optifine/OptiFine-" + OF_FILE_NAME + "_LIB" + OF_VERSION_EXT, fo);
// Check (potentially) downloaded optifine md5
optOnDiskMd5 = GetMd5(fo);
if (success == false || optOnDiskMd5 == null || !optOnDiskMd5.equalsIgnoreCase(OF_MD5)) {
Expand Down
8 changes: 4 additions & 4 deletions minecriftversion.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
project_name = "Vivecraft"
mc_version = "1.16.2"
mc_file_md5 = "114f460c5ba72d0dd66a16ed399c0f6d"
of_file_name = "1.16.2_HD_U_G3_pre1"
of_file_md5 = "a061306600eefbc9b3053d91bd94db71"
of_build_md5 = "510dae3a2563d3cec725f30702c7d8a6"
of_file_name = "1.16.2_HD_U_G3_pre2"
of_file_md5 = "4a9988e83f85782cd40c80038c9b42b9"
of_build_md5 = "9cbaeb05e8cf97c84c4e3c37ae60c321"
minecrift_version_num = "1.16.2"
minecrift_build = "jrbudda-4-r1b3"
minecrift_build = "jrbudda-4-r1b5"
of_file_extension = ".jar"
mcp_version = "mcp940"
mcp_uses_generics = True
Expand Down
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 @@ -202,7 +202,7 @@
+ * The minecriftVerString will be automatically updated by the build scripts, do
+ * not modify here. Modify minecriftversion.py in root minecrift dir.
+ */
+ public final String minecriftVerString = "Vivecraft 1.16.2 jrbudda-4-r1b3";
+ public final String minecriftVerString = "Vivecraft 1.16.2 jrbudda-4-r1b5";
+ /* end version */
+ /** END MINECRIFT */
private static final Logger LOGGER = LogManager.getLogger();
Expand Down
35 changes: 32 additions & 3 deletions patches/net/minecraft/client/renderer/GameRenderer.java.patch
Original file line number Diff line number Diff line change
Expand Up @@ -744,7 +744,7 @@
}
}

@@ -1359,4 +1370,2195 @@
@@ -1359,4 +1370,2224 @@
{
return this.overlayTexture;
}
Expand Down Expand Up @@ -2432,14 +2432,39 @@
+ return this.colorBuffer;
+ }
+
+
+ private void renderSwingDebug(int c) {
+ if(true) return;
+ if(mc.swingTracker.miningPoint[c] == null) return;
+ //Swing debug
+ GlStateManager.pushMatrix();
+ GlStateManager.loadIdentity();
+ applyVRModelViewLegacy(mc.currentPass);
+ Vector3d eye = mc.vrPlayer.vrdata_world_render.getEye(mc.currentPass).getPosition();
+ GlStateManager.pushMatrix();
+ GlStateManager.translated(mc.swingTracker.attackingPoint[c].x - eye.x, mc.swingTracker.attackingPoint[c].y - eye.y, mc.swingTracker.attackingPoint[c].z-eye.z);
+ if(mc.swingTracker.canact[c])
+ renderDebugAxes(0, 255, 0, 0.03f);
+ else
+ renderDebugAxes(255, 0, 0, 0.03f);
+ GlStateManager.popMatrix();
+ GlStateManager.pushMatrix();
+ GlStateManager.translated(mc.swingTracker.miningPoint[c].x - eye.x, mc.swingTracker.miningPoint[c].y - eye.y, mc.swingTracker.miningPoint[c].z-eye.z);
+ if(mc.swingTracker.canact[c])
+ renderDebugAxes(0, 255, 0, 0.02f);
+ else
+ renderDebugAxes(255, 255, 0, 0.02f);
+ GlStateManager.popMatrix();
+ GlStateManager.popMatrix();
+ }
+
+ void renderVRHands(float partialTicks, boolean renderright, boolean renderleft, boolean menuhandright, boolean menuhandleft) {
+ this.mc.getProfiler().startSection("hands");
+
+ //Render Physical Inventories
+ //mc.physicalGuiManager.doRender(partialTicks);
+ //
+
+
+ if(renderright) {
+ mc.getItemRenderer().ismainhand = true;
+ if(menuhandright) {
Expand All @@ -2451,6 +2476,8 @@
+ mat.getLast().getMatrix().setIdentity();
+ applyVRModelView(mc.currentPass, mat);
+ this.renderVRHand_Main(mat, partialTicks);
+ //Testing
+ renderSwingDebug(0);
+ }
+ mc.getItemRenderer().ismainhand = false;
+ }
Expand All @@ -2465,6 +2492,8 @@
+ mat.getLast().getMatrix().setIdentity();
+ applyVRModelView(mc.currentPass, mat);
+ this.renderVRHand_Offhand(partialTicks, true, mat);
+ //Testing
+ renderSwingDebug(1);
+ }
+ }
+ this.mc.getProfiler().endSection();
Expand All @@ -2475,7 +2504,7 @@
+ matrix.push();
+ //from HMD to controller
+ SetupRenderingAtController(0, matrix);
+
+
+ ItemStack item = mc.player.getHeldItemMainhand();
+ ItemStack override=mc.physicalGuiManager.getHeldItemOverride();
+ if(override!=null)
Expand Down
28 changes: 14 additions & 14 deletions patches/net/minecraft/client/renderer/WorldRenderer.java.patch
Original file line number Diff line number Diff line change
Expand Up @@ -334,32 +334,32 @@
irendertypebuffer$impl.finish(Atlases.getTranslucentCullBlockType());
irendertypebuffer$impl.finish(Atlases.getBannerType());
irendertypebuffer$impl.finish(Atlases.getShieldType());
@@ -1833,13 +1917,21 @@

@@ -1834,13 +1918,21 @@
if (flag1)
{
irendertypebuffer$impl.finish();
- Shaders.preRenderHand();
- ShadersRender.renderHand0(gameRendererIn, matrixStackIn, activeRenderInfoIn, partialTicks);
+ //Shaders.preRenderHand();
+ //ShadersRender.renderHand0(gameRendererIn, matrixStackIn, activeRenderInfoIn, partialTicks);
Shaders.preWater();
}
+

+ //Temporary hack til I can figure out whats wrong with this
+ if(mc.currentPass ==RenderPass.SCOPEL || mc.currentPass == RenderPass.SCOPER )
+ this.field_239227_K_ = null;
+ //
+
+
+ boolean menuHandleft = gameRendererIn.isInMenuRoom() || mc.currentScreen != null || KeyboardHandler.Showing;
+ boolean menuhandright = menuHandleft || (mc.interactTracker.hotbar >= 0 && mc.vrSettings.vrTouchHotbar);
+
if (this.field_239227_K_ != null)
- {
+ { //fabulous!
irendertypebuffer$impl.finish(RenderType.getLines());
irendertypebuffer$impl.finish();
this.field_239222_F_.framebufferClear(Minecraft.IS_RUNNING_ON_MAC);
@@ -1853,10 +1945,17 @@
@@ -1854,10 +1946,17 @@
RenderState.field_239237_T_.setupRenderState();
iprofiler.endStartSection("particles");
this.mc.particles.renderParticles(matrixStackIn, irendertypebuffer$impl, lightmapIn, activeRenderInfoIn, partialTicks);
Expand All @@ -379,7 +379,7 @@
iprofiler.endStartSection("translucent");

if (flag1)
@@ -1883,7 +1982,11 @@
@@ -1884,7 +1983,11 @@
}

this.mc.particles.renderParticles(matrixStackIn, irendertypebuffer$impl, lightmapIn, activeRenderInfoIn, partialTicks);
Expand All @@ -392,7 +392,7 @@
if (flag1)
{
Shaders.endParticles();
@@ -3189,10 +3292,11 @@
@@ -3190,10 +3293,11 @@
{
bufferIn.pos(xIn - camX, (double)yIn - camY, zIn - camZ).tex(texU, texV).endVertex();
}
Expand All @@ -406,7 +406,7 @@
}

public static void drawVoxelShapeParts(MatrixStack matrixStackIn, IVertexBuilder bufferIn, VoxelShape shapeIn, double xIn, double yIn, double zIn, float red, float green, float blue, float alpha)
@@ -3656,6 +3760,8 @@
@@ -3661,6 +3765,8 @@
{
Random random = this.world.rand;

Expand All @@ -415,7 +415,7 @@
switch (type)
{
case 1000:
@@ -3718,18 +3824,26 @@
@@ -3723,18 +3829,26 @@
break;

case 1011:
Expand All @@ -442,7 +442,7 @@
this.world.playSound(blockPosIn, SoundEvents.BLOCK_FENCE_GATE_CLOSE, SoundCategory.BLOCKS, 1.0F, random.nextFloat() * 0.1F + 0.9F, false);
break;

@@ -3750,14 +3864,26 @@
@@ -3755,14 +3869,26 @@
break;

case 1019:
Expand All @@ -469,7 +469,7 @@
this.world.playSound(blockPosIn, SoundEvents.ENTITY_ZOMBIE_BREAK_WOODEN_DOOR, SoundCategory.HOSTILE, 2.0F, (random.nextFloat() - random.nextFloat()) * 0.2F + 1.0F, false);
break;

@@ -3786,10 +3912,17 @@
@@ -3791,10 +3917,17 @@
break;

case 1030:
Expand All @@ -487,7 +487,7 @@
this.world.playSound(blockPosIn, SoundEvents.BLOCK_ANVIL_LAND, SoundCategory.BLOCKS, 0.3F, this.world.rand.nextFloat() * 0.1F + 0.9F, false);
break;

@@ -3810,6 +3943,9 @@
@@ -3815,6 +3948,9 @@
break;

case 1036:
Expand All @@ -497,7 +497,7 @@
this.world.playSound(blockPosIn, SoundEvents.BLOCK_IRON_TRAPDOOR_CLOSE, SoundCategory.BLOCKS, 1.0F, random.nextFloat() * 0.1F + 0.9F, false);
break;

@@ -4402,4 +4538,40 @@
@@ -4407,4 +4543,40 @@
super(p_i232463_1_, p_i232463_2_);
}
}
Expand Down
Loading

0 comments on commit 5c091dc

Please sign in to comment.