mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-15 02:15:34 -04:00
remove some java warnings
This commit is contained in:
parent
4e2e1adbeb
commit
bdee1ea852
@ -45,6 +45,7 @@ import de.bixilon.minosoft.data.entities.entities.vehicle.*
|
||||
import de.bixilon.minosoft.data.mappings.ModIdentifier
|
||||
|
||||
object EntityClassMappings {
|
||||
@SuppressWarnings("deprecation")
|
||||
private val ENTITY_CLASS_MAPPINGS: HashBiMap<Class<out Entity>, ModIdentifier> = HashBiMap.create(
|
||||
mapOf(
|
||||
AreaEffectCloud::class.java to ModIdentifier("area_effect_cloud"),
|
||||
|
@ -32,6 +32,7 @@ import static de.bixilon.minosoft.protocol.protocol.ProtocolVersions.V_1_8_9;
|
||||
|
||||
public class VersionTweaker {
|
||||
// some data was packed in mata data in early versions (1.8). This function converts it to the real identifier
|
||||
@SuppressWarnings("deprecation")
|
||||
public static Class<? extends Entity> getRealEntityClass(Class<? extends Entity> fakeClass, EntityMetaData metaData, int versionId) {
|
||||
if (fakeClass == ZombiePigman.class) {
|
||||
return ZombifiedPiglin.class;
|
||||
|
@ -96,7 +96,7 @@ class ChunkRenderer(private val connection: Connection, private val world: World
|
||||
|
||||
for ((_, map) in chunkSectionsToDraw) {
|
||||
for ((_, mesh) in map) {
|
||||
mesh.draw(chunkShader)
|
||||
mesh.draw()
|
||||
}
|
||||
}
|
||||
glDisable(GL_CULL_FACE)
|
||||
|
@ -1,6 +1,5 @@
|
||||
package de.bixilon.minosoft.gui.rendering.chunk
|
||||
|
||||
import de.bixilon.minosoft.gui.rendering.shader.Shader
|
||||
import glm_.BYTES
|
||||
import org.lwjgl.opengl.GL11.GL_FLOAT
|
||||
import org.lwjgl.opengl.GL20.glEnableVertexAttribArray
|
||||
@ -28,7 +27,7 @@ class WorldMesh(data: FloatArray) {
|
||||
glBindBuffer(GL_ARRAY_BUFFER, 0)
|
||||
}
|
||||
|
||||
fun draw(chunkShader: Shader) {
|
||||
fun draw() {
|
||||
glBindVertexArray(vAO)
|
||||
glDrawArrays(GL_TRIANGLES, 0, trianglesCount)
|
||||
}
|
||||
|
@ -77,7 +77,7 @@ class PacketJoinGame : ClientboundPacket() {
|
||||
buffer.readByte() // previous game mode
|
||||
}
|
||||
if (buffer.versionId >= ProtocolVersions.V_20W22A) {
|
||||
val worlds = buffer.readStringArray()
|
||||
buffer.readStringArray() // world
|
||||
}
|
||||
if (buffer.versionId < ProtocolVersions.V_20W21A) {
|
||||
dimension = buffer.connection.mapping.getDimension(buffer.readInt())!!
|
||||
|
Loading…
x
Reference in New Issue
Block a user