This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class FontOffsetUtil { | |
private static final char MINUS_START = '\uF800'; | |
private static final char PLUS_START = '\uF820'; | |
private static final char MINUS_POW_START = '\uF808'; | |
private static final char PLUS_POW_START = '\uF828'; | |
public static String getOffset(int offset) { | |
//If no offset, return empty string |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void one() { | |
EntityBuilder builder = Entity.builder(); | |
builder.makeTrait(EntityTraits.HEALTH, 20); // Stores data | |
builder.makeTrait(EntityTraits.ENTITY_TYPE, EntityType.ZOMBIE); // Implements create, destroy, meta functions | |
Entity entity = builder.build(); | |
// Damage the entity with a method specific to EntityTraits.HEALTH | |
EntityTraits.HEALTH.damage(entity, 5); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class PlayerInput { | |
private static final HashMap<UUID, Consumer<?>> callbackMap = new HashMap<>(); | |
private static final Set<Class<?>> ignoredClasses = Sets.newHashSet( | |
ClientAnimationPacket.class, | |
ClientPongPacket.class, | |
ClientPlayerPositionPacket.class, | |
ClientPlayerRotationPacket.class, | |
ClientPlayerPositionAndRotationPacket.class, | |
ClientKeepAlivePacket.class |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/python3 | |
from PIL import Image | |
import math, base64 | |
i = Image.open("lcch.png") | |
pixels = i.load() | |
width, height = i.size |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import net.minestom.server.entity.PlayerSkin; | |
public class PlayerSkins { | |
public static final PlayerSkin DEFAULT_SKIN_AQUA = new PlayerSkin( | |
"ewogICJ0aW1lc3RhbXAiIDogMTYxMTQyNjc0OTk1NiwKICAicHJvZmlsZUlkIiA6ICIzZmM3ZmRmOTM5NjM0YzQxOTExOTliYTNmN2NjM2ZlZCIsCiAgInByb2ZpbGVOYW1lIiA6ICJZZWxlaGEiLAogICJzaWduYXR1cmVSZXF1aXJlZCIgOiB0cnVlLAogICJ0ZXh0dXJlcyIgOiB7CiAgICAiU0tJTiIgOiB7CiAgICAgICJ1cmwiIDogImh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYWE1Njk5ZDJmMmEwOTgyMWIwMGM0Mzc5MTIxNWJhNGZjMGQxNTEzYTgxNTRkNTcwNjllZmRjNjRlMWRkNjJmIgogICAgfQogIH0KfQ==", | |
"wzECNGF+15FK5ZtJo5USp9xIbUIUD5VXxh8QEupGiH5AzTxFl2gwZHrDIuahwUrQPd8FdMKl69PkoqtzX6OlFsx8qP8Xn27dAKURFrhKEiNQJDQAXtlW4Ce9umu8/uDLFhDBw5cqGe2kPdeWaBHoYUOXWRwN2DMaZ/e7JNs3thQUqauLCr8qzKVMYgz23+ezPuc1ZEUS9qWf2NN4ERj5Nw7h5kzVa66eNZywbPXTA2YLYp98Wps0DodijDxNEHLwbKi7RljJWlMJsldX27XeZ67pWhEr/GNE3IpyZ4pTMg3UgOQUzicQedCX705O3+njDn/aoR4Sbv4/fhjnAxkCVPHSY2L/asuoZ04eGrUDmxnBj/Uuk24KZzDGiLVfLkOAgGRO56IdI/bTu4GGM41zlvXSN2XyhJW+4R3VwdgfGaM9au3PL6VgCwmZzQT |