Git Product home page Git Product logo

tweaker's Introduction

Tweaker (WIP)

Total Github Release Downloads License MIT Build Status

Discord Twitter

Tweaker is a Minecraft Forge mod that provides tons of general enhancements, bug fixes, and core game tweak features.


Build Instructions

gradle is required to build this mod!

You can use the gradle wrapper shipped in the Minecraft Forge MDK here, or alternatively you may use a system-wide install of gradle which you can get and install from here.

1. Get the project repository source

First you must get a copy of the mod source

  • From GitHub using git...
    • Via git over HTTPS git clone -b "1.8.9" https://github.com/h1nk/Tweaker.git tweaker
    • Via git over SSH yes | git clone -b "1.8.9" [email protected]:h1nk/Tweaker.git tweaker
    • You can alternatively get the source from the pre-packaged master branch archive off of GitHub
      • with libcurl: curl -o tweaker.zip -O https://github.com/h1nk/h1nk.github.io/archive/master.zip
      • or with wget... wget -o tweaker.zip https://github.com/h1nk/Tweaker/archive/master.zip
      • after you download the zip file, you must extract it into a directory: unzip master.zip tweaker

2. Change your current working directory to that of the source

Simply... cd ./tweaker

3. Run the gradle build task

Now you can build the mod.

If you don't have gradle installed on your system and would prefer use the portable gradle wrapper as provided in the Minecraft Forge MDK you can do the following:

  • Download the MDK package that correlates to the Minecraft version of the source branch you downloaded earlier
    • with curl: curl -O https://files.minecraftforge.net/maven/net/minecraftforge/forge/1.8.9-11.15.1.2318-1.8.9/forge-1.8.9-11.15.1.2318-1.8.9-mdk.zip
    • with wget: wget https://files.minecraftforge.net/maven/net/minecraftforge/forge/1.8.9-11.15.1.2318-1.8.9/forge-1.8.9-11.15.1.2318-1.8.9-mdk.zip
  • unzip the gradle wrapper directory and scripts from the zip archive: unzip forge*.zip "gradlew*" "gradle/wrapper/*" && rm forge*.zip
  • set the the executable bit for the gradle wrapper binaries and scripts: chmod +x gradlew*
  • and finally build with the gradle wrapper script: ./gradlew build --stacktrace --info

Features

TODO

GUI Modifications

TODO

Better audio options

TODO


Vanilla Bug Fixes

MC-92216 "Leaving bed doesn't work sometimes"

TODO

MC-2835 "Resizing the Minecraft window while dead grays out the Respawn/Exit to Menu buttons and several other screens"

TODO

MC-67665 "Mouse click position always lags a few frames behind the crosshair"

TODO

MC-1349 "While riding a pig, horse or minecart and using F5, the hand of your character is misplaced"

This bug is a minor visual render glitch that occurs with the first person perspective of the player model. The bug affects Minecraft versions 1.4.2-1.8.8+. The bug is caused by incorrect logic to reset the hand after the player enters a ridable entity such as a boat, horse, minecart, etc.

MC-1349 bug comparision

The Bug

The bug as introduced in an unknown Minecraft version:

public void renderRightArm(AbstractClientPlayer clientPlayer)
{
	float f = 1.0F;
	GlStateManager.color(f, f, f);
	ModelPlayer modelplayer = this.getMainModel();
	this.setModelVisibilities(clientPlayer);
	modelplayer.swingProgress = 0.0F;
	modelplayer.isSneak = false; // the bug resides in the exuction of this statement
	modelplayer.setRotationAngles(0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, clientPlayer);
	modelplayer.renderRightArm();
}

Mojang's Fix

Mojang's fix in 15w44b (the thirty-eighth snapshot for Minecraft version 1.9).

public void renderRightArm(AbstractClientPlayer clientPlayer)
{
	float f = 1.0F;
	GlStateManager.color(f, f, f);
	float f1 = 0.0625F;
	ModelPlayer modelplayer = this.getMainModel();
	this.setModelVisibilities(clientPlayer);
	GlStateManager.enableBlend();
	modelplayer.swingProgress = 0.0F;
	modelplayer.isSneak = false;
	modelplayer.setRotationAngles(0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, clientPlayer);
	modelplayer.bipedRightArm.rotateAngleX = 0.0F;
	modelplayer.bipedRightArm.render(0.0625F);
	modelplayer.bipedRightArmwear.rotateAngleX = 0.0F;
	modelplayer.bipedRightArmwear.render(0.0625F);
	GlStateManager.disableBlend();
}

My Fix

My fix replaces the following statement doing a proper reset of the player model.

