mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-12-16 00:33:40 +01:00
ForgeCraft Playtesting, Part III-b
- fix blockzapper upgrade category - fix goggle item not displaying properly in the goggle-overlay and its config screen - fix items in guis occluding certain tooltips (again)
This commit is contained in:
parent
f499122ae5
commit
49ed619a79
12 changed files with 80 additions and 103 deletions
|
@ -1,19 +1,11 @@
|
|||
package com.simibubi.create.compat.jei.category;
|
||||
|
||||
import static com.simibubi.create.foundation.gui.AllGuiTextures.BLOCKZAPPER_UPGRADE_RECIPE;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||
import com.mojang.blaze3d.systems.RenderSystem;
|
||||
import com.simibubi.create.AllItems;
|
||||
import com.simibubi.create.compat.jei.ScreenResourceWrapper;
|
||||
import com.simibubi.create.content.curiosities.zapper.blockzapper.BlockzapperUpgradeRecipe;
|
||||
import com.simibubi.create.foundation.gui.GuiGameElement;
|
||||
import com.simibubi.create.foundation.utility.Lang;
|
||||
|
||||
import mezz.jei.api.constants.VanillaTypes;
|
||||
import mezz.jei.api.gui.IRecipeLayout;
|
||||
import mezz.jei.api.gui.ingredient.IGuiItemStackGroup;
|
||||
|
@ -24,7 +16,15 @@ import net.minecraft.client.util.ITooltipFlag;
|
|||
import net.minecraft.item.crafting.Ingredient;
|
||||
import net.minecraft.item.crafting.ShapedRecipe;
|
||||
import net.minecraft.util.NonNullList;
|
||||
import net.minecraft.util.text.IFormattableTextComponent;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraft.util.text.StringTextComponent;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import static com.simibubi.create.foundation.gui.AllGuiTextures.BLOCKZAPPER_UPGRADE_RECIPE;
|
||||
|
||||
public class BlockzapperUpgradeCategory extends CreateRecipeCategory<BlockzapperUpgradeRecipe> {
|
||||
|
||||
|
@ -78,18 +78,17 @@ public class BlockzapperUpgradeCategory extends CreateRecipeCategory<Blockzapper
|
|||
@Override
|
||||
public void draw(BlockzapperUpgradeRecipe recipe, MatrixStack matrixStack, double mouseX, double mouseY) {
|
||||
FontRenderer font = Minecraft.getInstance().fontRenderer;
|
||||
ITextComponent componentName =
|
||||
Lang.translate("blockzapper.component." + Lang.asId(recipe.getUpgradedComponent().name()));
|
||||
String text = "+ " + recipe.getTier().color + componentName;
|
||||
font.drawWithShadow(matrixStack, text, (BLOCKZAPPER_UPGRADE_RECIPE.width - font.getStringWidth(text)) / 2, 57,
|
||||
0x8B8B8B);
|
||||
|
||||
matrixStack.push();
|
||||
matrixStack.translate(126, 0, 0);
|
||||
matrixStack.scale(3.5f, 3.5f, 3.5f);
|
||||
matrixStack.translate(-10, 0, 0);
|
||||
RenderSystem.color3f(1, 1, 1);
|
||||
GuiGameElement.of(recipe.getRecipeOutput()).render(matrixStack);
|
||||
matrixStack.pop();
|
||||
|
||||
IFormattableTextComponent textComponent =
|
||||
new StringTextComponent("+ ")
|
||||
.append(Lang.translate("blockzapper.component." + Lang.asId(recipe.getUpgradedComponent().name())))
|
||||
.formatted(recipe.getTier().color);
|
||||
|
||||
font.drawWithShadow(matrixStack, textComponent, (BLOCKZAPPER_UPGRADE_RECIPE.width - font.getStringWidth(textComponent.getString())) / 2f, 57, 0x8B8B8B);
|
||||
|
||||
GuiGameElement.of(recipe.getRecipeOutput())
|
||||
.at(90, 55)
|
||||
.scale(3.5)
|
||||
.render(matrixStack);
|
||||
}
|
||||
}
|
|
@ -1,21 +1,20 @@
|
|||
package com.simibubi.create.content.contraptions.goggles;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||
import com.simibubi.create.AllItems;
|
||||
import com.simibubi.create.foundation.config.AllConfigs;
|
||||
import com.simibubi.create.foundation.gui.AbstractSimiScreen;
|
||||
import com.simibubi.create.foundation.gui.GuiGameElement;
|
||||
import com.simibubi.create.foundation.utility.Lang;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraft.util.text.StringTextComponent;
|
||||
import net.minecraft.util.text.TextFormatting;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class GoggleConfigScreen extends AbstractSimiScreen {
|
||||
|
||||
private int offsetX;
|
||||
|
@ -78,12 +77,10 @@ public class GoggleConfigScreen extends AbstractSimiScreen {
|
|||
ms.push();
|
||||
int posX = this.width / 2 + offsetX;
|
||||
int posY = this.height / 2 + offsetY;
|
||||
//tooltipScreen.renderTooltip(tooltip, tooltipScreen.width / 2, tooltipScreen.height / 2);
|
||||
renderTooltip(ms, tooltip, posX, posY);
|
||||
|
||||
ItemStack item = AllItems.GOGGLES.asStack();
|
||||
//GuiGameElement.of(item).at(tooltipScreen.width / 2 + 10, tooltipScreen.height / 2 - 16).render();
|
||||
GuiGameElement.of(item).at(posX + 10, posY - 16).render(ms);
|
||||
GuiGameElement.of(item).atLocal(posX + 10, posY, 450).render(ms);
|
||||
ms.pop();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,13 +1,9 @@
|
|||
package com.simibubi.create.content.contraptions.goggles;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||
import com.simibubi.create.AllItems;
|
||||
import com.simibubi.create.foundation.config.AllConfigs;
|
||||
import com.simibubi.create.foundation.gui.GuiGameElement;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.screen.Screen;
|
||||
import net.minecraft.client.world.ClientWorld;
|
||||
|
@ -25,6 +21,9 @@ import net.minecraftforge.client.event.RenderGameOverlayEvent.ElementType;
|
|||
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||
import net.minecraftforge.fml.common.Mod.EventBusSubscriber;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@EventBusSubscriber(value = Dist.CLIENT)
|
||||
public class GoggleOverlayRenderer {
|
||||
|
||||
|
@ -81,12 +80,10 @@ public class GoggleOverlayRenderer {
|
|||
tooltipScreen.init(mc, mc.getWindow().getScaledWidth(), mc.getWindow().getScaledHeight());
|
||||
int posX = tooltipScreen.width / 2 + AllConfigs.CLIENT.overlayOffsetX.get();
|
||||
int posY = tooltipScreen.height / 2 + AllConfigs.CLIENT.overlayOffsetY.get();
|
||||
//tooltipScreen.renderTooltip(tooltip, tooltipScreen.width / 2, tooltipScreen.height / 2);
|
||||
tooltipScreen.renderTooltip(ms, tooltip, posX, posY);
|
||||
|
||||
ItemStack item = AllItems.GOGGLES.asStack();
|
||||
//GuiGameElement.of(item).at(tooltipScreen.width / 2 + 10, tooltipScreen.height / 2 - 16).render();
|
||||
GuiGameElement.of(item).at(posX + 10, posY - 16).render(ms);
|
||||
GuiGameElement.of(item).atLocal(posX + 10, posY, 450).render(ms);
|
||||
ms.pop();
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
package com.simibubi.create.content.contraptions.relays.advanced.sequencer;
|
||||
|
||||
import java.util.Vector;
|
||||
|
||||
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||
import com.simibubi.create.AllBlocks;
|
||||
import com.simibubi.create.foundation.gui.AbstractSimiScreen;
|
||||
|
@ -13,7 +11,6 @@ import com.simibubi.create.foundation.gui.widgets.ScrollInput;
|
|||
import com.simibubi.create.foundation.gui.widgets.SelectionScrollInput;
|
||||
import com.simibubi.create.foundation.networking.AllPackets;
|
||||
import com.simibubi.create.foundation.utility.Lang;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.ListNBT;
|
||||
|
@ -21,6 +18,8 @@ import net.minecraft.util.math.BlockPos;
|
|||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraft.util.text.StringTextComponent;
|
||||
|
||||
import java.util.Vector;
|
||||
|
||||
public class SequencedGearshiftScreen extends AbstractSimiScreen {
|
||||
|
||||
private final ItemStack renderedItem = AllBlocks.SEQUENCED_GEARSHIFT.asStack();
|
||||
|
@ -153,7 +152,7 @@ public class SequencedGearshiftScreen extends AbstractSimiScreen {
|
|||
0xffffff);
|
||||
|
||||
GuiGameElement.of(renderedItem)
|
||||
.at(guiLeft + background.width + 10, guiTop + 180)
|
||||
.at(guiLeft + background.width + 10, guiTop + 180, -150)
|
||||
.scale(5)
|
||||
.render(matrixStack);
|
||||
}
|
||||
|
|
|
@ -1,11 +1,7 @@
|
|||
package com.simibubi.create.content.curiosities.symmetry;
|
||||
|
||||
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||
import com.simibubi.create.content.curiosities.symmetry.mirror.CrossPlaneMirror;
|
||||
import com.simibubi.create.content.curiosities.symmetry.mirror.EmptyMirror;
|
||||
import com.simibubi.create.content.curiosities.symmetry.mirror.PlaneMirror;
|
||||
import com.simibubi.create.content.curiosities.symmetry.mirror.SymmetryMirror;
|
||||
import com.simibubi.create.content.curiosities.symmetry.mirror.TriplePlaneMirror;
|
||||
import com.simibubi.create.content.curiosities.symmetry.mirror.*;
|
||||
import com.simibubi.create.foundation.gui.AbstractSimiScreen;
|
||||
import com.simibubi.create.foundation.gui.AllGuiTextures;
|
||||
import com.simibubi.create.foundation.gui.AllIcons;
|
||||
|
@ -17,7 +13,6 @@ import com.simibubi.create.foundation.gui.widgets.SelectionScrollInput;
|
|||
import com.simibubi.create.foundation.networking.AllPackets;
|
||||
import com.simibubi.create.foundation.networking.NbtPacket;
|
||||
import com.simibubi.create.foundation.utility.Lang;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
|
@ -123,7 +118,7 @@ public class SymmetryWandScreen extends AbstractSimiScreen {
|
|||
|
||||
renderBlock(matrixStack);
|
||||
GuiGameElement.of(wand)
|
||||
.at(guiLeft + 190, guiTop + 420)
|
||||
.at(guiLeft + 190, guiTop + 420, -150)
|
||||
.scale(4)
|
||||
.rotate(-70, 20, 20)
|
||||
.render(matrixStack);
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
package com.simibubi.create.content.curiosities.zapper;
|
||||
|
||||
import java.util.Vector;
|
||||
|
||||
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||
import com.simibubi.create.foundation.gui.AbstractSimiScreen;
|
||||
import com.simibubi.create.foundation.gui.AllGuiTextures;
|
||||
|
@ -11,7 +9,6 @@ import com.simibubi.create.foundation.gui.widgets.IconButton;
|
|||
import com.simibubi.create.foundation.networking.AllPackets;
|
||||
import com.simibubi.create.foundation.networking.NbtPacket;
|
||||
import com.simibubi.create.foundation.utility.Lang;
|
||||
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.client.Minecraft;
|
||||
|
@ -23,6 +20,8 @@ import net.minecraft.util.math.vector.Vector3f;
|
|||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraft.util.text.StringTextComponent;
|
||||
|
||||
import java.util.Vector;
|
||||
|
||||
public class ZapperScreen extends AbstractSimiScreen {
|
||||
|
||||
protected ItemStack zapper;
|
||||
|
@ -133,7 +132,7 @@ public class ZapperScreen extends AbstractSimiScreen {
|
|||
|
||||
protected void renderZapper(MatrixStack matrixStack) {
|
||||
GuiGameElement.of(zapper)
|
||||
.at((this.width - this.sWidth) / 2 + 220, this.height / 2 - this.sHeight / 4 + 30)
|
||||
.at((this.width - this.sWidth) / 2 + 220, this.height / 2 - this.sHeight / 4 + 30, -150)
|
||||
.scale(4)
|
||||
.render(matrixStack);
|
||||
}
|
||||
|
|
|
@ -1,12 +1,5 @@
|
|||
package com.simibubi.create.content.logistics.block.inventories;
|
||||
|
||||
import static com.simibubi.create.foundation.gui.AllGuiTextures.ADJUSTABLE_CRATE;
|
||||
import static com.simibubi.create.foundation.gui.AllGuiTextures.ADJUSTABLE_DOUBLE_CRATE;
|
||||
import static com.simibubi.create.foundation.gui.AllGuiTextures.PLAYER_INVENTORY;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||
import com.simibubi.create.AllBlocks;
|
||||
import com.simibubi.create.content.logistics.packet.ConfigureFlexcratePacket;
|
||||
|
@ -17,13 +10,17 @@ import com.simibubi.create.foundation.gui.widgets.Label;
|
|||
import com.simibubi.create.foundation.gui.widgets.ScrollInput;
|
||||
import com.simibubi.create.foundation.networking.AllPackets;
|
||||
import com.simibubi.create.foundation.utility.Lang;
|
||||
|
||||
import net.minecraft.client.renderer.Rectangle2d;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraft.util.text.StringTextComponent;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import static com.simibubi.create.foundation.gui.AllGuiTextures.*;
|
||||
|
||||
public class AdjustableCrateScreen extends AbstractSimiContainerScreen<AdjustableCrateContainer> {
|
||||
|
||||
private AdjustableCrateTileEntity te;
|
||||
|
@ -97,7 +94,7 @@ public class AdjustableCrateScreen extends AbstractSimiContainerScreen<Adjustabl
|
|||
}
|
||||
|
||||
GuiGameElement.of(renderedItem)
|
||||
.at(guiLeft + ADJUSTABLE_CRATE.width + 110, guiTop + 120)
|
||||
.at(guiLeft + ADJUSTABLE_CRATE.width + 110, guiTop + 120, -150)
|
||||
.scale(5)
|
||||
.render(matrixStack);
|
||||
}
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
package com.simibubi.create.content.logistics.block.redstone;
|
||||
|
||||
import static com.simibubi.create.foundation.gui.AllGuiTextures.STOCKSWITCH;
|
||||
|
||||
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||
import com.simibubi.create.AllBlocks;
|
||||
import com.simibubi.create.content.logistics.packet.ConfigureStockswitchPacket;
|
||||
|
@ -15,12 +13,13 @@ import com.simibubi.create.foundation.networking.AllPackets;
|
|||
import com.simibubi.create.foundation.utility.Lang;
|
||||
import com.simibubi.create.foundation.utility.LerpedFloat;
|
||||
import com.simibubi.create.foundation.utility.LerpedFloat.Chaser;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraft.util.text.StringTextComponent;
|
||||
|
||||
import static com.simibubi.create.foundation.gui.AllGuiTextures.STOCKSWITCH;
|
||||
|
||||
public class StockpileSwitchScreen extends AbstractSimiScreen {
|
||||
|
||||
private ScrollInput offBelow;
|
||||
|
@ -126,7 +125,7 @@ public class StockpileSwitchScreen extends AbstractSimiScreen {
|
|||
|
||||
matrixStack.push();
|
||||
GuiGameElement.of(renderedItem)
|
||||
.at(guiLeft + STOCKSWITCH.width + 15, guiTop + 120)
|
||||
.at(guiLeft + STOCKSWITCH.width + 15, guiTop + 120, -250)
|
||||
.scale(5)
|
||||
.render(matrixStack);
|
||||
matrixStack.pop();
|
||||
|
|
|
@ -1,11 +1,5 @@
|
|||
package com.simibubi.create.content.logistics.item.filter;
|
||||
|
||||
import static com.simibubi.create.foundation.gui.AllGuiTextures.PLAYER_INVENTORY;
|
||||
import static net.minecraft.util.text.TextFormatting.GRAY;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||
import com.simibubi.create.content.logistics.item.filter.FilterScreenPacket.Option;
|
||||
import com.simibubi.create.foundation.gui.AbstractSimiContainerScreen;
|
||||
|
@ -18,13 +12,18 @@ import com.simibubi.create.foundation.gui.widgets.Indicator.State;
|
|||
import com.simibubi.create.foundation.item.ItemDescription.Palette;
|
||||
import com.simibubi.create.foundation.item.TooltipHelper;
|
||||
import com.simibubi.create.foundation.networking.AllPackets;
|
||||
|
||||
import net.minecraft.client.gui.widget.Widget;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.util.text.IFormattableTextComponent;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import static com.simibubi.create.foundation.gui.AllGuiTextures.PLAYER_INVENTORY;
|
||||
import static net.minecraft.util.text.TextFormatting.GRAY;
|
||||
|
||||
public abstract class AbstractFilterScreen<F extends AbstractFilterContainer> extends AbstractSimiContainerScreen<F> {
|
||||
|
||||
protected AllGuiTextures background;
|
||||
|
@ -65,7 +64,7 @@ public abstract class AbstractFilterScreen<F extends AbstractFilterContainer> ex
|
|||
textRenderer.draw(ms, I18n.format(container.filterItem.getTranslationKey()), x + 15, y + 3, 0xdedede);
|
||||
|
||||
GuiGameElement.of(container.filterItem)
|
||||
.at(guiLeft + background.width, guiTop + background.height + 25)
|
||||
.at(guiLeft + background.width, guiTop + background.height + 25, -150)
|
||||
.scale(5)
|
||||
.render(ms);
|
||||
|
||||
|
|
|
@ -1,11 +1,5 @@
|
|||
package com.simibubi.create.content.schematics.block;
|
||||
|
||||
import static com.simibubi.create.foundation.gui.AllGuiTextures.SCHEMATIC_TABLE;
|
||||
import static com.simibubi.create.foundation.gui.AllGuiTextures.SCHEMATIC_TABLE_PROGRESS;
|
||||
|
||||
import java.nio.file.Paths;
|
||||
import java.util.List;
|
||||
|
||||
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||
import com.mojang.blaze3d.systems.RenderSystem;
|
||||
import com.simibubi.create.AllBlocks;
|
||||
|
@ -20,7 +14,6 @@ import com.simibubi.create.foundation.gui.widgets.Label;
|
|||
import com.simibubi.create.foundation.gui.widgets.ScrollInput;
|
||||
import com.simibubi.create.foundation.gui.widgets.SelectionScrollInput;
|
||||
import com.simibubi.create.foundation.utility.Lang;
|
||||
|
||||
import net.minecraft.client.gui.IHasContainer;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
@ -29,6 +22,12 @@ import net.minecraft.util.math.MathHelper;
|
|||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraft.util.text.StringTextComponent;
|
||||
|
||||
import java.nio.file.Paths;
|
||||
import java.util.List;
|
||||
|
||||
import static com.simibubi.create.foundation.gui.AllGuiTextures.SCHEMATIC_TABLE;
|
||||
import static com.simibubi.create.foundation.gui.AllGuiTextures.SCHEMATIC_TABLE_PROGRESS;
|
||||
|
||||
|
||||
public class SchematicTableScreen extends AbstractSimiContainerScreen<SchematicTableContainer>
|
||||
implements IHasContainer<SchematicTableContainer> {
|
||||
|
@ -116,7 +115,7 @@ public class SchematicTableScreen extends AbstractSimiContainerScreen<SchematicT
|
|||
textRenderer.drawWithShadow(matrixStack, noSchematics, mainLeft + 54, mainTop + 26, 0xd3d3d3);
|
||||
|
||||
GuiGameElement.of(renderedItem)
|
||||
.at(mainLeft + 217, mainTop + 98)
|
||||
.at(mainLeft + 217, mainTop + 98, -150)
|
||||
.scale(3)
|
||||
.render(matrixStack);
|
||||
|
||||
|
|
|
@ -1,14 +1,5 @@
|
|||
package com.simibubi.create.content.schematics.block;
|
||||
|
||||
import static net.minecraft.util.text.TextFormatting.BLUE;
|
||||
import static net.minecraft.util.text.TextFormatting.DARK_PURPLE;
|
||||
import static net.minecraft.util.text.TextFormatting.GRAY;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Vector;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||
import com.simibubi.create.AllBlocks;
|
||||
|
@ -25,7 +16,6 @@ import com.simibubi.create.foundation.item.ItemDescription.Palette;
|
|||
import com.simibubi.create.foundation.item.TooltipHelper;
|
||||
import com.simibubi.create.foundation.networking.AllPackets;
|
||||
import com.simibubi.create.foundation.utility.Lang;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.widget.Widget;
|
||||
import net.minecraft.client.renderer.Rectangle2d;
|
||||
|
@ -35,6 +25,13 @@ import net.minecraft.util.text.ITextComponent;
|
|||
import net.minecraft.util.text.StringTextComponent;
|
||||
import net.minecraft.util.text.TextFormatting;
|
||||
import net.minecraft.util.text.TranslationTextComponent;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Vector;
|
||||
|
||||
import static net.minecraft.util.text.TextFormatting.*;
|
||||
public class SchematicannonScreen extends AbstractSimiContainerScreen<SchematicannonContainer> {
|
||||
|
||||
private static final AllGuiTextures BG_BOTTOM = AllGuiTextures.SCHEMATICANNON_BOTTOM;
|
||||
|
@ -261,7 +258,7 @@ public class SchematicannonScreen extends AbstractSimiContainerScreen<Schematica
|
|||
renderBlueprintHighlight(matrixStack);
|
||||
|
||||
GuiGameElement.of(renderedItem)
|
||||
.at(guiLeft + 230, guiTop + 190)
|
||||
.at(guiLeft + 230, guiTop + 190, -200)
|
||||
.scale(5)
|
||||
.render(matrixStack);
|
||||
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
package com.simibubi.create.foundation.gui;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||
import com.mojang.blaze3d.platform.GlStateManager;
|
||||
import com.mojang.blaze3d.platform.GlStateManager.DestFactor;
|
||||
|
@ -15,19 +12,12 @@ import com.simibubi.create.foundation.utility.ColorHelper;
|
|||
import com.simibubi.create.foundation.utility.Iterate;
|
||||
import com.simibubi.create.foundation.utility.VecHelper;
|
||||
import com.simibubi.create.foundation.utility.worldWrappers.WrappedWorld;
|
||||
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.block.FireBlock;
|
||||
import net.minecraft.block.FlowingFluidBlock;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.Atlases;
|
||||
import net.minecraft.client.renderer.BlockRendererDispatcher;
|
||||
import net.minecraft.client.renderer.IRenderTypeBuffer;
|
||||
import net.minecraft.client.renderer.ItemRenderer;
|
||||
import net.minecraft.client.renderer.RenderHelper;
|
||||
import net.minecraft.client.renderer.RenderType;
|
||||
import net.minecraft.client.renderer.RenderTypeLookup;
|
||||
import net.minecraft.client.renderer.*;
|
||||
import net.minecraft.client.renderer.model.IBakedModel;
|
||||
import net.minecraft.client.renderer.model.ItemCameraTransforms;
|
||||
import net.minecraft.client.renderer.texture.AtlasTexture;
|
||||
|
@ -46,6 +36,9 @@ import net.minecraft.world.LightType;
|
|||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.model.data.EmptyModelData;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
public class GuiGameElement {
|
||||
|
||||
public static GuiRenderBuilder of(ItemStack stack) {
|
||||
|
@ -71,7 +64,7 @@ public class GuiGameElement {
|
|||
}
|
||||
|
||||
public static abstract class GuiRenderBuilder {
|
||||
double xBeforeScale, yBeforeScale;
|
||||
double xBeforeScale, yBeforeScale, zBeforeScale = 0;
|
||||
double x, y, z;
|
||||
double xRot, yRot, zRot;
|
||||
double scale = 1;
|
||||
|
@ -91,6 +84,13 @@ public class GuiGameElement {
|
|||
return this;
|
||||
}
|
||||
|
||||
public GuiRenderBuilder at(double x, double y, double z) {
|
||||
this.xBeforeScale = x;
|
||||
this.yBeforeScale = y;
|
||||
this.zBeforeScale = z;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GuiRenderBuilder rotate(double xRot, double yRot, double zRot) {
|
||||
this.xRot = xRot;
|
||||
this.yRot = yRot;
|
||||
|
@ -148,7 +148,7 @@ public class GuiGameElement {
|
|||
}
|
||||
|
||||
protected void transformMatrix(MatrixStack matrixStack) {
|
||||
matrixStack.translate(xBeforeScale, yBeforeScale, 0);
|
||||
matrixStack.translate(xBeforeScale, yBeforeScale, zBeforeScale);
|
||||
matrixStack.scale((float) scale, (float) scale, (float) scale);
|
||||
matrixStack.translate(x, y, z);
|
||||
matrixStack.scale(1, -1, 1);
|
||||
|
|
Loading…
Reference in a new issue