This file contains 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
fun animateParticles(player: Player) { | |
val particleType = Particle.REDSTONE | |
val colors1 = arrayOf( | |
Color.fromRGB(247,202,201), Color.fromRGB(222,194,203), Color.fromRGB(197,185,205), | |
Color.fromRGB(171,177,207), Color.fromRGB(146,168,209) | |
) | |
val radius = 1.0 // radius of the pentagon | |
val period = 80L // time for one full rotation (in ticks) |
This file contains 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
fun drawHeart(player: Player) { | |
val loc = player.location.add(0.0, -1.0, 0.0) | |
val radius = 0.1 | |
val particleType = Particle.REDSTONE | |
val step = Math.PI / 32 | |
for (i in 0..63) { | |
val theta = i * step | |
val x = radius * (16 * sin(theta).pow(3)) | |
val z = radius * (13 * cos(theta) - 5 * cos(2 * theta) - 2 * cos(3 * theta) - cos(4 * theta)) |
This file contains 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
fun drawHeart(player: Player) { | |
val loc = player.location.add(0.0 , 0.5, 0.0) | |
val radius = 0.1 | |
val particleType = Particle.REDSTONE | |
val step = Math.PI / 32 | |
for (i in 0..63) { | |
val theta = i * step | |
val x = radius * (16 * sin(theta).pow(3)) | |
val z = radius * (13 * cos(theta) - 5 * cos(2 * theta) - 2 * cos(3 * theta) - cos(4 * theta)) |
This file contains 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
class ChangeMaxStackSize { | |
private net.minecraft.world.item.ItemStack stack; | |
private Item nmsItem; | |
private ItemStack item; | |
public ChangeMaxStackSize(ItemStack itemStack, int maxStackSize) throws NoSuchFieldException, IllegalAccessException { | |
this.item = itemStack; | |
this.stack = CraftItemStack.asNMSCopy(itemStack); | |
this.nmsItem = stack.o().c(); |