Update to 1.15.1

This commit is contained in:
Marcel Konrad
2019-12-26 19:18:34 +01:00
parent d68b9126d0
commit efdcf51c23
29 changed files with 416 additions and 285 deletions

View File

@@ -0,0 +1,24 @@
package exopandora.worldhandler.gui;
import net.minecraft.client.gui.screen.Screen;
import net.minecraft.util.text.StringTextComponent;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
@OnlyIn(Dist.CLIENT)
public class DummyScreen extends Screen
{
private final Runnable runnable;
public DummyScreen(Runnable runnable)
{
super(new StringTextComponent(""));
this.runnable = runnable;
}
@Override
protected void init()
{
this.runnable.run();
}
}

View File

@@ -1,6 +1,6 @@
package exopandora.worldhandler.gui.button;
import com.mojang.blaze3d.platform.GlStateManager;
import com.mojang.blaze3d.systems.RenderSystem;
import exopandora.worldhandler.config.Config;
import exopandora.worldhandler.util.ActionHandler;
@@ -29,11 +29,10 @@ public class GuiButtonBase extends Button
@Override
protected void renderBg(Minecraft minecraft, int mouseX, int mouseY)
{
GlStateManager.enableBlend();
GlStateManager.color4f(Config.getSkin().getButtonRedF(), Config.getSkin().getButtonGreenF(), Config.getSkin().getButtonBlueF(), Config.getSkin().getButtonAlphaF());
RenderSystem.enableBlend();
RenderSystem.color4f(Config.getSkin().getButtonRedF(), Config.getSkin().getButtonGreenF(), Config.getSkin().getButtonBlueF(), Config.getSkin().getButtonAlphaF());
int hovered = this.getYImage(this.isHovered());
Minecraft.getInstance().getTextureManager().bindTexture(ResourceHelper.getButtonTexture());
if(Config.getSkin().getTextureType().equals("resourcepack"))
@@ -47,7 +46,7 @@ public class GuiButtonBase extends Button
this.blit(this.x + this.width / 2, this.y, 200 - this.width / 2, hovered * 20, this.width / 2, this.height);
}
GlStateManager.disableBlend();
GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F);
RenderSystem.disableBlend();
RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F);
}
}

View File

@@ -1,6 +1,6 @@
package exopandora.worldhandler.gui.button;
import com.mojang.blaze3d.platform.GlStateManager;
import com.mojang.blaze3d.systems.RenderSystem;
import exopandora.worldhandler.util.ActionHandler;
import exopandora.worldhandler.util.ResourceHelper;
@@ -38,16 +38,16 @@ public class GuiButtonIcon extends GuiButtonTooltip
{
if(this.isHovered())
{
GlStateManager.color4f(1.0F, 1.0F, 0.6F, 1.0F);
RenderSystem.color4f(1.0F, 1.0F, 0.6F, 1.0F);
}
else
{
GlStateManager.color4f(0.95F, 0.95F, 0.95F, 1.0F);
RenderSystem.color4f(0.95F, 0.95F, 0.95F, 1.0F);
}
}
else
{
GlStateManager.color4f(0.8F, 0.8F, 0.8F, 1.0F);
RenderSystem.color4f(0.8F, 0.8F, 0.8F, 1.0F);
}
this.blit(this.x + this.width / 2 - 4, this.y + 6, this.icon.getX() * 8, this.icon.getY() * 8, 8, 8);

View File

@@ -1,6 +1,6 @@
package exopandora.worldhandler.gui.button;
import com.mojang.blaze3d.platform.GlStateManager;
import com.mojang.blaze3d.systems.RenderSystem;
import exopandora.worldhandler.util.ActionHandler;
import net.minecraft.client.Minecraft;
@@ -31,13 +31,13 @@ public class GuiButtonItem extends GuiButtonBase
{
super.renderBg(Minecraft.getInstance(), mouseX, mouseY);
GlStateManager.enableRescaleNormal();
RenderHelper.enableGUIStandardItemLighting();
RenderSystem.enableRescaleNormal();
RenderHelper.func_227784_d_();
Minecraft.getInstance().getItemRenderer().renderItemIntoGUI(this.stack, this.x + this.width / 2 - 8, this.y + 2);
RenderHelper.disableStandardItemLighting();
GlStateManager.disableRescaleNormal();
GlStateManager.enableAlphaTest();
RenderSystem.disableRescaleNormal();
RenderSystem.enableAlphaTest();
}
}

