mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-21 12:42:57 +00:00
quick fix : Private field may be 'final'
This commit is contained in:
1 parent
b1c2569992
commit
ae363450b1
42 files changed
+81
-81
No files matched your search
@@ -13,7 +13,7 @@ import org.lwjgl.opengl.*;
|
||||
|
||||
public class CustomBowRenderer implements IItemRenderer {
|
||||
Minecraft mc = Minecraft.getMinecraft();
|
||||
private RenderBlocks renderBlocksInstance = new RenderBlocks();
|
||||
private final RenderBlocks renderBlocksInstance = new RenderBlocks();
|
||||
|
||||
@Override
|
||||
public boolean handleRenderType(ItemStack item, ItemRenderType type) {
|
||||
|
||||
@@ -18,11 +18,11 @@ import org.lwjgl.opengl.GL11;
|
||||
*/
|
||||
public class CustomFont {
|
||||
private int texID;
|
||||
private int[] xPos;
|
||||
private int[] yPos;
|
||||
private int startChar;
|
||||
private int endChar;
|
||||
private FontMetrics metrics;
|
||||
private final int[] xPos;
|
||||
private final int[] yPos;
|
||||
private final int startChar;
|
||||
private final int endChar;
|
||||
private final FontMetrics metrics;
|
||||
|
||||
/**
|
||||
* Instantiates the font, filling in default start and end character
|
||||
|
||||
@@ -13,7 +13,7 @@ import tconstruct.world.TinkerWorld;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class ExplosiveRender extends Render {
|
||||
private RenderBlocks blockRenderer = new RenderBlocks();
|
||||
private final RenderBlocks blockRenderer = new RenderBlocks();
|
||||
|
||||
public ExplosiveRender() {
|
||||
this.shadowSize = 0.5F;
|
||||
|
||||
@@ -19,10 +19,10 @@ import tconstruct.tools.entity.ArrowEntity;
|
||||
public class ArrowRender extends Render {
|
||||
private static final ResourceLocation RES_ITEM_GLINT =
|
||||
new ResourceLocation("textures/misc/enchanted_item_glint.png");
|
||||
private RenderBlocks itemRenderBlocks = new RenderBlocks();
|
||||
private final RenderBlocks itemRenderBlocks = new RenderBlocks();
|
||||
|
||||
/** The RNG used in RenderItem (for bobbing itemstacks on the ground) */
|
||||
private Random random = new Random();
|
||||
private final Random random = new Random();
|
||||
|
||||
public boolean renderWithColor = true;
|
||||
|
||||
|
||||
@@ -15,8 +15,8 @@ import tconstruct.tools.entity.ArrowEntity;
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Deprecated
|
||||
public class ArrowRenderCustom extends Render {
|
||||
private static RenderItem renderer = new RenderItem();
|
||||
private Random random = new Random();
|
||||
private static final RenderItem renderer = new RenderItem();
|
||||
private final Random random = new Random();
|
||||
|
||||
public ArrowRenderCustom() {}
|
||||
|
||||
|
||||
@@ -21,10 +21,10 @@ import tconstruct.tools.entity.DaggerEntity;
|
||||
public class DaggerRender extends Render {
|
||||
private static final ResourceLocation RES_ITEM_GLINT =
|
||||
new ResourceLocation("textures/misc/enchanted_item_glint.png");
|
||||
private RenderBlocks itemRenderBlocks = new RenderBlocks();
|
||||
private final RenderBlocks itemRenderBlocks = new RenderBlocks();
|
||||
|
||||
/** The RNG used in RenderItem (for bobbing itemstacks on the ground) */
|
||||
private Random random = new Random();
|
||||
private final Random random = new Random();
|
||||
|
||||
public boolean renderWithColor = true;
|
||||
|
||||
|
||||
@@ -16,9 +16,9 @@ import tconstruct.tools.entity.DaggerEntity;
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Deprecated
|
||||
public class DaggerRenderCustom extends Render {
|
||||
private static RenderItem renderer = new RenderItem();
|
||||
private static ToolCoreRenderer toolCoreRenderer = new ToolCoreRenderer(true, true);
|
||||
private Random random = new Random();
|
||||
private static final RenderItem renderer = new RenderItem();
|
||||
private static final ToolCoreRenderer toolCoreRenderer = new ToolCoreRenderer(true, true);
|
||||
private final Random random = new Random();
|
||||
|
||||
public DaggerRenderCustom() {
|
||||
this.shadowSize = 0.15F;
|
||||
|
||||
@@ -13,8 +13,8 @@ import tconstruct.tools.entity.LaunchedPotion;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class LaunchedItemRender extends Render {
|
||||
private Item field_94151_a;
|
||||
private int field_94150_f;
|
||||
private final Item field_94151_a;
|
||||
private final int field_94150_f;
|
||||
|
||||
public LaunchedItemRender(Item par1Item, int par2) {
|
||||
this.field_94151_a = par1Item;
|
||||
|
||||
@@ -13,7 +13,7 @@ import net.minecraft.network.play.client.C0DPacketCloseWindow;
|
||||
import net.minecraftforge.client.event.GuiScreenEvent;
|
||||
|
||||
public class TabRegistry {
|
||||
private static ArrayList<AbstractTab> tabList = new ArrayList<>();
|
||||
private static final ArrayList<AbstractTab> tabList = new ArrayList<>();
|
||||
|
||||
public static void registerTab(AbstractTab tab) {
|
||||
tabList.add(tab);
|
||||
@@ -38,7 +38,7 @@ public class TabRegistry {
|
||||
}
|
||||
}
|
||||
|
||||
private static Minecraft mc = FMLClientHandler.instance().getClient();
|
||||
private static final Minecraft mc = FMLClientHandler.instance().getClient();
|
||||
|
||||
public static void openInventoryGui() {
|
||||
mc.thePlayer.sendQueue.addToSendQueue(new C0DPacketCloseWindow(mc.thePlayer.openContainer.windowId));
|
||||
|
||||
Reference in new issue
Block a user