Skip to content

Commit

Permalink
pre7
Browse files Browse the repository at this point in the history
  • Loading branch information
jrbudda committed Jun 1, 2017
1 parent fb9f1a4 commit 772c9f7
Show file tree
Hide file tree
Showing 21 changed files with 676 additions and 221 deletions.
2 changes: 1 addition & 1 deletion minecriftversion.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
of_json_name = "1.10.2_HD_U_D8"
of_file_md5 = "d2a99a8d96d1067cb9e384bbdc560c70"
minecrift_version_num = "1.10.2"
minecrift_build = "jrbudda-10pre5"
minecrift_build = "jrbudda-10pre7"
of_file_extension = ".jar"
mcp_version = "mcp931"
mcp_uses_generics = True
Expand Down
52 changes: 27 additions & 25 deletions patches/net/minecraft/client/Minecraft.java.patch
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,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.10.2 jrbudda-10pre5";
+ public final String minecriftVerString = "Vivecraft 1.10.2 jrbudda-10pre7";
+ /* end version */
+ /** END MINECRIFT */
+
Expand Down Expand Up @@ -1612,7 +1612,7 @@
}

this.processKeyBinds();
@@ -2171,20 +2795,36 @@
@@ -2171,20 +2795,38 @@
{
for (; this.gameSettings.keyBindTogglePerspective.isPressed(); this.renderGlobal.setDisplayListEntitiesDirty())
{
Expand Down Expand Up @@ -1644,8 +1644,10 @@
+ e.printStackTrace();
+ }
+ } else {
+ if(true) return;
+ ++this.gameSettings.thirdPersonView;
+ //this.displayGuiScreen(new net.minecraft.client.gui.GuiWinGame()); //ez mode
+
+ // VIVE: No don't do this it's really bad
+ /*++this.gameSettings.thirdPersonView;
+
+ if (this.gameSettings.thirdPersonView > 2)
+ {
Expand All @@ -1659,11 +1661,11 @@
+ else if (this.gameSettings.thirdPersonView == 1)
+ {
+ this.entityRenderer.loadEntityShader((Entity)null);
+ }
+ }*/
}
}

@@ -2207,7 +2847,7 @@
@@ -2207,7 +2849,7 @@
}
}
}
Expand All @@ -1672,7 +1674,7 @@
while (this.gameSettings.keyBindInventory.isPressed())
{
this.getConnection().sendPacket(new CPacketClientStatus(CPacketClientStatus.State.OPEN_INVENTORY_ACHIEVEMENT));
@@ -2242,22 +2882,42 @@
@@ -2242,22 +2884,42 @@

if (flag)
{
Expand Down Expand Up @@ -1722,7 +1724,7 @@
}

label472:
@@ -2283,17 +2943,27 @@
@@ -2283,17 +2945,27 @@
}
}
}
Expand Down Expand Up @@ -1758,7 +1760,7 @@

while (this.gameSettings.keyBindPickBlock.isPressed())
{
@@ -2301,18 +2971,23 @@
@@ -2301,18 +2973,23 @@
}
}

Expand All @@ -1785,7 +1787,7 @@
int i = Mouse.getEventButton();
KeyBinding.setKeyBindState(i - 100, Mouse.getEventButtonState());

@@ -2327,6 +3002,13 @@
@@ -2327,6 +3004,13 @@
KeyBinding.onTick(i - 100);
}
}
Expand All @@ -1799,7 +1801,7 @@

long j = getSystemTime() - this.systemTime;

