Coder Social home page Coder Social logo

gobrush's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

gobrush's Issues

Nullpointer by clicking in the inventory

By opening the gobrush menu, the following exception is printed:

Serverversion: 1.16.5 Paper

[12:01:34 ERROR]: Could not pass event InventoryClickEvent to goBrush v3.6.0 java.lang.NullPointerException: null at com.arcaniax.gobrush.listener.InventoryClickListener.mainMenuClickEvent(InventoryClickListener.java:118) ~[?:?] at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor130.execute(Unknown Source) ~[?:?] at org.bukkit.plugin.EventExecutor.lambda$create$1(EventExecutor.java:69) ~[patched_1.16.5.jar:git-Paper-626] at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:80) ~[patched_1.16.5.jar:git-Paper-626] at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[patched_1.16.5.jar:git-Paper-626] at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:607) ~[patched_1.16.5.jar:git-Paper-626] at net.minecraft.server.v1_16_R3.PlayerConnection.a(PlayerConnection.java:2701) ~[patched_1.16.5.jar:git-Paper-626] at net.minecraft.server.v1_16_R3.PacketPlayInWindowClick.a(SourceFile:32) ~[patched_1.16.5.jar:git-Paper-626] at net.minecraft.server.v1_16_R3.PacketPlayInWindowClick.a(SourceFile:10) ~[patched_1.16.5.jar:git-Paper-626] at net.minecraft.server.v1_16_R3.PlayerConnectionUtils.lambda$ensureMainThread$1(PlayerConnectionUtils.java:35) ~[patched_1.16.5.jar:git-Paper-626] at net.minecraft.server.v1_16_R3.TickTask.run(SourceFile:18) ~[patched_1.16.5.jar:git-Paper-626] at net.minecraft.server.v1_16_R3.IAsyncTaskHandler.executeTask(IAsyncTaskHandler.java:136) ~[patched_1.16.5.jar:git-Paper-626] at net.minecraft.server.v1_16_R3.IAsyncTaskHandlerReentrant.executeTask(SourceFile:23) ~[patched_1.16.5.jar:git-Paper-626] at net.minecraft.server.v1_16_R3.IAsyncTaskHandler.executeNext(IAsyncTaskHandler.java:109) ~[patched_1.16.5.jar:git-Paper-626] at net.minecraft.server.v1_16_R3.MinecraftServer.bb(MinecraftServer.java:1262) ~[patched_1.16.5.jar:git-Paper-626] at net.minecraft.server.v1_16_R3.MinecraftServer.executeNext(MinecraftServer.java:1255) ~[patched_1.16.5.jar:git-Paper-626] at net.minecraft.server.v1_16_R3.IAsyncTaskHandler.awaitTasks(IAsyncTaskHandler.java:119) ~[patched_1.16.5.jar:git-Paper-626] at net.minecraft.server.v1_16_R3.MinecraftServer.sleepForTick(MinecraftServer.java:1216) ~[patched_1.16.5.jar:git-Paper-626] at net.minecraft.server.v1_16_R3.MinecraftServer.w(MinecraftServer.java:1130) ~[patched_1.16.5.jar:git-Paper-626] at net.minecraft.server.v1_16_R3.MinecraftServer.lambda$a$0(MinecraftServer.java:289) ~[patched_1.16.5.jar:git-Paper-626] at java.lang.Thread.run(Thread.java:748) [?:1.8.0_282]

BrushPlayerUtil.getClosest() - Performance Improvement

What feature do you want to see added?

When the player right clicks, there is an attempt to find the first block they are looking at. The loop for this moves half a block at a time so each block is checked ~twice for if it matches the condition or not.

Over a couple tests, profiling my server as I ran the commands, the getType() call accounted for about 50% of the operation.

I suggest only running checks on a block if the position (loc variable) has actually changed block position.
Doing so removes about half of these calls and gives a sizable performance boost.

Before:
image

After:
image

