Skip to content

Commit

Permalink
v2
Browse files Browse the repository at this point in the history
  • Loading branch information
jrbudda committed Aug 7, 2020
1 parent 9e97b20 commit 6ed5570
Show file tree
Hide file tree
Showing 10 changed files with 50 additions and 47 deletions.
2 changes: 1 addition & 1 deletion minecriftversion.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
of_file_md5 = "ef86ff22ecf29c2cb66967cfdaccee90"
of_build_md5 = "46c3772ee836abb4571d95cdddde9c2f"
minecrift_version_num = "1.16.1"
minecrift_build = "jrbudda-2-b4"
minecrift_build = "jrbudda-2-1"
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.1 jrbudda-2-b4";
+ public final String minecriftVerString = "Vivecraft 1.16.1 jrbudda-2-1";
+ /* end version */
+ /** END MINECRIFT */
private static final Logger LOGGER = LogManager.getLogger();
Expand Down
47 changes: 24 additions & 23 deletions patches/net/minecraft/client/gui/IngameGui.java.patch
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@
{
this.overlayPlayerList.setVisible(true);
this.overlayPlayerList.func_238523_a_(p_238445_1_, this.scaledWidth, scoreboard, scoreobjective1);
@@ -607,22 +656,44 @@
@@ -607,22 +656,45 @@
this.blit(p_238443_2_, i - 91, this.scaledHeight - 22, 0, 0, 182, 22);
this.blit(p_238443_2_, i - 91 - 1 + playerentity.inventory.currentItem * 20, this.scaledHeight - 22 - 1, 0, 22, 24, 22);

Expand All @@ -209,8 +209,9 @@
+ this.blit(p_238443_2_, i - 91 - 1 + mc.interactTracker.hotbar * 20, this.scaledHeight - 22 - 1, 0, 22, 24, 22);
+ RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F);
+ }
+ //
+
+ //Vivecraft
+ //Vivecraft - touch hotbar offhand-slot-swap
+ if (!itemstack.isEmpty() || mc.vrSettings.vrTouchHotbar)
{
if (handside == HandSide.LEFT)
Expand All @@ -235,7 +236,8 @@
+ this.blit(p_238443_2_, i + 91, this.scaledHeight - 23, 53, 22, 29, 24);
}
}

-
+ //
+
this.setBlitOffset(j);
RenderSystem.enableRescaleNormal();
Expand All @@ -247,7 +249,7 @@
CustomItems.setRenderOffHand(false);

for (int i1 = 0; i1 < 9; ++i1)
@@ -673,6 +744,10 @@
@@ -673,6 +745,10 @@

RenderSystem.disableRescaleNormal();
RenderSystem.disableBlend();
Expand All @@ -258,15 +260,15 @@
}
}

@@ -1212,6 +1287,7 @@
@@ -1212,6 +1288,7 @@
}
}

+ //unused
private void renderPumpkinOverlay()
{
RenderSystem.disableDepthTest();
@@ -1243,6 +1319,8 @@
@@ -1243,6 +1320,8 @@
}
}

Expand All @@ -275,15 +277,15 @@
private void renderVignette(Entity entityIn)
{
if (!Config.isVignetteEnabled())
@@ -1295,6 +1373,7 @@
@@ -1295,6 +1374,7 @@
}
}

