-
Recently Browsing
- No registered users viewing this page.
-
Posts
-
By eeyorenailbag · Posted
After some time, I've managed to get it to be able to summon a ghast fireball (as a test) on keybind, and it works fine, however it just spawns the entity, rather than giving it movement. This is the current code I have to summon the entity, I just need to add motion to it. And I do apologise, I'm just incredibly stupid, idk anything about Java - _ -' public boolean handle(Supplier<NetworkEvent.Context> supplier) { NetworkEvent.Context context = supplier.get(); context.enqueueWork( () -> { ServerPlayer player = context.getSender(); ServerLevel level = player.getLevel(); EntityType.FIREBALL.spawn(level, null, null, player.blockPosition(), MobSpawnType.COMMAND, true, false); }); return true; } -
By DiegoA111234 · Posted
ok, error 413, too large, what do I do -
By DiegoA111234 · Posted
it just doesn't get loaded on a reply, but let me try again, I guess is too large -
By ElTotisPro50 · Posted
It works now, thanks /*Synchronization to the client*/ @Nullable @Override public Packet<ClientGamePacketListener> getUpdatePacket() { return ClientboundBlockEntityDataPacket.create(this); } @Override public CompoundTag getUpdateTag() { return this.saveWithoutMetadata(); } @Override public void onDataPacket(Connection net, ClientboundBlockEntityDataPacket pkt) { super.onDataPacket(net, pkt); load(pkt.getTag()); } @Override public void handleUpdateTag(CompoundTag tag) { super.handleUpdateTag(tag); }
-
-
Topics
-
Who's Online (See full list)
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.