Coder Social home page Coder Social logo

skytasul / glowingentities Goto Github PK

View Code? Open in Web Editor NEW
57.0 57.0 7.0 1.85 MB

An API to easily make Minecraft entities glow. No dependencies, compatible 1.17 -> 1.21.

License: MIT License

Java 100.00%
api bukkit glow glowing java minecraft spigot

glowingentities's Introduction

Hi there ๐Ÿ‘‹

  • ๐Ÿ”ญ Iโ€™m working on a medical robotic research project in Python. I also create Java plugins for Minecraft servers and personal projects in C# and OCaml.
  • ๐ŸŒฑ Iโ€™m currently learning advanced OCaml and C++.
  • ๐Ÿ’ฌ Ask me about Java questions.
  • ๐Ÿ“ซ How to reach me: [email protected], my Discord server.
  • ๐Ÿ˜„ Pronouns: He/him
  • ๐Ÿ“š Studying computer engineering at INSA Rennes, I am responsible for the network team for InsaLan!
  • ๐Ÿ’ป Typst enthusiast!

glowingentities's People

Contributors

aematsubara avatar hsgamer avatar keremyurekli avatar maxxqc avatar skytasul avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

glowingentities's Issues

Glowing not working with Citizens.

Now, I know in a previous issue you said glowing is not really supported due to there already being a built-in glow system. But that glow system cannot do glow for individual players. Could I do it with this library? (Only one I could find)

Use BlockDisplays for glowing blocks (when possible)

Not all items work in BlockDisplays unfortunately, namely banners (maybe you could do some magic with ItemDisplays?), but it would allow much more flexibility for the shape of the glowing entity if a BlockDisplay was used.

image

Set entity's glowing color on existing team

Hi. We'd like to set a entity as glowing with a specific color. Initially, we tried using GlowingEntities#setGlowing, which partially worked and was the right color, but the team created by the library conflicted with the per-player teams we're creating in our own plugin. We then tried passing the team ID into the setGlowing method, which prevented the conflict, but the color was not used for the glowing effect, instead using the existing team's color. Our workaround is to set the color for the team in our plugin, which has the disadvantage of being visible to other players. Is there a better way to accomplish this using your library, or is this the best option given the limitations of the team system?

Let me know if I can elaborate. Thanks.

(cc @Molten57)

Glowing not working

[20:39:47] [Server thread/WARN]: [MyPlugin] Task #85 for MyPlugin v1.0 generated an exception
java.lang.RuntimeException: java.lang.IllegalAccessException: class fr.skytasul.glowingentities.GlowingEntities$Packets cannot access a member of class net.minecraft.server.network.PlayerConnection with modifiers "private final"
        at com.qm.myplugin.pvpclasses.GlowViewManager$GlowViewer.lambda$update$3(GlowViewManager.java:72) ~[?:?]
        at java.util.HashMap.forEach(HashMap.java:1421) ~[?:?]
        at com.qm.myplugin.pvpclasses.GlowViewManager$GlowViewer.update(GlowViewManager.java:49) ~[?:?]
        at com.qm.myplugin.pvpclasses.GlowViewManager.updateView(GlowViewManager.java:102) ~[?:?]
        at com.qm.myplugin.tasks.TickTask.run(TickTask.java:65) ~[?:?]
        at org.bukkit.craftbukkit.v1_19_R3.scheduler.CraftTask.run(CraftTask.java:82) ~[spigot-1.19.4-R0.1-SNAPSHOT.jar:3714-Spigot-b31949f-3ae9069]
        at org.bukkit.craftbukkit.v1_19_R3.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:415) ~[spigot-1.19.4-R0.1-SNAPSHOT.jar:3714-Spigot-b31949f-3ae9069]
        at net.minecraft.server.MinecraftServer.b(MinecraftServer.java:1259) ~[spigot-1.19.4-R0.1-SNAPSHOT.jar:3714-Spigot-b31949f-3ae9069]
        at net.minecraft.server.dedicated.DedicatedServer.b(DedicatedServer.java:388) ~[spigot-1.19.4-R0.1-SNAPSHOT.jar:3714-Spigot-b31949f-3ae9069]
        at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:1200) ~[spigot-1.19.4-R0.1-SNAPSHOT.jar:3714-Spigot-b31949f-3ae9069]
        at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:1017) ~[spigot-1.19.4-R0.1-SNAPSHOT.jar:3714-Spigot-b31949f-3ae9069]
        at net.minecraft.server.MinecraftServer.lambda$0(MinecraftServer.java:304) ~[spigot-1.19.4-R0.1-SNAPSHOT.jar:3714-Spigot-b31949f-3ae9069]
        at java.lang.Thread.run(Thread.java:833) ~[?:?]
