Skip to content

Commit

Permalink
r11 and r12 test
Browse files Browse the repository at this point in the history
  • Loading branch information
jrbudda committed Jan 16, 2019
1 parent aa30129 commit 7e58cbc
Show file tree
Hide file tree
Showing 12 changed files with 173 additions and 350 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.12.2_HD_U_E3"
of_file_md5 = "7EC95C57AC1A224D6EB93BD370E4AC37"
minecrift_version_num = "1.12.2"
minecrift_build = "jrbudda-7-r10"
minecrift_build = "jrbudda-7-r11"
of_file_extension = ".jar"
mcp_version = "mcp940"
mcp_uses_generics = True
Expand Down
16 changes: 0 additions & 16 deletions patches/net/minecraft/block/state/BlockStateContainer.java.patch

This file was deleted.

22 changes: 15 additions & 7 deletions patches/net/minecraft/client/Minecraft.java.patch
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,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.12.2 jrbudda-7-r10";
+ public final String minecriftVerString = "Vivecraft 1.12.2 jrbudda-7-r11";
+ /* end version */
+ /** END MINECRIFT */
+
Expand Down Expand Up @@ -1798,15 +1798,23 @@
}

this.mcSoundHandler.stopSounds();
@@ -2701,6 +3386,7 @@
@@ -2665,6 +3350,7 @@
EntityPlayerSP entityplayersp = this.player;
this.player = this.playerController.createPlayer(this.world, this.player == null ? new StatisticsManager() : this.player.getStatFileWriter(), this.player == null ? new RecipeBook() : this.player.getRecipeBook());
this.player.getDataManager().setEntryValues(entityplayersp.getDataManager().getAll());
+ this.player.updateSyncFields(entityplayersp); // Forge: fix MC-10657
this.player.dimension = dimension;
this.renderViewEntity = this.player;
this.player.preparePlayerToSpawn();
@@ -2701,6 +3387,7 @@
return instance == null || !instance.gameSettings.hideGUI;
}

+ //unused
public static boolean isFancyGraphicsEnabled()
{
return instance != null && instance.gameSettings.fancyGraphics;
@@ -2717,8 +3403,14 @@
@@ -2717,8 +3404,14 @@
/**
* Called when user clicked he's mouse middle button (pick block)
*/
Expand All @@ -1822,7 +1830,7 @@
if (this.objectMouseOver != null && this.objectMouseOver.typeOfHit != RayTraceResult.Type.MISS)
{
boolean flag = this.player.capabilities.isCreativeMode;
@@ -2882,7 +3574,8 @@
@@ -2882,7 +3575,8 @@
}
}

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

@@ -3212,6 +3905,11 @@
@@ -3212,6 +3906,11 @@
*/
public static int getGLMaximumTextureSize()
{
Expand All @@ -1844,7 +1852,7 @@
for (int i = 16384; i > 0; i >>= 1)
{
GlStateManager.glTexImage2D(32868, 0, 6408, i, i, 0, 6408, 5121, (IntBuffer)null);
@@ -3400,7 +4098,7 @@
@@ -3400,7 +4099,7 @@
}

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

if (i != 0 && !Keyboard.isRepeatEvent())
@@ -3582,4 +4280,1216 @@
@@ -3582,4 +4281,1216 @@
{
return this.tutorial;
}
Expand Down
55 changes: 47 additions & 8 deletions patches/net/minecraft/client/entity/EntityPlayerSP.java.patch
Original file line number Diff line number Diff line change
Expand Up @@ -541,15 +541,41 @@
}