+ //unused
private void renderPortal(float timeInPortal)
{
if (timeInPortal < 1.0F)
@@ -1520,4 +1599,80 @@
@@ -1520,4 +1600,79 @@
{
this.overlayDebug.resetChunk();
}
Expand All @@ -305,28 +307,27 @@
+ if(entityplayer.isSneaking()) e = Effects.BLINDNESS;
+ if(entityplayer.isActualySwimming()) e = Effects.DOLPHINS_GRACE;
+ if(entityplayer.isElytraFlying()) iconp = -1;
+ if(mc.crawlTracker.crawling) iconp = -2;
+
+ int w = this.mc.getMainWindow().getScaledWidth() / 2 - 109;
+ int h = this.mc.getMainWindow().getScaledHeight() -39;
+
+ if(iconp == -1){
+// GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F);
+ int w = this.mc.getMainWindow().getScaledWidth() / 2 - 109;
+ int h = this.mc.getMainWindow().getScaledHeight() -39;
+// //TODO: this aint right.
+// TextureAtlasSprite textureatlassprite = this.mc.getAtlasSpriteGetter(AtlasTexture.LOCATION_BLOCKS_TEXTURE).apply(new ResourceLocation("textures/items/elytra"));
+// this.mc.getTextureManager().bindTexture(AtlasTexture.LOCATION_BLOCKS_TEXTURE);
+// AbstractGui.blit(w,h,0,16,16,textureatlassprite);
+//
+ mc.getItemRenderer().renderItemIntoGUI(new ItemStack(Items.ELYTRA), w, h);
+
+ // public void renderItemAndEffectIntoGUI(@Nullable LivingEntity entityIn, ItemStack itemIn, int x, int y)
+
+
+ e = null;
+ }
+ else if (e!=null) {
+ else if(iconp == -2){
+ if(entityplayer.isSneaking())
+ w = this.mc.getMainWindow().getScaledWidth() / 2 - 109 - 16;
+ else
+ e = null;
+ mc.getItemRenderer().renderItemIntoGUI(new ItemStack(Items.RABBIT_FOOT), w, h);
+ }
+
+ if (e!=null) {
+ TextureAtlasSprite sprite = mc.getPotionSpriteUploader().getSprite(e);
+ GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F);
+ this.mc.getTextureManager().bindTexture(sprite.getAtlasTexture().getTextureLocation());
+ int w = this.mc.getMainWindow().getScaledWidth() / 2 - 109;
+ int h = this.mc.getMainWindow().getScaledHeight() -39;
+ AbstractGui.blit(matrixstack, w, h, 0, 18, 18, sprite);
+ }
+ }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
+ }));
+ this.addButton(new Button(this.width / 2 + 4, this.height / 4 + 72 + -16, 98, 20, new TranslationTextComponent("vivecraft.gui.commands"), (p) ->
+ {
+ minecraft.displayGuiScreen(new GuiQuickCommandsInGame());
+ minecraft.displayGuiScreen(new GuiQuickCommandsInGame(this));
+ init();
+ }));
+ this.addButton(new Button(this.width / 2 - 102, this.height / 4 + 120 + -16, 49, 20, new TranslationTextComponent("vivecraft.gui.overlay"), (p) ->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@
public void renderItemInFirstPerson(float partialTicks, MatrixStack matrixStackIn, IRenderTypeBuffer.Impl bufferIn, ClientPlayerEntity playerEntityIn, int combinedLightIn)
{
float f = playerEntityIn.getSwingProgress(partialTicks);
@@ -310,186 +430,420 @@
@@ -310,186 +430,421 @@
bufferIn.finish();
}

Expand Down Expand Up @@ -829,6 +829,7 @@
+
+ if(stack.hasTag() && stack.getTag().getInt("CustomModelData") > 0) {
+ transform = ItemCameraTransforms.TransformType.THIRD_PERSON_RIGHT_HAND;
+ matrixStackIn.scale(0.7f, 0.7f, 0.7f);
+ } else {
+ matrixStackIn.rotate(prerotation);
+ matrixStackIn.translate(translateX, translateY, translateZ);
Expand Down Expand Up @@ -868,7 +869,7 @@
}

public void tick()
@@ -571,4 +925,120 @@
@@ -571,4 +926,120 @@
this.equippedProgressOffHand = 0.0F;
}
}
Expand Down
26 changes: 12 additions & 14 deletions patches/net/minecraft/client/renderer/GameRenderer.java.patch
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@
return matrixstack.getLast().getMatrix();
}

@@ -608,183 +734,99 @@
@@ -608,183 +734,98 @@

public void updateCameraAndRender(float partialTicks, long nanoTime, boolean renderWorldIn)
{
Expand Down Expand Up @@ -438,7 +438,9 @@
+ MatrixStack matrixstack = new MatrixStack();
+ this.mc.getProfiler().startSection("level");
+ this.renderWorld(partialTicks, nanoTime, matrixstack);
+
+ if(mc.currentPass != RenderPass.THIRD)
+ renderFaceOverlay(partialTicks);
+
+ if (this.mc.isSingleplayer() && this.timeWorldIcon < Util.milliTime() - 1000L)
+ {
+ this.timeWorldIcon = Util.milliTime();
Expand All @@ -449,6 +451,7 @@
+ }
+ }
+
+ //note calling this breaks the projection matrix.
+ this.mc.worldRenderer.renderEntityOutlineFramebuffer();
+
+ if (this.shaderGroup != null && this.useShader && mc.currentPass != RenderPass.THIRD )
Expand All @@ -466,10 +469,6 @@
+ }
+
+ this.mc.getFramebuffer().bindFramebuffer(true);
+
+ if(mc.currentPass != RenderPass.THIRD)
+ renderFaceOverlay(partialTicks);
+
+ }
+ else {
+ this.mc.getProfiler().startSection("MainMenu");
Expand Down Expand Up @@ -566,7 +565,7 @@
}