View File

@@ -1,6 +1,6 @@
package exopandora.worldhandler.gui.button;
import com.mojang.blaze3d.platform.GlStateManager;
import com.mojang.blaze3d.systems.RenderSystem;
import exopandora.worldhandler.Main;
import exopandora.worldhandler.config.Config;
@@ -52,7 +52,7 @@ public class GuiButtonPiano extends GuiButtonBase
}
int hoverstate = this.getYImage(this.isHovered);
GlStateManager.color4f(1.0F, 1.0F, 1.0F, Config.getSkin().getButtonAlphaF());
RenderSystem.color4f(1.0F, 1.0F, 1.0F, Config.getSkin().getButtonAlphaF());
Minecraft.getInstance().getTextureManager().bindTexture(NOTE);
switch(this.type)

View File

@@ -2,7 +2,7 @@ package exopandora.worldhandler.gui.button;
import java.util.Objects;
import com.mojang.blaze3d.platform.GlStateManager;
import com.mojang.blaze3d.systems.RenderSystem;
import exopandora.worldhandler.config.Config;
import exopandora.worldhandler.gui.container.Container;
@@ -38,15 +38,15 @@ public class GuiSlider extends GuiButtonBase
int xOffset = Config.getSkin().getTextureType().equals("resourcepack") ? 0 : -46;
GlStateManager.pushMatrix();
GlStateManager.enableBlend();
GlStateManager.color4f(Config.getSkin().getButtonRedF(), Config.getSkin().getButtonGreenF(), Config.getSkin().getButtonBlueF(), Config.getSkin().getButtonAlphaF());
RenderSystem.pushMatrix();
RenderSystem.enableBlend();
RenderSystem.color4f(Config.getSkin().getButtonRedF(), Config.getSkin().getButtonGreenF(), Config.getSkin().getButtonBlueF(), Config.getSkin().getButtonAlphaF());
this.blit(this.x + (int) (this.persistence.getValue() * (float) (this.width - 8)), this.y, 0, 66 + xOffset, 4, 20);
this.blit(this.x + (int) (this.persistence.getValue() * (float) (this.width - 8)) + 4, this.y, 196, 66 + xOffset, 4, 20);
GlStateManager.disableBlend();
GlStateManager.popMatrix();
RenderSystem.disableBlend();
RenderSystem.popMatrix();
}
@Override

View File