@@ -2381,6 +3063,15 @@
@@ -2381,6 +3065,15 @@
*/
public void launchIntegratedServer(String folderName, String worldName, @Nullable WorldSettings worldSettingsIn)
{
Expand All @@ -1815,7 +1817,7 @@
this.loadWorld((WorldClient)null);
System.gc();
ISaveHandler isavehandler = this.saveLoader.getSaveLoader(folderName, false);
@@ -2423,6 +3114,16 @@
@@ -2423,6 +3116,16 @@

while (!this.theIntegratedServer.serverIsInRunLoop())
{
Expand All @@ -1832,7 +1834,7 @@
String s = this.theIntegratedServer.getUserMessage();

if (s != null)
@@ -2443,12 +3144,19 @@
@@ -2443,12 +3146,19 @@
;
}
}
Expand All @@ -1854,7 +1856,7 @@
networkmanager.sendPacket(new CPacketLoginStart(this.getSession().getProfile()));
this.myNetworkManager = networkmanager;
}
@@ -2458,6 +3166,9 @@
@@ -2458,6 +3168,9 @@
*/
public void loadWorld(WorldClient worldClientIn)
{
Expand All @@ -1864,7 +1866,7 @@
this.loadWorld(worldClientIn, "");
}

@@ -2466,6 +3177,11 @@
@@ -2466,6 +3179,11 @@
*/
public void loadWorld(@Nullable WorldClient worldClientIn, String loadingMessage)
{
Expand All @@ -1876,7 +1878,7 @@
if (worldClientIn == null)
{
NetHandlerPlayClient nethandlerplayclient = this.getConnection();
@@ -2477,9 +3193,25 @@
@@ -2477,9 +3195,25 @@

if (this.theIntegratedServer != null && this.theIntegratedServer.isAnvilFileSet())
{
Expand Down Expand Up @@ -1904,7 +1906,7 @@
this.theIntegratedServer = null;
this.guiAchievement.clearAchievements();
this.entityRenderer.getMapItemRenderer().clearLoadedMaps();
@@ -2501,6 +3233,11 @@
@@ -2501,6 +3235,11 @@
this.ingameGUI.resetPlayersOverlayFooterHeader();
this.setServerData((ServerData)null);
this.integratedServerIsRunning = false;
Expand All @@ -1916,7 +1918,7 @@
}

this.mcSoundHandler.stopSounds();
@@ -2533,12 +3270,14 @@
@@ -2533,12 +3272,14 @@

if (this.player == null)
{
Expand All @@ -1932,23 +1934,23 @@
this.player.movementInput = new MovementInputFromOptions(this.gameSettings);
this.playerController.setPlayerCapabilities(this.player);
this.renderViewEntity = this.player;
@@ -2576,6 +3315,7 @@
@@ -2576,6 +3317,7 @@
this.player.preparePlayerToSpawn();
this.player.setServerBrand(s);
this.world.spawnEntity(this.player);
+ System.out.println("Spawned Player At " + this.player.posX + " " + this.player.posY + " " + this.player.posZ); //debug spawning in the damn ground.
this.playerController.flipPlayer(this.player);
this.player.movementInput = new MovementInputFromOptions(this.gameSettings);
this.player.setEntityId(i);
@@ -2607,6 +3347,7 @@
@@ -2607,6 +3349,7 @@
return theMinecraft == null || !theMinecraft.gameSettings.hideGUI;
}

+ //unused
public static boolean isFancyGraphicsEnabled()
{
return theMinecraft != null && theMinecraft.gameSettings.fancyGraphics;
@@ -2623,8 +3364,16 @@
@@ -2623,8 +3366,16 @@
/**
* Called when user clicked he's mouse middle button (pick block)
*/
Expand All @@ -1966,7 +1968,7 @@
if (this.objectMouseOver != null && this.objectMouseOver.typeOfHit != RayTraceResult.Type.MISS)
{
boolean flag = this.player.capabilities.isCreativeMode;
@@ -2788,7 +3537,8 @@
@@ -2788,7 +3539,8 @@
}
}

Expand All @@ -1976,7 +1978,7 @@
{
NBTTagCompound nbttagcompound = te.writeToNBT(new NBTTagCompound());

@@ -3098,6 +3848,11 @@
@@ -3098,6 +3850,11 @@
*/
public static int getGLMaximumTextureSize()
{
Expand All @@ -1988,7 +1990,7 @@
for (int i = 16384; i > 0; i >>= 1)
{
GlStateManager.glTexImage2D(32868, 0, 6408, i, i, 0, 6408, 5121, (IntBuffer)null);
@@ -3264,7 +4019,7 @@
@@ -3264,7 +4021,7 @@
}

public void dispatchKeypresses()
Expand All @@ -1997,7 +1999,7 @@
int i = Keyboard.getEventKey() == 0 ? Keyboard.getEventCharacter() + 256 : Keyboard.getEventKey();

if (i != 0 && !Keyboard.isRepeatEvent())
@@ -3417,4 +4172,1209 @@
@@ -3417,4 +4174,1209 @@
{
return this.player != null && this.player.hasReducedDebug() || this.gameSettings.reducedDebugInfo;
}
Expand Down
14 changes: 8 additions & 6 deletions patches/net/minecraft/client/entity/EntityPlayerSP.java.patch
Original file line number Diff line number Diff line change
Expand Up @@ -576,14 +576,15 @@
vec3d2 = new Vec3d((double)(f2 * f5 - f3 * f4), vec3d2.yCoord, (double)(f3 * f5 + f2 * f4));
f1 = (float)vec3d2.lengthSquared();

@@ -1269,4 +1483,336 @@
@@ -1269,4 +1483,338 @@
}
}
}
+
+
+ // VIVECREAFT ADDITIONS
+
+ boolean debugSpawn;
+
+ /**
+ * Sets the location and Yaw/Pitch of an entity in the world
Expand All @@ -595,7 +596,8 @@
+// Vec3 roomOrigin = OpenVRPlayer.get().getRoomOriginPos_World();
+// double ox = roomOrigin.xCoord - posX;
+// double oz = roomOrigin.zCoord - posZ;
+//
+ if(debugSpawn)System.out.println("setlocangles " + x + " " + y + " " + z);
+
+ super.setLocationAndAngles(x, y, z, yaw, pitch);
+
+ if(!initFromServer) return;
Expand All @@ -608,10 +610,11 @@
+// posZ + oz, false);
+ }
+ }
+
+
+ @Override
+ public void setPositionAndRotation(double x, double y, double z, float yaw, float pitch)
+ {
+ if(debugSpawn)System.out.println("setposrot " + x + " " + y + " " + z);
+ super.setPositionAndRotation(x, y, z, yaw, pitch);
+
+ OpenVRPlayer.get().snapRoomOriginToPlayerEntity(this, true, false, 1);
Expand All @@ -627,6 +630,8 @@
+ @Override
+ public void setPosition(double x, double y, double z)
+ { //this is also called when riding to move this around.
+ if(debugSpawn)System.out.println("setpos " + x + " " + y + " " + z);
+
+ super.setPosition(x, y, z);
+ if(this.isRiding()){
+ Vec3d roomOrigin = OpenVRPlayer.get().getRoomOriginPos_World();
Expand Down Expand Up @@ -893,12 +898,9 @@
+ */
+ @Override
+ public void onDeath(DamageSource p_70645_1_){
+
+ super.onDeath(p_70645_1_);
+ MCOpenVR.triggerHapticPulse(0, 2000);
+ MCOpenVR.triggerHapticPulse(1, 2000);
+ System.out.println("Player DIED At " + this.posX + " " + this.posY + " " + this.posZ); //debug spawning in the damn ground.
+
+ }
+
+
Expand Down
2 changes: 1 addition & 1 deletion patches/net/minecraft/client/gui/GuiChat.java.patch
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
this.inputField = new GuiTextField(0, this.fontRendererObj, 4, this.height - 12, this.width - 4, 12);
this.inputField.setMaxStringLength(100);
this.inputField.setEnableBackgroundDrawing(false);
+ //this.inputField.setCanLoseFocus(false);
+ this.inputField.setCanLoseFocus(false);
this.inputField.setFocused(true);
this.inputField.setText(this.defaultInputFieldText);
- this.inputField.setCanLoseFocus(false);
Expand Down
Loading

0 comments on commit 772c9f7

Please sign in to comment.