Caused by: java.lang.IllegalAccessException: class fr.skytasul.glowingentities.GlowingEntities$Packets cannot access a member of class net.minecraft.server.network.PlayerConnection with modifiers "private final"
        at jdk.internal.reflect.Reflection.newIllegalAccessException(Reflection.java:392) ~[?:?]
        at java.lang.reflect.AccessibleObject.checkAccess(AccessibleObject.java:674) ~[?:?]
        at java.lang.reflect.Field.checkAccess(Field.java:1102) ~[?:?]
        at java.lang.reflect.Field.get(Field.java:423) ~[?:?]
        at fr.skytasul.glowingentities.GlowingEntities$Packets.getChannel(GlowingEntities.java:565) ~[?:?]
        at fr.skytasul.glowingentities.GlowingEntities$Packets.addPacketsHandler(GlowingEntities.java:681) ~[?:?]
        at fr.skytasul.glowingentities.GlowingEntities.setGlowing(GlowingEntities.java:179) ~[?:?]
        at fr.skytasul.glowingentities.GlowingEntities.setGlowing(GlowingEntities.java:130) ~[?:?]
        at com.qm.myplugin.pvpclasses.GlowViewManager$GlowViewer.lambda$update$3(GlowViewManager.java:69) ~[?:?]
        ... 12 more

Older 1.20 versions unsupported

Hello! I would like to report a couple of bugs with the use of versions prior to 1.20.5 (GlowingEntities class)!

Mainly, watcherGet does not contain the al method. According to what I checked, there is not the previous adaptation that existed (it may not be this).
Finally, another error occurs in the DataWatcher subclass declaration (line 421) because the condicional is erroneous, currently it is version >= 20 || (version == 20 && versionMinor >= 5), where version >= 20 must be version > 20

Thank you for your work, it is a great dependency and of very good quality!

Adding support for block glow

This is by far the best "glow" API I've used. The only issue is that you can't apply glow on blocks just by using this API. You have to create shulkers and then apply glow on them, which could be supported out of the box to provide an even better user experience. You could also get a free performance boost since you wouldn't have to load all shulkers and then hide them with invisibility. If my brain works correctly, this should be achievable almost in the same way how YAMIPA does it.

nametag visibility

Hi, thanks for the amazing plugin and your hard work!
It does not have weird bugs like flickerling glow/white glow while crouching etc that other glow plugins have - it's working great!

But.. I would be really happy if you could add a functionality to set nameTagVisivility for the team, because I want to hide thier nametag while glowing.

Thank you in advance!

Player is kicked on 1.19.3

This looks like a remapping problem to me? $b seems like $Item: https://github.com/SkytAsul/GlowingEntities/blob/master/src/main/java/fr/skytasul/glowingentities/GlowingEntities.java#L373-L386. This didn't happen on our 1.19.2 server, only after we updated to 1.19.3 and version 1.1.3 of glowing entities. Server is based on Paper, we run custom server software, but the same problem happens on Paper 1.19.3 #362.