@@ -9,7 +9,7 @@ import java.util.function.BiConsumer;
import javax.annotation.Nullable;
import com.google.common.base.Predicates;
import com.mojang.blaze3d.platform.GlStateManager;
import com.mojang.blaze3d.systems.RenderSystem;
import exopandora.worldhandler.Main;
import exopandora.worldhandler.builder.impl.BuilderWorldHandler;
@@ -190,26 +190,6 @@ public class GuiWorldHandler extends Container
}
}
private int getContentX()
{
return this.getBackgroundX() + 8;
}
private int getContentY()
{
return this.getBackgroundY() + 33;
}
private int getXOffset()
{
return 0;
}
private int getYOffset()
{
return Config.getSettings().shortcuts() ? 11 : 8;
}
@Override
public void tick()
{
@@ -300,55 +280,6 @@ public class GuiWorldHandler extends Container
this.content.onPlayerNameChanged(GuiWorldHandler.player);
}
private void defaultColor()
{
this.defaultColor(1.0F);
}
private void defaultColor(float alpha)
{
GlStateManager.enableBlend();
GlStateManager.color4f(Config.getSkin().getBackgroundRedF(), Config.getSkin().getBackgroundGreenF(), Config.getSkin().getBackgroundBlueF(), alpha * Config.getSkin().getBackgroundAlphaF());
}
private void darkColor()
{
GlStateManager.enableBlend();
GlStateManager.color4f(Config.getSkin().getBackgroundRedF() - 0.3F, Config.getSkin().getBackgroundGreenF() - 0.3F, Config.getSkin().getBackgroundBlueF() - 0.3F, Config.getSkin().getBackgroundAlphaF());
}
private void bindBackground()
{
Minecraft.getInstance().getTextureManager().bindTexture(ResourceHelper.getBackgroundTexture());
}
@Nullable
protected String getSplash()
{
Calendar calendar = Calendar.getInstance();
int day = calendar.get(Calendar.DAY_OF_MONTH);
int month = calendar.get(Calendar.MONTH) + 1;
if(day == 12 && month == 24)
{
return "Merry X-mas!";
}
else if(day == 1 && month == 1)
{
return "Happy new year!";
}
else if(day == 10 && month == 31)
{
return "OOoooOOOoooo! Spooky!";
}
else if(day == 3 && month == 28)
{
return (calendar.get(Calendar.YEAR) - 2013) + " Years of World Handler!";
}
return null;
}
@Override
public void render(int mouseX, int mouseY, float partialTicks)
{
@@ -361,6 +292,7 @@ public class GuiWorldHandler extends Container
if(Config.getSkin().drawBackground())
{
this.setBlitOffset(-1);
super.renderBackground();
}
@@ -375,6 +307,7 @@ public class GuiWorldHandler extends Container
//TABS
this.setBlitOffset(0);
this.forEachTab(this::drawTab);
this.defaultColor();
@@ -412,7 +345,7 @@ public class GuiWorldHandler extends Container
if(mouseX >= watchX && mouseX <= watchX + 9 && mouseY >= watchY && mouseY <= watchY + 9)
{
GuiUtils.drawHoveringText(Arrays.asList(TextFormatting.formatWorldTime(Minecraft.getInstance().world.getDayTime())), mouseX, mouseY + 9, this.width, this.height, this.width, this.font);
GlStateManager.disableLighting();
RenderSystem.disableLighting();
}
}
}
@@ -446,19 +379,19 @@ public class GuiWorldHandler extends Container
if(this.splash != null)
{
GlStateManager.pushMatrix();
RenderHelper.enableGUIStandardItemLighting();
GlStateManager.disableLighting();
GlStateManager.translatef((float) (backgroundX + 212), backgroundY + 15, 0.0F);
GlStateManager.rotatef(17.0F, 0.0F, 0.0F, 1.0F);
RenderSystem.pushMatrix();
RenderHelper.func_227784_d_();
RenderSystem.disableLighting();
RenderSystem.translatef((float) (backgroundX + 212), backgroundY + 15, 0.0F);
RenderSystem.rotatef(17.0F, 0.0F, 0.0F, 1.0F);
float scale = 1.1F - MathHelper.abs(MathHelper.sin((float) (System.currentTimeMillis() % 1000L) / 1000.0F * (float) Math.PI * 2.0F) * 0.1F);
scale = scale * 100.0F / this.font.getStringWidth(this.splash);
GlStateManager.scalef(scale, scale, scale);
RenderSystem.scalef(scale, scale, scale);
this.drawCenteredString(this.font, this.splash, 0, (int) scale, 0xFFFF00);
GlStateManager.popMatrix();
RenderSystem.popMatrix();
}
//TOOLTIPS
@@ -510,6 +443,7 @@ public class GuiWorldHandler extends Container
}
this.bindBackground();
this.setBlitOffset(-1);
this.blit((int) (backgroundX + xOffset), (int) (backgroundY + yOffset), 0, 0, (int) Math.ceil(this.tabHalf), fHeight);
this.blit((int) (backgroundX + this.tabHalf + xOffset), (int) (backgroundY + yOffset), this.bgTextureWidth - (int) Math.floor(this.tabHalf + 1), 0, (int) Math.floor(this.tabHalf + 1), fHeight);
@@ -596,6 +530,7 @@ public class GuiWorldHandler extends Container
}
}
this.setBlitOffset(0);
this.drawCenteredString(this.font, TextFormatting.shortenString(net.minecraft.util.text.TextFormatting.UNDERLINE + tab.getTabTitle(), (int) this.tabWidth, this.font), (int) (backgroundX + this.tabHalf + xOffset), (int) (backgroundY - 13), color);
}
@@ -640,6 +575,75 @@ public class GuiWorldHandler extends Container
return super.keyPressed(keyCode, scanCode, modifiers);
}
private void defaultColor()
{
this.defaultColor(1.0F);
}
private void defaultColor(float alpha)
{
RenderSystem.enableBlend();
RenderSystem.color4f(Config.getSkin().getBackgroundRedF(), Config.getSkin().getBackgroundGreenF(), Config.getSkin().getBackgroundBlueF(), alpha * Config.getSkin().getBackgroundAlphaF());
}
private void darkColor()
{
RenderSystem.enableBlend();
RenderSystem.color4f(Config.getSkin().getBackgroundRedF() - 0.3F, Config.getSkin().getBackgroundGreenF() - 0.3F, Config.getSkin().getBackgroundBlueF() - 0.3F, Config.getSkin().getBackgroundAlphaF());
}
private void bindBackground()
{
Minecraft.getInstance().getTextureManager().bindTexture(ResourceHelper.getBackgroundTexture());
}
private int getContentX()
{
return this.getBackgroundX() + 8;
}
private int getContentY()
{
return this.getBackgroundY() + 33;
}
private int getXOffset()
{
return 0;
}
private int getYOffset()
{
return Config.getSettings().shortcuts() ? 11 : 8;
}
@Nullable
protected String getSplash()
{
Calendar calendar = Calendar.getInstance();
int day = calendar.get(Calendar.DAY_OF_MONTH);
int month = calendar.get(Calendar.MONTH) + 1;
if(day == 12 && month == 24)
{
return "Merry X-mas!";
}
else if(day == 1 && month == 1)
{
return "Happy new year!";
}
else if(day == 10 && month == 31)
{
return "OOoooOOOoooo! Spooky!";
}
else if(day == 3 && month == 28)
{
return (calendar.get(Calendar.YEAR) - 2013) + " Years of World Handler!";
}
return null;
}
@Override
public void onClose()
{

View File

@@ -1,17 +1,23 @@
package exopandora.worldhandler.gui.content.impl;
import exopandora.worldhandler.gui.DummyScreen;
import exopandora.worldhandler.gui.button.GuiButtonBase;
import exopandora.worldhandler.gui.container.Container;
import exopandora.worldhandler.util.ActionHelper;
import exopandora.worldhandler.util.Connection;
import exopandora.worldhandler.util.Connection.DedicatedConnection;
import exopandora.worldhandler.util.Connection.IntegratedConnection;
import exopandora.worldhandler.util.Connection.Type;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.screen.ConnectingScreen;
import net.minecraft.client.gui.screen.DirtMessageScreen;
import net.minecraft.client.gui.screen.MainMenuScreen;
import net.minecraft.client.gui.screen.MultiplayerScreen;
import net.minecraft.client.gui.screen.Screen;
import net.minecraft.client.gui.screen.WorldSelectionScreen;
import net.minecraft.client.multiplayer.ServerData;
import net.minecraft.client.resources.I18n;
import net.minecraft.util.text.StringTextComponent;
import net.minecraft.realms.RealmsBridge;
import net.minecraft.util.text.TranslationTextComponent;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
@@ -26,49 +32,66 @@ public class ContentChangeWorld extends ContentChild
container.add(new GuiButtonBase(x + 116 / 2, y + 24, 232 / 2, 20, I18n.format("gui.worldhandler.change_world.singleplayer"), () ->
{
Minecraft.getInstance().displayGuiScreen(new WorldSelectionScreen(container));
Connection connection = ContentChangeWorld.disconnect();
Minecraft.getInstance().displayGuiScreen(new WorldSelectionScreen(new DummyScreen(() -> ContentChangeWorld.reconnect(connection))));
}));
container.add(new GuiButtonBase(x + 116 / 2, y + 48, 232 / 2, 20, I18n.format("gui.worldhandler.change_world.multiplayer"), () ->
{
ServerData server = Minecraft.getInstance().getCurrentServerData();
if(server != null)
{
Minecraft.getInstance().world.sendQuittingDisconnectingPacket();
Minecraft.getInstance().loadWorld(null);
Minecraft.getInstance().displayGuiScreen(new MultiplayerScreen(new Screen(new StringTextComponent(""))
{
@Override
public void init()
{
Minecraft.getInstance().displayGuiScreen(new ConnectingScreen(new MainMenuScreen(), Minecraft.getInstance(), server));
Minecraft.getInstance().mouseHelper.grabMouse();
}
}));
}
else
{
String worldName = Minecraft.getInstance().getIntegratedServer().getWorldName();
String folderName = Minecraft.getInstance().getIntegratedServer().getFolderName();
Minecraft.getInstance().world.sendQuittingDisconnectingPacket();
Minecraft.getInstance().loadWorld(null);
Minecraft.getInstance().displayGuiScreen(new MultiplayerScreen(new Screen(new StringTextComponent(""))
{
@Override
public void init()
{
Minecraft.getInstance().launchIntegratedServer(folderName, worldName, null);
Minecraft.getInstance().displayGuiScreen(null);
Minecraft.getInstance().mouseHelper.grabMouse();
}
}));
}
Connection connection = ContentChangeWorld.disconnect();
Minecraft.getInstance().displayGuiScreen(new MultiplayerScreen(new DummyScreen(() -> ContentChangeWorld.reconnect(connection))));
}));
}
private static Connection disconnect()
{
boolean isIntegrated = Minecraft.getInstance().isIntegratedServerRunning();
boolean isRealms = Minecraft.getInstance().isConnectedToRealms();
ServerData data = Minecraft.getInstance().getCurrentServerData();
if(isIntegrated)
{
String worldName = Minecraft.getInstance().getIntegratedServer().getWorldName();
String folderName = Minecraft.getInstance().getIntegratedServer().getFolderName();
Minecraft.getInstance().world.sendQuittingDisconnectingPacket();
Minecraft.getInstance().func_213231_b(new DirtMessageScreen(new TranslationTextComponent("menu.savingLevel")));
return new IntegratedConnection(Type.INTEGRATED, worldName, folderName);
}
Minecraft.getInstance().world.sendQuittingDisconnectingPacket();
Minecraft.getInstance().func_213254_o();
if(isRealms)
{
return null;
}
return new DedicatedConnection(Type.DEDICATED, data);
}
private static void reconnect(Connection connection)
{
if(connection == null)
{
RealmsBridge realmsbridge = new RealmsBridge();
realmsbridge.switchToRealms(new MainMenuScreen());
}
else if(connection instanceof IntegratedConnection)
{
IntegratedConnection integrated = (IntegratedConnection) connection;
Minecraft.getInstance().launchIntegratedServer(integrated.getFolderName(), integrated.getWorldName(), null);
Minecraft.getInstance().mouseHelper.grabMouse();
}
else if(connection instanceof DedicatedConnection)
{
DedicatedConnection dedicated = (DedicatedConnection) connection;
Minecraft.getInstance().displayGuiScreen(new ConnectingScreen(new MainMenuScreen(), Minecraft.getInstance(), dedicated.getData()));
Minecraft.getInstance().mouseHelper.grabMouse();
}
}
@Override
public String getTitle()
{

View File

@@ -86,7 +86,7 @@ public class ContentMain extends Content
container.add(new GuiButtonBase(x + 78, y + 96, 76, 20, I18n.format("gui.worldhandler.resourcepack"), () ->
{
Minecraft.getInstance().gameSettings.saveOptions();
Minecraft.getInstance().displayGuiScreen(new ResourcePacksScreen(container));
Minecraft.getInstance().displayGuiScreen(new ResourcePacksScreen(container, Minecraft.getInstance().gameSettings));
}));
container.add(new GuiButtonBase(x + 158, y + 96, 74, 20, I18n.format("gui.worldhandler.generic.backToGame"), ActionHelper::backToGame));
}