/**
@@ -975,6 +1178,7 @@
@@ -975,6 +1178,9 @@
float f = 0.8F;
boolean flag2 = this.movementInput.moveForward >= 0.8F;
this.movementInput.updatePlayerMoveState();
+ if (Reflector.forgeExists())
+ Reflector.callVoid(Reflector.ForgeHooksClient_onInputUpdate, this, this.movementInput);
+ this.mc.vrPlayer.doLookOverride(mc.vrPlayer.vrdata_world_pre);
this.mc.getTutorial().handleMovement(this.movementInput);

if (this.isHandActive() && !this.isRiding())
@@ -1032,7 +1236,7 @@
@@ -994,10 +1200,19 @@
}

AxisAlignedBB axisalignedbb = this.getEntityBoundingBox();
- this.pushOutOfBlocks(this.posX - (double)this.width * 0.35D, axisalignedbb.minY + 0.5D, this.posZ + (double)this.width * 0.35D);
- this.pushOutOfBlocks(this.posX - (double)this.width * 0.35D, axisalignedbb.minY + 0.5D, this.posZ - (double)this.width * 0.35D);
- this.pushOutOfBlocks(this.posX + (double)this.width * 0.35D, axisalignedbb.minY + 0.5D, this.posZ - (double)this.width * 0.35D);
- this.pushOutOfBlocks(this.posX + (double)this.width * 0.35D, axisalignedbb.minY + 0.5D, this.posZ + (double)this.width * 0.35D);
+ boolean pushOutOfBlocks = true;
+ if (Reflector.forgeExists()) {
+ Object event = Reflector.newInstance(Reflector.ForgePlayerSPPushOutOfBlocksEvent_Constructor, this, axisalignedbb);
+ pushOutOfBlocks = !Reflector.postForgeBusEvent(event);
+ if (pushOutOfBlocks)
+ axisalignedbb = (AxisAlignedBB)Reflector.call(event, Reflector.ForgePlayerSPPushOutOfBlocksEvent_getEntityBoundingBox);
+ }
+ if (pushOutOfBlocks) {
+ this.pushOutOfBlocks(this.posX - (double) this.width * 0.35D, axisalignedbb.minY + 0.5D, this.posZ + (double) this.width * 0.35D);
+ this.pushOutOfBlocks(this.posX - (double) this.width * 0.35D, axisalignedbb.minY + 0.5D, this.posZ - (double) this.width * 0.35D);
+ this.pushOutOfBlocks(this.posX + (double) this.width * 0.35D, axisalignedbb.minY + 0.5D, this.posZ - (double) this.width * 0.35D);
+ this.pushOutOfBlocks(this.posX + (double) this.width * 0.35D, axisalignedbb.minY + 0.5D, this.posZ + (double) this.width * 0.35D);
+ }
boolean flag4 = (float)this.getFoodStats().getFoodLevel() > 6.0F || this.capabilities.allowFlying;

if (this.onGround && !flag1 && !flag2 && this.movementInput.moveForward >= 0.8F && !this.isSprinting() && flag4 && !this.isHandActive() && !this.isPotionActive(MobEffects.BLINDNESS))
@@ -1032,7 +1247,7 @@
this.sendPlayerAbilities();
}
}
Expand All @@ -558,7 +584,7 @@
{
if (this.flyToggleTimer == 0)
{
@@ -1120,6 +1324,10 @@
@@ -1120,6 +1335,10 @@

super.onLivingUpdate();

Expand All @@ -569,7 +595,7 @@
if (this.onGround && this.capabilities.isFlying && !this.mc.playerController.isSpectatorMode())
{
this.capabilities.isFlying = false;
@@ -1139,7 +1347,7 @@
@@ -1139,7 +1358,7 @@
{
EntityBoat entityboat = (EntityBoat)this.getRidingEntity();
entityboat.updateInputs(this.movementInput.leftKeyDown, this.movementInput.rightKeyDown, this.movementInput.forwardKeyDown, this.movementInput.backKeyDown);
Expand All @@ -578,7 +604,7 @@
}
}

@@ -1170,10 +1378,47 @@
@@ -1170,10 +1389,47 @@
*/
public void move(MoverType type, double x, double y, double z)
{
Expand Down Expand Up @@ -630,7 +656,7 @@
}

public boolean isAutoJumpEnabled()
@@ -1199,12 +1444,16 @@
@@ -1199,12 +1455,16 @@
float f = this.getAIMoveSpeed();
float f1 = (float)vec3d2.lengthSquared();

Expand All @@ -649,7 +675,7 @@
vec3d2 = new Vec3d((double)(f2 * f5 - f3 * f4), vec3d2.y, (double)(f3 * f5 + f2 * f4));
f1 = (float)vec3d2.lengthSquared();

@@ -1324,4 +1573,381 @@
@@ -1324,4 +1584,394 @@
}
}
}
Expand Down Expand Up @@ -1029,5 +1055,18 @@
+ this.world.playSound((EntityPlayer)null, soundPos.x, soundPos.y, soundPos.z, soundIn, this.getSoundCategory(), volume, pitch);
+ }
+ }
+
+
+ // FORGE
+ public void updateSyncFields(EntityPlayerSP old)
+ {
+ this.lastReportedPosX = old.lastReportedPosX;
+ this.lastReportedPosY = old.lastReportedPosY;
+ this.lastReportedPosZ = old.lastReportedPosZ;
+ this.lastReportedYaw = old.lastReportedYaw;
+ this.lastReportedPitch = old.lastReportedPitch;
+ this.prevOnGround = old.prevOnGround;
+ this.serverSneakState = old.serverSneakState;
+ this.serverSprintState = old.serverSprintState;
+ this.positionUpdateTicks = old.positionUpdateTicks;
+ }
}
Loading

0 comments on commit 7e58cbc

Please sign in to comment.