[15:55:16 INFO]: [GlowingEntities] [GlowingEntities] Found server version 1.19.3
[15:55:16 INFO]: [GlowingEntities] [GlowingEntities] Loaded mappings V1_19
[15:55:16 ERROR]: Packet encoding of packet ID 78 threw (skippable? false)
java.lang.ClassCastException: class net.minecraft.network.syncher.DataWatcher$Item cannot be cast to class net.minecraft.network.syncher.DataWatcher$b (net.minecraft.network.syncher.DataWatcher$Item and net.minecraft.network.syncher.DataWatcher$b are in unnamed module of loader java.net.URLClassLoader @25f38edc)
        at net.minecraft.network.protocol.game.ClientboundSetEntityDataPacket.pack(ClientboundSetEntityDataPacket.java:17) ~[?:?]
        at net.minecraft.network.protocol.game.ClientboundSetEntityDataPacket.write(ClientboundSetEntityDataPacket.java:38) ~[?:?]
        at net.minecraft.network.PacketEncoder.encode(PacketEncoder.java:41) ~[treaty-1.19.3.jar:git-Treaty-"852eadf"]
        at net.minecraft.network.PacketEncoder.encode(PacketEncoder.java:14) ~[treaty-1.19.3.jar:git-Treaty-"852eadf"]
        at io.netty.handler.codec.MessageToByteEncoder.write(MessageToByteEncoder.java:107) ~[netty-codec-4.1.82.Final.jar:4.1.82.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:717) ~[netty-transport-4.1.82.Final.jar:4.1.82.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:709) ~[netty-transport-4.1.82.Final.jar:4.1.82.Final]
        at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:792) ~[netty-transport-4.1.82.Final.jar:4.1.82.Final]
        at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:702) ~[netty-transport-4.1.82.Final.jar:4.1.82.Final]
        at io.netty.handler.codec.MessageToByteEncoder.write(MessageToByteEncoder.java:120) ~[netty-codec-4.1.82.Final.jar:4.1.82.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:717) ~[netty-transport-4.1.82.Final.jar:4.1.82.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeWriteAndFlush(AbstractChannelHandlerContext.java:764) ~[netty-transport-4.1.82.Final.jar:4.1.82.Final]
        at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:790) ~[netty-transport-4.1.82.Final.jar:4.1.82.Final]
        at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:758) ~[netty-transport-4.1.82.Final.jar:4.1.82.Final]
        at io.netty.channel.DefaultChannelPipeline.writeAndFlush(DefaultChannelPipeline.java:1020) ~[netty-transport-4.1.82.Final.jar:4.1.82.Final]
        at io.netty.channel.AbstractChannel.writeAndFlush(AbstractChannel.java:311) ~[netty-transport-4.1.82.Final.jar:4.1.82.Final]
        at com.comphenix.protocol.injector.netty.channel.NettyChannelProxy.writeAndFlush(NettyChannelProxy.java:227) ~[ProtocolLib.jar:?]
        at com.comphenix.protocol.injector.netty.channel.NettyChannelProxy.writeAndFlush(NettyChannelProxy.java:233) ~[ProtocolLib.jar:?]
        at net.minecraft.network.Connection.doSendPacket(Connection.java:459) ~[?:?]
        at net.minecraft.network.Connection.lambda$sendPacket$11(Connection.java:433) ~[?:?]
        at com.comphenix.protocol.injector.netty.channel.NettyEventLoopProxy.lambda$proxyRunnable$2(NettyEventLoopProxy.java:48) ~[ProtocolLib.jar:?]
        at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:174) ~[netty-common-4.1.82.Final.jar:4.1.82.Final]
        at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:167) ~[netty-common-4.1.82.Final.jar:4.1.82.Final]
        at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470) ~[netty-common-4.1.82.Final.jar:4.1.82.Final]
        at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:403) ~[netty-transport-classes-epoll-4.1.82.Final.jar:4.1.82.Final]
        at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) ~[netty-common-4.1.82.Final.jar:4.1.82.Final]
        at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[netty-common-4.1.82.Final.jar:4.1.82.Final]
        at java.lang.Thread.run(Thread.java:833) ~[?:?]