View File

@@ -1,6 +1,6 @@
package exopandora.worldhandler.gui.content.impl;
import com.mojang.blaze3d.platform.GlStateManager;
import com.mojang.blaze3d.systems.RenderSystem;
import exopandora.worldhandler.Main;
import exopandora.worldhandler.builder.ICommandBuilder;
@@ -178,7 +178,7 @@ public class ContentNoteEditor extends Content
{
if(this.isActive)
{
GlStateManager.color3f(1.0F, 1.0F, 1.0F);
RenderSystem.color3f(1.0F, 1.0F, 1.0F);
Minecraft.getInstance().getTextureManager().bindTexture(NOTE);
container.blit(x - 1, y - 1, 0, 0, 8, 59);
@@ -194,16 +194,16 @@ public class ContentNoteEditor extends Content
{
float scale = 4;
GlStateManager.color3f(1.0F, 1.0F, 1.0F);
GlStateManager.pushMatrix();
RenderHelper.enableGUIStandardItemLighting();
RenderSystem.color3f(1.0F, 1.0F, 1.0F);
RenderSystem.pushMatrix();
RenderHelper.func_227784_d_();
GlStateManager.translatef(container.width / 2 - 8 * scale, container.height / 2 - 15 - 8 * scale, 0);
GlStateManager.scalef(scale, scale, scale);
RenderSystem.translatef(container.width / 2 - 8 * scale, container.height / 2 - 15 - 8 * scale, 0);
RenderSystem.scalef(scale, scale, scale);
Minecraft.getInstance().getItemRenderer().renderItemIntoGUI(new ItemStack(Blocks.NOTE_BLOCK), 0, 0);
RenderHelper.disableStandardItemLighting();
GlStateManager.popMatrix();
RenderSystem.popMatrix();
String displayString = I18n.format("gui.worldhandler.blocks.note_block_editor.look_at_note_block", KeyHandler.KEY_WORLD_HANDLER.getLocalizedName());
FontRenderer fontRenderer = Minecraft.getInstance().fontRenderer;

View File

@@ -1,6 +1,6 @@
package exopandora.worldhandler.gui.content.impl;
import com.mojang.blaze3d.platform.GlStateManager;
import com.mojang.blaze3d.systems.RenderSystem;
import exopandora.worldhandler.builder.ICommandBuilder;
import exopandora.worldhandler.builder.impl.BuilderGeneric;
@@ -115,9 +115,9 @@ public class ContentPlayer extends Content
container.add(new GuiButtonBase(x + 118, y + 72, 114, 20, I18n.format("gui.worldhandler.entities.player.position.copy_position"), () ->
{
int posX = MathHelper.floor(Minecraft.getInstance().player.posX);
int posY = MathHelper.floor(Minecraft.getInstance().player.posY);
int posZ = MathHelper.floor(Minecraft.getInstance().player.posZ);
int posX = MathHelper.floor(Minecraft.getInstance().player.func_226277_ct_());
int posY = MathHelper.floor(Minecraft.getInstance().player.func_226278_cu_());
int posZ = MathHelper.floor(Minecraft.getInstance().player.func_226281_cx_());
Minecraft.getInstance().keyboardListener.setClipboardString(posX + " " + posY + " " + posZ);
}));
@@ -148,9 +148,9 @@ public class ContentPlayer extends Content
@Override
public void tick(Container container)
{
this.posXField.setText("X: " + MathHelper.floor(Minecraft.getInstance().player.posX));
this.posYField.setText("Y: " + MathHelper.floor(Minecraft.getInstance().player.posY));
this.posZField.setText("Z: " + MathHelper.floor(Minecraft.getInstance().player.posZ));
this.posXField.setText("X: " + MathHelper.floor(Minecraft.getInstance().player.func_226277_ct_()));
this.posYField.setText("Y: " + MathHelper.floor(Minecraft.getInstance().player.func_226278_cu_()));
this.posZField.setText("Z: " + MathHelper.floor(Minecraft.getInstance().player.func_226281_cx_()));
this.scoreField.setText(I18n.format("gui.worldhandler.entities.player.score") + ": " + Minecraft.getInstance().player.getScore());
this.coinsField.setText(I18n.format("gui.worldhandler.entities.player.score.experience") + ": " + Minecraft.getInstance().player.experienceLevel + "L");
this.xpField.setText(I18n.format("gui.worldhandler.entities.player.score.experience_coins") + ": " + Minecraft.getInstance().player.experienceTotal);
@@ -168,9 +168,9 @@ public class ContentPlayer extends Content
Screen.fill(container.width / 2 - playerNameWidth - 1 + 59, yPos - 74, container.width / 2 + playerNameWidth + 1 + 59, yPos - 65, 0x3F000000);
Minecraft.getInstance().fontRenderer.drawString(Minecraft.getInstance().player.getName().getFormattedText(), container.width / 2 - playerNameWidth + 59, yPos - 73, 0xE0E0E0);
GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F);
InventoryScreen.drawEntityOnScreen(xPos, yPos, 30, xPos - mouseX, yPos - mouseY - 44, Minecraft.getInstance().player);
GlStateManager.blendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO);
RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F);
InventoryScreen.func_228187_a_(xPos, yPos, 30, xPos - mouseX, yPos - mouseY - 44, Minecraft.getInstance().player);
RenderSystem.defaultBlendFunc();
}
else if(Page.SCORE.equals(this.page))
{

View File

@@ -200,7 +200,7 @@ public class ContentPotions extends ContentChild
container.init();
}));
boolean enabled = this.builderPotion.getAmplifier() >= 0;
boolean enabled = this.builderPotion.getAmplifier() >= 0 && this.builderPotion.getDuration() > 0;
button1.active = enabled;
button2.active = enabled;

