mirror of
https://github.com/GeyserExtensionists/GeyserUtils.git
synced 2025-12-19 14:59:18 +00:00
errr
This commit is contained in:
@@ -1,7 +1,9 @@
|
|||||||
package me.zimzaza4.geyserutils.geyser;
|
package me.zimzaza4.geyserutils.geyser;
|
||||||
|
|
||||||
|
import com.github.steveice10.mc.protocol.data.game.entity.type.EntityType;
|
||||||
import com.github.steveice10.mc.protocol.packet.common.clientbound.ClientboundCustomPayloadPacket;
|
import com.github.steveice10.mc.protocol.packet.common.clientbound.ClientboundCustomPayloadPacket;
|
||||||
import com.github.steveice10.mc.protocol.packet.common.serverbound.ServerboundCustomPayloadPacket;
|
import com.github.steveice10.mc.protocol.packet.common.serverbound.ServerboundCustomPayloadPacket;
|
||||||
|
import com.github.steveice10.mc.protocol.packet.ingame.clientbound.entity.spawn.ClientboundAddEntityPacket;
|
||||||
import com.github.steveice10.packetlib.Session;
|
import com.github.steveice10.packetlib.Session;
|
||||||
import com.github.steveice10.packetlib.event.session.SessionAdapter;
|
import com.github.steveice10.packetlib.event.session.SessionAdapter;
|
||||||
import com.github.steveice10.packetlib.packet.Packet;
|
import com.github.steveice10.packetlib.packet.Packet;
|
||||||
@@ -76,8 +78,17 @@ public class GeyserUtils implements Extension {
|
|||||||
}
|
}
|
||||||
for (File file : folder.listFiles()) {
|
for (File file : folder.listFiles()) {
|
||||||
if (file.isDirectory()) {
|
if (file.isDirectory()) {
|
||||||
File textureFile = new File(file, "texture.png");
|
File textureFile = null;
|
||||||
File geometryFile = new File(file, "geometry.json");
|
File geometryFile = null;
|
||||||
|
|
||||||
|
for (File folderFile : file.listFiles()) {
|
||||||
|
if (folderFile.getName().endsWith(".png")) {
|
||||||
|
textureFile = folderFile;
|
||||||
|
}
|
||||||
|
if (folderFile.getName().endsWith(".json")) {
|
||||||
|
geometryFile = folderFile;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
SkinProvider.Skin skin = new SkinProvider.Skin(null, file.getName(), Files.readAllBytes(textureFile.toPath()), -1, false, false);
|
SkinProvider.Skin skin = new SkinProvider.Skin(null, file.getName(), Files.readAllBytes(textureFile.toPath()), -1, false, false);
|
||||||
@@ -200,6 +211,7 @@ public class GeyserUtils implements Extension {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -255,6 +267,7 @@ public class GeyserUtils implements Extension {
|
|||||||
entry.setPlatformChatId("");
|
entry.setPlatformChatId("");
|
||||||
entry.setTeacher(false);
|
entry.setTeacher(false);
|
||||||
entry.setTrustedSkin(true);
|
entry.setTrustedSkin(true);
|
||||||
|
|
||||||
return entry;
|
return entry;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user