[15:55:16 WARN]: io.netty.handler.codec.EncoderException: java.lang.ClassCastException: class net.minecraft.network.syncher.DataWatcher$Item cannot be cast to class net.minecraft.network.syncher.DataWatcher$b (net.minecraft.network.syncher.DataWatcher$Item and net.minecraft.network.syncher.DataWatcher$b are in unnamed module of loader java.net.URLClassLoader @25f38edc)
[15:55:16 WARN]:        at io.netty.handler.codec.MessageToByteEncoder.write(MessageToByteEncoder.java:125)
[15:55:16 WARN]:        at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:717)
[15:55:16 WARN]:        at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:709)
[15:55:16 WARN]:        at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:792)
[15:55:16 WARN]:        at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:702)
[15:55:16 WARN]:        at io.netty.handler.codec.MessageToByteEncoder.write(MessageToByteEncoder.java:120)
[15:55:16 WARN]:        at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:717)
[15:55:16 WARN]:        at io.netty.channel.AbstractChannelHandlerContext.invokeWriteAndFlush(AbstractChannelHandlerContext.java:764)
[15:55:16 WARN]:        at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:790)
[15:55:16 WARN]:        at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:758)
[15:55:16 WARN]:        at io.netty.channel.DefaultChannelPipeline.writeAndFlush(DefaultChannelPipeline.java:1020)
[15:55:16 WARN]:        at io.netty.channel.AbstractChannel.writeAndFlush(AbstractChannel.java:311)
[15:55:16 WARN]:        at ProtocolLib.jar//com.comphenix.protocol.injector.netty.channel.NettyChannelProxy.writeAndFlush(NettyChannelProxy.java:227)
[15:55:16 WARN]:        at ProtocolLib.jar//com.comphenix.protocol.injector.netty.channel.NettyChannelProxy.writeAndFlush(NettyChannelProxy.java:233)
[15:55:16 WARN]:        at net.minecraft.network.Connection.doSendPacket(Connection.java:459)
[15:55:16 WARN]:        at net.minecraft.network.Connection.lambda$sendPacket$11(Connection.java:433)
[15:55:16 WARN]:        at ProtocolLib.jar//com.comphenix.protocol.injector.netty.channel.NettyEventLoopProxy.lambda$proxyRunnable$2(NettyEventLoopProxy.java:48)
[15:55:16 WARN]:        at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:174)
[15:55:16 WARN]:        at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:167)
[15:55:16 WARN]:        at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470)
[15:55:16 WARN]:        at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:403)
[15:55:16 WARN]:        at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
[15:55:16 WARN]:        at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
[15:55:16 WARN]:        at java.base/java.lang.Thread.run(Thread.java:833)
[15:55:16 WARN]: Caused by: java.lang.ClassCastException: class net.minecraft.network.syncher.DataWatcher$Item cannot be cast to class net.minecraft.network.syncher.DataWatcher$b (net.minecraft.network.syncher.DataWatcher$Item and net.minecraft.network.syncher.DataWatcher$b are in unnamed module of loader java.net.URLClassLoader @25f38edc)
[15:55:16 WARN]:        at net.minecraft.network.protocol.game.ClientboundSetEntityDataPacket.pack(ClientboundSetEntityDataPacket.java:17)
[15:55:16 WARN]:        at net.minecraft.network.protocol.game.ClientboundSetEntityDataPacket.write(ClientboundSetEntityDataPacket.java:38)
[15:55:16 WARN]:        at net.minecraft.network.PacketEncoder.encode(PacketEncoder.java:41)
[15:55:16 WARN]:        at net.minecraft.network.PacketEncoder.encode(PacketEncoder.java:14)
[15:55:16 WARN]:        at io.netty.handler.codec.MessageToByteEncoder.write(MessageToByteEncoder.java:107)
[15:55:16 WARN]:        ... 23 more

1.21 not working

I am trying to use 1.3.5 and it is only displaying a blue glow colour, I have migrated to the new group name in the dependency and it is correctly importing, when looking at the library within my source code I can see that there is mappings for 1.21 but when running the code I get the following logs in my console:

[GlowingEntities] [GlowingEntities] Found server version 1.21.0
[GlowingEntities] [GlowingEntities] Loaded not matching version of the mappings for your server version
[GlowingEntities] [GlowingEntities] Loaded mappings V1_20_5_REMAPPED

java.util.NoSuchElementException: packet_handler

I keep getting the following error and no colour changes:

[05:14:10 WARN]: [Fairies] Task #75 for Fairies v1.0 generated an exception
java.util.NoSuchElementException: packet_handler
        at io.netty.channel.DefaultChannelPipeline.getContextOrDie(DefaultChannelPipeline.java:1073) ~[netty-transport-4.1.87.Final.jar:4.1.87.Final]
        at io.netty.channel.DefaultChannelPipeline.addBefore(DefaultChannelPipeline.java:248) ~[netty-transport-4.1.87.Final.jar:4.1.87.Final]
        at io.netty.channel.DefaultChannelPipeline.addBefore(DefaultChannelPipeline.java:237) ~[netty-transport-4.1.87.Final.jar:4.1.87.Final]
        at me.dave.fairies.utils.GlowingEntities$Packets.addPacketsHandler(GlowingEntities.java:721) ~[Fairies-1.0.jar:?]
        at me.dave.fairies.utils.GlowingEntities.setGlowing(GlowingEntities.java:158) ~[Fairies-1.0.jar:?]
        at me.dave.fairies.utils.GlowingEntities.setGlowing(GlowingEntities.java:109) ~[Fairies-1.0.jar:?]
        at me.dave.fairies.abilities.custom.PotionAbility.lambda$givePotionEffects$1(PotionAbility.java:52) ~[Fairies-1.0.jar:?]
        at java.util.ArrayList.forEach(ArrayList.java:1511) ~[?:?]
        at me.dave.fairies.abilities.custom.PotionAbility.lambda$givePotionEffects$2(PotionAbility.java:49) ~[Fairies-1.0.jar:?]
        at java.lang.Iterable.forEach(Iterable.java:75) ~[?:?]
        at me.dave.fairies.abilities.custom.PotionAbility.givePotionEffects(PotionAbility.java:38) ~[Fairies-1.0.jar:?]
        at me.dave.fairies.abilities.custom.PotionAbility.lambda$new$0(PotionAbility.java:29) ~[Fairies-1.0.jar:?]
        at org.bukkit.craftbukkit.v1_20_R1.scheduler.CraftTask.run(CraftTask.java:101) ~[pufferfish-1.20.1.jar:git-Pufferfish-16]
        at org.bukkit.craftbukkit.v1_20_R1.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:480) ~[pufferfish-1.20.1.jar:git-Pufferfish-16]
        at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1482) ~[pufferfish-1.20.1.jar:git-Pufferfish-16]
        at net.minecraft.server.dedicated.DedicatedServer.tickChildren(DedicatedServer.java:450) ~[pufferfish-1.20.1.jar:git-Pufferfish-16]
        at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1396) ~[pufferfish-1.20.1.jar:git-Pufferfish-16]
        at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1173) ~[pufferfish-1.20.1.jar:git-Pufferfish-16]
        at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:320) ~[pufferfish-1.20.1.jar:git-Pufferfish-16]
        at java.lang.Thread.run(Thread.java:833) ~[?:?]

Is it possible to hide a "shulker head"?

Hello
Is it possible to make it so that I can glow the blocks and these heads will not be visible? After studying the source code, I realized that this is most likely impossible due to the limitations of Minecraft.
I need to glow Banner's and these shulker heads can be seen through the banner.
Maybe there is some kind of loophole?
image

TAB plugin is removing the glowing color of the player

I've encountered a problem between TAB (https://github.com/NEZNAMY/TAB) and GlowingEntities when trying to apply glowing to a player. TAB is likely using a custom team packet to order the players.

I know it's TAB as: Removing TAB from the plugins folder fixes this issue and makes the entity glow any color I want.

No TAB plugin allows the player to still glow, but for some reason the glowing does not contain the color I want.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.