View File

@@ -36,7 +36,7 @@ public class ContentSettings extends ContentChild
SETTINGS.add(new BooleanSetting("pause_game", Config.CLIENT.getSettings()::pause, Config.CLIENT.getSettings()::setPause));
SETTINGS.add(new BooleanSetting("custom_times", Config.CLIENT.getSettings()::customTimes, Config.CLIENT.getSettings()::setCustomTimes));
SETTINGS.add(new BooleanSetting("permission_query", Config.CLIENT.getSettings()::permissionQuery, Config.CLIENT.getSettings()::setPermissionQuery));
SETTINGS.add(new BooleanSetting("highlight_blocks", Config.CLIENT.getSettings()::highlightBlocks, Config.CLIENT.getSettings()::setHighlightBlocks));
// SETTINGS.add(new BooleanSetting("highlight_blocks", Config.CLIENT.getSettings()::highlightBlocks, Config.CLIENT.getSettings()::setHighlightBlocks));
SETTINGS.add(new IntegerSetting("custom_time_dawn", Config.CLIENT.getSettings()::getDawn, Config.CLIENT.getSettings()::setDawn));
SETTINGS.add(new IntegerSetting("custom_time_noon", Config.CLIENT.getSettings()::getNoon, Config.CLIENT.getSettings()::setNoon));
SETTINGS.add(new IntegerSetting("custom_time_sunset", Config.CLIENT.getSettings()::getSunset, Config.CLIENT.getSettings()::setSunset));