Are there any alternatives?

Leaving as is still functions but is slower.

Anything else?

I looked in to this after the Bakery server disabled goBrush & goPaint due to performance concerns

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.github/workflows/gradle.yml
  • actions/checkout v4
  • gradle/wrapper-validation-action v3
  • benjlevesque/short-sha v3.0
  • actions/setup-java v4
  • HardNorth/github-version-generate v1
  • actions/upload-artifact v4
gradle
gradle.properties
settings.gradle.kts
build.gradle.kts
  • com.github.johnrengelman.shadow 8.1.1
  • com.diffplug.spotless 6.25.0
  • org.ajoberstar.grgit 5.2.2
  • com.intellectualsites.bom:bom-newest 1.44
  • io.papermc.paper:paper-api 1.19.3-R0.1-SNAPSHOT
  • net.md-5:bungeecord-api 1.20-R0.2
  • com.mojang:authlib 1.5.25
  • net.lingala.zip4j:zip4j 2.11.5
  • org.bstats:bstats-bukkit 3.0.2
  • org.bstats:bstats-base 3.0.2
  • dev.notmyfault.serverlib:ServerLib 2.3.6
  • io.papermc:paperlib 1.0.8
gradle-wrapper
gradle/wrapper/gradle-wrapper.properties
  • gradle 8.8

  • Check this box to trigger a request for Renovate to run again on this repository

Action Required: Fix Renovate Configuration

There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.

Error type: Cannot find preset's package (github>whitesource/merge-confidence:beta)

Every brush is force reloaded on player join

amountOfValidBrushes = Session.initializeValidBrushes();

Session.initializeValidBrushes(); - This method clears a map then loads all the brushes from scratch again. This is.. Rather laggy if you have a fair amount of brushes.

https://github.com/Arcaniax-Development/goBrush/blob/master/src/main/java/com/arcaniax/gobrush/object/BrushPlayer.java#L63

This is why its called on player join.

Todo: Performance

  • Optimize usage of player and inventory listener; currently the brush inventory may bring some performance regression based on (often) done being superseded by others.
  • Having a large brush folder/many files in total may slow down or hang your server, whether you have a solid disk i/o or not.
  • Do not assign a brush session in sync if not necessary [5deec14]

New max and min world heights not respected, leading to goBrush not working above 255 and below 0 in 1.18

Server Implementation

Paper

Server Version

1.17.1

Describe the bug

Just to be clear, I am on 1.18.1, but the server version isn't added for that.

Using goBrush below 0 or above 255 leads to nothing happening when right clicking the flint tool.

To Reproduce

  1. Create a flat world or just be above or below original world limits (below 0 or above 255).
  2. Attempt to use goBrush on blocks outside that original region.
  3. Profit.

Expected behaviour

goBrush does as expected and works within the new world limits to build.

Screenshots / Videos

No response

Error log (if applicable)

No response

Fawe Debugpaste (if applicable)

No response

goBrush Version

3.8.0-46

Checklist

Anything else?

No response

A Config Option to choose which Material should get used by goBrush

What feature do you want to see added?

To make the Plugin more compatible with other ones, a config option to choose which Material should get used by goBrush would be pretty nice.

Are there any alternatives?

I searched for Config Options in other Plugins but couldn't find anything.

Anything else?

No response

Right clicking a block with flint outputs twice.

Server Implementation

Purpur (Paper)

Server Version

1.18.1

Describe the bug

link

Right clicking the ground / a block outputs twice.

To Reproduce

  1. Spawn in flint.
  2. Look down.
  3. Right click.

Expected behaviour

Only one output like goPaint.

Screenshots / Videos

No response

Error log (if applicable)

No response

Fawe Debugpaste (if applicable)

No response

goBrush Version

goBrush version 3.8.0-47

Checklist

Anything else?

Listening for any interact event, thus triggering from offhand too?

Using Purpur dev 1561 (Paper 1.18.1).

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.