Skip to content

Commit

Permalink
Sitting Position / GUI Fix
Browse files Browse the repository at this point in the history
-Random button in the Paint Bucket GUI has been moved to a position where it works with every vanilla GUI scale
-Player seating position has been fixed for other users on a server.
  • Loading branch information
broscolotos committed Sep 6, 2023
1 parent 49a0c98 commit 12916d6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion src/main/java/ebf/tim/entities/EntitySeat.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import cpw.mods.fml.relauncher.SideOnly;
import io.netty.buffer.ByteBuf;
import net.minecraft.block.Block;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.nbt.NBTTagCompound;
Expand Down Expand Up @@ -145,7 +146,7 @@ public void writeSpawnData(ByteBuf buffer) {
@Override
public void updateRiderPosition() {
if (this.getPassenger() != null) {
this.getPassenger().setPosition(this.posX, this.posY+(getWorld().isRemote?0.4:-1.5), this.posZ);
this.getPassenger().setPosition(this.posX, this.posY+(getWorld().isRemote?(this.getPassenger()==Minecraft.getMinecraft().thePlayer?0.4:-1.3):-1.5), this.posZ);
}
}

Expand Down
8 changes: 4 additions & 4 deletions src/main/java/ebf/tim/gui/GUIPaintBucket.java
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public void drawScreen(int parWidth, int parHeight, float p_73863_3_) {
public boolean doesGuiPauseGame() {return true;}


/** adds the correct buttons based on which case happens*/
/** adds the correct buttons based on which case happens*/
public void defineButtons(){
switch (guiScreen){
case 0:{
Expand All @@ -127,7 +127,7 @@ public void onClick() {
);

buttonList.add(
new GUIButton( percentLeft(75)-10,percentTop(56), 20,20,">>") {
new GUIButton( percentLeft(75)-7,percentTop(56), 20,20,">>") {
@Override
public String getHoverText() {
return "Next Page";
Expand Down Expand Up @@ -169,7 +169,7 @@ public void onClick() {


buttonList.add(
new GUIButton( percentLeft(75)-16,percentTop(45), 64,20, "Close") {
new GUIButton( percentLeft(75)-7,percentTop(45), 64,20, "Close") {
@Override
public String getHoverText() {
return "Close Menu";
Expand All @@ -184,7 +184,7 @@ public void onClick() {
}
);
buttonList.add(
new GUIButton(percentLeft(83) - 61, percentTop(56), 40, 20, "Random") {
new GUIButton(percentLeft(75)-7, percentTop(34), 40, 20, "Random") {
@Override
public String getHoverText() {
return "Randomize Skin";
Expand Down

0 comments on commit 12916d6

Please sign in to comment.