private void createWorldIcon()
@@ -827,7 +869,10 @@
@@ -827,7 +868,10 @@

private boolean isDrawBlockOutline()
{
Expand All @@ -578,7 +577,7 @@
{
return false;
}
@@ -862,17 +907,36 @@
@@ -862,17 +906,36 @@
}
}

Expand Down Expand Up @@ -620,7 +619,7 @@
if (Config.isShaders())
{
Shaders.beginRender(this.mc, this.activeRender, partialTicks, finishTimeNano);
@@ -885,36 +949,17 @@
@@ -885,36 +948,17 @@
{
Shaders.beginRenderPass(partialTicks, finishTimeNano);
}
Expand Down Expand Up @@ -662,7 +661,7 @@
}

float f = MathHelper.lerp(partialTicks, this.mc.player.prevTimeInPortal, this.mc.player.timeInPortal);
@@ -930,69 +975,51 @@
@@ -930,69 +974,51 @@

float f1 = 5.0F / (f * f + 5.0F) - f * 0.04F;
f1 = f1 * f1;
Expand Down Expand Up @@ -755,7 +754,7 @@
this.mc.getProfiler().endSection();
}

@@ -1104,8 +1131,6 @@
@@ -1104,8 +1130,6 @@

if (!this.initialized)
{
Expand All @@ -764,7 +763,7 @@
if (Config.getBitsOs() == 64 && Config.getBitsJre() == 32)
{
Config.setNotify64BitJava(true);
@@ -1274,25 +1299,30 @@
@@ -1274,25 +1298,30 @@
float f6 = this.itemActivationOffY * (float)(heightScaled / 4);
RenderSystem.enableAlphaTest();
RenderSystem.pushMatrix();
Expand Down Expand Up @@ -811,7 +810,7 @@
}
}

@@ -1320,4 +1350,2187 @@
@@ -1320,4 +1349,2186 @@
{
return this.overlayTexture;
}
Expand Down Expand Up @@ -1123,7 +1122,6 @@
+ RenderSystem.alphaFunc(GL11.GL_GREATER, 1f / 255f);
+ RenderSystem.depthMask(true);
+ RenderSystem.enableDepthTest();
+
+ //Render framebuffer onto world projection
+ if(inMenuRoom)
+ RenderSystem.disableAlphaTest();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@
-
+
+ //Vivecraft do it again. Come at be bro.
+ gameRendererIn.renderVrFast(partialTicks, false, menuhandright, menuHandleft);
+ gameRendererIn.renderVrFast(partialTicks, true, menuhandright, menuHandleft);
+ //
+
if (flag1)
Expand Down
2 changes: 1 addition & 1 deletion src/org/vivecraft/gameplay/OpenVRPlayer.java
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public VRData getVRDataWorld(){
public int wfCount = 0;
//

private int roomScaleMovementDelay = 0;
public int roomScaleMovementDelay = 0;

boolean initdone =false;

Expand Down
8 changes: 5 additions & 3 deletions src/org/vivecraft/gui/settings/GuiQuickCommandsInGame.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,16 @@

public class GuiQuickCommandsInGame extends Screen
{
public GuiQuickCommandsInGame() {
public GuiQuickCommandsInGame(Screen parent) {
super(new StringTextComponent(""));
this.parentScreen = parent;
}

private int field_146445_a;
private int field_146444_f;
private static final String __OBFID = "CL_00000703";

protected final Screen parentScreen;

@Override
public void init()
{
Expand All @@ -40,7 +42,7 @@ public void init()
}));
}
this.addButton(new Button( this.width / 2 -50, this.height -30 + var1, 100, 20, "Cancel", (p) -> {
minecraft.displayGuiScreen(new IngameMenuScreen(false));
minecraft.displayGuiScreen(parentScreen);
}));
}

Expand Down
1 change: 1 addition & 0 deletions src/org/vivecraft/settings/VRSettings.java
Original file line number Diff line number Diff line change
Expand Up @@ -1584,6 +1584,7 @@ public void setOptionFloatValue(VRSettings.VrOptions par1EnumOptions, float par2
break;
// VIVE START - new options
case WORLD_SCALE:
mc.vrPlayer.roomScaleMovementDelay = 2;
if(par2 == 0) vrWorldScale = 0.1f;
else if(par2 == 1) vrWorldScale = 0.25f;
else if(par2 >= 2 && par2 <= 17) vrWorldScale = (float) (par2 * 0.1 + 0.3);
Expand Down

0 comments on commit 6ed5570

Please sign in to comment.