public void renderRightArm(AbstractClientPlayer clientPlayer)
{
	float f = 1.0F;
	GlStateManager.color(f, f, f);
	ModelPlayer modelplayer = this.getMainModel();
	this.setModelVisibilities(clientPlayer);
	modelplayer.swingProgress = 0.0F;
-	modelplayer.isSneak = false;
+	if (TConfig.isRightArmRidableEntityRenderFixEnabled)
+	{
+		modelplayer.isRiding = modelplayer.isSneak = false;
+	}
+	else
+	{
+		modelplayer.isSneak = false;
+	}
	modelplayer.setRotationAngles(0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, clientPlayer);
	modelplayer.renderRightArm();
}

MC-417 "Arrows first bounce back then appear at correct location"

TODO

MC-117793 "When creating a screenshot the clickable link in chat doesn't work" & MC-113208 "gameDir containing dots breaks some file opening methods"

TODO

MC-68754 "Exiting fullscreen disables window resize" & MC-111254 "Fullscreen Disables Window Resize"

The following bug occurs when a player exits fullscreen mode. When exiting from fullscreen mode to windowed mode the game window does not allow resizing anymore. This is a bug specific to Windows users. This bug remains unpatched, despite the Mojang bug tracker ticket being "resolved".

MC-68754 bug comparison

The Bug

// net.minecraft.client.Minecraft#toggleFullscreen

/**
 * Toggles fullscreen mode.
 */
public void toggleFullscreen()
{
	try
	{
		this.fullscreen = !this.fullscreen;
		this.gameSettings.fullScreen = this.fullscreen;

		if (this.fullscreen)
		{
			this.updateDisplayMode();
			this.displayWidth = Display.getDisplayMode().getWidth();
			this.displayHeight = Display.getDisplayMode().getHeight();

			if (this.displayWidth <= 0)
			{
				this.displayWidth = 1;
			}

			if (this.displayHeight <= 0)
			{
				this.displayHeight = 1;
			}
		}
		else
		{
			Display.setDisplayMode(new DisplayMode(this.tempDisplayWidth, this.tempDisplayHeight));
			this.displayWidth = this.tempDisplayWidth;
			this.displayHeight = this.tempDisplayHeight;

			if (this.displayWidth <= 0)
			{
				this.displayWidth = 1;
			}

			if (this.displayHeight <= 0)
			{
				this.displayHeight = 1;
			}
		}

		if (this.currentScreen != null)
		{
			this.resize(this.displayWidth, this.displayHeight);
		}
		else
		{
			this.updateFramebufferSize();
		}
		
		// The bug resides here, since the resizability window property is cached incorrectly we need to do a manual redundant reset

		Display.setFullscreen(this.fullscreen);
		Display.setVSyncEnabled(this.gameSettings.enableVsync);
		this.updateDisplay();
	}
	catch (Exception exception)
	{
		logger.error((String)"Couldn\'t toggle fullscreen", (Throwable)exception);
	}
}

My Fix

// net.minecraft.client.Minecraft#toggleFullscreen

/**
 * Toggles fullscreen mode.
 */
public void toggleFullscreen()
{
	try
	{
		this.fullscreen = !this.fullscreen;
		this.gameSettings.fullScreen = this.fullscreen;

		if (this.fullscreen)
		{
			this.updateDisplayMode();
			this.displayWidth = Display.getDisplayMode().getWidth();
			this.displayHeight = Display.getDisplayMode().getHeight();

			if (this.displayWidth <= 0)
			{
				this.displayWidth = 1;
			}

			if (this.displayHeight <= 0)
			{
				this.displayHeight = 1;
			}
		}
		else
		{
			Display.setDisplayMode(new DisplayMode(this.tempDisplayWidth, this.tempDisplayHeight));
			this.displayWidth = this.tempDisplayWidth;
			this.displayHeight = this.tempDisplayHeight;

			if (this.displayWidth <= 0)
			{
				this.displayWidth = 1;
			}

			if (this.displayHeight <= 0)
			{
				this.displayHeight = 1;
			}
		}

		if (this.currentScreen != null)
		{
			this.resize(this.displayWidth, this.displayHeight);
		}
		else
		{
			this.updateFramebufferSize();
		}
		
+		if (TConfig.isToggleFullscreenResizeFixEnabled) {
+			Display.setResizable(false);
+			Display.setResizable(true);
+		}

		Display.setFullscreen(this.fullscreen);
		Display.setVSyncEnabled(this.gameSettings.enableVsync);
		this.updateDisplay();
	}
	catch (Exception exception)
	{
		logger.error((String)"Couldn\'t toggle fullscreen", (Throwable)exception);
	}
}

Video explanation of the bug:

Read more from: MC-68754, MC-111254 & LWJGL-142

tweaker's People

Contributors

h1nk avatar prplz avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.