View File

@@ -2,7 +2,7 @@ package exopandora.worldhandler.gui.content.impl;
import com.google.common.base.Predicates;
import com.mojang.blaze3d.platform.GlStateManager;
import com.mojang.blaze3d.systems.RenderSystem;
import exopandora.worldhandler.builder.ICommandBuilder;
import exopandora.worldhandler.builder.impl.BuilderSignEditor;
@@ -179,16 +179,16 @@ public class ContentSignEditor extends Content
{
float scale = 4;
GlStateManager.color3f(1.0F, 1.0F, 1.0F);
GlStateManager.pushMatrix();
RenderHelper.enableGUIStandardItemLighting();
RenderSystem.color3f(1.0F, 1.0F, 1.0F);
RenderSystem.pushMatrix();
RenderHelper.func_227784_d_();
GlStateManager.translatef(container.width / 2 - 8.5F * scale, container.height / 2 - 15 - 8.5F * scale, 0);
GlStateManager.scalef(scale, scale, scale);
RenderSystem.translatef(container.width / 2 - 8.5F * scale, container.height / 2 - 15 - 8.5F * scale, 0);
RenderSystem.scalef(scale, scale, scale);
Minecraft.getInstance().getItemRenderer().renderItemIntoGUI(new ItemStack(Items.OAK_SIGN), 0, 0);
RenderHelper.disableStandardItemLighting();
GlStateManager.popMatrix();
RenderSystem.popMatrix();
String displayString = I18n.format("gui.worldhandler.blocks.sign_editor.look_at_sign", KeyHandler.KEY_WORLD_HANDLER.getLocalizedName());
FontRenderer fontRenderer = Minecraft.getInstance().fontRenderer;

View File

@@ -4,9 +4,8 @@ import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import org.lwjgl.opengl.GL11;
import com.google.common.base.Predicates;
import com.mojang.blaze3d.systems.RenderSystem;
import exopandora.worldhandler.builder.ICommandBuilder;
import exopandora.worldhandler.builder.impl.BuilderSummon;
@@ -594,8 +593,9 @@ public class ContentSummon extends Content
}
else if(Page.EQUIPMENT.equals(this.page))
{
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F);
Minecraft.getInstance().getTextureManager().bindTexture(new ResourceLocation("textures/gui/container/beacon.png"));
container.setBlitOffset(0);
for(int row = 0; row < 3; row++)
{