Removing Warnings since it's deprecated code anyways
This commit is contained in:
parent
30e63d79a2
commit
91c4d15313
|
@ -330,11 +330,13 @@ public abstract class GuiBase
|
||||||
return baseLayer;
|
return baseLayer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
public <T extends GuiBase> T cast()
|
public <T extends GuiBase> T cast()
|
||||||
{
|
{
|
||||||
return (T)this;
|
return (T)this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
public <T extends GuiBase> T cast(Class<? extends T> clz)
|
public <T extends GuiBase> T cast(Class<? extends T> clz)
|
||||||
{
|
{
|
||||||
return (T)this;
|
return (T)this;
|
||||||
|
|
|
@ -479,7 +479,7 @@ public class GuiScreenBase extends GuiBase
|
||||||
@Override
|
@Override
|
||||||
public boolean isComponentFocused(GuiComponent comp)
|
public boolean isComponentFocused(GuiComponent comp)
|
||||||
{
|
{
|
||||||
return hasFocus() && buttonOrder.size() > 0 && ((buttonOrder.size() == 1 && buttonOrder.containsKey(comp)) || buttonOrder.firstKey() == comp);
|
return hasFocus() && buttonOrder.size() > 0 && ((buttonOrder.size() == 1 && buttonOrder.containsKey((IButtonComponent)comp)) || buttonOrder.firstKey() == comp);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -215,6 +215,7 @@ public class TreeComponent<T extends ITreeEntry> extends GuiComponent implements
|
||||||
return node;
|
return node;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
public void onTreeChanged()
|
public void onTreeChanged()
|
||||||
{
|
{
|
||||||
listChange = true;
|
listChange = true;
|
||||||
|
@ -664,6 +665,7 @@ public class TreeComponent<T extends ITreeEntry> extends GuiComponent implements
|
||||||
return MathUtils.clamp(0, visibleNodes.size(), MathUtils.ceil((getBox().getBaseHeight() - (horizontalBar.getRequiredSpace() / getBox().getScale())) / entryHeight) + 1);
|
return MathUtils.clamp(0, visibleNodes.size(), MathUtils.ceil((getBox().getBaseHeight() - (horizontalBar.getRequiredSpace() / getBox().getScale())) / entryHeight) + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
protected void getNodes(T entry, Collection<T> collection, boolean openOnly, int layers)
|
protected void getNodes(T entry, Collection<T> collection, boolean openOnly, int layers)
|
||||||
{
|
{
|
||||||
if(entry != null && layers >= 0)
|
if(entry != null && layers >= 0)
|
||||||
|
@ -680,6 +682,7 @@ public class TreeComponent<T extends ITreeEntry> extends GuiComponent implements
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
protected void getNodes(T entry, Collection<T> collection, boolean openOnly)
|
protected void getNodes(T entry, Collection<T> collection, boolean openOnly)
|
||||||
{
|
{
|
||||||
if(entry != null)
|
if(entry != null)
|
||||||
|
|
|
@ -28,9 +28,9 @@ public class RenderBuffer implements Consumer<GuiComponent>, Iterable<DrawCall>
|
||||||
clear();
|
clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
public <T extends DrawCall> T get(int index, Class<T> clz)
|
public DrawCall get(int index)
|
||||||
{
|
{
|
||||||
return (T)drawCalls.get(index);
|
return drawCalls.get(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addDrawCall(DrawCall call)
|
public void addDrawCall(DrawCall call)
|
||||||
|
|
|
@ -130,6 +130,7 @@ public class Line
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
public Iterable<CharInstance> letterIterator()
|
public Iterable<CharInstance> letterIterator()
|
||||||
{
|
{
|
||||||
ObjectIterator<CharInstance>[] arrays = new ObjectIterator[words.size()];
|
ObjectIterator<CharInstance>[] arrays = new ObjectIterator[words.size()];
|
||||||
|
|
|
@ -89,6 +89,7 @@ public class BitmapFontProvider implements IFontProvider
|
||||||
return space * info.tabs;
|
return space * info.tabs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
public static IFontProvider load(JsonObject object, float desiredSize, AssetManager manager)
|
public static IFontProvider load(JsonObject object, float desiredSize, AssetManager manager)
|
||||||
{
|
{
|
||||||
FontInfo info = new FontInfo(object.getAsJsonObject("info"));
|
FontInfo info = new FontInfo(object.getAsJsonObject("info"));
|
||||||
|
@ -104,6 +105,7 @@ public class BitmapFontProvider implements IFontProvider
|
||||||
return new BitmapFontProvider(info, ITexture.simple(AssetLocation.of(object.get("file").getAsString())), maps);
|
return new BitmapFontProvider(info, ITexture.simple(AssetLocation.of(object.get("file").getAsString())), maps);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
public static IFontProvider create(JsonObject object, float desiredSize, AssetManager manager)
|
public static IFontProvider create(JsonObject object, float desiredSize, AssetManager manager)
|
||||||
{
|
{
|
||||||
try(IAsset asset = TextureManager.INSTANCE.getManager().getAsset(AssetLocation.of(object.get("file").getAsString())))
|
try(IAsset asset = TextureManager.INSTANCE.getManager().getAsset(AssetLocation.of(object.get("file").getAsString())))
|
||||||
|
|
|
@ -19,6 +19,7 @@ public abstract class Uniform
|
||||||
return position;
|
return position;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
public <T extends Uniform> T setOptional() {
|
public <T extends Uniform> T setOptional() {
|
||||||
optional = true;
|
optional = true;
|
||||||
return (T)this;
|
return (T)this;
|
||||||
|
|
|
@ -24,6 +24,7 @@ public class UniformArrayBase<T extends Object> extends Uniform {
|
||||||
return positions[index];
|
return positions[index];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
protected boolean hasChanged(int index, T value) {
|
protected boolean hasChanged(int index, T value) {
|
||||||
if (!first[index] || !Objects.equals(lastValues[index], value)) {
|
if (!first[index] || !Objects.equals(lastValues[index], value)) {
|
||||||
first[index] = true;
|
first[index] = true;
|
||||||
|
|
|
@ -198,6 +198,7 @@ public class Tesselator implements IVertexBuilder
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("removal")
|
||||||
public DrawCall getDrawCall(int texture) {
|
public DrawCall getDrawCall(int texture) {
|
||||||
float[] data = new float[currentList.totalOffset() * vertexes];
|
float[] data = new float[currentList.totalOffset() * vertexes];
|
||||||
buffer.get(data);
|
buffer.get(data);
|
||||||
|
|
Loading…
Reference in New Issue