Fix some deprecations and some formatting fixes.

This commit is contained in:
raoulvdberge
2020-09-05 14:36:43 +02:00
parent dcbf838c70
commit d3818bcb98
39 changed files with 93 additions and 131 deletions

View File

@@ -1,6 +1,5 @@
package com.refinedmods.refinedstorage.api.render; package com.refinedmods.refinedstorage.api.render;
import com.mojang.blaze3d.matrix.MatrixStack;
import net.minecraft.client.gui.FontRenderer; import net.minecraft.client.gui.FontRenderer;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.FluidStack;

View File

@@ -4,7 +4,6 @@ import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.Direction; import net.minecraft.util.Direction;
import javax.annotation.Nonnull; import javax.annotation.Nonnull;
import java.util.function.Supplier;
/** /**
* Provides an external storage handler to the external storage block. * Provides an external storage handler to the external storage block.

View File

@@ -27,8 +27,8 @@ public class CraftingMonitorElementList implements ICraftingMonitorElementList {
if (craftingElements != null) { if (craftingElements != null) {
ICraftingMonitorElement existingElement = craftingElements.get(element.baseElementHashCode()); ICraftingMonitorElement existingElement = craftingElements.get(element.baseElementHashCode());
if (existingElement != null) { if (existingElement != null) {
if(existingElement instanceof ErrorCraftingMonitorElement){ if (existingElement instanceof ErrorCraftingMonitorElement) {
((ErrorCraftingMonitorElement)existingElement).mergeBases(element); ((ErrorCraftingMonitorElement) existingElement).mergeBases(element);
} else { } else {
existingElement.merge(element); existingElement.merge(element);
} }
@@ -38,8 +38,8 @@ public class CraftingMonitorElementList implements ICraftingMonitorElementList {
if (processingElements != null) { if (processingElements != null) {
ICraftingMonitorElement existingElement = processingElements.get(element.baseElementHashCode()); ICraftingMonitorElement existingElement = processingElements.get(element.baseElementHashCode());
if (existingElement != null) { if (existingElement != null) {
if(existingElement instanceof ErrorCraftingMonitorElement){ if (existingElement instanceof ErrorCraftingMonitorElement) {
((ErrorCraftingMonitorElement)existingElement).mergeBases(element); ((ErrorCraftingMonitorElement) existingElement).mergeBases(element);
} else { } else {
existingElement.merge(element); existingElement.merge(element);
} }
@@ -114,7 +114,7 @@ public class CraftingMonitorElementList implements ICraftingMonitorElementList {
@Override @Override
public List<ICraftingMonitorElement> getElements() { public List<ICraftingMonitorElement> getElements() {
if (!currentLists.isEmpty()||!currentCraftingLists.isEmpty() || !currentProcessingLists.isEmpty() || !currentStorageLists.isEmpty()) { if (!currentLists.isEmpty() || !currentCraftingLists.isEmpty() || !currentProcessingLists.isEmpty() || !currentStorageLists.isEmpty()) {
commit(); commit();
} }

View File

@@ -1,7 +1,6 @@
package com.refinedmods.refinedstorage.apiimpl.autocrafting.craftingmonitor; package com.refinedmods.refinedstorage.apiimpl.autocrafting.craftingmonitor;
import com.mojang.blaze3d.matrix.MatrixStack; import com.mojang.blaze3d.matrix.MatrixStack;
import com.mojang.blaze3d.systems.RenderSystem;
import com.refinedmods.refinedstorage.RS; import com.refinedmods.refinedstorage.RS;
import com.refinedmods.refinedstorage.api.autocrafting.craftingmonitor.ICraftingMonitorElement; import com.refinedmods.refinedstorage.api.autocrafting.craftingmonitor.ICraftingMonitorElement;
import com.refinedmods.refinedstorage.api.render.IElementDrawers; import com.refinedmods.refinedstorage.api.render.IElementDrawers;
@@ -61,8 +60,8 @@ public class FluidCraftingMonitorElement implements ICraftingMonitorElement {
float scale = Minecraft.getInstance().getForceUnicodeFont() ? 1F : 0.5F; float scale = Minecraft.getInstance().getForceUnicodeFont() ? 1F : 0.5F;
RenderSystem.pushMatrix(); matrixStack.push();
RenderSystem.scalef(scale, scale, 1); matrixStack.scale(scale, scale, 1);
int yy = y + 7; int yy = y + 7;
@@ -94,7 +93,7 @@ public class FluidCraftingMonitorElement implements ICraftingMonitorElement {
drawers.getStringDrawer().draw(matrixStack, RenderUtils.getOffsetOnScale(x + 25, scale), RenderUtils.getOffsetOnScale(yy, scale), I18n.format("gui.refinedstorage.crafting_monitor.crafting", API.instance().getQuantityFormatter().formatInBucketForm(crafting))); drawers.getStringDrawer().draw(matrixStack, RenderUtils.getOffsetOnScale(x + 25, scale), RenderUtils.getOffsetOnScale(yy, scale), I18n.format("gui.refinedstorage.crafting_monitor.crafting", API.instance().getQuantityFormatter().formatInBucketForm(crafting)));
} }
RenderSystem.popMatrix(); matrixStack.pop();
} }
@Override @Override

View File

@@ -1,7 +1,6 @@
package com.refinedmods.refinedstorage.apiimpl.autocrafting.craftingmonitor; package com.refinedmods.refinedstorage.apiimpl.autocrafting.craftingmonitor;
import com.mojang.blaze3d.matrix.MatrixStack; import com.mojang.blaze3d.matrix.MatrixStack;
import com.mojang.blaze3d.systems.RenderSystem;
import com.refinedmods.refinedstorage.RS; import com.refinedmods.refinedstorage.RS;
import com.refinedmods.refinedstorage.api.autocrafting.craftingmonitor.ICraftingMonitorElement; import com.refinedmods.refinedstorage.api.autocrafting.craftingmonitor.ICraftingMonitorElement;
import com.refinedmods.refinedstorage.api.render.IElementDrawers; import com.refinedmods.refinedstorage.api.render.IElementDrawers;
@@ -61,8 +60,8 @@ public class ItemCraftingMonitorElement implements ICraftingMonitorElement {
float scale = Minecraft.getInstance().getForceUnicodeFont() ? 1F : 0.5F; float scale = Minecraft.getInstance().getForceUnicodeFont() ? 1F : 0.5F;
RenderSystem.pushMatrix(); matrixStack.push();
RenderSystem.scalef(scale, scale, 1); matrixStack.scale(scale, scale, 1);
int yy = y + 7; int yy = y + 7;
@@ -94,7 +93,7 @@ public class ItemCraftingMonitorElement implements ICraftingMonitorElement {
drawers.getStringDrawer().draw(matrixStack, RenderUtils.getOffsetOnScale(x + 25, scale), RenderUtils.getOffsetOnScale(yy, scale), I18n.format("gui.refinedstorage.crafting_monitor.crafting", crafting)); drawers.getStringDrawer().draw(matrixStack, RenderUtils.getOffsetOnScale(x + 25, scale), RenderUtils.getOffsetOnScale(yy, scale), I18n.format("gui.refinedstorage.crafting_monitor.crafting", crafting));
} }
RenderSystem.popMatrix(); matrixStack.pop();
} }
@Override @Override

View File

@@ -1,7 +1,6 @@
package com.refinedmods.refinedstorage.apiimpl.autocrafting.preview; package com.refinedmods.refinedstorage.apiimpl.autocrafting.preview;
import com.mojang.blaze3d.matrix.MatrixStack; import com.mojang.blaze3d.matrix.MatrixStack;
import com.mojang.blaze3d.systems.RenderSystem;
import com.refinedmods.refinedstorage.RS; import com.refinedmods.refinedstorage.RS;
import com.refinedmods.refinedstorage.api.autocrafting.preview.ICraftingPreviewElement; import com.refinedmods.refinedstorage.api.autocrafting.preview.ICraftingPreviewElement;
import com.refinedmods.refinedstorage.api.render.IElementDrawers; import com.refinedmods.refinedstorage.api.render.IElementDrawers;
@@ -15,8 +14,6 @@ import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.api.distmarker.OnlyIn;
import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.FluidStack;
import java.util.Map;
public class FluidCraftingPreviewElement implements ICraftingPreviewElement<FluidStack> { public class FluidCraftingPreviewElement implements ICraftingPreviewElement<FluidStack> {
public static final ResourceLocation ID = new ResourceLocation(RS.ID, "fluid"); public static final ResourceLocation ID = new ResourceLocation(RS.ID, "fluid");
@@ -75,8 +72,8 @@ public class FluidCraftingPreviewElement implements ICraftingPreviewElement<Flui
y += 2; y += 2;
RenderSystem.pushMatrix(); matrixStack.push();
RenderSystem.scalef(scale, scale, 1); matrixStack.scale(scale, scale, 1);
if (getToCraft() > 0) { if (getToCraft() > 0) {
String format = hasMissing() ? "gui.refinedstorage.crafting_preview.missing" : "gui.refinedstorage.crafting_preview.to_craft"; String format = hasMissing() ? "gui.refinedstorage.crafting_preview.missing" : "gui.refinedstorage.crafting_preview.to_craft";
@@ -89,7 +86,7 @@ public class FluidCraftingPreviewElement implements ICraftingPreviewElement<Flui
drawers.getStringDrawer().draw(matrixStack, RenderUtils.getOffsetOnScale(x + 23, scale), RenderUtils.getOffsetOnScale(y, scale), I18n.format("gui.refinedstorage.crafting_preview.available", API.instance().getQuantityFormatter().formatInBucketForm(getAvailable()))); drawers.getStringDrawer().draw(matrixStack, RenderUtils.getOffsetOnScale(x + 23, scale), RenderUtils.getOffsetOnScale(y, scale), I18n.format("gui.refinedstorage.crafting_preview.available", API.instance().getQuantityFormatter().formatInBucketForm(getAvailable())));
} }
RenderSystem.popMatrix(); matrixStack.pop();
} }
public void addAvailable(int amount) { public void addAvailable(int amount) {

View File

@@ -1,7 +1,6 @@
package com.refinedmods.refinedstorage.apiimpl.autocrafting.preview; package com.refinedmods.refinedstorage.apiimpl.autocrafting.preview;
import com.mojang.blaze3d.matrix.MatrixStack; import com.mojang.blaze3d.matrix.MatrixStack;
import com.mojang.blaze3d.systems.RenderSystem;
import com.refinedmods.refinedstorage.RS; import com.refinedmods.refinedstorage.RS;
import com.refinedmods.refinedstorage.api.autocrafting.preview.ICraftingPreviewElement; import com.refinedmods.refinedstorage.api.autocrafting.preview.ICraftingPreviewElement;
import com.refinedmods.refinedstorage.api.render.IElementDrawers; import com.refinedmods.refinedstorage.api.render.IElementDrawers;
@@ -73,8 +72,8 @@ public class ItemCraftingPreviewElement implements ICraftingPreviewElement<ItemS
y += 2; y += 2;
RenderSystem.pushMatrix(); matrixStack.push();
RenderSystem.scalef(scale, scale, 1); matrixStack.scale(scale, scale, 1);
if (getToCraft() > 0) { if (getToCraft() > 0) {
String format = hasMissing() ? "gui.refinedstorage.crafting_preview.missing" : "gui.refinedstorage.crafting_preview.to_craft"; String format = hasMissing() ? "gui.refinedstorage.crafting_preview.missing" : "gui.refinedstorage.crafting_preview.to_craft";
@@ -87,7 +86,7 @@ public class ItemCraftingPreviewElement implements ICraftingPreviewElement<ItemS
drawers.getStringDrawer().draw(matrixStack, RenderUtils.getOffsetOnScale(x + 23, scale), RenderUtils.getOffsetOnScale(y, scale), I18n.format("gui.refinedstorage.crafting_preview.available", getAvailable())); drawers.getStringDrawer().draw(matrixStack, RenderUtils.getOffsetOnScale(x + 23, scale), RenderUtils.getOffsetOnScale(y, scale), I18n.format("gui.refinedstorage.crafting_preview.available", getAvailable()));
} }
RenderSystem.popMatrix(); matrixStack.pop();
} }
public void addAvailable(int amount) { public void addAvailable(int amount) {

View File

@@ -56,7 +56,10 @@ import net.minecraftforge.items.wrapper.InvWrapper;
import javax.annotation.Nonnull; import javax.annotation.Nonnull;
import javax.annotation.Nullable; import javax.annotation.Nullable;
import java.util.*; import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
public class GridNetworkNode extends NetworkNode implements INetworkAwareGrid, IType { public class GridNetworkNode extends NetworkNode implements INetworkAwareGrid, IType {
public static final ResourceLocation ID = new ResourceLocation(RS.ID, "grid"); public static final ResourceLocation ID = new ResourceLocation(RS.ID, "grid");

View File

@@ -10,7 +10,6 @@ import net.minecraft.util.Direction;
import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.FluidStack;
import javax.annotation.Nonnull; import javax.annotation.Nonnull;
import java.util.function.Supplier;
public class FluidExternalStorageProvider implements IExternalStorageProvider<FluidStack> { public class FluidExternalStorageProvider implements IExternalStorageProvider<FluidStack> {
@Override @Override

View File

@@ -13,7 +13,6 @@ import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.Direction; import net.minecraft.util.Direction;
import javax.annotation.Nonnull; import javax.annotation.Nonnull;
import java.util.function.Supplier;
public class ItemExternalStorageProvider implements IExternalStorageProvider<ItemStack> { public class ItemExternalStorageProvider implements IExternalStorageProvider<ItemStack> {
@Override @Override

View File

@@ -1,6 +1,5 @@
package com.refinedmods.refinedstorage.block; package com.refinedmods.refinedstorage.block;
import com.refinedmods.refinedstorage.RS;
import com.refinedmods.refinedstorage.api.network.grid.GridType; import com.refinedmods.refinedstorage.api.network.grid.GridType;
import com.refinedmods.refinedstorage.apiimpl.API; import com.refinedmods.refinedstorage.apiimpl.API;
import com.refinedmods.refinedstorage.apiimpl.network.grid.factory.GridBlockGridFactory; import com.refinedmods.refinedstorage.apiimpl.network.grid.factory.GridBlockGridFactory;

View File

@@ -2,7 +2,6 @@ package com.refinedmods.refinedstorage.integration.jei;
import com.refinedmods.refinedstorage.container.BaseContainer; import com.refinedmods.refinedstorage.container.BaseContainer;
import com.refinedmods.refinedstorage.container.slot.filter.FluidFilterSlot; import com.refinedmods.refinedstorage.container.slot.filter.FluidFilterSlot;
import com.refinedmods.refinedstorage.screen.BaseScreen;
import com.refinedmods.refinedstorage.screen.grid.GridScreen; import com.refinedmods.refinedstorage.screen.grid.GridScreen;
import com.refinedmods.refinedstorage.util.RenderUtils; import com.refinedmods.refinedstorage.util.RenderUtils;
import mezz.jei.api.gui.handlers.IGuiContainerHandler; import mezz.jei.api.gui.handlers.IGuiContainerHandler;

View File

@@ -44,7 +44,7 @@ public class GridItemPullMessage {
} }
}); });
} }
ctx.get().setPacketHandled(true); ctx.get().setPacketHandled(true);
} }
} }

View File

@@ -14,7 +14,6 @@ import net.minecraft.util.math.vector.Matrix4f;
import net.minecraftforge.fluids.FluidAttributes; import net.minecraftforge.fluids.FluidAttributes;
import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.FluidStack;
import javax.annotation.Nonnull;
import javax.annotation.Nullable; import javax.annotation.Nullable;
/** /**

View File

@@ -12,7 +12,6 @@ import net.minecraft.client.renderer.model.ItemOverrideList;
import net.minecraft.client.world.ClientWorld; import net.minecraft.client.world.ClientWorld;
import net.minecraft.entity.LivingEntity; import net.minecraft.entity.LivingEntity;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import javax.annotation.Nullable; import javax.annotation.Nullable;

View File

@@ -15,7 +15,6 @@ import net.minecraft.client.world.ClientWorld;
import net.minecraft.entity.LivingEntity; import net.minecraft.entity.LivingEntity;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.util.Direction; import net.minecraft.util.Direction;
import net.minecraft.world.World;
import javax.annotation.Nonnull; import javax.annotation.Nonnull;
import javax.annotation.Nullable; import javax.annotation.Nullable;

View File

@@ -142,25 +142,25 @@ public class StorageMonitorTileRenderer extends TileEntityRenderer<StorageMonito
final int colorAlpha = fluidColor >> 24 & 0xFF; final int colorAlpha = fluidColor >> 24 & 0xFF;
buffer.pos(matrixStack.getLast().getMatrix(), -0.5F, -0.5F, 0F) buffer.pos(matrixStack.getLast().getMatrix(), -0.5F, -0.5F, 0F)
.color(colorRed, colorGreen, colorBlue, colorAlpha) .color(colorRed, colorGreen, colorBlue, colorAlpha)
.tex(sprite.getMinU(), sprite.getMinV()) .tex(sprite.getMinU(), sprite.getMinV())
.lightmap(light) .lightmap(light)
.endVertex(); .endVertex();
buffer.pos(matrixStack.getLast().getMatrix(), 0.5F, -0.5F, 0F) buffer.pos(matrixStack.getLast().getMatrix(), 0.5F, -0.5F, 0F)
.color(colorRed, colorGreen, colorBlue, colorAlpha) .color(colorRed, colorGreen, colorBlue, colorAlpha)
.tex(sprite.getMaxU(), sprite.getMinV()) .tex(sprite.getMaxU(), sprite.getMinV())
.lightmap(light) .lightmap(light)
.endVertex(); .endVertex();
buffer.pos(matrixStack.getLast().getMatrix(), 0.5F, -1.5F, 0F) buffer.pos(matrixStack.getLast().getMatrix(), 0.5F, -1.5F, 0F)
.color(colorRed, colorGreen, colorBlue, colorAlpha) .color(colorRed, colorGreen, colorBlue, colorAlpha)
.tex(sprite.getMaxU(), sprite.getMaxV()) .tex(sprite.getMaxU(), sprite.getMaxV())
.lightmap(light) .lightmap(light)
.endVertex(); .endVertex();
buffer.pos(matrixStack.getLast().getMatrix(), -0.5F, -1.5F, 0F) buffer.pos(matrixStack.getLast().getMatrix(), -0.5F, -1.5F, 0F)
.color(colorRed, colorGreen, colorBlue, colorAlpha) .color(colorRed, colorGreen, colorBlue, colorAlpha)
.tex(sprite.getMinU(), sprite.getMaxV()) .tex(sprite.getMinU(), sprite.getMaxV())
.lightmap(light) .lightmap(light)
.endVertex(); .endVertex();
matrixStack.pop(); matrixStack.pop();
} }

View File

@@ -5,7 +5,6 @@ import com.refinedmods.refinedstorage.RS;
import com.refinedmods.refinedstorage.render.RenderSettings; import com.refinedmods.refinedstorage.render.RenderSettings;
import net.minecraft.client.gui.widget.TextFieldWidget; import net.minecraft.client.gui.widget.TextFieldWidget;
import net.minecraft.client.gui.widget.button.Button; import net.minecraft.client.gui.widget.button.Button;
import net.minecraft.client.resources.I18n;
import net.minecraft.entity.player.PlayerInventory; import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.inventory.container.Container; import net.minecraft.inventory.container.Container;
import net.minecraft.util.text.ITextComponent; import net.minecraft.util.text.ITextComponent;

View File

@@ -305,16 +305,16 @@ public abstract class BaseScreen<T extends Container> extends ContainerScreen<T>
public void renderQuantity(MatrixStack matrixStack, int x, int y, String qty, int color) { public void renderQuantity(MatrixStack matrixStack, int x, int y, String qty, int color) {
boolean large = minecraft.getForceUnicodeFont() || RS.CLIENT_CONFIG.getGrid().getLargeFont(); boolean large = minecraft.getForceUnicodeFont() || RS.CLIENT_CONFIG.getGrid().getLargeFont();
RenderSystem.pushMatrix(); matrixStack.push();
RenderSystem.translatef(x, y, Z_LEVEL_QTY); matrixStack.translate(x, y, Z_LEVEL_QTY);
if (!large) { if (!large) {
RenderSystem.scalef(0.5f, 0.5f, 1); matrixStack.scale(0.5F, 0.5F, 1);
} }
font.drawStringWithShadow(matrixStack, qty, (large ? 16 : 30) - font.getStringWidth(qty), large ? 8 : 22, color); font.drawStringWithShadow(matrixStack, qty, (large ? 16 : 30) - font.getStringWidth(qty), large ? 8 : 22, color);
RenderSystem.popMatrix(); matrixStack.pop();
} }
public void renderString(MatrixStack matrixStack, int x, int y, String message) { public void renderString(MatrixStack matrixStack, int x, int y, String message) {

View File

@@ -1,7 +1,6 @@
package com.refinedmods.refinedstorage.screen; package com.refinedmods.refinedstorage.screen;
import com.mojang.blaze3d.matrix.MatrixStack; import com.mojang.blaze3d.matrix.MatrixStack;
import com.mojang.blaze3d.systems.RenderSystem;
import com.refinedmods.refinedstorage.RS; import com.refinedmods.refinedstorage.RS;
import com.refinedmods.refinedstorage.apiimpl.network.Network; import com.refinedmods.refinedstorage.apiimpl.network.Network;
import com.refinedmods.refinedstorage.container.ControllerContainer; import com.refinedmods.refinedstorage.container.ControllerContainer;
@@ -103,8 +102,8 @@ public class ControllerScreen extends BaseScreen<ControllerContainer> {
float scale = minecraft.getForceUnicodeFont() ? 1F : 0.5F; float scale = minecraft.getForceUnicodeFont() ? 1F : 0.5F;
RenderSystem.pushMatrix(); matrixStack.push();
RenderSystem.scalef(scale, scale, 1); matrixStack.scale(scale, scale, 1);
renderString( renderString(
matrixStack, matrixStack,
@@ -114,7 +113,7 @@ public class ControllerScreen extends BaseScreen<ControllerContainer> {
); );
renderString(matrixStack, RenderUtils.getOffsetOnScale(x + 21, scale), RenderUtils.getOffsetOnScale(y + 10, scale), node.getAmount() + "x"); renderString(matrixStack, RenderUtils.getOffsetOnScale(x + 21, scale), RenderUtils.getOffsetOnScale(y + 10, scale), node.getAmount() + "x");
RenderSystem.popMatrix(); matrixStack.pop();
if (RenderUtils.inBounds(x, y, 16, 16, mouseX, mouseY)) { if (RenderUtils.inBounds(x, y, 16, 16, mouseX, mouseY)) {
hoveringNode = node; hoveringNode = node;

View File

@@ -5,7 +5,6 @@ import com.refinedmods.refinedstorage.container.FluidAmountContainer;
import com.refinedmods.refinedstorage.network.SetFluidFilterSlotMessage; import com.refinedmods.refinedstorage.network.SetFluidFilterSlotMessage;
import com.refinedmods.refinedstorage.util.StackUtils; import com.refinedmods.refinedstorage.util.StackUtils;
import net.minecraft.client.gui.screen.Screen; import net.minecraft.client.gui.screen.Screen;
import net.minecraft.client.resources.I18n;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.util.text.ITextComponent; import net.minecraft.util.text.ITextComponent;
import net.minecraft.util.text.TranslationTextComponent; import net.minecraft.util.text.TranslationTextComponent;

View File

@@ -4,7 +4,6 @@ import com.refinedmods.refinedstorage.RS;
import com.refinedmods.refinedstorage.container.AmountContainer; import com.refinedmods.refinedstorage.container.AmountContainer;
import com.refinedmods.refinedstorage.network.SetFilterSlotMessage; import com.refinedmods.refinedstorage.network.SetFilterSlotMessage;
import net.minecraft.client.gui.screen.Screen; import net.minecraft.client.gui.screen.Screen;
import net.minecraft.client.resources.I18n;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.util.text.ITextComponent; import net.minecraft.util.text.ITextComponent;

View File

@@ -2,7 +2,6 @@ package com.refinedmods.refinedstorage.screen;
import com.refinedmods.refinedstorage.tile.data.TileDataManager; import com.refinedmods.refinedstorage.tile.data.TileDataManager;
import com.refinedmods.refinedstorage.tile.data.TileDataParameter; import com.refinedmods.refinedstorage.tile.data.TileDataParameter;
import net.minecraft.client.resources.I18n;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.PlayerInventory; import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.inventory.container.Container; import net.minecraft.inventory.container.Container;

View File

@@ -14,7 +14,6 @@ import com.refinedmods.refinedstorage.tile.grid.GridTile;
import com.refinedmods.refinedstorage.util.RenderUtils; import com.refinedmods.refinedstorage.util.RenderUtils;
import net.minecraft.client.gui.screen.Screen; import net.minecraft.client.gui.screen.Screen;
import net.minecraft.client.gui.widget.button.Button; import net.minecraft.client.gui.widget.button.Button;
import net.minecraft.client.resources.I18n;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.fluid.Fluid; import net.minecraft.fluid.Fluid;
import net.minecraft.item.Item; import net.minecraft.item.Item;
@@ -284,7 +283,7 @@ public class AlternativesScreen extends BaseScreen<AlternativesContainer> {
@Override @Override
public void render(MatrixStack matrixStack, int x, int y) { public void render(MatrixStack matrixStack, int x, int y) {
RenderSystem.color4f(1,1,1,1); RenderSystem.color4f(1, 1, 1, 1);
renderItem(matrixStack, x + 3, y + 2, item); renderItem(matrixStack, x + 3, y + 2, item);
renderString(matrixStack, x + 4 + 19, y + 7, item.getDisplayName().getString()); renderString(matrixStack, x + 4 + 19, y + 7, item.getDisplayName().getString());
} }

View File

@@ -117,8 +117,8 @@ public class CraftingPreviewScreen extends BaseScreen<Container> {
float scale = Minecraft.getInstance().getForceUnicodeFont() ? 1F : 0.5F; float scale = Minecraft.getInstance().getForceUnicodeFont() ? 1F : 0.5F;
if (getErrorType() != null) { if (getErrorType() != null) {
RenderSystem.pushMatrix(); matrixStack.push();
RenderSystem.scalef(scale, scale, 1); matrixStack.scale(scale, scale, 1);
renderString(matrixStack, RenderUtils.getOffsetOnScale(x + 5, scale), RenderUtils.getOffsetOnScale(y + 11, scale), I18n.format("gui.refinedstorage.crafting_preview.error")); renderString(matrixStack, RenderUtils.getOffsetOnScale(x + 5, scale), RenderUtils.getOffsetOnScale(y + 11, scale), I18n.format("gui.refinedstorage.crafting_preview.error"));
@@ -136,10 +136,10 @@ public class CraftingPreviewScreen extends BaseScreen<Container> {
int yy = 83; int yy = 83;
for (ItemStack output : pattern.getOutputs()) { for (ItemStack output : pattern.getOutputs()) {
if (output != null) { if (output != null) {
RenderSystem.pushMatrix(); matrixStack.push();
RenderSystem.scalef(scale, scale, 1); matrixStack.scale(scale, scale, 1);
renderString(matrixStack, RenderUtils.getOffsetOnScale(x + 25, scale), RenderUtils.getOffsetOnScale(yy + 6, scale), output.getDisplayName().getString()); renderString(matrixStack, RenderUtils.getOffsetOnScale(x + 25, scale), RenderUtils.getOffsetOnScale(yy + 6, scale), output.getDisplayName().getString());
RenderSystem.popMatrix(); matrixStack.pop();
RenderHelper.setupGui3DDiffuseLighting(); RenderHelper.setupGui3DDiffuseLighting();
RenderSystem.enableDepthTest(); RenderSystem.enableDepthTest();
@@ -160,7 +160,7 @@ public class CraftingPreviewScreen extends BaseScreen<Container> {
} }
} }
RenderSystem.popMatrix(); matrixStack.pop();
} else { } else {
int slot = scrollbar != null ? (scrollbar.getOffset() * 3) : 0; int slot = scrollbar != null ? (scrollbar.getOffset() * 3) : 0;

View File

@@ -7,7 +7,6 @@ import com.refinedmods.refinedstorage.screen.AmountSpecifyingScreen;
import com.refinedmods.refinedstorage.screen.BaseScreen; import com.refinedmods.refinedstorage.screen.BaseScreen;
import com.refinedmods.refinedstorage.screen.grid.stack.FluidGridStack; import com.refinedmods.refinedstorage.screen.grid.stack.FluidGridStack;
import com.refinedmods.refinedstorage.screen.grid.stack.IGridStack; import com.refinedmods.refinedstorage.screen.grid.stack.IGridStack;
import net.minecraft.client.resources.I18n;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.util.text.ITextComponent; import net.minecraft.util.text.ITextComponent;
import net.minecraft.util.text.TranslationTextComponent; import net.minecraft.util.text.TranslationTextComponent;

View File

@@ -372,13 +372,13 @@ public class GridScreen extends BaseScreen<GridContainer> implements IScreenInfo
if (RenderUtils.inBounds(x, y, 16, 16, mouseX, mouseY) || !grid.isGridActive()) { if (RenderUtils.inBounds(x, y, 16, 16, mouseX, mouseY) || !grid.isGridActive()) {
int color = grid.isGridActive() ? -2130706433 : 0xFF5B5B5B; int color = grid.isGridActive() ? -2130706433 : 0xFF5B5B5B;
RenderSystem.pushMatrix(); matrixStack.push();
RenderSystem.disableLighting(); RenderSystem.disableLighting();
RenderSystem.disableDepthTest(); RenderSystem.disableDepthTest();
RenderSystem.colorMask(true, true, true, false); RenderSystem.colorMask(true, true, true, false);
fillGradient(matrixStack, x, y, x + 16, y + 16, color, color); fillGradient(matrixStack, x, y, x + 16, y + 16, color, color);
RenderSystem.colorMask(true, true, true, true); RenderSystem.colorMask(true, true, true, true);
RenderSystem.popMatrix(); matrixStack.pop();
} }
slot++; slot++;

View File

@@ -7,7 +7,6 @@ import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.FontRenderer; import net.minecraft.client.gui.FontRenderer;
import net.minecraft.client.gui.widget.button.CheckboxButton; import net.minecraft.client.gui.widget.button.CheckboxButton;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.text.ITextComponent; import net.minecraft.util.text.ITextComponent;
import java.util.function.Consumer; import java.util.function.Consumer;

View File

@@ -8,8 +8,6 @@ import net.minecraft.network.play.server.SUpdateTileEntityPacket;
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntity;
import net.minecraft.tileentity.TileEntityType; import net.minecraft.tileentity.TileEntityType;
import javax.annotation.Nullable;
public abstract class BaseTile extends TileEntity { public abstract class BaseTile extends TileEntity {
protected final TileDataManager dataManager = new TileDataManager(this); protected final TileDataManager dataManager = new TileDataManager(this);

View File

@@ -21,7 +21,7 @@ public class ConstructorTile extends NetworkNodeTile<ConstructorNetworkNode> {
public ConstructorTile() { public ConstructorTile() {
super(RSTiles.CONSTRUCTOR); super(RSTiles.CONSTRUCTOR);
dataManager.addWatchedParameter(COMPARE); dataManager.addWatchedParameter(COMPARE);
dataManager.addWatchedParameter(TYPE); dataManager.addWatchedParameter(TYPE);
dataManager.addWatchedParameter(DROP); dataManager.addWatchedParameter(DROP);

View File

@@ -23,7 +23,7 @@ public class DestructorTile extends NetworkNodeTile<DestructorNetworkNode> {
public DestructorTile() { public DestructorTile() {
super(RSTiles.DESTRUCTOR); super(RSTiles.DESTRUCTOR);
dataManager.addWatchedParameter(COMPARE); dataManager.addWatchedParameter(COMPARE);
dataManager.addWatchedParameter(WHITELIST_BLACKLIST); dataManager.addWatchedParameter(WHITELIST_BLACKLIST);
dataManager.addWatchedParameter(TYPE); dataManager.addWatchedParameter(TYPE);

View File

@@ -16,7 +16,7 @@ public class ExporterTile extends NetworkNodeTile<ExporterNetworkNode> {
public ExporterTile() { public ExporterTile() {
super(RSTiles.EXPORTER); super(RSTiles.EXPORTER);
dataManager.addWatchedParameter(COMPARE); dataManager.addWatchedParameter(COMPARE);
dataManager.addWatchedParameter(TYPE); dataManager.addWatchedParameter(TYPE);
} }

View File

@@ -49,7 +49,7 @@ public class ExternalStorageTile extends NetworkNodeTile<ExternalStorageNetworkN
public ExternalStorageTile() { public ExternalStorageTile() {
super(RSTiles.EXTERNAL_STORAGE); super(RSTiles.EXTERNAL_STORAGE);
dataManager.addWatchedParameter(PRIORITY); dataManager.addWatchedParameter(PRIORITY);
dataManager.addWatchedParameter(COMPARE); dataManager.addWatchedParameter(COMPARE);
dataManager.addWatchedParameter(WHITELIST_BLACKLIST); dataManager.addWatchedParameter(WHITELIST_BLACKLIST);

View File

@@ -18,7 +18,7 @@ public class ImporterTile extends NetworkNodeTile<ImporterNetworkNode> {
public ImporterTile() { public ImporterTile() {
super(RSTiles.IMPORTER); super(RSTiles.IMPORTER);
dataManager.addWatchedParameter(COMPARE); dataManager.addWatchedParameter(COMPARE);
dataManager.addWatchedParameter(WHITELIST_BLACKLIST); dataManager.addWatchedParameter(WHITELIST_BLACKLIST);
dataManager.addWatchedParameter(TYPE); dataManager.addWatchedParameter(TYPE);

View File

@@ -28,7 +28,7 @@ public class StorageTile extends NetworkNodeTile<StorageNetworkNode> {
super(StorageBlockUtils.getTileEntityType(type)); super(StorageBlockUtils.getTileEntityType(type));
this.type = type; this.type = type;
dataManager.addWatchedParameter(PRIORITY); dataManager.addWatchedParameter(PRIORITY);
dataManager.addWatchedParameter(COMPARE); dataManager.addWatchedParameter(COMPARE);
dataManager.addWatchedParameter(WHITELIST_BLACKLIST); dataManager.addWatchedParameter(WHITELIST_BLACKLIST);

View File

@@ -14,7 +14,7 @@ public class WirelessTransmitterTile extends NetworkNodeTile<WirelessTransmitter
public WirelessTransmitterTile() { public WirelessTransmitterTile() {
super(RSTiles.WIRELESS_TRANSMITTER); super(RSTiles.WIRELESS_TRANSMITTER);
dataManager.addWatchedParameter(RANGE); dataManager.addWatchedParameter(RANGE);
} }

View File

@@ -4,8 +4,6 @@ import com.refinedmods.refinedstorage.tile.data.TileDataParameter;
import net.minecraft.nbt.CompoundNBT; import net.minecraft.nbt.CompoundNBT;
import net.minecraft.network.datasync.DataSerializers; import net.minecraft.network.datasync.DataSerializers;
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
public enum RedstoneMode { public enum RedstoneMode {
IGNORE, HIGH, LOW; IGNORE, HIGH, LOW;

View File

@@ -12,7 +12,6 @@ import net.minecraft.client.renderer.IRenderTypeBuffer;
import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.util.ITooltipFlag; import net.minecraft.client.util.ITooltipFlag;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.util.IReorderingProcessor;
import net.minecraft.util.math.vector.Matrix4f; import net.minecraft.util.math.vector.Matrix4f;
import net.minecraft.util.text.*; import net.minecraft.util.text.*;
import net.minecraftforge.client.event.RenderTooltipEvent; import net.minecraftforge.client.event.RenderTooltipEvent;
@@ -119,7 +118,7 @@ public final class RenderUtils {
RenderSystem.disableDepthTest(); RenderSystem.disableDepthTest();
int tooltipTextWidth = 0; int tooltipTextWidth = 0;
for (ITextProperties textLine : textLines) { for (ITextProperties textLine : textLines) {
int textLineWidth = font.getStringWidth(textLine.getString()); int textLineWidth = font.getStringWidth(textLine.getString());
if (textLineWidth > tooltipTextWidth) if (textLineWidth > tooltipTextWidth)
tooltipTextWidth = textLineWidth; tooltipTextWidth = textLineWidth;
@@ -162,8 +161,8 @@ public final class RenderUtils {
int wrappedTooltipWidth = 0; int wrappedTooltipWidth = 0;
List<ITextProperties> wrappedTextLines = new ArrayList<>(); List<ITextProperties> wrappedTextLines = new ArrayList<>();
for (int i = 0; i < textLines.size(); i++) { for (int i = 0; i < textLines.size(); i++) {
ITextProperties textLine = textLines.get(i); ITextProperties textLine = textLines.get(i);
List<ITextProperties> wrappedLine = font.func_238420_b_().func_238362_b_(textLine, tooltipTextWidth, Style.EMPTY); List<ITextProperties> wrappedLine = font.func_238420_b_().func_238362_b_(textLine, tooltipTextWidth, Style.EMPTY);
if (i == 0) if (i == 0)
titleLinesCount = wrappedLine.size(); titleLinesCount = wrappedLine.size();

View File

@@ -24,38 +24,35 @@ public class TemporaryPortingUtils {
@Nonnull @Nonnull
private static ItemStack cachedTooltipStack = ItemStack.EMPTY; private static ItemStack cachedTooltipStack = ItemStack.EMPTY;
public static void drawHoveringText(MatrixStack mStack, List<? extends ITextProperties> textLines, int mouseX, int mouseY, int screenWidth, int screenHeight, int maxTextWidth, FontRenderer font) public static void drawHoveringText(MatrixStack mStack, List<? extends ITextProperties> textLines, int mouseX, int mouseY, int screenWidth, int screenHeight, int maxTextWidth, FontRenderer font) {
{
drawHoveringText(mStack, textLines, mouseX, mouseY, screenWidth, screenHeight, maxTextWidth, GuiUtils.DEFAULT_BACKGROUND_COLOR, GuiUtils.DEFAULT_BORDER_COLOR_START, GuiUtils.DEFAULT_BORDER_COLOR_END, font); drawHoveringText(mStack, textLines, mouseX, mouseY, screenWidth, screenHeight, maxTextWidth, GuiUtils.DEFAULT_BACKGROUND_COLOR, GuiUtils.DEFAULT_BORDER_COLOR_START, GuiUtils.DEFAULT_BORDER_COLOR_END, font);
} }
/** /**
* Draws a tooltip box on the screen with text in it. * Draws a tooltip box on the screen with text in it.
* Automatically positions the box relative to the mouse to match Mojang's implementation. * Automatically positions the box relative to the mouse to match Mojang's implementation.
* Automatically wraps text when there is not enough space on the screen to display the text without wrapping. * Automatically wraps text when there is not enough space on the screen to display the text without wrapping.
* Can have a maximum width set to avoid creating very wide tooltips. * Can have a maximum width set to avoid creating very wide tooltips.
* *
* @param textLines the lines of text to be drawn in a hovering tooltip box. * @param textLines the lines of text to be drawn in a hovering tooltip box.
* @param mouseX the mouse X position * @param mouseX the mouse X position
* @param mouseY the mouse Y position * @param mouseY the mouse Y position
* @param screenWidth the available screen width for the tooltip to drawn in * @param screenWidth the available screen width for the tooltip to drawn in
* @param screenHeight the available screen height for the tooltip to drawn in * @param screenHeight the available screen height for the tooltip to drawn in
* @param maxTextWidth the maximum width of the text in the tooltip box. * @param maxTextWidth the maximum width of the text in the tooltip box.
* Set to a negative number to have no max width. * Set to a negative number to have no max width.
* @param backgroundColor The background color of the box * @param backgroundColor The background color of the box
* @param borderColorStart The starting color of the box border * @param borderColorStart The starting color of the box border
* @param borderColorEnd The ending color of the box border. The border color will be smoothly interpolated * @param borderColorEnd The ending color of the box border. The border color will be smoothly interpolated
* between the start and end values. * between the start and end values.
* @param font the font for drawing the text in the tooltip box * @param font the font for drawing the text in the tooltip box
*/ */
public static void drawHoveringText(MatrixStack mStack, List<? extends ITextProperties> textLines, int mouseX, int mouseY, int screenWidth, int screenHeight, public static void drawHoveringText(MatrixStack mStack, List<? extends ITextProperties> textLines, int mouseX, int mouseY, int screenWidth, int screenHeight,
int maxTextWidth, int backgroundColor, int borderColorStart, int borderColorEnd, FontRenderer font) int maxTextWidth, int backgroundColor, int borderColorStart, int borderColorEnd, FontRenderer font) {
{
drawHoveringText(cachedTooltipStack, mStack, textLines, mouseX, mouseY, screenWidth, screenHeight, maxTextWidth, backgroundColor, borderColorStart, borderColorEnd, font); drawHoveringText(cachedTooltipStack, mStack, textLines, mouseX, mouseY, screenWidth, screenHeight, maxTextWidth, backgroundColor, borderColorStart, borderColorEnd, font);
} }
public static void drawHoveringText(@Nonnull final ItemStack stack, MatrixStack mStack, List<? extends ITextProperties> textLines, int mouseX, int mouseY, int screenWidth, int screenHeight, int maxTextWidth, FontRenderer font) public static void drawHoveringText(@Nonnull final ItemStack stack, MatrixStack mStack, List<? extends ITextProperties> textLines, int mouseX, int mouseY, int screenWidth, int screenHeight, int maxTextWidth, FontRenderer font) {
{
drawHoveringText(stack, mStack, textLines, mouseX, mouseY, screenWidth, screenHeight, maxTextWidth, GuiUtils.DEFAULT_BACKGROUND_COLOR, GuiUtils.DEFAULT_BORDER_COLOR_START, GuiUtils.DEFAULT_BORDER_COLOR_END, font); drawHoveringText(stack, mStack, textLines, mouseX, mouseY, screenWidth, screenHeight, maxTextWidth, GuiUtils.DEFAULT_BACKGROUND_COLOR, GuiUtils.DEFAULT_BORDER_COLOR_START, GuiUtils.DEFAULT_BORDER_COLOR_END, font);
} }
@@ -66,10 +63,8 @@ public class TemporaryPortingUtils {
*/ */
public static void drawHoveringText(@Nonnull final ItemStack stack, MatrixStack mStack, List<? extends ITextProperties> textLines, int mouseX, int mouseY, public static void drawHoveringText(@Nonnull final ItemStack stack, MatrixStack mStack, List<? extends ITextProperties> textLines, int mouseX, int mouseY,
int screenWidth, int screenHeight, int maxTextWidth, int screenWidth, int screenHeight, int maxTextWidth,
int backgroundColor, int borderColorStart, int borderColorEnd, FontRenderer font) int backgroundColor, int borderColorStart, int borderColorEnd, FontRenderer font) {
{ if (!textLines.isEmpty()) {
if (!textLines.isEmpty())
{
RenderTooltipEvent.Pre event = new RenderTooltipEvent.Pre(stack, textLines, mStack, mouseX, mouseY, screenWidth, screenHeight, maxTextWidth, font); RenderTooltipEvent.Pre event = new RenderTooltipEvent.Pre(stack, textLines, mStack, mouseX, mouseY, screenWidth, screenHeight, maxTextWidth, font);
if (MinecraftForge.EVENT_BUS.post(event)) if (MinecraftForge.EVENT_BUS.post(event))
return; return;
@@ -84,8 +79,7 @@ public class TemporaryPortingUtils {
RenderSystem.disableDepthTest(); RenderSystem.disableDepthTest();
int tooltipTextWidth = 0; int tooltipTextWidth = 0;
for (ITextProperties textLine : textLines) for (ITextProperties textLine : textLines) {
{
int textLineWidth = font.func_238414_a_(textLine); int textLineWidth = font.func_238414_a_(textLine);
if (textLineWidth > tooltipTextWidth) if (textLineWidth > tooltipTextWidth)
tooltipTextWidth = textLineWidth; tooltipTextWidth = textLineWidth;
@@ -95,8 +89,7 @@ public class TemporaryPortingUtils {
int titleLinesCount = 1; int titleLinesCount = 1;
int tooltipX = mouseX + 12; int tooltipX = mouseX + 12;
if (tooltipX + tooltipTextWidth + 4 > screenWidth) if (tooltipX + tooltipTextWidth + 4 > screenWidth) {
{
tooltipX = mouseX - 16 - tooltipTextWidth; tooltipX = mouseX - 16 - tooltipTextWidth;
if (tooltipX < 4) // if the tooltip doesn't fit on the screen if (tooltipX < 4) // if the tooltip doesn't fit on the screen
{ {
@@ -108,25 +101,21 @@ public class TemporaryPortingUtils {
} }
} }
if (maxTextWidth > 0 && tooltipTextWidth > maxTextWidth) if (maxTextWidth > 0 && tooltipTextWidth > maxTextWidth) {
{
tooltipTextWidth = maxTextWidth; tooltipTextWidth = maxTextWidth;
needsWrap = true; needsWrap = true;
} }
if (needsWrap) if (needsWrap) {
{
int wrappedTooltipWidth = 0; int wrappedTooltipWidth = 0;
List<ITextProperties> wrappedTextLines = new ArrayList<>(); List<ITextProperties> wrappedTextLines = new ArrayList<>();
for (int i = 0; i < textLines.size(); i++) for (int i = 0; i < textLines.size(); i++) {
{
ITextProperties textLine = textLines.get(i); ITextProperties textLine = textLines.get(i);
List<ITextProperties> wrappedLine = font.func_238420_b_().func_238362_b_(textLine, tooltipTextWidth, Style.EMPTY); List<ITextProperties> wrappedLine = font.func_238420_b_().func_238362_b_(textLine, tooltipTextWidth, Style.EMPTY);
if (i == 0) if (i == 0)
titleLinesCount = wrappedLine.size(); titleLinesCount = wrappedLine.size();
for (ITextProperties line : wrappedLine) for (ITextProperties line : wrappedLine) {
{
int lineWidth = font.func_238414_a_(line); int lineWidth = font.func_238414_a_(line);
if (lineWidth > wrappedTooltipWidth) if (lineWidth > wrappedTooltipWidth)
wrappedTooltipWidth = lineWidth; wrappedTooltipWidth = lineWidth;
@@ -145,8 +134,7 @@ public class TemporaryPortingUtils {
int tooltipY = mouseY - 12; int tooltipY = mouseY - 12;
int tooltipHeight = 8; int tooltipHeight = 8;
if (textLines.size() > 1) if (textLines.size() > 1) {
{
tooltipHeight += (textLines.size() - 1) * 10; tooltipHeight += (textLines.size() - 1) * 10;
if (textLines.size() > titleLinesCount) if (textLines.size() > titleLinesCount)
tooltipHeight += 2; // gap between title lines and next lines tooltipHeight += 2; // gap between title lines and next lines
@@ -184,11 +172,10 @@ public class TemporaryPortingUtils {
int tooltipTop = tooltipY; int tooltipTop = tooltipY;
for (int lineNumber = 0; lineNumber < textLines.size(); ++lineNumber) for (int lineNumber = 0; lineNumber < textLines.size(); ++lineNumber) {
{
ITextProperties line = textLines.get(lineNumber); ITextProperties line = textLines.get(lineNumber);
if (line != null) if (line != null)
font.func_238416_a_(LanguageMap.getInstance().func_241870_a(line), (float)tooltipX, (float)tooltipY, -1, true, mat, renderType, false, 0, 15728880); font.func_238416_a_(LanguageMap.getInstance().func_241870_a(line), (float) tooltipX, (float) tooltipY, -1, true, mat, renderType, false, 0, 15728880);
if (lineNumber + 1 == titleLinesCount) if (lineNumber + 1 == titleLinesCount)
tooltipY += 2; tooltipY += 2;