forked from Upstream/mmocore
Skill Trees in MMOCore
This commit is contained in:
parent
fece7347ef
commit
7fee8736ed
536
hs_err_pid12252.log
Normal file
536
hs_err_pid12252.log
Normal file
@ -0,0 +1,536 @@
|
||||
#
|
||||
# There is insufficient memory for the Java Runtime Environment to continue.
|
||||
# Native memory allocation (mmap) failed to map 65536 bytes for Failed to commit metaspace.
|
||||
# Possible reasons:
|
||||
# The system is out of physical RAM or swap space
|
||||
# The process is running with CompressedOops enabled, and the Java Heap may be blocking the growth of the native heap
|
||||
# Possible solutions:
|
||||
# Reduce memory load on the system
|
||||
# Increase physical memory or swap space
|
||||
# Check if swap backing store is full
|
||||
# Decrease Java heap size (-Xmx/-Xms)
|
||||
# Decrease number of Java threads
|
||||
# Decrease Java thread stack sizes (-Xss)
|
||||
# Set larger code cache with -XX:ReservedCodeCacheSize=
|
||||
# JVM is running with Unscaled Compressed Oops mode in which the Java heap is
|
||||
# placed in the first 4GB address space. The Java Heap base address is the
|
||||
# maximum limit for the native heap growth. Please use -XX:HeapBaseMinAddress
|
||||
# to set the Java Heap base and to place the Java Heap above 4GB virtual address.
|
||||
# This output file may be truncated or incomplete.
|
||||
#
|
||||
# Out of Memory Error (virtualSpaceNode.cpp:110), pid=12252, tid=5504
|
||||
#
|
||||
# JRE version: Java(TM) SE Runtime Environment (18.0.1+10) (build 18.0.1+10-24)
|
||||
# Java VM: Java HotSpot(TM) 64-Bit Server VM (18.0.1+10-24, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, windows-amd64)
|
||||
# No core dump will be written. Minidumps are not enabled by default on client versions of Windows
|
||||
#
|
||||
|
||||
--------------- S U M M A R Y ------------
|
||||
|
||||
Command Line: -Dmaven.multiModuleProjectDirectory=C:\Users\guill\gitProjects\mmocore -Dmaven.home=C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2021.1.2\plugins\maven\lib\maven3 -Dclassworlds.conf=C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2021.1.2\plugins\maven\lib\maven3\bin\m2.conf -Dmaven.ext.class.path=C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2021.1.2\plugins\maven\lib\maven-event-listener.jar -Dfile.encoding=UTF-8 org.codehaus.classworlds.Launcher -Didea.version=2021.1.2 install --non-recursive
|
||||
|
||||
Host: AMD Ryzen 7 3700U with Radeon Vega Mobile Gfx , 8 cores, 5G, Windows 10 , 64 bit Build 19041 (10.0.19041.1706)
|
||||
Time: Tue May 24 23:24:28 2022 Paris, Madrid (heure duild 19041 (10.0.19041.1706) elapsed time: 0.830927 seconds (0d 0h 0m 0s)
|
||||
|
||||
--------------- T H R E A D ---------------
|
||||
|
||||
Current thread (0x00000196db61cea0): JavaThread "C1 CompilerThread0" daemon [_thread_in_vm, id=5504, stack(0x000000221d000000,0x000000221d100000)]
|
||||
|
||||
|
||||
Current CompileTask:
|
||||
C1: 831 545 3 jdk.internal.loader.ClassLoaders$AppClassLoader::loadClass (40 bytes)
|
||||
|
||||
Stack: [0x000000221d000000,0x000000221d100000]
|
||||
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
|
||||
V [jvm.dll+0x69887a]
|
||||
V [jvm.dll+0x7f38bd]
|
||||
V [jvm.dll+0x7f51ce]
|
||||
V [jvm.dll+0x7f5883]
|
||||
V [jvm.dll+0x25ca3f]
|
||||
V [jvm.dll+0x7ef5cb]
|
||||
V [jvm.dll+0x63ea76]
|
||||
V [jvm.dll+0x63eada]
|
||||
V [jvm.dll+0x64135e]
|
||||
V [jvm.dll+0x64121e]
|
||||
V [jvm.dll+0x63f43e]
|
||||
V [jvm.dll+0x650d9a]
|
||||
V [jvm.dll+0x649c8a]
|
||||
V [jvm.dll+0x1e4700]
|
||||
V [jvm.dll+0x1e48e6]
|
||||
V [jvm.dll+0x1485de]
|
||||
V [jvm.dll+0x148926]
|
||||
V [jvm.dll+0x147d9a]
|
||||
V [jvm.dll+0x149a81]
|
||||
V [jvm.dll+0x23e8ca]
|
||||
V [jvm.dll+0x23cbb5]
|
||||
V [jvm.dll+0x7a5fb1]
|
||||
V [jvm.dll+0x7a03ea]
|
||||
V [jvm.dll+0x697725]
|
||||
C [ucrtbase.dll+0x21bb2]
|
||||
C [KERNEL32.DLL+0x17034]
|
||||
C [ntdll.dll+0x52651]
|
||||
|
||||
|
||||
--------------- P R O C E S S ---------------
|
||||
|
||||
Threads class SMR info:
|
||||
_java_thread_list=0x00000196df8513a0, length=12, elements={
|
||||
0x00000196be777660, 0x00000196db5e6ac0, 0x00000196db5e7720, 0x00000196db603f40,
|
||||
0x00000196db6058f0, 0x00000196db606290, 0x00000196db606d70, 0x00000196db608b90,
|
||||
0x00000196db61cea0, 0x00000196db6333c0, 0x00000196df884700, 0x00000196df8888a0
|
||||
}
|
||||
|
||||
Java Threads: ( => current thread )
|
||||
0x00000196be777660 JavaThread "main" [_thread_in_vm, id=16080, stack(0x000000221c200000,0x000000221c300000)]
|
||||
0x00000196db5e6ac0 JavaThread "Reference Handler" daemon [_thread_blocked, id=3240, stack(0x000000221c900000,0x000000221ca00000)]
|
||||
0x00000196db5e7720 JavaThread "Finalizer" daemon [_thread_blocked, id=31388, stack(0x000000221ca00000,0x000000221cb00000)]
|
||||
0x00000196db603f40 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=27972, stack(0x000000221cb00000,0x000000221cc00000)]
|
||||
0x00000196db6058f0 JavaThread "Attach Listener" daemon [_thread_blocked, id=29668, stack(0x000000221cc00000,0x000000221cd00000)]
|
||||
0x00000196db606290 JavaThread "Service Thread" daemon [_thread_blocked, id=28240, stack(0x000000221cd00000,0x000000221ce00000)]
|
||||
0x00000196db606d70 JavaThread "Monitor Deflation Thread" daemon [_thread_blocked, id=1896, stack(0x000000221ce00000,0x000000221cf00000)]
|
||||
0x00000196db608b90 JavaThread "C2 CompilerThread0" daemon [_thread_blocked, id=27540, stack(0x000000221cf00000,0x000000221d000000)]
|
||||
=>0x00000196db61cea0 JavaThread "C1 CompilerThread0" daemon [_thread_in_vm, id=5504, stack(0x000000221d000000,0x000000221d100000)]
|
||||
0x00000196db6333c0 JavaThread "Sweeper thread" daemon [_thread_blocked, id=25016, stack(0x000000221d100000,0x000000221d200000)]
|
||||
0x00000196df884700 JavaThread "Notification Thread" daemon [_thread_blocked, id=36124, stack(0x000000221d200000,0x000000221d300000)]
|
||||
0x00000196df8888a0 JavaThread "Common-Cleaner" daemon [_thread_blocked, id=20016, stack(0x000000221d400000,0x000000221d500000)]
|
||||
|
||||
Other Threads:
|
||||
0x00000196be7eab00 VMThread "VM Thread" [stack: 0x000000221c800000,0x000000221c900000] [id=8764]
|
||||
0x00000196df887a00 WatcherThread "VM Periodic Task Thread" [stack: 0x000000221d300000,0x000000221d400000] [id=36084]
|
||||
0x00000196be7c7f90 WorkerThread "GC Thread#0" [stack: 0x000000221c300000,0x000000221c400000] [id=33236]
|
||||
0x00000196be7d5d20 ConcurrentGCThread "G1 Main Marker" [stack: 0x000000221c400000,0x000000221c500000] [id=9264]
|
||||
0x00000196be7d6eb0 WorkerThread "G1 Conc#0" [stack: 0x000000221c500000,0x000000221c600000] [id=9172]
|
||||
0x00000196be81e530 ConcurrentGCThread "G1 Refine#0" [stack: 0x000000221c600000,0x000000221c700000] [id=25384]
|
||||
0x00000196be81ee40 ConcurrentGCThread "G1 Service" [stack: 0x000000221c700000,0x000000221c800000] [id=22176]
|
||||
|
||||
Threads with active compile tasks:
|
||||
C1 CompilerThread0 969 545 3 jdk.internal.loader.ClassLoaders$AppClassLoader::loadClass (40 bytes)
|
||||
|
||||
VM state: not at safepoint (normal execution)
|
||||
|
||||
VM Mutex/Monitor currently owned by a thread: ([mutex/lock_event])
|
||||
[0x00000196be771460] Metaspace_lock - owner thread: 0x00000196db61cea0
|
||||
[0x00000196be773730] MethodData_lock - owner thread: 0x00000196db61cea0
|
||||
|
||||
Heap address: 0x00000000a1400000, size: 1516 MB, Compressed Oops mode: 32-bit
|
||||
|
||||
CDS archive(s) mapped at: [0x0000000800000000-0x0000000800ba0000-0x0000000800ba0000), size 12189696, SharedBaseAddress: 0x0000000800000000, ArchiveRelocationMode: 0.
|
||||
Compressed class space mapped at: 0x0000000800c00000-0x0000000840c00000, reserved size: 1073741824
|
||||
Narrow klass base: 0x0000000800000000, Narrow klass shift: 0, Narrow klass range: 0x100000000
|
||||
|
||||
GC Precious Log:
|
||||
CardTable entry size: 512
|
||||
Card Set container configuration: InlinePtr #cards 5 size 8 Array Of Cards #cards 12 size 40 Howl #buckets 4 coarsen threshold 1843 Howl Bitmap #cards 512 size 80 coarsen threshold 460 Card regions per heap region 1 cards per card region 2048
|
||||
CPUs: 8 total, 8 available
|
||||
Memory: 6061M
|
||||
Large Page Support: Disabled
|
||||
NUMA Support: Disabled
|
||||
Compressed Oops: Enabled (32-bit)
|
||||
Heap Region Size: 1M
|
||||
Heap Min Capacity: 8M
|
||||
Heap Initial Capacity: 96M
|
||||
Heap Max Capacity: 1516M
|
||||
Pre-touch: Disabled
|
||||
Parallel Workers: 8
|
||||
Concurrent Workers: 2
|
||||
Concurrent Refinement Workers: 8
|
||||
Periodic GC: Disabled
|
||||
|
||||
Heap:
|
||||
garbage-first heap total 98304K, used 5120K [0x00000000a1400000, 0x0000000100000000)
|
||||
region size 1024K, 7 young (7168K), 0 survivors (0K)
|
||||
Metaspace used 2358K, committed 2496K, reserved 1114112K
|
||||
class space used 212K, committed 320K, reserved 1048576K
|
||||
|
||||
Heap Regions: E=young(eden), S=young(survivor), O=old, HS=humongous(starts), HC=humongous(continues), CS=collection set, F=free, OA=open archive, CA=closed archive, TAMS=top-at-mark-start (previous, next)
|
||||
| 0|0x00000000a1400000, 0x00000000a1400000, 0x00000000a1500000| 0%| F| |TAMS 0x00000000a1400000, 0x00000000a1400000| Untracked
|
||||
| 1|0x00000000a1500000, 0x00000000a1500000, 0x00000000a1600000| 0%| F| |TAMS 0x00000000a1500000, 0x00000000a1500000| Untracked
|
||||
| 2|0x00000000a1600000, 0x00000000a1600000, 0x00000000a1700000| 0%| F| |TAMS 0x00000000a1600000, 0x00000000a1600000| Untracked
|
||||
| 3|0x00000000a1700000, 0x00000000a1700000, 0x00000000a1800000| 0%| F| |TAMS 0x00000000a1700000, 0x00000000a1700000| Untracked
|
||||
| 4|0x00000000a1800000, 0x00000000a1800000, 0x00000000a1900000| 0%| F| |TAMS 0x00000000a1800000, 0x00000000a1800000| Untracked
|
||||
| 5|0x00000000a1900000, 0x00000000a1900000, 0x00000000a1a00000| 0%| F| |TAMS 0x00000000a1900000, 0x00000000a1900000| Untracked
|
||||
| 6|0x00000000a1a00000, 0x00000000a1a00000, 0x00000000a1b00000| 0%| F| |TAMS 0x00000000a1a00000, 0x00000000a1a00000| Untracked
|
||||
| 7|0x00000000a1b00000, 0x00000000a1b00000, 0x00000000a1c00000| 0%| F| |TAMS 0x00000000a1b00000, 0x00000000a1b00000| Untracked
|
||||
| 8|0x00000000a1c00000, 0x00000000a1c00000, 0x00000000a1d00000| 0%| F| |TAMS 0x00000000a1c00000, 0x00000000a1c00000| Untracked
|
||||
| 9|0x00000000a1d00000, 0x00000000a1d00000, 0x00000000a1e00000| 0%| F| |TAMS 0x00000000a1d00000, 0x00000000a1d00000| Untracked
|
||||
| 10|0x00000000a1e00000, 0x00000000a1e00000, 0x00000000a1f00000| 0%| F| |TAMS 0x00000000a1e00000, 0x00000000a1e00000| Untracked
|
||||
| 11|0x00000000a1f00000, 0x00000000a1f00000, 0x00000000a2000000| 0%| F| |TAMS 0x00000000a1f00000, 0x00000000a1f00000| Untracked
|
||||
| 12|0x00000000a2000000, 0x00000000a2000000, 0x00000000a2100000| 0%| F| |TAMS 0x00000000a2000000, 0x00000000a2000000| Untracked
|
||||
| 13|0x00000000a2100000, 0x00000000a2100000, 0x00000000a2200000| 0%| F| |TAMS 0x00000000a2100000, 0x00000000a2100000| Untracked
|
||||
| 14|0x00000000a2200000, 0x00000000a2200000, 0x00000000a2300000| 0%| F| |TAMS 0x00000000a2200000, 0x00000000a2200000| Untracked
|
||||
| 15|0x00000000a2300000, 0x00000000a2300000, 0x00000000a2400000| 0%| F| |TAMS 0x00000000a2300000, 0x00000000a2300000| Untracked
|
||||
| 16|0x00000000a2400000, 0x00000000a2400000, 0x00000000a2500000| 0%| F| |TAMS 0x00000000a2400000, 0x00000000a2400000| Untracked
|
||||
| 17|0x00000000a2500000, 0x00000000a2500000, 0x00000000a2600000| 0%| F| |TAMS 0x00000000a2500000, 0x00000000a2500000| Untracked
|
||||
| 18|0x00000000a2600000, 0x00000000a2600000, 0x00000000a2700000| 0%| F| |TAMS 0x00000000a2600000, 0x00000000a2600000| Untracked
|
||||
| 19|0x00000000a2700000, 0x00000000a2700000, 0x00000000a2800000| 0%| F| |TAMS 0x00000000a2700000, 0x00000000a2700000| Untracked
|
||||
| 20|0x00000000a2800000, 0x00000000a2800000, 0x00000000a2900000| 0%| F| |TAMS 0x00000000a2800000, 0x00000000a2800000| Untracked
|
||||
| 21|0x00000000a2900000, 0x00000000a2900000, 0x00000000a2a00000| 0%| F| |TAMS 0x00000000a2900000, 0x00000000a2900000| Untracked
|
||||
| 22|0x00000000a2a00000, 0x00000000a2a00000, 0x00000000a2b00000| 0%| F| |TAMS 0x00000000a2a00000, 0x00000000a2a00000| Untracked
|
||||
| 23|0x00000000a2b00000, 0x00000000a2b00000, 0x00000000a2c00000| 0%| F| |TAMS 0x00000000a2b00000, 0x00000000a2b00000| Untracked
|
||||
| 24|0x00000000a2c00000, 0x00000000a2c00000, 0x00000000a2d00000| 0%| F| |TAMS 0x00000000a2c00000, 0x00000000a2c00000| Untracked
|
||||
| 25|0x00000000a2d00000, 0x00000000a2d00000, 0x00000000a2e00000| 0%| F| |TAMS 0x00000000a2d00000, 0x00000000a2d00000| Untracked
|
||||
| 26|0x00000000a2e00000, 0x00000000a2e00000, 0x00000000a2f00000| 0%| F| |TAMS 0x00000000a2e00000, 0x00000000a2e00000| Untracked
|
||||
| 27|0x00000000a2f00000, 0x00000000a2f00000, 0x00000000a3000000| 0%| F| |TAMS 0x00000000a2f00000, 0x00000000a2f00000| Untracked
|
||||
| 28|0x00000000a3000000, 0x00000000a3000000, 0x00000000a3100000| 0%| F| |TAMS 0x00000000a3000000, 0x00000000a3000000| Untracked
|
||||
| 29|0x00000000a3100000, 0x00000000a3100000, 0x00000000a3200000| 0%| F| |TAMS 0x00000000a3100000, 0x00000000a3100000| Untracked
|
||||
| 30|0x00000000a3200000, 0x00000000a3200000, 0x00000000a3300000| 0%| F| |TAMS 0x00000000a3200000, 0x00000000a3200000| Untracked
|
||||
| 31|0x00000000a3300000, 0x00000000a3300000, 0x00000000a3400000| 0%| F| |TAMS 0x00000000a3300000, 0x00000000a3300000| Untracked
|
||||
| 32|0x00000000a3400000, 0x00000000a3400000, 0x00000000a3500000| 0%| F| |TAMS 0x00000000a3400000, 0x00000000a3400000| Untracked
|
||||
| 33|0x00000000a3500000, 0x00000000a3500000, 0x00000000a3600000| 0%| F| |TAMS 0x00000000a3500000, 0x00000000a3500000| Untracked
|
||||
| 34|0x00000000a3600000, 0x00000000a3600000, 0x00000000a3700000| 0%| F| |TAMS 0x00000000a3600000, 0x00000000a3600000| Untracked
|
||||
| 35|0x00000000a3700000, 0x00000000a3700000, 0x00000000a3800000| 0%| F| |TAMS 0x00000000a3700000, 0x00000000a3700000| Untracked
|
||||
| 36|0x00000000a3800000, 0x00000000a3800000, 0x00000000a3900000| 0%| F| |TAMS 0x00000000a3800000, 0x00000000a3800000| Untracked
|
||||
| 37|0x00000000a3900000, 0x00000000a3900000, 0x00000000a3a00000| 0%| F| |TAMS 0x00000000a3900000, 0x00000000a3900000| Untracked
|
||||
| 38|0x00000000a3a00000, 0x00000000a3a00000, 0x00000000a3b00000| 0%| F| |TAMS 0x00000000a3a00000, 0x00000000a3a00000| Untracked
|
||||
| 39|0x00000000a3b00000, 0x00000000a3b00000, 0x00000000a3c00000| 0%| F| |TAMS 0x00000000a3b00000, 0x00000000a3b00000| Untracked
|
||||
| 40|0x00000000a3c00000, 0x00000000a3c00000, 0x00000000a3d00000| 0%| F| |TAMS 0x00000000a3c00000, 0x00000000a3c00000| Untracked
|
||||
| 41|0x00000000a3d00000, 0x00000000a3d00000, 0x00000000a3e00000| 0%| F| |TAMS 0x00000000a3d00000, 0x00000000a3d00000| Untracked
|
||||
| 42|0x00000000a3e00000, 0x00000000a3e00000, 0x00000000a3f00000| 0%| F| |TAMS 0x00000000a3e00000, 0x00000000a3e00000| Untracked
|
||||
| 43|0x00000000a3f00000, 0x00000000a3f00000, 0x00000000a4000000| 0%| F| |TAMS 0x00000000a3f00000, 0x00000000a3f00000| Untracked
|
||||
| 44|0x00000000a4000000, 0x00000000a4000000, 0x00000000a4100000| 0%| F| |TAMS 0x00000000a4000000, 0x00000000a4000000| Untracked
|
||||
| 45|0x00000000a4100000, 0x00000000a4100000, 0x00000000a4200000| 0%| F| |TAMS 0x00000000a4100000, 0x00000000a4100000| Untracked
|
||||
| 46|0x00000000a4200000, 0x00000000a4200000, 0x00000000a4300000| 0%| F| |TAMS 0x00000000a4200000, 0x00000000a4200000| Untracked
|
||||
| 47|0x00000000a4300000, 0x00000000a4300000, 0x00000000a4400000| 0%| F| |TAMS 0x00000000a4300000, 0x00000000a4300000| Untracked
|
||||
| 48|0x00000000a4400000, 0x00000000a4400000, 0x00000000a4500000| 0%| F| |TAMS 0x00000000a4400000, 0x00000000a4400000| Untracked
|
||||
| 49|0x00000000a4500000, 0x00000000a4500000, 0x00000000a4600000| 0%| F| |TAMS 0x00000000a4500000, 0x00000000a4500000| Untracked
|
||||
| 50|0x00000000a4600000, 0x00000000a4600000, 0x00000000a4700000| 0%| F| |TAMS 0x00000000a4600000, 0x00000000a4600000| Untracked
|
||||
| 51|0x00000000a4700000, 0x00000000a4700000, 0x00000000a4800000| 0%| F| |TAMS 0x00000000a4700000, 0x00000000a4700000| Untracked
|
||||
| 52|0x00000000a4800000, 0x00000000a4800000, 0x00000000a4900000| 0%| F| |TAMS 0x00000000a4800000, 0x00000000a4800000| Untracked
|
||||
| 53|0x00000000a4900000, 0x00000000a4900000, 0x00000000a4a00000| 0%| F| |TAMS 0x00000000a4900000, 0x00000000a4900000| Untracked
|
||||
| 54|0x00000000a4a00000, 0x00000000a4a00000, 0x00000000a4b00000| 0%| F| |TAMS 0x00000000a4a00000, 0x00000000a4a00000| Untracked
|
||||
| 55|0x00000000a4b00000, 0x00000000a4b00000, 0x00000000a4c00000| 0%| F| |TAMS 0x00000000a4b00000, 0x00000000a4b00000| Untracked
|
||||
| 56|0x00000000a4c00000, 0x00000000a4c00000, 0x00000000a4d00000| 0%| F| |TAMS 0x00000000a4c00000, 0x00000000a4c00000| Untracked
|
||||
| 57|0x00000000a4d00000, 0x00000000a4d00000, 0x00000000a4e00000| 0%| F| |TAMS 0x00000000a4d00000, 0x00000000a4d00000| Untracked
|
||||
| 58|0x00000000a4e00000, 0x00000000a4e00000, 0x00000000a4f00000| 0%| F| |TAMS 0x00000000a4e00000, 0x00000000a4e00000| Untracked
|
||||
| 59|0x00000000a4f00000, 0x00000000a4f00000, 0x00000000a5000000| 0%| F| |TAMS 0x00000000a4f00000, 0x00000000a4f00000| Untracked
|
||||
| 60|0x00000000a5000000, 0x00000000a5000000, 0x00000000a5100000| 0%| F| |TAMS 0x00000000a5000000, 0x00000000a5000000| Untracked
|
||||
| 61|0x00000000a5100000, 0x00000000a5100000, 0x00000000a5200000| 0%| F| |TAMS 0x00000000a5100000, 0x00000000a5100000| Untracked
|
||||
| 62|0x00000000a5200000, 0x00000000a5200000, 0x00000000a5300000| 0%| F| |TAMS 0x00000000a5200000, 0x00000000a5200000| Untracked
|
||||
| 63|0x00000000a5300000, 0x00000000a5300000, 0x00000000a5400000| 0%| F| |TAMS 0x00000000a5300000, 0x00000000a5300000| Untracked
|
||||
| 64|0x00000000a5400000, 0x00000000a5400000, 0x00000000a5500000| 0%| F| |TAMS 0x00000000a5400000, 0x00000000a5400000| Untracked
|
||||
| 65|0x00000000a5500000, 0x00000000a5500000, 0x00000000a5600000| 0%| F| |TAMS 0x00000000a5500000, 0x00000000a5500000| Untracked
|
||||
| 66|0x00000000a5600000, 0x00000000a5600000, 0x00000000a5700000| 0%| F| |TAMS 0x00000000a5600000, 0x00000000a5600000| Untracked
|
||||
| 67|0x00000000a5700000, 0x00000000a5700000, 0x00000000a5800000| 0%| F| |TAMS 0x00000000a5700000, 0x00000000a5700000| Untracked
|
||||
| 68|0x00000000a5800000, 0x00000000a5800000, 0x00000000a5900000| 0%| F| |TAMS 0x00000000a5800000, 0x00000000a5800000| Untracked
|
||||
| 69|0x00000000a5900000, 0x00000000a5900000, 0x00000000a5a00000| 0%| F| |TAMS 0x00000000a5900000, 0x00000000a5900000| Untracked
|
||||
| 70|0x00000000a5a00000, 0x00000000a5a00000, 0x00000000a5b00000| 0%| F| |TAMS 0x00000000a5a00000, 0x00000000a5a00000| Untracked
|
||||
| 71|0x00000000a5b00000, 0x00000000a5b00000, 0x00000000a5c00000| 0%| F| |TAMS 0x00000000a5b00000, 0x00000000a5b00000| Untracked
|
||||
| 72|0x00000000a5c00000, 0x00000000a5c00000, 0x00000000a5d00000| 0%| F| |TAMS 0x00000000a5c00000, 0x00000000a5c00000| Untracked
|
||||
| 73|0x00000000a5d00000, 0x00000000a5d00000, 0x00000000a5e00000| 0%| F| |TAMS 0x00000000a5d00000, 0x00000000a5d00000| Untracked
|
||||
| 74|0x00000000a5e00000, 0x00000000a5e00000, 0x00000000a5f00000| 0%| F| |TAMS 0x00000000a5e00000, 0x00000000a5e00000| Untracked
|
||||
| 75|0x00000000a5f00000, 0x00000000a5f00000, 0x00000000a6000000| 0%| F| |TAMS 0x00000000a5f00000, 0x00000000a5f00000| Untracked
|
||||
| 76|0x00000000a6000000, 0x00000000a6000000, 0x00000000a6100000| 0%| F| |TAMS 0x00000000a6000000, 0x00000000a6000000| Untracked
|
||||
| 77|0x00000000a6100000, 0x00000000a6100000, 0x00000000a6200000| 0%| F| |TAMS 0x00000000a6100000, 0x00000000a6100000| Untracked
|
||||
| 78|0x00000000a6200000, 0x00000000a6200000, 0x00000000a6300000| 0%| F| |TAMS 0x00000000a6200000, 0x00000000a6200000| Untracked
|
||||
| 79|0x00000000a6300000, 0x00000000a6300000, 0x00000000a6400000| 0%| F| |TAMS 0x00000000a6300000, 0x00000000a6300000| Untracked
|
||||
| 80|0x00000000a6400000, 0x00000000a6400000, 0x00000000a6500000| 0%| F| |TAMS 0x00000000a6400000, 0x00000000a6400000| Untracked
|
||||
| 81|0x00000000a6500000, 0x00000000a6500000, 0x00000000a6600000| 0%| F| |TAMS 0x00000000a6500000, 0x00000000a6500000| Untracked
|
||||
| 82|0x00000000a6600000, 0x00000000a6600000, 0x00000000a6700000| 0%| F| |TAMS 0x00000000a6600000, 0x00000000a6600000| Untracked
|
||||
| 83|0x00000000a6700000, 0x00000000a6700000, 0x00000000a6800000| 0%| F| |TAMS 0x00000000a6700000, 0x00000000a6700000| Untracked
|
||||
| 84|0x00000000a6800000, 0x00000000a6800000, 0x00000000a6900000| 0%| F| |TAMS 0x00000000a6800000, 0x00000000a6800000| Untracked
|
||||
| 85|0x00000000a6900000, 0x00000000a6900000, 0x00000000a6a00000| 0%| F| |TAMS 0x00000000a6900000, 0x00000000a6900000| Untracked
|
||||
| 86|0x00000000a6a00000, 0x00000000a6a00000, 0x00000000a6b00000| 0%| F| |TAMS 0x00000000a6a00000, 0x00000000a6a00000| Untracked
|
||||
| 87|0x00000000a6b00000, 0x00000000a6b00000, 0x00000000a6c00000| 0%| F| |TAMS 0x00000000a6b00000, 0x00000000a6b00000| Untracked
|
||||
| 88|0x00000000a6c00000, 0x00000000a6c00000, 0x00000000a6d00000| 0%| F| |TAMS 0x00000000a6c00000, 0x00000000a6c00000| Untracked
|
||||
| 89|0x00000000a6d00000, 0x00000000a6d76700, 0x00000000a6e00000| 46%| E| |TAMS 0x00000000a6d00000, 0x00000000a6d00000| Complete
|
||||
| 90|0x00000000a6e00000, 0x00000000a6f00000, 0x00000000a6f00000|100%| E|CS|TAMS 0x00000000a6e00000, 0x00000000a6e00000| Complete
|
||||
| 91|0x00000000a6f00000, 0x00000000a7000000, 0x00000000a7000000|100%| E|CS|TAMS 0x00000000a6f00000, 0x00000000a6f00000| Complete
|
||||
| 92|0x00000000a7000000, 0x00000000a7100000, 0x00000000a7100000|100%| E| |TAMS 0x00000000a7000000, 0x00000000a7000000| Complete
|
||||
| 93|0x00000000a7100000, 0x00000000a7200000, 0x00000000a7200000|100%| E|CS|TAMS 0x00000000a7100000, 0x00000000a7100000| Complete
|
||||
| 94|0x00000000a7200000, 0x00000000a7300000, 0x00000000a7300000|100%| E|CS|TAMS 0x00000000a7200000, 0x00000000a7200000| Complete
|
||||
| 95|0x00000000a7300000, 0x00000000a7400000, 0x00000000a7400000|100%| E|CS|TAMS 0x00000000a7300000, 0x00000000a7300000| Complete
|
||||
|
||||
Card table byte_map: [0x00000196d56e0000,0x00000196d59e0000] _byte_map_base: 0x00000196d51d6000
|
||||
|
||||
Marking Bits (Prev, Next): (CMBitMap*) 0x00000196be7c95a0, (CMBitMap*) 0x00000196be7c95e0
|
||||
Prev Bits: [0x00000196d5ce0000, 0x00000196d7490000)
|
||||
Next Bits: [0x00000196d7490000, 0x00000196d8c40000)
|
||||
|
||||
Polling page: 0x00000196bc8d0000
|
||||
|
||||
Metaspace:
|
||||
|
||||
Usage:
|
||||
Non-class: 2.10 MB used.
|
||||
Class: 212.52 KB used.
|
||||
Both: 2.30 MB used.
|
||||
|
||||
Virtual space:
|
||||
Non-class space: 64.00 MB reserved, 2.12 MB ( 3%) committed, 1 nodes.
|
||||
Class space: 1.00 GB reserved, 320.00 KB ( <1%) committed, 1 nodes.
|
||||
Both: 1.06 GB reserved, 2.44 MB ( <1%) committed.
|
||||
|
||||
Chunk freelists:
|
||||
Non-Class: 3.25 MB
|
||||
Class: 3.66 MB
|
||||
Both: 6.91 MB
|
||||
|
||||
MaxMetaspaceSize: unlimited
|
||||
CompressedClassSpaceSize: 1.00 GB
|
||||
Initial GC threshold: 21.00 MB
|
||||
Current GC threshold: 21.00 MB
|
||||
CDS: on
|
||||
MetaspaceReclaimPolicy: balanced
|
||||
- commit_granule_bytes: 65536.
|
||||
- commit_granule_words: 8192.
|
||||
- virtual_space_node_default_size: 8388608.
|
||||
- enlarge_chunks_in_place: 1.
|
||||
- new_chunks_are_fully_committed: 0.
|
||||
- uncommit_free_chunks: 1.
|
||||
- use_allocation_guard: 0.
|
||||
|
||||
|
||||
Internal statistics:
|
||||
|
||||
num_allocs_failed_limit: 0.
|
||||
num_arena_births: 32.
|
||||
num_arena_deaths: 0.
|
||||
num_vsnodes_births: 2.
|
||||
num_vsnodes_deaths: 0.
|
||||
num_space_committed: 39.
|
||||
num_space_uncommitted: 0.
|
||||
num_chunks_returned_to_freelist: 0.
|
||||
num_chunks_taken_from_freelist: 74.
|
||||
num_chunk_merges: 0.
|
||||
num_chunk_splits: 50.
|
||||
num_chunks_enlarged: 39.
|
||||
num_inconsistent_stats: 0.
|
||||
|
||||
CodeHeap 'non-profiled nmethods': size=120000Kb used=153Kb max_used=153Kb free=119846Kb
|
||||
bounds [0x00000196cdb80000, 0x00000196cddf0000, 0x00000196d50b0000]
|
||||
CodeHeap 'profiled nmethods': size=120000Kb used=883Kb max_used=883Kb free=119116Kb
|
||||
bounds [0x00000196c6650000, 0x00000196c68c0000, 0x00000196cdb80000]
|
||||
CodeHeap 'non-nmethods': size=5760Kb used=1140Kb max_used=1155Kb free=4619Kb
|
||||
bounds [0x00000196c60b0000, 0x00000196c6320000, 0x00000196c6650000]
|
||||
total_blobs=957 nmethods=544 adapters=326
|
||||
compilation: enabled
|
||||
stopped_count=0, restarted_count=0
|
||||
full_count=0
|
||||
|
||||
Compilation events (20 events):
|
||||
Event: 0.809 Thread 0x00000196db61cea0 534 3 java.lang.String::indexOf (18 bytes)
|
||||
Event: 0.809 Thread 0x00000196db61cea0 nmethod 534 0x00000196c6729c90 code [0x00000196c6729e60, 0x00000196c672a128]
|
||||
Event: 0.810 Thread 0x00000196db61cea0 535 3 java.lang.String::indexOf (113 bytes)
|
||||
Event: 0.810 Thread 0x00000196db61cea0 nmethod 535 0x00000196c672a290 code [0x00000196c672a4c0, 0x00000196c672aae8]
|
||||
Event: 0.811 Thread 0x00000196db61cea0 536 3 java.net.URL::<init> (8 bytes)
|
||||
Event: 0.811 Thread 0x00000196db61cea0 nmethod 536 0x00000196c672ac90 code [0x00000196c672ae40, 0x00000196c672af88]
|
||||
Event: 0.812 Thread 0x00000196db608b90 537 % 4 java.lang.StringLatin1::indexOf @ 30 (121 bytes)
|
||||
Event: 0.816 Thread 0x00000196db61cea0 539 3 jdk.internal.jimage.BasicImageReader::getLocationIndex (52 bytes)
|
||||
Event: 0.817 Thread 0x00000196db61cea0 nmethod 539 0x00000196c672b010 code [0x00000196c672b200, 0x00000196c672b698]
|
||||
Event: 0.819 Thread 0x00000196db61cea0 541 3 java.util.ArrayList$Itr::next (66 bytes)
|
||||
Event: 0.820 Thread 0x00000196db61cea0 nmethod 541 0x00000196c672b910 code [0x00000196c672bb00, 0x00000196c672bec8]
|
||||
Event: 0.820 Thread 0x00000196db61cea0 542 3 java.util.ArrayList$Itr::checkForComodification (23 bytes)
|
||||
Event: 0.820 Thread 0x00000196db61cea0 nmethod 542 0x00000196c672c090 code [0x00000196c672c240, 0x00000196c672c408]
|
||||
Event: 0.820 Thread 0x00000196db61cea0 543 3 java.lang.Character::getType (9 bytes)
|
||||
Event: 0.820 Thread 0x00000196db61cea0 nmethod 543 0x00000196c672c510 code [0x00000196c672c6c0, 0x00000196c672c8b8]
|
||||
Event: 0.820 Thread 0x00000196db61cea0 544 3 java.lang.CharacterDataLatin1::getType (11 bytes)
|
||||
Event: 0.820 Thread 0x00000196db61cea0 nmethod 544 0x00000196c672c990 code [0x00000196c672cb40, 0x00000196c672ccf8]
|
||||
Event: 0.824 Thread 0x00000196db61cea0 545 3 jdk.internal.loader.ClassLoaders$AppClassLoader::loadClass (40 bytes)
|
||||
Event: 0.825 Thread 0x00000196db608b90 nmethod 537% 0x00000196cdba5610 code [0x00000196cdba57a0, 0x00000196cdba5b18]
|
||||
Event: 0.825 Thread 0x00000196db608b90 540 4 java.nio.Buffer::scope (17 bytes)
|
||||
|
||||
GC Heap History (0 events):
|
||||
No events
|
||||
|
||||
Deoptimization events (4 events):
|
||||
Event: 0.300 Thread 0x00000196be777660 Uncommon trap: trap_request=0xffffff45 fr.pc=0x00000196cdb8b264 relative=0x0000000000000064
|
||||
Event: 0.300 Thread 0x00000196be777660 Uncommon trap: reason=unstable_if action=reinterpret pc=0x00000196cdb8b264 method=java.io.WinNTFileSystem.isSlash(C)Z @ 9 c2
|
||||
Event: 0.300 Thread 0x00000196be777660 DEOPT PACKING pc=0x00000196cdb8b264 sp=0x000000221c2fe330
|
||||
Event: 0.300 Thread 0x00000196be777660 DEOPT UNPACKING pc=0x00000196c61023a3 sp=0x000000221c2fe2b8 mode 2
|
||||
|
||||
Classes loaded (20 events):
|
||||
Event: 0.776 Loading class sun/net/ProgressMeteringPolicy
|
||||
Event: 0.776 Loading class sun/net/ProgressMeteringPolicy done
|
||||
Event: 0.776 Loading class sun/net/DefaultProgressMeteringPolicy done
|
||||
Event: 0.782 Loading class java/lang/IllegalAccessException
|
||||
Event: 0.782 Loading class java/lang/IllegalAccessException done
|
||||
Event: 0.783 Loading class java/lang/InstantiationException
|
||||
Event: 0.783 Loading class java/lang/InstantiationException done
|
||||
Event: 0.792 Loading class java/io/StringWriter
|
||||
Event: 0.792 Loading class java/io/StringWriter done
|
||||
Event: 0.793 Loading class java/io/StringReader
|
||||
Event: 0.793 Loading class java/io/StringReader done
|
||||
Event: 0.797 Loading class java/lang/AssertionError
|
||||
Event: 0.797 Loading class java/lang/AssertionError done
|
||||
Event: 0.805 Loading class java/lang/StringIndexOutOfBoundsException
|
||||
Event: 0.805 Loading class java/lang/IndexOutOfBoundsException
|
||||
Event: 0.805 Loading class java/lang/IndexOutOfBoundsException done
|
||||
Event: 0.805 Loading class java/lang/StringIndexOutOfBoundsException done
|
||||
Event: 0.818 Loading class jdk/internal/misc/ScopedMemoryAccess$Scope
|
||||
Event: 0.818 Loading class jdk/internal/misc/ScopedMemoryAccess$Scope done
|
||||
Event: 0.824 Loading class java/io/FileReader
|
||||
|
||||
Classes unloaded (0 events):
|
||||
No events
|
||||
|
||||
Classes redefined (0 events):
|
||||
No events
|
||||
|
||||
Internal exceptions (3 events):
|
||||
Event: 0.332 Thread 0x00000196be777660 Exception <a 'java/lang/NoSuchMethodError'{0x00000000a704d590}: 'java.lang.Object java.lang.invoke.Invokers$Holder.invokeExact_MT(java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object)'> (0x00000000a704d590)
|
||||
thrown [s\open\src\hotspot\share\interpreter\linkResolver.cpp, line 766]
|
||||
Event: 0.468 Thread 0x00000196be777660 Exception <a 'java/lang/NoSuchMethodError'{0x00000000a6f51a28}: 'java.lang.Object java.lang.invoke.DirectMethodHandle$Holder.invokeStaticInit(java.lang.Object, int, int, int, int)'> (0x00000000a6f51a28)
|
||||
thrown [s\open\src\hotspot\share\interpreter\linkResolver.cpp, line 766]
|
||||
Event: 0.601 Thread 0x00000196be777660 Exception <a 'java/lang/NoSuchMethodError'{0x00000000a6f9a260}: 'java.lang.Object java.lang.invoke.DirectMethodHandle$Holder.invokeStaticInit(java.lang.Object, java.lang.Object, int, int, int, int)'> (0x00000000a6f9a260)
|
||||
thrown [s\open\src\hotspot\share\interpreter\linkResolver.cpp, line 766]
|
||||
|
||||
VM Operations (12 events):
|
||||
Event: 0.116 Executing VM operation: HandshakeAllThreads
|
||||
Event: 0.116 Executing VM operation: HandshakeAllThreads done
|
||||
Event: 0.363 Executing VM operation: HandshakeAllThreads
|
||||
Event: 0.363 Executing VM operation: HandshakeAllThreads done
|
||||
Event: 0.500 Executing VM operation: HandshakeAllThreads
|
||||
Event: 0.500 Executing VM operation: HandshakeAllThreads done
|
||||
Event: 0.612 Executing VM operation: HandshakeAllThreads
|
||||
Event: 0.612 Executing VM operation: HandshakeAllThreads done
|
||||
Event: 0.659 Executing VM operation: HandshakeAllThreads
|
||||
Event: 0.659 Executing VM operation: HandshakeAllThreads done
|
||||
Event: 0.773 Executing VM operation: HandshakeAllThreads
|
||||
Event: 0.774 Executing VM operation: HandshakeAllThreads done
|
||||
|
||||
Events (20 events):
|
||||
Event: 0.030 Loaded shared library C:\Program Files\Java\jdk-18.0.1\bin\jsvml.dll
|
||||
Event: 0.031 Thread 0x00000196be777660 Thread added: 0x00000196be777660
|
||||
Event: 0.035 Thread 0x00000196db5e6ac0 Thread added: 0x00000196db5e6ac0
|
||||
Event: 0.035 Thread 0x00000196db5e7720 Thread added: 0x00000196db5e7720
|
||||
Event: 0.056 Thread 0x00000196db603f40 Thread added: 0x00000196db603f40
|
||||
Event: 0.056 Thread 0x00000196db6058f0 Thread added: 0x00000196db6058f0
|
||||
Event: 0.056 Thread 0x00000196db606290 Thread added: 0x00000196db606290
|
||||
Event: 0.056 Thread 0x00000196db606d70 Thread added: 0x00000196db606d70
|
||||
Event: 0.057 Thread 0x00000196db608b90 Thread added: 0x00000196db608b90
|
||||
Event: 0.057 Thread 0x00000196db61cea0 Thread added: 0x00000196db61cea0
|
||||
Event: 0.057 Thread 0x00000196db6333c0 Thread added: 0x00000196db6333c0
|
||||
Event: 0.086 Thread 0x00000196df884700 Thread added: 0x00000196df884700
|
||||
Event: 0.094 Thread 0x00000196df8888a0 Thread added: 0x00000196df8888a0
|
||||
Event: 0.102 Loaded shared library C:\Program Files\Java\jdk-18.0.1\bin\net.dll
|
||||
Event: 0.107 Loaded shared library C:\Program Files\Java\jdk-18.0.1\bin\nio.dll
|
||||
Event: 0.115 Loaded shared library C:\Program Files\Java\jdk-18.0.1\bin\zip.dll
|
||||
Event: 0.368 Loaded shared library C:\Program Files\Java\jdk-18.0.1\bin\verify.dll
|
||||
Event: 0.399 Loaded shared library C:\Program Files\Java\jdk-18.0.1\bin\jimage.dll
|
||||
Event: 0.653 Loaded shared library C:\Users\guill\AppData\Local\Temp\jansi-1.17.1-2708375098780757364.dll
|
||||
Event: 0.690 Loaded shared library C:\Users\guill\AppData\Local\Temp\jansi-1.17.1-3176157090017154440.dll
|
||||
|
||||
|
||||
Dynamic libraries:
|
||||
0x00007ff7a7750000 - 0x00007ff7a7760000 C:\Program Files\Java\jdk-18.0.1\bin\java.exe
|
||||
0x00007ffbfbb50000 - 0x00007ffbfbd45000 C:\WINDOWS\SYSTEM32\ntdll.dll
|
||||
0x00007ffbd8b00000 - 0x00007ffbd8b16000 C:\Program Files\Avast Software\Avast\aswhook.dll
|
||||
0x00007ffbf9ba0000 - 0x00007ffbf9c5d000 C:\WINDOWS\System32\KERNEL32.DLL
|
||||
0x00007ffbf97d0000 - 0x00007ffbf9a9d000 C:\WINDOWS\System32\KERNELBASE.dll
|
||||
0x00007ffbf9aa0000 - 0x00007ffbf9ba0000 C:\WINDOWS\System32\ucrtbase.dll
|
||||
0x00007ffbf2cb0000 - 0x00007ffbf2cc8000 C:\Program Files\Java\jdk-18.0.1\bin\jli.dll
|
||||
0x00007ffbec2b0000 - 0x00007ffbec2ca000 C:\Program Files\Java\jdk-18.0.1\bin\VCRUNTIME140.dll
|
||||
0x00007ffbfb5f0000 - 0x00007ffbfb69e000 C:\WINDOWS\System32\ADVAPI32.dll
|
||||
0x00007ffbf9da0000 - 0x00007ffbf9e3e000 C:\WINDOWS\System32\msvcrt.dll
|
||||
0x00007ffbfa6b0000 - 0x00007ffbfa74c000 C:\WINDOWS\System32\sechost.dll
|
||||
0x00007ffbfb460000 - 0x00007ffbfb585000 C:\WINDOWS\System32\RPCRT4.dll
|
||||
0x00007ffbfb7c0000 - 0x00007ffbfb960000 C:\WINDOWS\System32\USER32.dll
|
||||
0x00007ffbdc100000 - 0x00007ffbdc39a000 C:\WINDOWS\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.19041.1110_none_60b5254171f9507e\COMCTL32.dll
|
||||
0x00007ffbf9700000 - 0x00007ffbf9722000 C:\WINDOWS\System32\win32u.dll
|
||||
0x00007ffbfa680000 - 0x00007ffbfa6aa000 C:\WINDOWS\System32\GDI32.dll
|
||||
0x00007ffbf9540000 - 0x00007ffbf964b000 C:\WINDOWS\System32\gdi32full.dll
|
||||
0x00007ffbf9340000 - 0x00007ffbf93dd000 C:\WINDOWS\System32\msvcp_win.dll
|
||||
0x00007ffbf2c30000 - 0x00007ffbf2c3a000 C:\WINDOWS\SYSTEM32\VERSION.dll
|
||||
0x00007ffbfa650000 - 0x00007ffbfa680000 C:\WINDOWS\System32\IMM32.DLL
|
||||
0x00007ffbf3df0000 - 0x00007ffbf3dfc000 C:\Program Files\Java\jdk-18.0.1\bin\vcruntime140_1.dll
|
||||
0x00007ffbda4c0000 - 0x00007ffbda54d000 C:\Program Files\Java\jdk-18.0.1\bin\msvcp140.dll
|
||||
0x00007ffbbf6a0000 - 0x00007ffbc02b0000 C:\Program Files\Java\jdk-18.0.1\bin\server\jvm.dll
|
||||
0x00007ffbf9c60000 - 0x00007ffbf9c68000 C:\WINDOWS\System32\PSAPI.DLL
|
||||
0x00007ffbe6a50000 - 0x00007ffbe6a59000 C:\WINDOWS\SYSTEM32\WSOCK32.dll
|
||||
0x00007ffbedb20000 - 0x00007ffbedb47000 C:\WINDOWS\SYSTEM32\WINMM.dll
|
||||
0x00007ffbfa7b0000 - 0x00007ffbfa81b000 C:\WINDOWS\System32\WS2_32.dll
|
||||
0x00007ffbf7120000 - 0x00007ffbf7132000 C:\WINDOWS\SYSTEM32\kernel.appcore.dll
|
||||
0x00007ffbf07b0000 - 0x00007ffbf07ba000 C:\Program Files\Java\jdk-18.0.1\bin\jimage.dll
|
||||
0x00007ffbe8240000 - 0x00007ffbe8424000 C:\WINDOWS\SYSTEM32\DBGHELP.DLL
|
||||
0x00007ffbe8210000 - 0x00007ffbe823c000 C:\WINDOWS\SYSTEM32\dbgcore.DLL
|
||||
0x00007ffbf92b0000 - 0x00007ffbf9332000 C:\WINDOWS\System32\bcryptPrimitives.dll
|
||||
0x00007ffbec280000 - 0x00007ffbec2a5000 C:\Program Files\Java\jdk-18.0.1\bin\java.dll
|
||||
0x00007ffbd4ec0000 - 0x00007ffbd4f96000 C:\Program Files\Java\jdk-18.0.1\bin\jsvml.dll
|
||||
0x00007ffbfa8d0000 - 0x00007ffbfb014000 C:\WINDOWS\System32\SHELL32.dll
|
||||
0x00007ffbf7320000 - 0x00007ffbf7ab4000 C:\WINDOWS\SYSTEM32\windows.storage.dll
|
||||
0x00007ffbfb020000 - 0x00007ffbfb374000 C:\WINDOWS\System32\combase.dll
|
||||
0x00007ffbf8bf0000 - 0x00007ffbf8c1c000 C:\WINDOWS\SYSTEM32\Wldp.dll
|
||||
0x00007ffbfa090000 - 0x00007ffbfa13d000 C:\WINDOWS\System32\SHCORE.dll
|
||||
0x00007ffbfb590000 - 0x00007ffbfb5e5000 C:\WINDOWS\System32\shlwapi.dll
|
||||
0x00007ffbf91a0000 - 0x00007ffbf91bf000 C:\WINDOWS\SYSTEM32\profapi.dll
|
||||
0x00007ffbec260000 - 0x00007ffbec273000 C:\Program Files\Java\jdk-18.0.1\bin\net.dll
|
||||
0x00007ffbf02b0000 - 0x00007ffbf03ba000 C:\WINDOWS\SYSTEM32\WINHTTP.dll
|
||||
0x00007ffbf8910000 - 0x00007ffbf897a000 C:\WINDOWS\system32\mswsock.dll
|
||||
0x00007ffbebfa0000 - 0x00007ffbebfb6000 C:\Program Files\Java\jdk-18.0.1\bin\nio.dll
|
||||
0x00007ffbe4750000 - 0x00007ffbe4768000 C:\Program Files\Java\jdk-18.0.1\bin\zip.dll
|
||||
0x00007ffbf3e60000 - 0x00007ffbf3e70000 C:\Program Files\Java\jdk-18.0.1\bin\verify.dll
|
||||
0x00007ffbf8b40000 - 0x00007ffbf8b58000 C:\WINDOWS\SYSTEM32\CRYPTSP.dll
|
||||
0x00007ffbf8290000 - 0x00007ffbf82c4000 C:\WINDOWS\system32\rsaenh.dll
|
||||
0x00007ffbf97a0000 - 0x00007ffbf97c7000 C:\WINDOWS\System32\bcrypt.dll
|
||||
0x00007ffbf9120000 - 0x00007ffbf914e000 C:\WINDOWS\SYSTEM32\USERENV.dll
|
||||
0x00007ffbf8b60000 - 0x00007ffbf8b6c000 C:\WINDOWS\SYSTEM32\CRYPTBASE.dll
|
||||
0x00007ffbf8610000 - 0x00007ffbf864b000 C:\WINDOWS\SYSTEM32\IPHLPAPI.DLL
|
||||
0x00007ffbf9ec0000 - 0x00007ffbf9ec8000 C:\WINDOWS\System32\NSI.dll
|
||||
0x00007ffbefaa0000 - 0x00007ffbefab7000 C:\WINDOWS\SYSTEM32\dhcpcsvc6.DLL
|
||||
0x00007ffbf0450000 - 0x00007ffbf046d000 C:\WINDOWS\SYSTEM32\dhcpcsvc.DLL
|
||||
0x00007ffbf8650000 - 0x00007ffbf871b000 C:\WINDOWS\SYSTEM32\DNSAPI.dll
|
||||
0x00007ffbf3800000 - 0x00007ffbf380a000 C:\Users\guill\AppData\Local\Temp\jansi-1.17.1-2708375098780757364.dll
|
||||
0x00007ffbf2c80000 - 0x00007ffbf2c8a000 C:\Users\guill\AppData\Local\Temp\jansi-1.17.1-3176157090017154440.dll
|
||||
|
||||
dbghelp: loaded successfully - version: 4.0.5 - missing functions: none
|
||||
symbol engine: initialized successfully - sym options: 0x614 - pdb path: .;C:\Program Files\Java\jdk-18.0.1\bin;C:\WINDOWS\SYSTEM32;C:\Program Files\Avast Software\Avast;C:\WINDOWS\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.19041.1110_none_60b5254171f9507e;C:\Program Files\Java\jdk-18.0.1\bin\server;C:\Users\guill\AppData\Local\Temp
|
||||
|
||||
VM Arguments:
|
||||
jvm_args: -Dmaven.multiModuleProjectDirectory=C:\Users\guill\gitProjects\mmocore -Dmaven.home=C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2021.1.2\plugins\maven\lib\maven3 -Dclassworlds.conf=C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2021.1.2\plugins\maven\lib\maven3\bin\m2.conf -Dmaven.ext.class.path=C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2021.1.2\plugins\maven\lib\maven-event-listener.jar -Dfile.encoding=UTF-8
|
||||
java_command: org.codehaus.classworlds.Launcher -Didea.version=2021.1.2 install --non-recursive
|
||||
java_class_path (initial): C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2021.1.2\plugins\maven\lib\maven3\boot\plexus-classworlds-2.6.0.jar;C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2021.1.2\plugins\maven\lib\maven3\boot\plexus-classworlds.license
|
||||
Launcher Type: SUN_STANDARD
|
||||
|
||||
[Global flags]
|
||||
intx CICompilerCount = 4 {product} {ergonomic}
|
||||
uint ConcGCThreads = 2 {product} {ergonomic}
|
||||
uint G1ConcRefinementThreads = 8 {product} {ergonomic}
|
||||
size_t G1HeapRegionSize = 1048576 {product} {ergonomic}
|
||||
uintx GCDrainStackTargetSize = 64 {product} {ergonomic}
|
||||
size_t InitialHeapSize = 100663296 {product} {ergonomic}
|
||||
size_t MarkStackSize = 4194304 {product} {ergonomic}
|
||||
size_t MaxHeapSize = 1589641216 {product} {ergonomic}
|
||||
size_t MaxNewSize = 953155584 {product} {ergonomic}
|
||||
size_t MinHeapDeltaBytes = 1048576 {product} {ergonomic}
|
||||
size_t MinHeapSize = 8388608 {product} {ergonomic}
|
||||
uintx NonNMethodCodeHeapSize = 5839372 {pd product} {ergonomic}
|
||||
uintx NonProfiledCodeHeapSize = 122909434 {pd product} {ergonomic}
|
||||
uintx ProfiledCodeHeapSize = 122909434 {pd product} {ergonomic}
|
||||
uintx ReservedCodeCacheSize = 251658240 {pd product} {ergonomic}
|
||||
bool SegmentedCodeCache = true {product} {ergonomic}
|
||||
size_t SoftMaxHeapSize = 1589641216 {manageable} {ergonomic}
|
||||
bool UseCompressedClassPointers = true {product lp64_product} {ergonomic}
|
||||
bool UseCompressedOops = true {product lp64_product} {ergonomic}
|
||||
bool UseG1GC = true {product} {ergonomic}
|
||||
bool UseLargePagesIndividualAllocation = false {pd product} {ergonomic}
|
||||
|
||||
Logging:
|
||||
Log output configuration:
|
||||
#0: stdout all=warning uptime,level,tags foldmultilines=false
|
||||
#1: stderr all=off uptime,level,tags foldmultilines=false
|
||||
|
||||
Environment Variables:
|
||||
PATH=C:\Program Files\Common Files\Oracle\Java\javapath;C:\Program Files\Java\jdk-16.0.2\bin\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\nodejs\;C:\Program Files\Docker\Docker\resources\bin;C:\ProgramData\DockerDesktop\version-bin;PATH;C:\Users\guill\AppData\Local\Microsoft\WindowsApps;C:\Windows\System32;;C:\Users\guill\Desktop\Microsoft VS Code\bin;C:\Users\guill\AppData\Roaming\npm
|
||||
USERNAME=guill
|
||||
OS=Windows_NT
|
||||
PROCESSOR_IDENTIFIER=AMD64 Family 23 Model 24 Stepping 1, AuthenticAMD
|
||||
|
||||
|
||||
|
||||
--------------- S Y S T E M ---------------
|
||||
|
||||
OS:
|
||||
Windows 10 , 64 bit Build 19041 (10.0.19041.1706)
|
||||
OS uptime: 11 days 18:11 hours
|
||||
Hyper-V role detected
|
||||
|
||||
CPU: total 8 (initial active 8) (8 cores per cpu, 2 threads per core) family 23 model 24 stepping 1 microcode 0x0, cx8, cmov, fxsr, ht, mmx, 3dnowpref, sse, sse2, sse3, ssse3, sse4a, sse4.1, sse4.2, popcnt, lzcnt, tsc, tscinvbit, avx, avx2, aes, clmul, bmi1, bmi2, adx, sha, fma, vzeroupper, clflush, clflushopt, hv
|
||||
|
||||
Memory: 4k page, system-wide physical 6061M (387M free)
|
||||
TotalPageFile size 24493M (AvailPageFile size 0M)
|
||||
current process WorkingSet (physical memory assigned to process): 44M, peak: 44M
|
||||
current process commit charge ("private bytes"): 182M, peak: 182M
|
||||
|
||||
vm_info: Java HotSpot(TM) 64-Bit Server VM (18.0.1+10-24) for windows-amd64 JRE (18.0.1+10-24), built on Mar 9 2022 22:41:56 by "mach5one" with MS VC++ 16.8 / 16.9 (VS2019)
|
||||
|
||||
END.
|
525
hs_err_pid23924.log
Normal file
525
hs_err_pid23924.log
Normal file
@ -0,0 +1,525 @@
|
||||
#
|
||||
# There is insufficient memory for the Java Runtime Environment to continue.
|
||||
# Native memory allocation (mmap) failed to map 65536 bytes for Failed to commit metaspace.
|
||||
# Possible reasons:
|
||||
# The system is out of physical RAM or swap space
|
||||
# The process is running with CompressedOops enabled, and the Java Heap may be blocking the growth of the native heap
|
||||
# Possible solutions:
|
||||
# Reduce memory load on the system
|
||||
# Increase physical memory or swap space
|
||||
# Check if swap backing store is full
|
||||
# Decrease Java heap size (-Xmx/-Xms)
|
||||
# Decrease number of Java threads
|
||||
# Decrease Java thread stack sizes (-Xss)
|
||||
# Set larger code cache with -XX:ReservedCodeCacheSize=
|
||||
# JVM is running with Unscaled Compressed Oops mode in which the Java heap is
|
||||
# placed in the first 4GB address space. The Java Heap base address is the
|
||||
# maximum limit for the native heap growth. Please use -XX:HeapBaseMinAddress
|
||||
# to set the Java Heap base and to place the Java Heap above 4GB virtual address.
|
||||
# This output file may be truncated or incomplete.
|
||||
#
|
||||
# Out of Memory Error (virtualSpaceNode.cpp:110), pid=23924, tid=35452
|
||||
#
|
||||
# JRE version: Java(TM) SE Runtime Environment (18.0.1+10) (build 18.0.1+10-24)
|
||||
# Java VM: Java HotSpot(TM) 64-Bit Server VM (18.0.1+10-24, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, windows-amd64)
|
||||
# No core dump will be written. Minidumps are not enabled by default on client versions of Windows
|
||||
#
|
||||
|
||||
--------------- S U M M A R Y ------------
|
||||
|
||||
Command Line: -Dmaven.multiModuleProjectDirectory=C:\Users\guill\gitProjects\mmocore -Dmaven.home=C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2021.1.2\plugins\maven\lib\maven3 -Dclassworlds.conf=C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2021.1.2\plugins\maven\lib\maven3\bin\m2.conf -Dmaven.ext.class.path=C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2021.1.2\plugins\maven\lib\maven-event-listener.jar -Dfile.encoding=UTF-8 org.codehaus.classworlds.Launcher -Didea.version=2021.1.2 install --non-recursive
|
||||
|
||||
Host: AMD Ryzen 7 3700U with Radeon Vega Mobile Gfx , 8 cores, 5G, Windows 10 , 64 bit Build 19041 (10.0.19041.1706)
|
||||
Time: Tue May 24 23:24:35 2022 Paris, Madrid (heure duild 19041 (10.0.19041.1706) elapsed time: 1.633790 seconds (0d 0h 0m 1s)
|
||||
|
||||
--------------- T H R E A D ---------------
|
||||
|
||||
Current thread (0x000002cbfa035c40): JavaThread "main" [_thread_in_vm, id=35452, stack(0x000000db19a00000,0x000000db19b00000)]
|
||||
|
||||
Stack: [0x000000db19a00000,0x000000db19b00000]
|
||||
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
|
||||
V [jvm.dll+0x69887a]
|
||||
V [jvm.dll+0x7f38bd]
|
||||
V [jvm.dll+0x7f51ce]
|
||||
V [jvm.dll+0x7f5883]
|
||||
V [jvm.dll+0x25ca3f]
|
||||
V [jvm.dll+0x7ef5cb]
|
||||
V [jvm.dll+0x63ea76]
|
||||
V [jvm.dll+0x63eada]
|
||||
V [jvm.dll+0x64135e]
|
||||
V [jvm.dll+0x64121e]
|
||||
V [jvm.dll+0x63f43e]
|
||||
V [jvm.dll+0x649ab7]
|
||||
V [jvm.dll+0x64ce3b]
|
||||
V [jvm.dll+0x76af50]
|
||||
V [jvm.dll+0x57dc2a]
|
||||
V [jvm.dll+0x57f856]
|
||||
V [jvm.dll+0x57d4be]
|
||||
V [jvm.dll+0x57fe0b]
|
||||
V [jvm.dll+0x659f38]
|
||||
V [jvm.dll+0x655f11]
|
||||
C 0x000002cb8787d621
|
||||
|
||||
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
|
||||
j java.lang.invoke.MethodHandleNatives.resolve(Ljava/lang/invoke/MemberName;Ljava/lang/Class;IZ)Ljava/lang/invoke/MemberName;+0 java.base@18.0.1
|
||||
j java.lang.invoke.MemberName$Factory.resolve(BLjava/lang/invoke/MemberName;Ljava/lang/Class;IZ)Ljava/lang/invoke/MemberName;+36 java.base@18.0.1
|
||||
j java.lang.invoke.MemberName$Factory.resolveOrFail(BLjava/lang/invoke/MemberName;Ljava/lang/Class;ILjava/lang/Class;)Ljava/lang/invoke/MemberName;+31 java.base@18.0.1
|
||||
j java.lang.invoke.DirectMethodHandle.makePreparedLambdaForm(Ljava/lang/invoke/MethodType;I)Ljava/lang/invoke/LambdaForm;+330 java.base@18.0.1
|
||||
j java.lang.invoke.DirectMethodHandle.preparedLambdaForm(Ljava/lang/invoke/MethodType;I)Ljava/lang/invoke/LambdaForm;+17 java.base@18.0.1
|
||||
j java.lang.invoke.DirectMethodHandle.preparedLambdaForm(Ljava/lang/invoke/MemberName;Z)Ljava/lang/invoke/LambdaForm;+159 java.base@18.0.1
|
||||
j java.lang.invoke.DirectMethodHandle.preparedLambdaForm(Ljava/lang/invoke/MemberName;)Ljava/lang/invoke/LambdaForm;+2 java.base@18.0.1
|
||||
j java.lang.invoke.DirectMethodHandle.make(BLjava/lang/Class;Ljava/lang/invoke/MemberName;Ljava/lang/Class;)Ljava/lang/invoke/DirectMethodHandle;+163 java.base@18.0.1
|
||||
j java.lang.invoke.DirectMethodHandle.make(Ljava/lang/Class;Ljava/lang/invoke/MemberName;)Ljava/lang/invoke/DirectMethodHandle;+17 java.base@18.0.1
|
||||
j java.lang.invoke.DirectMethodHandle.make(Ljava/lang/invoke/MemberName;)Ljava/lang/invoke/DirectMethodHandle;+17 java.base@18.0.1
|
||||
j java.lang.invoke.Invokers.basicInvoker()Ljava/lang/invoke/MethodHandle;+60 java.base@18.0.1
|
||||
j java.lang.invoke.LambdaForm$NamedFunction.<init>(Ljava/lang/invoke/MethodType;)V+42 java.base@18.0.1
|
||||
j java.lang.invoke.LambdaForm$Name.<init>(Ljava/lang/invoke/MethodType;[Ljava/lang/Object;)V+6 java.base@18.0.1
|
||||
j java.lang.invoke.Invokers.invokeHandleForm(Ljava/lang/invoke/MethodType;ZI)Ljava/lang/invoke/LambdaForm;+595 java.base@18.0.1
|
||||
j java.lang.invoke.Invokers.methodHandleInvokeLinkerMethod(Ljava/lang/String;Ljava/lang/invoke/MethodType;[Ljava/lang/Object;)Ljava/lang/invoke/MemberName;+144 java.base@18.0.1
|
||||
j java.lang.invoke.MethodHandleNatives.linkMethodImpl(Ljava/lang/Class;ILjava/lang/Class;Ljava/lang/String;Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/invoke/MemberName;+20 java.base@18.0.1
|
||||
j java.lang.invoke.MethodHandleNatives.linkMethod(Ljava/lang/Class;ILjava/lang/Class;Ljava/lang/String;Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/invoke/MemberName;+14 java.base@18.0.1
|
||||
v ~StubRoutines::call_stub
|
||||
j jdk.internal.reflect.DirectMethodHandleAccessor.invokeImpl(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+72 java.base@18.0.1
|
||||
j jdk.internal.reflect.DirectMethodHandleAccessor.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+23 java.base@18.0.1
|
||||
j java.lang.reflect.Method.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+102 java.base@18.0.1
|
||||
j org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced([Ljava/lang/String;)V+45
|
||||
j org.codehaus.plexus.classworlds.launcher.Launcher.launch([Ljava/lang/String;)V+2
|
||||
j org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode([Ljava/lang/String;)I+101
|
||||
j org.codehaus.plexus.classworlds.launcher.Launcher.main([Ljava/lang/String;)V+1
|
||||
j org.codehaus.classworlds.Launcher.main([Ljava/lang/String;)V+1
|
||||
v ~StubRoutines::call_stub
|
||||
|
||||
--------------- P R O C E S S ---------------
|
||||
|
||||
Threads class SMR info:
|
||||
_java_thread_list=0x000002cb9b18d4a0, length=12, elements={
|
||||
0x000002cbfa035c40, 0x000002cb96ee2c60, 0x000002cb96ee6070, 0x000002cb96f00d20,
|
||||
0x000002cb96f02ad0, 0x000002cb96f03c10, 0x000002cb96f04e90, 0x000002cb96f09a80,
|
||||
0x000002cb96f2bd60, 0x000002cb96f406c0, 0x000002cb9b1ca2c0, 0x000002cb9b1d2850
|
||||
}
|
||||
|
||||
Java Threads: ( => current thread )
|
||||
=>0x000002cbfa035c40 JavaThread "main" [_thread_in_vm, id=35452, stack(0x000000db19a00000,0x000000db19b00000)]
|
||||
0x000002cb96ee2c60 JavaThread "Reference Handler" daemon [_thread_blocked, id=5596, stack(0x000000db1a100000,0x000000db1a200000)]
|
||||
0x000002cb96ee6070 JavaThread "Finalizer" daemon [_thread_blocked, id=23040, stack(0x000000db1a200000,0x000000db1a300000)]
|
||||
0x000002cb96f00d20 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=34692, stack(0x000000db1a300000,0x000000db1a400000)]
|
||||
0x000002cb96f02ad0 JavaThread "Attach Listener" daemon [_thread_blocked, id=10076, stack(0x000000db1a400000,0x000000db1a500000)]
|
||||
0x000002cb96f03c10 JavaThread "Service Thread" daemon [_thread_blocked, id=30556, stack(0x000000db1a500000,0x000000db1a600000)]
|
||||
0x000002cb96f04e90 JavaThread "Monitor Deflation Thread" daemon [_thread_blocked, id=27468, stack(0x000000db1a600000,0x000000db1a700000)]
|
||||
0x000002cb96f09a80 JavaThread "C2 CompilerThread0" daemon [_thread_blocked, id=24056, stack(0x000000db1a700000,0x000000db1a800000)]
|
||||
0x000002cb96f2bd60 JavaThread "C1 CompilerThread0" daemon [_thread_in_vm, id=22596, stack(0x000000db1a800000,0x000000db1a900000)]
|
||||
0x000002cb96f406c0 JavaThread "Sweeper thread" daemon [_thread_blocked, id=18792, stack(0x000000db1a900000,0x000000db1aa00000)]
|
||||
0x000002cb9b1ca2c0 JavaThread "Notification Thread" daemon [_thread_blocked, id=3768, stack(0x000000db1aa00000,0x000000db1ab00000)]
|
||||
0x000002cb9b1d2850 JavaThread "Common-Cleaner" daemon [_thread_blocked, id=24964, stack(0x000000db1ac00000,0x000000db1ad00000)]
|
||||
|
||||
Other Threads:
|
||||
0x000002cbfa0fe0b0 VMThread "VM Thread" [stack: 0x000000db1a000000,0x000000db1a100000] [id=14012]
|
||||
0x000002cb9b1d25e0 WatcherThread "VM Periodic Task Thread" [stack: 0x000000db1ab00000,0x000000db1ac00000] [id=30256]
|
||||
0x000002cbfa0889b0 WorkerThread "GC Thread#0" [stack: 0x000000db19b00000,0x000000db19c00000] [id=19068]
|
||||
0x000002cbfa096740 ConcurrentGCThread "G1 Main Marker" [stack: 0x000000db19c00000,0x000000db19d00000] [id=30540]
|
||||
0x000002cbfa0978d0 WorkerThread "G1 Conc#0" [stack: 0x000000db19d00000,0x000000db19e00000] [id=22284]
|
||||
0x000002cbfa0dc550 ConcurrentGCThread "G1 Refine#0" [stack: 0x000000db19e00000,0x000000db19f00000] [id=34192]
|
||||
0x000002cbfa0dce60 ConcurrentGCThread "G1 Service" [stack: 0x000000db19f00000,0x000000db1a000000] [id=17324]
|
||||
|
||||
Threads with active compile tasks:
|
||||
C1 CompilerThread0 1768 307 3 jdk.internal.org.objectweb.asm.ByteVector::putShort (52 bytes)
|
||||
|
||||
VM state: not at safepoint (normal execution)
|
||||
|
||||
VM Mutex/Monitor currently owned by a thread: ([mutex/lock_event])
|
||||
[0x000002cbfa01e690] Metaspace_lock - owner thread: 0x000002cbfa035c40
|
||||
[0x000002cbfa02ff60] MethodData_lock - owner thread: 0x000002cb96f2bd60
|
||||
|
||||
Heap address: 0x00000000a1400000, size: 1516 MB, Compressed Oops mode: 32-bit
|
||||
|
||||
CDS archive(s) mapped at: [0x0000000800000000-0x0000000800ba0000-0x0000000800ba0000), size 12189696, SharedBaseAddress: 0x0000000800000000, ArchiveRelocationMode: 0.
|
||||
Compressed class space mapped at: 0x0000000800c00000-0x0000000840c00000, reserved size: 1073741824
|
||||
Narrow klass base: 0x0000000800000000, Narrow klass shift: 0, Narrow klass range: 0x100000000
|
||||
|
||||
GC Precious Log:
|
||||
CardTable entry size: 512
|
||||
Card Set container configuration: InlinePtr #cards 5 size 8 Array Of Cards #cards 12 size 40 Howl #buckets 4 coarsen threshold 1843 Howl Bitmap #cards 512 size 80 coarsen threshold 460 Card regions per heap region 1 cards per card region 2048
|
||||
CPUs: 8 total, 8 available
|
||||
Memory: 6061M
|
||||
Large Page Support: Disabled
|
||||
NUMA Support: Disabled
|
||||
Compressed Oops: Enabled (32-bit)
|
||||
Heap Region Size: 1M
|
||||
Heap Min Capacity: 8M
|
||||
Heap Initial Capacity: 96M
|
||||
Heap Max Capacity: 1516M
|
||||
Pre-touch: Disabled
|
||||
Parallel Workers: 8
|
||||
Concurrent Workers: 2
|
||||
Concurrent Refinement Workers: 8
|
||||
Periodic GC: Disabled
|
||||
|
||||
Heap:
|
||||
garbage-first heap total 98304K, used 3072K [0x00000000a1400000, 0x0000000100000000)
|
||||
region size 1024K, 4 young (4096K), 0 survivors (0K)
|
||||
Metaspace used 709K, committed 832K, reserved 1114112K
|
||||
class space used 47K, committed 128K, reserved 1048576K
|
||||
|
||||
Heap Regions: E=young(eden), S=young(survivor), O=old, HS=humongous(starts), HC=humongous(continues), CS=collection set, F=free, OA=open archive, CA=closed archive, TAMS=top-at-mark-start (previous, next)
|
||||
| 0|0x00000000a1400000, 0x00000000a1400000, 0x00000000a1500000| 0%| F| |TAMS 0x00000000a1400000, 0x00000000a1400000| Untracked
|
||||
| 1|0x00000000a1500000, 0x00000000a1500000, 0x00000000a1600000| 0%| F| |TAMS 0x00000000a1500000, 0x00000000a1500000| Untracked
|
||||
| 2|0x00000000a1600000, 0x00000000a1600000, 0x00000000a1700000| 0%| F| |TAMS 0x00000000a1600000, 0x00000000a1600000| Untracked
|
||||
| 3|0x00000000a1700000, 0x00000000a1700000, 0x00000000a1800000| 0%| F| |TAMS 0x00000000a1700000, 0x00000000a1700000| Untracked
|
||||
| 4|0x00000000a1800000, 0x00000000a1800000, 0x00000000a1900000| 0%| F| |TAMS 0x00000000a1800000, 0x00000000a1800000| Untracked
|
||||
| 5|0x00000000a1900000, 0x00000000a1900000, 0x00000000a1a00000| 0%| F| |TAMS 0x00000000a1900000, 0x00000000a1900000| Untracked
|
||||
| 6|0x00000000a1a00000, 0x00000000a1a00000, 0x00000000a1b00000| 0%| F| |TAMS 0x00000000a1a00000, 0x00000000a1a00000| Untracked
|
||||
| 7|0x00000000a1b00000, 0x00000000a1b00000, 0x00000000a1c00000| 0%| F| |TAMS 0x00000000a1b00000, 0x00000000a1b00000| Untracked
|
||||
| 8|0x00000000a1c00000, 0x00000000a1c00000, 0x00000000a1d00000| 0%| F| |TAMS 0x00000000a1c00000, 0x00000000a1c00000| Untracked
|
||||
| 9|0x00000000a1d00000, 0x00000000a1d00000, 0x00000000a1e00000| 0%| F| |TAMS 0x00000000a1d00000, 0x00000000a1d00000| Untracked
|
||||
| 10|0x00000000a1e00000, 0x00000000a1e00000, 0x00000000a1f00000| 0%| F| |TAMS 0x00000000a1e00000, 0x00000000a1e00000| Untracked
|
||||
| 11|0x00000000a1f00000, 0x00000000a1f00000, 0x00000000a2000000| 0%| F| |TAMS 0x00000000a1f00000, 0x00000000a1f00000| Untracked
|
||||
| 12|0x00000000a2000000, 0x00000000a2000000, 0x00000000a2100000| 0%| F| |TAMS 0x00000000a2000000, 0x00000000a2000000| Untracked
|
||||
| 13|0x00000000a2100000, 0x00000000a2100000, 0x00000000a2200000| 0%| F| |TAMS 0x00000000a2100000, 0x00000000a2100000| Untracked
|
||||
| 14|0x00000000a2200000, 0x00000000a2200000, 0x00000000a2300000| 0%| F| |TAMS 0x00000000a2200000, 0x00000000a2200000| Untracked
|
||||
| 15|0x00000000a2300000, 0x00000000a2300000, 0x00000000a2400000| 0%| F| |TAMS 0x00000000a2300000, 0x00000000a2300000| Untracked
|
||||
| 16|0x00000000a2400000, 0x00000000a2400000, 0x00000000a2500000| 0%| F| |TAMS 0x00000000a2400000, 0x00000000a2400000| Untracked
|
||||
| 17|0x00000000a2500000, 0x00000000a2500000, 0x00000000a2600000| 0%| F| |TAMS 0x00000000a2500000, 0x00000000a2500000| Untracked
|
||||
| 18|0x00000000a2600000, 0x00000000a2600000, 0x00000000a2700000| 0%| F| |TAMS 0x00000000a2600000, 0x00000000a2600000| Untracked
|
||||
| 19|0x00000000a2700000, 0x00000000a2700000, 0x00000000a2800000| 0%| F| |TAMS 0x00000000a2700000, 0x00000000a2700000| Untracked
|
||||
| 20|0x00000000a2800000, 0x00000000a2800000, 0x00000000a2900000| 0%| F| |TAMS 0x00000000a2800000, 0x00000000a2800000| Untracked
|
||||
| 21|0x00000000a2900000, 0x00000000a2900000, 0x00000000a2a00000| 0%| F| |TAMS 0x00000000a2900000, 0x00000000a2900000| Untracked
|
||||
| 22|0x00000000a2a00000, 0x00000000a2a00000, 0x00000000a2b00000| 0%| F| |TAMS 0x00000000a2a00000, 0x00000000a2a00000| Untracked
|
||||
| 23|0x00000000a2b00000, 0x00000000a2b00000, 0x00000000a2c00000| 0%| F| |TAMS 0x00000000a2b00000, 0x00000000a2b00000| Untracked
|
||||
| 24|0x00000000a2c00000, 0x00000000a2c00000, 0x00000000a2d00000| 0%| F| |TAMS 0x00000000a2c00000, 0x00000000a2c00000| Untracked
|
||||
| 25|0x00000000a2d00000, 0x00000000a2d00000, 0x00000000a2e00000| 0%| F| |TAMS 0x00000000a2d00000, 0x00000000a2d00000| Untracked
|
||||
| 26|0x00000000a2e00000, 0x00000000a2e00000, 0x00000000a2f00000| 0%| F| |TAMS 0x00000000a2e00000, 0x00000000a2e00000| Untracked
|
||||
| 27|0x00000000a2f00000, 0x00000000a2f00000, 0x00000000a3000000| 0%| F| |TAMS 0x00000000a2f00000, 0x00000000a2f00000| Untracked
|
||||
| 28|0x00000000a3000000, 0x00000000a3000000, 0x00000000a3100000| 0%| F| |TAMS 0x00000000a3000000, 0x00000000a3000000| Untracked
|
||||
| 29|0x00000000a3100000, 0x00000000a3100000, 0x00000000a3200000| 0%| F| |TAMS 0x00000000a3100000, 0x00000000a3100000| Untracked
|
||||
| 30|0x00000000a3200000, 0x00000000a3200000, 0x00000000a3300000| 0%| F| |TAMS 0x00000000a3200000, 0x00000000a3200000| Untracked
|
||||
| 31|0x00000000a3300000, 0x00000000a3300000, 0x00000000a3400000| 0%| F| |TAMS 0x00000000a3300000, 0x00000000a3300000| Untracked
|
||||
| 32|0x00000000a3400000, 0x00000000a3400000, 0x00000000a3500000| 0%| F| |TAMS 0x00000000a3400000, 0x00000000a3400000| Untracked
|
||||
| 33|0x00000000a3500000, 0x00000000a3500000, 0x00000000a3600000| 0%| F| |TAMS 0x00000000a3500000, 0x00000000a3500000| Untracked
|
||||
| 34|0x00000000a3600000, 0x00000000a3600000, 0x00000000a3700000| 0%| F| |TAMS 0x00000000a3600000, 0x00000000a3600000| Untracked
|
||||
| 35|0x00000000a3700000, 0x00000000a3700000, 0x00000000a3800000| 0%| F| |TAMS 0x00000000a3700000, 0x00000000a3700000| Untracked
|
||||
| 36|0x00000000a3800000, 0x00000000a3800000, 0x00000000a3900000| 0%| F| |TAMS 0x00000000a3800000, 0x00000000a3800000| Untracked
|
||||
| 37|0x00000000a3900000, 0x00000000a3900000, 0x00000000a3a00000| 0%| F| |TAMS 0x00000000a3900000, 0x00000000a3900000| Untracked
|
||||
| 38|0x00000000a3a00000, 0x00000000a3a00000, 0x00000000a3b00000| 0%| F| |TAMS 0x00000000a3a00000, 0x00000000a3a00000| Untracked
|
||||
| 39|0x00000000a3b00000, 0x00000000a3b00000, 0x00000000a3c00000| 0%| F| |TAMS 0x00000000a3b00000, 0x00000000a3b00000| Untracked
|
||||
| 40|0x00000000a3c00000, 0x00000000a3c00000, 0x00000000a3d00000| 0%| F| |TAMS 0x00000000a3c00000, 0x00000000a3c00000| Untracked
|
||||
| 41|0x00000000a3d00000, 0x00000000a3d00000, 0x00000000a3e00000| 0%| F| |TAMS 0x00000000a3d00000, 0x00000000a3d00000| Untracked
|
||||
| 42|0x00000000a3e00000, 0x00000000a3e00000, 0x00000000a3f00000| 0%| F| |TAMS 0x00000000a3e00000, 0x00000000a3e00000| Untracked
|
||||
| 43|0x00000000a3f00000, 0x00000000a3f00000, 0x00000000a4000000| 0%| F| |TAMS 0x00000000a3f00000, 0x00000000a3f00000| Untracked
|
||||
| 44|0x00000000a4000000, 0x00000000a4000000, 0x00000000a4100000| 0%| F| |TAMS 0x00000000a4000000, 0x00000000a4000000| Untracked
|
||||
| 45|0x00000000a4100000, 0x00000000a4100000, 0x00000000a4200000| 0%| F| |TAMS 0x00000000a4100000, 0x00000000a4100000| Untracked
|
||||
| 46|0x00000000a4200000, 0x00000000a4200000, 0x00000000a4300000| 0%| F| |TAMS 0x00000000a4200000, 0x00000000a4200000| Untracked
|
||||
| 47|0x00000000a4300000, 0x00000000a4300000, 0x00000000a4400000| 0%| F| |TAMS 0x00000000a4300000, 0x00000000a4300000| Untracked
|
||||
| 48|0x00000000a4400000, 0x00000000a4400000, 0x00000000a4500000| 0%| F| |TAMS 0x00000000a4400000, 0x00000000a4400000| Untracked
|
||||
| 49|0x00000000a4500000, 0x00000000a4500000, 0x00000000a4600000| 0%| F| |TAMS 0x00000000a4500000, 0x00000000a4500000| Untracked
|
||||
| 50|0x00000000a4600000, 0x00000000a4600000, 0x00000000a4700000| 0%| F| |TAMS 0x00000000a4600000, 0x00000000a4600000| Untracked
|
||||
| 51|0x00000000a4700000, 0x00000000a4700000, 0x00000000a4800000| 0%| F| |TAMS 0x00000000a4700000, 0x00000000a4700000| Untracked
|
||||
| 52|0x00000000a4800000, 0x00000000a4800000, 0x00000000a4900000| 0%| F| |TAMS 0x00000000a4800000, 0x00000000a4800000| Untracked
|
||||
| 53|0x00000000a4900000, 0x00000000a4900000, 0x00000000a4a00000| 0%| F| |TAMS 0x00000000a4900000, 0x00000000a4900000| Untracked
|
||||
| 54|0x00000000a4a00000, 0x00000000a4a00000, 0x00000000a4b00000| 0%| F| |TAMS 0x00000000a4a00000, 0x00000000a4a00000| Untracked
|
||||
| 55|0x00000000a4b00000, 0x00000000a4b00000, 0x00000000a4c00000| 0%| F| |TAMS 0x00000000a4b00000, 0x00000000a4b00000| Untracked
|
||||
| 56|0x00000000a4c00000, 0x00000000a4c00000, 0x00000000a4d00000| 0%| F| |TAMS 0x00000000a4c00000, 0x00000000a4c00000| Untracked
|
||||
| 57|0x00000000a4d00000, 0x00000000a4d00000, 0x00000000a4e00000| 0%| F| |TAMS 0x00000000a4d00000, 0x00000000a4d00000| Untracked
|
||||
| 58|0x00000000a4e00000, 0x00000000a4e00000, 0x00000000a4f00000| 0%| F| |TAMS 0x00000000a4e00000, 0x00000000a4e00000| Untracked
|
||||
| 59|0x00000000a4f00000, 0x00000000a4f00000, 0x00000000a5000000| 0%| F| |TAMS 0x00000000a4f00000, 0x00000000a4f00000| Untracked
|
||||
| 60|0x00000000a5000000, 0x00000000a5000000, 0x00000000a5100000| 0%| F| |TAMS 0x00000000a5000000, 0x00000000a5000000| Untracked
|
||||
| 61|0x00000000a5100000, 0x00000000a5100000, 0x00000000a5200000| 0%| F| |TAMS 0x00000000a5100000, 0x00000000a5100000| Untracked
|
||||
| 62|0x00000000a5200000, 0x00000000a5200000, 0x00000000a5300000| 0%| F| |TAMS 0x00000000a5200000, 0x00000000a5200000| Untracked
|
||||
| 63|0x00000000a5300000, 0x00000000a5300000, 0x00000000a5400000| 0%| F| |TAMS 0x00000000a5300000, 0x00000000a5300000| Untracked
|
||||
| 64|0x00000000a5400000, 0x00000000a5400000, 0x00000000a5500000| 0%| F| |TAMS 0x00000000a5400000, 0x00000000a5400000| Untracked
|
||||
| 65|0x00000000a5500000, 0x00000000a5500000, 0x00000000a5600000| 0%| F| |TAMS 0x00000000a5500000, 0x00000000a5500000| Untracked
|
||||
| 66|0x00000000a5600000, 0x00000000a5600000, 0x00000000a5700000| 0%| F| |TAMS 0x00000000a5600000, 0x00000000a5600000| Untracked
|
||||
| 67|0x00000000a5700000, 0x00000000a5700000, 0x00000000a5800000| 0%| F| |TAMS 0x00000000a5700000, 0x00000000a5700000| Untracked
|
||||
| 68|0x00000000a5800000, 0x00000000a5800000, 0x00000000a5900000| 0%| F| |TAMS 0x00000000a5800000, 0x00000000a5800000| Untracked
|
||||
| 69|0x00000000a5900000, 0x00000000a5900000, 0x00000000a5a00000| 0%| F| |TAMS 0x00000000a5900000, 0x00000000a5900000| Untracked
|
||||
| 70|0x00000000a5a00000, 0x00000000a5a00000, 0x00000000a5b00000| 0%| F| |TAMS 0x00000000a5a00000, 0x00000000a5a00000| Untracked
|
||||
| 71|0x00000000a5b00000, 0x00000000a5b00000, 0x00000000a5c00000| 0%| F| |TAMS 0x00000000a5b00000, 0x00000000a5b00000| Untracked
|
||||
| 72|0x00000000a5c00000, 0x00000000a5c00000, 0x00000000a5d00000| 0%| F| |TAMS 0x00000000a5c00000, 0x00000000a5c00000| Untracked
|
||||
| 73|0x00000000a5d00000, 0x00000000a5d00000, 0x00000000a5e00000| 0%| F| |TAMS 0x00000000a5d00000, 0x00000000a5d00000| Untracked
|
||||
| 74|0x00000000a5e00000, 0x00000000a5e00000, 0x00000000a5f00000| 0%| F| |TAMS 0x00000000a5e00000, 0x00000000a5e00000| Untracked
|
||||
| 75|0x00000000a5f00000, 0x00000000a5f00000, 0x00000000a6000000| 0%| F| |TAMS 0x00000000a5f00000, 0x00000000a5f00000| Untracked
|
||||
| 76|0x00000000a6000000, 0x00000000a6000000, 0x00000000a6100000| 0%| F| |TAMS 0x00000000a6000000, 0x00000000a6000000| Untracked
|
||||
| 77|0x00000000a6100000, 0x00000000a6100000, 0x00000000a6200000| 0%| F| |TAMS 0x00000000a6100000, 0x00000000a6100000| Untracked
|
||||
| 78|0x00000000a6200000, 0x00000000a6200000, 0x00000000a6300000| 0%| F| |TAMS 0x00000000a6200000, 0x00000000a6200000| Untracked
|
||||
| 79|0x00000000a6300000, 0x00000000a6300000, 0x00000000a6400000| 0%| F| |TAMS 0x00000000a6300000, 0x00000000a6300000| Untracked
|
||||
| 80|0x00000000a6400000, 0x00000000a6400000, 0x00000000a6500000| 0%| F| |TAMS 0x00000000a6400000, 0x00000000a6400000| Untracked
|
||||
| 81|0x00000000a6500000, 0x00000000a6500000, 0x00000000a6600000| 0%| F| |TAMS 0x00000000a6500000, 0x00000000a6500000| Untracked
|
||||
| 82|0x00000000a6600000, 0x00000000a6600000, 0x00000000a6700000| 0%| F| |TAMS 0x00000000a6600000, 0x00000000a6600000| Untracked
|
||||
| 83|0x00000000a6700000, 0x00000000a6700000, 0x00000000a6800000| 0%| F| |TAMS 0x00000000a6700000, 0x00000000a6700000| Untracked
|
||||
| 84|0x00000000a6800000, 0x00000000a6800000, 0x00000000a6900000| 0%| F| |TAMS 0x00000000a6800000, 0x00000000a6800000| Untracked
|
||||
| 85|0x00000000a6900000, 0x00000000a6900000, 0x00000000a6a00000| 0%| F| |TAMS 0x00000000a6900000, 0x00000000a6900000| Untracked
|
||||
| 86|0x00000000a6a00000, 0x00000000a6a00000, 0x00000000a6b00000| 0%| F| |TAMS 0x00000000a6a00000, 0x00000000a6a00000| Untracked
|
||||
| 87|0x00000000a6b00000, 0x00000000a6b00000, 0x00000000a6c00000| 0%| F| |TAMS 0x00000000a6b00000, 0x00000000a6b00000| Untracked
|
||||
| 88|0x00000000a6c00000, 0x00000000a6c00000, 0x00000000a6d00000| 0%| F| |TAMS 0x00000000a6c00000, 0x00000000a6c00000| Untracked
|
||||
| 89|0x00000000a6d00000, 0x00000000a6d00000, 0x00000000a6e00000| 0%| F| |TAMS 0x00000000a6d00000, 0x00000000a6d00000| Untracked
|
||||
| 90|0x00000000a6e00000, 0x00000000a6e00000, 0x00000000a6f00000| 0%| F| |TAMS 0x00000000a6e00000, 0x00000000a6e00000| Untracked
|
||||
| 91|0x00000000a6f00000, 0x00000000a6f00000, 0x00000000a7000000| 0%| F| |TAMS 0x00000000a6f00000, 0x00000000a6f00000| Untracked
|
||||
| 92|0x00000000a7000000, 0x00000000a7076a70, 0x00000000a7100000| 46%| E| |TAMS 0x00000000a7000000, 0x00000000a7000000| Complete
|
||||
| 93|0x00000000a7100000, 0x00000000a7200000, 0x00000000a7200000|100%| E|CS|TAMS 0x00000000a7100000, 0x00000000a7100000| Complete
|
||||
| 94|0x00000000a7200000, 0x00000000a7300000, 0x00000000a7300000|100%| E|CS|TAMS 0x00000000a7200000, 0x00000000a7200000| Complete
|
||||
| 95|0x00000000a7300000, 0x00000000a7400000, 0x00000000a7400000|100%| E|CS|TAMS 0x00000000a7300000, 0x00000000a7300000| Complete
|
||||
|
||||
Card table byte_map: [0x000002cbfa730000,0x000002cbfaa30000] _byte_map_base: 0x000002cbfa226000
|
||||
|
||||
Marking Bits (Prev, Next): (CMBitMap*) 0x000002cbfa089fc0, (CMBitMap*) 0x000002cbfa08a000
|
||||
Prev Bits: [0x000002cbfad30000, 0x000002cbfc4e0000)
|
||||
Next Bits: [0x000002cbfc4e0000, 0x000002cbfdc90000)
|
||||
|
||||
Polling page: 0x000002cbf7f70000
|
||||
|
||||
Metaspace:
|
||||
|
||||
Usage:
|
||||
Non-class: 662.75 KB used.
|
||||
Class: 47.21 KB used.
|
||||
Both: 709.96 KB used.
|
||||
|
||||
Virtual space:
|
||||
Non-class space: 64.00 MB reserved, 704.00 KB ( 1%) committed, 1 nodes.
|
||||
Class space: 1.00 GB reserved, 128.00 KB ( <1%) committed, 1 nodes.
|
||||
Both: 1.06 GB reserved, 832.00 KB ( <1%) committed.
|
||||
|
||||
Chunk freelists:
|
||||
Non-Class: 3.85 MB
|
||||
Class: 3.72 MB
|
||||
Both: 7.56 MB
|
||||
|
||||
MaxMetaspaceSize: unlimited
|
||||
CompressedClassSpaceSize: 1.00 GB
|
||||
Initial GC threshold: 21.00 MB
|
||||
Current GC threshold: 21.00 MB
|
||||
CDS: on
|
||||
MetaspaceReclaimPolicy: balanced
|
||||
- commit_granule_bytes: 65536.
|
||||
- commit_granule_words: 8192.
|
||||
- virtual_space_node_default_size: 8388608.
|
||||
- enlarge_chunks_in_place: 1.
|
||||
- new_chunks_are_fully_committed: 0.
|
||||
- uncommit_free_chunks: 1.
|
||||
- use_allocation_guard: 0.
|
||||
|
||||
|
||||
Internal statistics:
|
||||
|
||||
num_allocs_failed_limit: 0.
|
||||
num_arena_births: 20.
|
||||
num_arena_deaths: 0.
|
||||
num_vsnodes_births: 2.
|
||||
num_vsnodes_deaths: 0.
|
||||
num_space_committed: 13.
|
||||
num_space_uncommitted: 0.
|
||||
num_chunks_returned_to_freelist: 0.
|
||||
num_chunks_taken_from_freelist: 34.
|
||||
num_chunk_merges: 0.
|
||||
num_chunk_splits: 22.
|
||||
num_chunks_enlarged: 16.
|
||||
num_inconsistent_stats: 0.
|
||||
|
||||
CodeHeap 'non-profiled nmethods': size=120000Kb used=90Kb max_used=90Kb free=119910Kb
|
||||
bounds [0x000002cb8f340000, 0x000002cb8f5b0000, 0x000002cb96870000]
|
||||
CodeHeap 'profiled nmethods': size=120000Kb used=399Kb max_used=399Kb free=119600Kb
|
||||
bounds [0x000002cb87e10000, 0x000002cb88080000, 0x000002cb8f340000]
|
||||
CodeHeap 'non-nmethods': size=5760Kb used=1111Kb max_used=1111Kb free=4648Kb
|
||||
bounds [0x000002cb87870000, 0x000002cb87ae0000, 0x000002cb87e10000]
|
||||
total_blobs=682 nmethods=307 adapters=288
|
||||
compilation: enabled
|
||||
stopped_count=0, restarted_count=0
|
||||
full_count=0
|
||||
|
||||
Compilation events (20 events):
|
||||
Event: 1.522 Thread 0x000002cb96f2bd60 nmethod 292 0x000002cb87e70710 code [0x000002cb87e708c0, 0x000002cb87e70b58]
|
||||
Event: 1.525 Thread 0x000002cb96f2bd60 293 3 jdk.internal.org.objectweb.asm.SymbolTable::put (150 bytes)
|
||||
Event: 1.526 Thread 0x000002cb96f2bd60 nmethod 293 0x000002cb87e70c10 code [0x000002cb87e70e00, 0x000002cb87e71698]
|
||||
Event: 1.528 Thread 0x000002cb96f2bd60 294 1 java.lang.invoke.MethodType$ConcurrentWeakInternSet$WeakEntry::hashCode (5 bytes)
|
||||
Event: 1.528 Thread 0x000002cb96f2bd60 nmethod 294 0x000002cb8f354e90 code [0x000002cb8f355020, 0x000002cb8f3550f8]
|
||||
Event: 1.528 Thread 0x000002cb96f2bd60 295 3 java.lang.Class::getClassLoader (28 bytes)
|
||||
Event: 1.529 Thread 0x000002cb96f2bd60 nmethod 295 0x000002cb87e71990 code [0x000002cb87e71b40, 0x000002cb87e71d98]
|
||||
Event: 1.588 Thread 0x000002cb96f2bd60 300 3 java.lang.invoke.MemberName::testAllFlags (7 bytes)
|
||||
Event: 1.589 Thread 0x000002cb96f2bd60 nmethod 300 0x000002cb87e71e90 code [0x000002cb87e72020, 0x000002cb87e721f8]
|
||||
Event: 1.589 Thread 0x000002cb96f2bd60 302 3 java.lang.invoke.LambdaForm$BasicType::basicType (19 bytes)
|
||||
Event: 1.590 Thread 0x000002cb96f2bd60 nmethod 302 0x000002cb87e72290 code [0x000002cb87e72460, 0x000002cb87e726b8]
|
||||
Event: 1.590 Thread 0x000002cb96f2bd60 303 3 jdk.internal.org.objectweb.asm.SymbolTable$Entry::<init> (17 bytes)
|
||||
Event: 1.590 Thread 0x000002cb96f2bd60 nmethod 303 0x000002cb87e72810 code [0x000002cb87e729c0, 0x000002cb87e72b48]
|
||||
Event: 1.590 Thread 0x000002cb96f2bd60 304 3 jdk.internal.org.objectweb.asm.ByteVector::putByte (39 bytes)
|
||||
Event: 1.590 Thread 0x000002cb96f2bd60 nmethod 304 0x000002cb87e72c10 code [0x000002cb87e72dc0, 0x000002cb87e72fa8]
|
||||
Event: 1.590 Thread 0x000002cb96f2bd60 305 1 java.lang.invoke.MethodTypeForm::parameterSlotCount (5 bytes)
|
||||
Event: 1.590 Thread 0x000002cb96f2bd60 nmethod 305 0x000002cb8f356210 code [0x000002cb8f3563a0, 0x000002cb8f356478]
|
||||
Event: 1.590 Thread 0x000002cb96f2bd60 306 3 jdk.internal.org.objectweb.asm.SymbolTable::addConstantUtf8 (98 bytes)
|
||||
Event: 1.591 Thread 0x000002cb96f2bd60 nmethod 306 0x000002cb87e73110 code [0x000002cb87e73340, 0x000002cb87e73938]
|
||||
Event: 1.591 Thread 0x000002cb96f2bd60 307 3 jdk.internal.org.objectweb.asm.ByteVector::putShort (52 bytes)
|
||||
|
||||
GC Heap History (0 events):
|
||||
No events
|
||||
|
||||
Deoptimization events (4 events):
|
||||
Event: 1.087 Thread 0x000002cbfa035c40 Uncommon trap: trap_request=0xffffff45 fr.pc=0x000002cb8f34af64 relative=0x0000000000000064
|
||||
Event: 1.087 Thread 0x000002cbfa035c40 Uncommon trap: reason=unstable_if action=reinterpret pc=0x000002cb8f34af64 method=java.io.WinNTFileSystem.isSlash(C)Z @ 9 c2
|
||||
Event: 1.087 Thread 0x000002cbfa035c40 DEOPT PACKING pc=0x000002cb8f34af64 sp=0x000000db19afe380
|
||||
Event: 1.087 Thread 0x000002cbfa035c40 DEOPT UNPACKING pc=0x000002cb878c23a3 sp=0x000000db19afe308 mode 2
|
||||
|
||||
Classes loaded (20 events):
|
||||
Event: 0.511 Loading class java/net/URLConnection
|
||||
Event: 0.512 Loading class java/net/URLConnection done
|
||||
Event: 0.512 Loading class sun/net/www/URLConnection done
|
||||
Event: 0.512 Loading class sun/net/www/protocol/file/FileURLConnection done
|
||||
Event: 0.513 Loading class sun/net/www/MessageHeader
|
||||
Event: 0.513 Loading class sun/net/www/MessageHeader done
|
||||
Event: 0.516 Loading class java/io/FilePermission$1
|
||||
Event: 0.516 Loading class jdk/internal/access/JavaIOFilePermissionAccess
|
||||
Event: 0.517 Loading class jdk/internal/access/JavaIOFilePermissionAccess done
|
||||
Event: 0.517 Loading class java/io/FilePermission$1 done
|
||||
Event: 0.529 Loading class java/io/FilePermissionCollection
|
||||
Event: 0.530 Loading class java/io/FilePermissionCollection done
|
||||
Event: 0.530 Loading class java/util/Vector
|
||||
Event: 0.532 Loading class java/util/Vector done
|
||||
Event: 0.532 Loading class java/io/FilePermissionCollection$1
|
||||
Event: 0.533 Loading class java/io/FilePermissionCollection$1 done
|
||||
Event: 1.032 Loading class java/lang/IllegalStateException
|
||||
Event: 1.035 Loading class java/lang/IllegalStateException done
|
||||
Event: 1.471 Loading class sun/invoke/util/VerifyAccess$1
|
||||
Event: 1.479 Loading class sun/invoke/util/VerifyAccess$1 done
|
||||
|
||||
Classes unloaded (0 events):
|
||||
No events
|
||||
|
||||
Classes redefined (0 events):
|
||||
No events
|
||||
|
||||
Internal exceptions (0 events):
|
||||
No events
|
||||
|
||||
VM Operations (4 events):
|
||||
Event: 0.172 Executing VM operation: HandshakeAllThreads
|
||||
Event: 0.172 Executing VM operation: HandshakeAllThreads done
|
||||
Event: 1.184 Executing VM operation: Cleanup
|
||||
Event: 1.205 Executing VM operation: Cleanup done
|
||||
|
||||
Events (17 events):
|
||||
Event: 0.015 Loaded shared library C:\Program Files\Java\jdk-18.0.1\bin\java.dll
|
||||
Event: 0.031 Loaded shared library C:\Program Files\Java\jdk-18.0.1\bin\jsvml.dll
|
||||
Event: 0.032 Thread 0x000002cbfa035c40 Thread added: 0x000002cbfa035c40
|
||||
Event: 0.042 Thread 0x000002cb96ee2c60 Thread added: 0x000002cb96ee2c60
|
||||
Event: 0.043 Thread 0x000002cb96ee6070 Thread added: 0x000002cb96ee6070
|
||||
Event: 0.080 Thread 0x000002cb96f00d20 Thread added: 0x000002cb96f00d20
|
||||
Event: 0.080 Thread 0x000002cb96f02ad0 Thread added: 0x000002cb96f02ad0
|
||||
Event: 0.080 Thread 0x000002cb96f03c10 Thread added: 0x000002cb96f03c10
|
||||
Event: 0.080 Thread 0x000002cb96f04e90 Thread added: 0x000002cb96f04e90
|
||||
Event: 0.081 Thread 0x000002cb96f09a80 Thread added: 0x000002cb96f09a80
|
||||
Event: 0.081 Thread 0x000002cb96f2bd60 Thread added: 0x000002cb96f2bd60
|
||||
Event: 0.081 Thread 0x000002cb96f406c0 Thread added: 0x000002cb96f406c0
|
||||
Event: 0.133 Thread 0x000002cb9b1ca2c0 Thread added: 0x000002cb9b1ca2c0
|
||||
Event: 0.143 Thread 0x000002cb9b1d2850 Thread added: 0x000002cb9b1d2850
|
||||
Event: 0.153 Loaded shared library C:\Program Files\Java\jdk-18.0.1\bin\net.dll
|
||||
Event: 0.158 Loaded shared library C:\Program Files\Java\jdk-18.0.1\bin\nio.dll
|
||||
Event: 0.170 Loaded shared library C:\Program Files\Java\jdk-18.0.1\bin\zip.dll
|
||||
|
||||
|
||||
Dynamic libraries:
|
||||
0x00007ff7a7750000 - 0x00007ff7a7760000 C:\Program Files\Java\jdk-18.0.1\bin\java.exe
|
||||
0x00007ffbfbb50000 - 0x00007ffbfbd45000 C:\WINDOWS\SYSTEM32\ntdll.dll
|
||||
0x00007ffbd8b00000 - 0x00007ffbd8b16000 C:\Program Files\Avast Software\Avast\aswhook.dll
|
||||
0x00007ffbf9ba0000 - 0x00007ffbf9c5d000 C:\WINDOWS\System32\KERNEL32.DLL
|
||||
0x00007ffbf97d0000 - 0x00007ffbf9a9d000 C:\WINDOWS\System32\KERNELBASE.dll
|
||||
0x00007ffbf9aa0000 - 0x00007ffbf9ba0000 C:\WINDOWS\System32\ucrtbase.dll
|
||||
0x00007ffbec2b0000 - 0x00007ffbec2ca000 C:\Program Files\Java\jdk-18.0.1\bin\VCRUNTIME140.dll
|
||||
0x00007ffbf2cb0000 - 0x00007ffbf2cc8000 C:\Program Files\Java\jdk-18.0.1\bin\jli.dll
|
||||
0x00007ffbfb5f0000 - 0x00007ffbfb69e000 C:\WINDOWS\System32\ADVAPI32.dll
|
||||
0x00007ffbf9da0000 - 0x00007ffbf9e3e000 C:\WINDOWS\System32\msvcrt.dll
|
||||
0x00007ffbfa6b0000 - 0x00007ffbfa74c000 C:\WINDOWS\System32\sechost.dll
|
||||
0x00007ffbfb460000 - 0x00007ffbfb585000 C:\WINDOWS\System32\RPCRT4.dll
|
||||
0x00007ffbfb7c0000 - 0x00007ffbfb960000 C:\WINDOWS\System32\USER32.dll
|
||||
0x00007ffbf9700000 - 0x00007ffbf9722000 C:\WINDOWS\System32\win32u.dll
|
||||
0x00007ffbdc100000 - 0x00007ffbdc39a000 C:\WINDOWS\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.19041.1110_none_60b5254171f9507e\COMCTL32.dll
|
||||
0x00007ffbfa680000 - 0x00007ffbfa6aa000 C:\WINDOWS\System32\GDI32.dll
|
||||
0x00007ffbf9540000 - 0x00007ffbf964b000 C:\WINDOWS\System32\gdi32full.dll
|
||||
0x00007ffbf9340000 - 0x00007ffbf93dd000 C:\WINDOWS\System32\msvcp_win.dll
|
||||
0x00007ffbf2c30000 - 0x00007ffbf2c3a000 C:\WINDOWS\SYSTEM32\VERSION.dll
|
||||
0x00007ffbfa650000 - 0x00007ffbfa680000 C:\WINDOWS\System32\IMM32.DLL
|
||||
0x00007ffbf3df0000 - 0x00007ffbf3dfc000 C:\Program Files\Java\jdk-18.0.1\bin\vcruntime140_1.dll
|
||||
0x00007ffbda4c0000 - 0x00007ffbda54d000 C:\Program Files\Java\jdk-18.0.1\bin\msvcp140.dll
|
||||
0x00007ffbbf6a0000 - 0x00007ffbc02b0000 C:\Program Files\Java\jdk-18.0.1\bin\server\jvm.dll
|
||||
0x00007ffbf9c60000 - 0x00007ffbf9c68000 C:\WINDOWS\System32\PSAPI.DLL
|
||||
0x00007ffbe6a50000 - 0x00007ffbe6a59000 C:\WINDOWS\SYSTEM32\WSOCK32.dll
|
||||
0x00007ffbfa7b0000 - 0x00007ffbfa81b000 C:\WINDOWS\System32\WS2_32.dll
|
||||
0x00007ffbedb20000 - 0x00007ffbedb47000 C:\WINDOWS\SYSTEM32\WINMM.dll
|
||||
0x00007ffbf7120000 - 0x00007ffbf7132000 C:\WINDOWS\SYSTEM32\kernel.appcore.dll
|
||||
0x00007ffbf07b0000 - 0x00007ffbf07ba000 C:\Program Files\Java\jdk-18.0.1\bin\jimage.dll
|
||||
0x00007ffbe8240000 - 0x00007ffbe8424000 C:\WINDOWS\SYSTEM32\DBGHELP.DLL
|
||||
0x00007ffbe8210000 - 0x00007ffbe823c000 C:\WINDOWS\SYSTEM32\dbgcore.DLL
|
||||
0x00007ffbf92b0000 - 0x00007ffbf9332000 C:\WINDOWS\System32\bcryptPrimitives.dll
|
||||
0x00007ffbec280000 - 0x00007ffbec2a5000 C:\Program Files\Java\jdk-18.0.1\bin\java.dll
|
||||
0x00007ffbd4ec0000 - 0x00007ffbd4f96000 C:\Program Files\Java\jdk-18.0.1\bin\jsvml.dll
|
||||
0x00007ffbfa8d0000 - 0x00007ffbfb014000 C:\WINDOWS\System32\SHELL32.dll
|
||||
0x00007ffbf7320000 - 0x00007ffbf7ab4000 C:\WINDOWS\SYSTEM32\windows.storage.dll
|
||||
0x00007ffbfb020000 - 0x00007ffbfb374000 C:\WINDOWS\System32\combase.dll
|
||||
0x00007ffbf8bf0000 - 0x00007ffbf8c1c000 C:\WINDOWS\SYSTEM32\Wldp.dll
|
||||
0x00007ffbfa090000 - 0x00007ffbfa13d000 C:\WINDOWS\System32\SHCORE.dll
|
||||
0x00007ffbfb590000 - 0x00007ffbfb5e5000 C:\WINDOWS\System32\shlwapi.dll
|
||||
0x00007ffbf91a0000 - 0x00007ffbf91bf000 C:\WINDOWS\SYSTEM32\profapi.dll
|
||||
0x00007ffbec260000 - 0x00007ffbec273000 C:\Program Files\Java\jdk-18.0.1\bin\net.dll
|
||||
0x00007ffbf02b0000 - 0x00007ffbf03ba000 C:\WINDOWS\SYSTEM32\WINHTTP.dll
|
||||
0x00007ffbf8910000 - 0x00007ffbf897a000 C:\WINDOWS\system32\mswsock.dll
|
||||
0x00007ffbebfa0000 - 0x00007ffbebfb6000 C:\Program Files\Java\jdk-18.0.1\bin\nio.dll
|
||||
0x00007ffbe4750000 - 0x00007ffbe4768000 C:\Program Files\Java\jdk-18.0.1\bin\zip.dll
|
||||
|
||||
dbghelp: loaded successfully - version: 4.0.5 - missing functions: none
|
||||
symbol engine: initialized successfully - sym options: 0x614 - pdb path: .;C:\Program Files\Java\jdk-18.0.1\bin;C:\WINDOWS\SYSTEM32;C:\Program Files\Avast Software\Avast;C:\WINDOWS\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.19041.1110_none_60b5254171f9507e;C:\Program Files\Java\jdk-18.0.1\bin\server
|
||||
|
||||
VM Arguments:
|
||||
jvm_args: -Dmaven.multiModuleProjectDirectory=C:\Users\guill\gitProjects\mmocore -Dmaven.home=C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2021.1.2\plugins\maven\lib\maven3 -Dclassworlds.conf=C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2021.1.2\plugins\maven\lib\maven3\bin\m2.conf -Dmaven.ext.class.path=C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2021.1.2\plugins\maven\lib\maven-event-listener.jar -Dfile.encoding=UTF-8
|
||||
java_command: org.codehaus.classworlds.Launcher -Didea.version=2021.1.2 install --non-recursive
|
||||
java_class_path (initial): C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2021.1.2\plugins\maven\lib\maven3\boot\plexus-classworlds-2.6.0.jar;C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2021.1.2\plugins\maven\lib\maven3\boot\plexus-classworlds.license
|
||||
Launcher Type: SUN_STANDARD
|
||||
|
||||
[Global flags]
|
||||
intx CICompilerCount = 4 {product} {ergonomic}
|
||||
uint ConcGCThreads = 2 {product} {ergonomic}
|
||||
uint G1ConcRefinementThreads = 8 {product} {ergonomic}
|
||||
size_t G1HeapRegionSize = 1048576 {product} {ergonomic}
|
||||
uintx GCDrainStackTargetSize = 64 {product} {ergonomic}
|
||||
size_t InitialHeapSize = 100663296 {product} {ergonomic}
|
||||
size_t MarkStackSize = 4194304 {product} {ergonomic}
|
||||
size_t MaxHeapSize = 1589641216 {product} {ergonomic}
|
||||
size_t MaxNewSize = 953155584 {product} {ergonomic}
|
||||
size_t MinHeapDeltaBytes = 1048576 {product} {ergonomic}
|
||||
size_t MinHeapSize = 8388608 {product} {ergonomic}
|
||||
uintx NonNMethodCodeHeapSize = 5839372 {pd product} {ergonomic}
|
||||
uintx NonProfiledCodeHeapSize = 122909434 {pd product} {ergonomic}
|
||||
uintx ProfiledCodeHeapSize = 122909434 {pd product} {ergonomic}
|
||||
uintx ReservedCodeCacheSize = 251658240 {pd product} {ergonomic}
|
||||
bool SegmentedCodeCache = true {product} {ergonomic}
|
||||
size_t SoftMaxHeapSize = 1589641216 {manageable} {ergonomic}
|
||||
bool UseCompressedClassPointers = true {product lp64_product} {ergonomic}
|
||||
bool UseCompressedOops = true {product lp64_product} {ergonomic}
|
||||
bool UseG1GC = true {product} {ergonomic}
|
||||
bool UseLargePagesIndividualAllocation = false {pd product} {ergonomic}
|
||||
|
||||
Logging:
|
||||
Log output configuration:
|
||||
#0: stdout all=warning uptime,level,tags foldmultilines=false
|
||||
#1: stderr all=off uptime,level,tags foldmultilines=false
|
||||
|
||||
Environment Variables:
|
||||
PATH=C:\Program Files\Common Files\Oracle\Java\javapath;C:\Program Files\Java\jdk-16.0.2\bin\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\nodejs\;C:\Program Files\Docker\Docker\resources\bin;C:\ProgramData\DockerDesktop\version-bin;PATH;C:\Users\guill\AppData\Local\Microsoft\WindowsApps;C:\Windows\System32;;C:\Users\guill\Desktop\Microsoft VS Code\bin;C:\Users\guill\AppData\Roaming\npm
|
||||
USERNAME=guill
|
||||
OS=Windows_NT
|
||||
PROCESSOR_IDENTIFIER=AMD64 Family 23 Model 24 Stepping 1, AuthenticAMD
|
||||
|
||||
|
||||
|
||||
--------------- S Y S T E M ---------------
|
||||
|
||||
OS:
|
||||
Windows 10 , 64 bit Build 19041 (10.0.19041.1706)
|
||||
OS uptime: 11 days 18:11 hours
|
||||
Hyper-V role detected
|
||||
|
||||
CPU: total 8 (initial active 8) (8 cores per cpu, 2 threads per core) family 23 model 24 stepping 1 microcode 0x0, cx8, cmov, fxsr, ht, mmx, 3dnowpref, sse, sse2, sse3, ssse3, sse4a, sse4.1, sse4.2, popcnt, lzcnt, tsc, tscinvbit, avx, avx2, aes, clmul, bmi1, bmi2, adx, sha, fma, vzeroupper, clflush, clflushopt, hv
|
||||
|
||||
Memory: 4k page, system-wide physical 6061M (441M free)
|
||||
TotalPageFile size 24493M (AvailPageFile size 0M)
|
||||
current process WorkingSet (physical memory assigned to process): 34M, peak: 34M
|
||||
current process commit charge ("private bytes"): 178M, peak: 178M
|
||||
|
||||
vm_info: Java HotSpot(TM) 64-Bit Server VM (18.0.1+10-24) for windows-amd64 JRE (18.0.1+10-24), built on Mar 9 2022 22:41:56 by "mach5one" with MS VC++ 16.8 / 16.9 (VS2019)
|
||||
|
||||
END.
|
1124
replay_pid12252.log
Normal file
1124
replay_pid12252.log
Normal file
File diff suppressed because it is too large
Load Diff
@ -16,5 +16,8 @@ public enum SoundEvent {
|
||||
NOT_ENOUGH_POINTS,
|
||||
CANCEL_QUEST,
|
||||
START_QUEST,
|
||||
CLOSE_LOOT_CHEST;
|
||||
CLOSE_LOOT_CHEST,
|
||||
LEVEL_SKILL_TREE_NODE,
|
||||
RESET_SKILL_TREE,
|
||||
CHANGE_SKILL_TREE;
|
||||
}
|
@ -7,9 +7,14 @@ import net.Indyuce.mmocore.MMOCore;
|
||||
import net.Indyuce.mmocore.api.ConfigMessage;
|
||||
import net.Indyuce.mmocore.api.SoundEvent;
|
||||
import net.Indyuce.mmocore.player.Unlockable;
|
||||
import net.Indyuce.mmocore.tree.IntegerCoordinates;
|
||||
import net.Indyuce.mmocore.tree.NodeState;
|
||||
import net.Indyuce.mmocore.tree.SkillTreeNode;
|
||||
import net.Indyuce.mmocore.tree.skilltree.AutomaticSkillTree;
|
||||
import net.Indyuce.mmocore.tree.skilltree.LinkedSkillTree;
|
||||
import net.Indyuce.mmocore.tree.skilltree.SkillTree;
|
||||
import net.Indyuce.mmocore.tree.skilltree.display.DisplayInfo;
|
||||
import net.Indyuce.mmocore.tree.skilltree.display.Icon;
|
||||
import net.Indyuce.mmocore.waypoint.Waypoint;
|
||||
import net.Indyuce.mmocore.api.event.PlayerExperienceGainEvent;
|
||||
import net.Indyuce.mmocore.api.event.PlayerLevelUpEvent;
|
||||
@ -40,6 +45,7 @@ import net.Indyuce.mmocore.skill.ClassSkill;
|
||||
import net.Indyuce.mmocore.skill.RegisteredSkill;
|
||||
import net.Indyuce.mmocore.skill.cast.SkillCastingHandler;
|
||||
import net.Indyuce.mmocore.waypoint.WaypointOption;
|
||||
import net.java.truecommons.shed.Link;
|
||||
import net.md_5.bungee.api.ChatMessageType;
|
||||
import net.md_5.bungee.api.chat.TextComponent;
|
||||
import org.apache.commons.lang.Validate;
|
||||
@ -50,7 +56,6 @@ import org.bukkit.potion.PotionEffect;
|
||||
import org.bukkit.potion.PotionEffectType;
|
||||
import org.bukkit.scheduler.BukkitRunnable;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.w3c.dom.Node;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.*;
|
||||
@ -73,7 +78,7 @@ public class PlayerData extends OfflinePlayerData implements Closable, Experienc
|
||||
*/
|
||||
@Nullable
|
||||
private PlayerClass profess;
|
||||
private int level, classPoints, skillPoints, attributePoints, attributeReallocationPoints;// skillReallocationPoints,
|
||||
private int level, classPoints, skillPoints, attributePoints, attributeReallocationPoints,skillTreeReallocationPoints;// skillReallocationPoints,
|
||||
private double experience;
|
||||
private double mana, stamina, stellium;
|
||||
private Guild guild;
|
||||
@ -105,8 +110,6 @@ public class PlayerData extends OfflinePlayerData implements Closable, Experienc
|
||||
*/
|
||||
private final Map<String, Integer> tableItemClaims = new HashMap<>();
|
||||
|
||||
// NON-FINAL player data stuff made public to facilitate field change
|
||||
public int skillGuiDisplayOffset;
|
||||
public boolean noCooldown;
|
||||
public CombatRunnable combat;
|
||||
|
||||
@ -119,7 +122,16 @@ public class PlayerData extends OfflinePlayerData implements Closable, Experienc
|
||||
|
||||
//Value of the last skill tree the player was viewing
|
||||
private SkillTree cachedSkillTree = null;
|
||||
private final HashMap<SkillTreeNode, NodeState> nodeStates= new HashMap<>();
|
||||
private final HashMap<SkillTreeNode, Integer> nodeLevels = new HashMap<>();
|
||||
//The states of all the node cached
|
||||
private HashMap<SkillTreeNode, NodeState> nodeStates = new HashMap<>();
|
||||
|
||||
/**
|
||||
* Stores the skill tree points for every tree with the corresponding id.
|
||||
* The id 'global' corresponds to points you can use for every skill-tree.
|
||||
*/
|
||||
private final HashMap<String, Integer> skillTreePoints = new HashMap<>();
|
||||
|
||||
/**
|
||||
* If the player data was loaded using temporary data.
|
||||
* See {@link TemporaryPlayerData} for more info
|
||||
@ -164,7 +176,6 @@ public class PlayerData extends OfflinePlayerData implements Closable, Experienc
|
||||
} catch (NullPointerException exception) {
|
||||
MMOCore.log(Level.SEVERE, "[Userdata] Could not find class " + getProfess().getId() + " while refreshing player data.");
|
||||
}
|
||||
|
||||
int j = 0;
|
||||
while (j < boundSkills.size())
|
||||
try {
|
||||
@ -175,12 +186,118 @@ public class PlayerData extends OfflinePlayerData implements Closable, Experienc
|
||||
}
|
||||
}
|
||||
|
||||
public void setupNodeState() {
|
||||
for (SkillTree skillTree : MMOCore.plugin.skillTreeManager.getAll())
|
||||
if (skillTree instanceof LinkedSkillTree) {
|
||||
LinkedSkillTree linkedSkillTree = (LinkedSkillTree) skillTree;
|
||||
linkedSkillTree.setupNodeState(this);
|
||||
} else {
|
||||
skillTree.setupNodeState(this);
|
||||
}
|
||||
}
|
||||
|
||||
public void setSkillTreePoints(String treeId, int points) {
|
||||
skillTreePoints.put(treeId, points);
|
||||
}
|
||||
|
||||
public void giveSkillTreePoints(String id, int val) {
|
||||
skillTreePoints.put(id, skillTreePoints.get(id) + val);
|
||||
}
|
||||
|
||||
public int countSkillTreePoints(SkillTree skillTree) {
|
||||
return nodeLevels.keySet().stream().filter(node -> node.getTree().equals(skillTree)).mapToInt(nodeLevels::get).sum();
|
||||
}
|
||||
|
||||
|
||||
public HashMap<String, Integer> getSkillTreePoints() {
|
||||
return skillTreePoints;
|
||||
}
|
||||
|
||||
public boolean containsSkillPointTreeId(String treeId) {
|
||||
return skillTreePoints.containsKey(treeId);
|
||||
}
|
||||
|
||||
public boolean canIncrementNodeLevel(SkillTreeNode node) {
|
||||
NodeState nodeState = nodeStates.get(node);
|
||||
//Check the State of the node
|
||||
if (nodeState != NodeState.UNLOCKED && nodeState != NodeState.UNLOCKABLE)
|
||||
return false;
|
||||
return getNodeLevel(node)<node.getMaxLevel()&&(skillTreePoints.get(node.getTree().getId()) > 0 || skillTreePoints.get("global") > 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* Increments the node level by one, change the states of branches of the tree.
|
||||
* Consumes skill tree points from the tree first and then consumes the global skill-tree points ('all')
|
||||
*/
|
||||
public <T extends SkillTree> void incrementNodeLevel(SkillTreeNode node) {
|
||||
setNodeLevel(node, getNodeLevel(node) + 1);
|
||||
if (nodeStates.get(node) == NodeState.UNLOCKABLE)
|
||||
setNodeState(node, NodeState.UNLOCKED);
|
||||
if (skillTreePoints.get(node.getTree().getId()) > 0)
|
||||
withdrawSkillTreePoints(node.getTree().getId(), 1);
|
||||
else
|
||||
withdrawSkillTreePoints("global", 1);
|
||||
//We unload the nodeStates map and reload it completely
|
||||
nodeStates= new HashMap<>();
|
||||
node.getTree().setupNodeState(this);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the icon the node should have.
|
||||
*/
|
||||
public Icon getIcon(SkillTreeNode node) {
|
||||
SkillTree skillTree = node.getTree();
|
||||
|
||||
DisplayInfo displayInfo = new DisplayInfo(nodeStates.get(node), node.getSize());
|
||||
return skillTree.getIcon(displayInfo);
|
||||
}
|
||||
|
||||
|
||||
public Icon getIcon(SkillTree skillTree, IntegerCoordinates coordinates) {
|
||||
if (skillTree.isNode(coordinates)) {
|
||||
SkillTreeNode node = skillTree.getNode(coordinates);
|
||||
DisplayInfo displayInfo = new DisplayInfo(nodeStates.get(node), node.getSize());
|
||||
return skillTree.getIcon(displayInfo);
|
||||
}
|
||||
if (skillTree.isPath(coordinates))
|
||||
return skillTree.getIcon(DisplayInfo.pathInfo);
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
public int getSkillTreePoint(String treeId) {
|
||||
return skillTreePoints.get(treeId);
|
||||
}
|
||||
|
||||
public void withdrawSkillTreePoints(String treeId, int withdraw) {
|
||||
skillTreePoints.put(treeId, skillTreePoints.get(treeId) - withdraw);
|
||||
}
|
||||
|
||||
public void setNodeState(SkillTreeNode node, NodeState nodeState) {
|
||||
nodeStates.put(node, nodeState);
|
||||
}
|
||||
|
||||
public NodeState getNodeState(SkillTreeNode node) {
|
||||
return nodeStates.get(node);
|
||||
}
|
||||
|
||||
public void setNodeState(SkillTreeNode node,NodeState nodeState) {
|
||||
nodeStates.put(node,nodeState);
|
||||
public boolean hasNodeState(SkillTreeNode node) {
|
||||
return nodeStates.containsKey(node);
|
||||
}
|
||||
|
||||
public int getNodeLevel(SkillTreeNode node) {
|
||||
return nodeLevels.get(node);
|
||||
}
|
||||
|
||||
|
||||
public void setNodeLevel(SkillTreeNode node, int nodeLevel) {
|
||||
|
||||
nodeLevels.put(node, nodeLevel);
|
||||
}
|
||||
|
||||
public void addNodeLevel(SkillTreeNode node) {
|
||||
nodeLevels.put(node, nodeLevels.get(node) + 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -273,6 +390,18 @@ public class PlayerData extends OfflinePlayerData implements Closable, Experienc
|
||||
return skillPoints;
|
||||
}
|
||||
|
||||
public int getSkillTreeReallocationPoints() {
|
||||
return skillTreeReallocationPoints;
|
||||
}
|
||||
|
||||
public void setSkillTreeReallocationPoints(int skillTreeReallocationPoints) {
|
||||
this.skillTreeReallocationPoints = skillTreeReallocationPoints;
|
||||
}
|
||||
|
||||
public void giveSkillTreeReallocationPoints(int amount) {
|
||||
skillTreeReallocationPoints+=amount;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getClaims(ExperienceObject object, ExperienceTable table, ExperienceItem item) {
|
||||
String key = object.getKey() + "." + table.getId() + "." + item.getId();
|
||||
|
@ -26,10 +26,7 @@ import org.yaml.snakeyaml.external.biz.base64Coder.Base64Coder;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.*;
|
||||
|
||||
public class MMOCoreUtils {
|
||||
public static boolean pluginItem(ItemStack item) {
|
||||
@ -59,6 +56,44 @@ public class MMOCoreUtils {
|
||||
return str.replace("-", "_").toUpperCase();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param value an integer you want to convert
|
||||
* @return the string representing the integer but with roman letters
|
||||
*/
|
||||
public static String toRomanNumerals(int value) {
|
||||
LinkedHashMap<String, Integer> roman_numerals = new LinkedHashMap<String, Integer>();
|
||||
roman_numerals.put("M", 1000);
|
||||
roman_numerals.put("CM", 900);
|
||||
roman_numerals.put("D", 500);
|
||||
roman_numerals.put("CD", 400);
|
||||
roman_numerals.put("C", 100);
|
||||
roman_numerals.put("XC", 90);
|
||||
roman_numerals.put("L", 50);
|
||||
roman_numerals.put("XL", 40);
|
||||
roman_numerals.put("X", 10);
|
||||
roman_numerals.put("IX", 9);
|
||||
roman_numerals.put("V", 5);
|
||||
roman_numerals.put("IV", 4);
|
||||
roman_numerals.put("I", 1);
|
||||
String res = "";
|
||||
for(Map.Entry<String, Integer> entry : roman_numerals.entrySet()){
|
||||
int matches = value/entry.getValue();
|
||||
res += repeat(entry.getKey(), matches);
|
||||
value = value % entry.getValue();
|
||||
}
|
||||
return res;
|
||||
}
|
||||
private static String repeat(String s, int n) {
|
||||
if(s == null) {
|
||||
return null;
|
||||
}
|
||||
final StringBuilder sb = new StringBuilder();
|
||||
for(int i = 0; i < n; i++) {
|
||||
sb.append(s);
|
||||
}
|
||||
return sb.toString();
|
||||
}
|
||||
/**
|
||||
* Displays an in game indicator using a hologram. This uses
|
||||
* LumineUtils hologramFactory to summon holograms
|
||||
|
@ -1,6 +1,7 @@
|
||||
package net.Indyuce.mmocore.command;
|
||||
|
||||
import net.Indyuce.mmocore.MMOCore;
|
||||
import net.Indyuce.mmocore.api.util.MMOCoreUtils;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.command.ConsoleCommandSender;
|
||||
import org.bukkit.configuration.ConfigurationSection;
|
||||
@ -18,7 +19,7 @@ public class CommandVerbose {
|
||||
|
||||
for (CommandType type : CommandType.values())
|
||||
try {
|
||||
values.put(type, VerboseValue.valueOf(config.getString(type.name().toLowerCase(), "TRUE").toUpperCase()));
|
||||
values.put(type, VerboseValue.valueOf(config.getString(MMOCoreUtils.toEnumName(type.name()), "TRUE").toUpperCase()));
|
||||
} catch (IllegalArgumentException exception) {
|
||||
values.put(type, VerboseValue.TRUE);
|
||||
MMOCore.plugin.getLogger().log(Level.WARNING, "Could not load command verbose action for " + type.name());
|
||||
@ -54,6 +55,7 @@ public class CommandVerbose {
|
||||
LEVEL,
|
||||
NOCD,
|
||||
POINTS,
|
||||
SKILL_TREE_POINTS,
|
||||
RESET,
|
||||
RESOURCE
|
||||
}
|
||||
|
@ -33,5 +33,6 @@ public class MMOCoreCommandTreeRoot extends CommandTreeRoot implements CommandEx
|
||||
addChild(new BoosterCommandTreeNode(this));
|
||||
addChild(new WaypointsCommandTreeNode(this));
|
||||
addChild(new QuestCommandTreeNode(this));
|
||||
addChild(new WaypointsCommandTreeNode(this));
|
||||
}
|
||||
}
|
||||
|
@ -24,7 +24,8 @@ public class AdminCommandTreeNode extends CommandTreeNode {
|
||||
addChild(new PointsCommandTreeNode("class", this, PlayerData::setClassPoints, PlayerData::giveClassPoints, PlayerData::getClassPoints));
|
||||
addChild(new PointsCommandTreeNode("attribute", this, PlayerData::setAttributePoints, PlayerData::giveAttributePoints, PlayerData::getAttributePoints));
|
||||
addChild(new PointsCommandTreeNode("attr-realloc", this, PlayerData::setAttributeReallocationPoints, PlayerData::giveAttributeReallocationPoints, PlayerData::getAttributeReallocationPoints));
|
||||
|
||||
addChild(new PointsCommandTreeNode("skill-tree-realloc",this,PlayerData::setSkillTreeReallocationPoints,PlayerData::giveSkillTreeReallocationPoints,PlayerData::getSkillTreeReallocationPoints));
|
||||
addChild(new SkillTreePointsCommandTreeNode(this,(playerData,val,id)->playerData.setSkillTreePoints(id,val),(playerData, val, id)->playerData.giveSkillTreePoints(id,val),(playerData,id)->playerData.getSkillTreePoint(id)));
|
||||
for (PlayerResource res : PlayerResource.values())
|
||||
addChild(new ResourceCommandTreeNode(res.name().toLowerCase(), this, res));
|
||||
}
|
||||
|
@ -0,0 +1,88 @@
|
||||
package net.Indyuce.mmocore.command.rpg.admin;
|
||||
|
||||
import io.lumine.mythic.lib.command.api.CommandTreeNode;
|
||||
import io.lumine.mythic.lib.command.api.Parameter;
|
||||
import io.lumine.mythic.utils.functions.TriConsumer;
|
||||
import net.Indyuce.mmocore.MMOCore;
|
||||
import net.Indyuce.mmocore.api.player.PlayerData;
|
||||
import net.Indyuce.mmocore.command.CommandVerbose;
|
||||
import net.Indyuce.mmocore.tree.skilltree.SkillTree;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.function.BiFunction;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public class SkillTreePointsCommandTreeNode extends CommandTreeNode {
|
||||
BiFunction<PlayerData, String,Integer> get;
|
||||
|
||||
public SkillTreePointsCommandTreeNode(CommandTreeNode parent, TriConsumer<PlayerData, Integer, String> give,
|
||||
TriConsumer<PlayerData, Integer, String> set, BiFunction<PlayerData, String,Integer> get) {
|
||||
super(parent, "skill-tree-points");
|
||||
addChild(new ActionCommandTreeNode(this, "give", give));
|
||||
addChild(new ActionCommandTreeNode(this, "set", set));
|
||||
this.get = get;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommandResult execute(CommandSender commandSender, String[] strings) {
|
||||
return CommandResult.THROW_USAGE;
|
||||
}
|
||||
|
||||
public class ActionCommandTreeNode extends CommandTreeNode {
|
||||
private final TriConsumer<PlayerData, Integer, String> action;
|
||||
|
||||
|
||||
public ActionCommandTreeNode(CommandTreeNode parent, String id, TriConsumer<PlayerData, Integer, String> action) {
|
||||
super(parent, id);
|
||||
this.action = action;
|
||||
addParameter(Parameter.PLAYER);
|
||||
addParameter(Parameter.AMOUNT);
|
||||
addParameter(new Parameter("<type>", ((explorer, list) -> {
|
||||
MMOCore.plugin.skillTreeManager.getAll().forEach(tree -> list.add(tree.getId()));
|
||||
list.add("global");
|
||||
})));
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommandResult execute(CommandSender sender, String[] args) {
|
||||
if (args.length < 6)
|
||||
return CommandResult.THROW_USAGE;
|
||||
Player player = Bukkit.getPlayer(args[3]);
|
||||
if (player == null) {
|
||||
sender.sendMessage(ChatColor.RED + "Could not find the player called " + args[3] + ".");
|
||||
return CommandResult.FAILURE;
|
||||
}
|
||||
|
||||
int amount;
|
||||
try {
|
||||
amount = Integer.parseInt(args[4]);
|
||||
} catch (Exception e) {
|
||||
sender.sendMessage(ChatColor.RED + args[4] + " is not a valid number.");
|
||||
return CommandResult.FAILURE;
|
||||
}
|
||||
List<String> list = new ArrayList();
|
||||
MMOCore.plugin.skillTreeManager.getAll().forEach(tree -> list.add(tree.getId()));
|
||||
list.add("global");
|
||||
|
||||
String id = args[5];
|
||||
|
||||
if (!list.contains(id)) {
|
||||
sender.sendMessage("Could not find the type of points " + id + ".");
|
||||
return CommandResult.FAILURE;
|
||||
}
|
||||
|
||||
PlayerData data = PlayerData.get(player);
|
||||
action.accept(data, amount, args[5]);
|
||||
CommandVerbose.verbose(sender, CommandVerbose.CommandType.SKILL_TREE_POINTS, ChatColor.GOLD + player.getName()
|
||||
+ ChatColor.YELLOW + " now has " + ChatColor.GOLD + get.apply(data, id) + ChatColor.YELLOW + " " + id + " skill tree points.");
|
||||
|
||||
return CommandResult.SUCCESS;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -1,7 +1,8 @@
|
||||
package net.Indyuce.mmocore.gui;
|
||||
|
||||
import io.lumine.mythic.lib.player.modifier.PlayerModifier;
|
||||
import io.lumine.mythic.lib.MythicLib;
|
||||
import net.Indyuce.mmocore.MMOCore;
|
||||
import net.Indyuce.mmocore.api.SoundEvent;
|
||||
import net.Indyuce.mmocore.api.player.PlayerData;
|
||||
import net.Indyuce.mmocore.gui.api.EditableInventory;
|
||||
import net.Indyuce.mmocore.gui.api.GeneratedInventory;
|
||||
@ -12,17 +13,22 @@ import net.Indyuce.mmocore.tree.IntegerCoordinates;
|
||||
import net.Indyuce.mmocore.tree.NodeState;
|
||||
import net.Indyuce.mmocore.tree.skilltree.SkillTree;
|
||||
import net.Indyuce.mmocore.tree.SkillTreeNode;
|
||||
import org.apache.commons.lang.Validate;
|
||||
import net.Indyuce.mmocore.tree.skilltree.display.Icon;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.NamespacedKey;
|
||||
import org.bukkit.configuration.ConfigurationSection;
|
||||
import org.bukkit.event.inventory.InventoryAction;
|
||||
import org.bukkit.event.inventory.InventoryClickEvent;
|
||||
import org.bukkit.inventory.ItemFlag;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.inventory.meta.ItemMeta;
|
||||
import org.bukkit.persistence.PersistentDataContainer;
|
||||
import org.bukkit.persistence.PersistentDataType;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
public class SkillTreeViewer extends EditableInventory {
|
||||
@ -37,6 +43,20 @@ public class SkillTreeViewer extends EditableInventory {
|
||||
if (function.equals("skill-tree")) {
|
||||
return new SkillTreeItem(config);
|
||||
}
|
||||
if (function.equals("reallocation"))
|
||||
return new InventoryItem<SkillTreeInventory>(config) {
|
||||
|
||||
@Override
|
||||
public Placeholders getPlaceholders(SkillTreeInventory inv, int n) {
|
||||
Placeholders holders = new Placeholders();
|
||||
holders.register("skill-tree-points", inv.getPlayerData().getSkillTreePoint(inv.getSkillTree().getId()));
|
||||
holders.register("global-points", inv.getPlayerData().getSkillTreePoint("global"));
|
||||
holders.register("realloc-points", inv.getPlayerData().getSkillTreeReallocationPoints());
|
||||
holders.register("total", inv.getPlayerData().countSkillTreePoints(inv.getSkillTree()));
|
||||
return holders;
|
||||
}
|
||||
};
|
||||
|
||||
if (function.equals("skill-tree-node"))
|
||||
return new SkillTreeNodeItem(config);
|
||||
if (function.equals("next-tree-list-page")) {
|
||||
@ -57,17 +77,31 @@ public class SkillTreeViewer extends EditableInventory {
|
||||
public class SkillTreeItem extends InventoryItem<SkillTreeInventory> {
|
||||
|
||||
public SkillTreeItem(ConfigurationSection config) {
|
||||
super(config);
|
||||
//We must use this constructor to show that there are not specified material
|
||||
super(Material.BARRIER, config);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean hasDifferentDisplay() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack display(SkillTreeInventory inv, int n) {
|
||||
int index = 4 * inv.treeListPage + n;
|
||||
int index = inv.getEditable().getByFunction("skill-tree").getSlots().size() * inv.treeListPage + n;
|
||||
if (!MMOCore.plugin.skillTreeManager.has(index)) {
|
||||
return new ItemStack(Material.AIR);
|
||||
}
|
||||
SkillTree skillTree = MMOCore.plugin.skillTreeManager.get(index);
|
||||
//We display with the material corresponding to the skillTree
|
||||
ItemStack item = super.display(inv, n, skillTree.getGuiMaterial());
|
||||
ItemStack item = super.display(inv, n, skillTree.getItem());
|
||||
|
||||
ItemMeta meta = item.getItemMeta();
|
||||
meta.addItemFlags(ItemFlag.HIDE_ATTRIBUTES);
|
||||
meta.setDisplayName(skillTree.getName());
|
||||
meta.setLore(skillTree.getLore());
|
||||
PersistentDataContainer container = meta.getPersistentDataContainer();
|
||||
container.set(new NamespacedKey(MMOCore.plugin, "skill-tree-id"), PersistentDataType.STRING, skillTree.getId());
|
||||
item.setItemMeta(meta);
|
||||
@ -76,7 +110,7 @@ public class SkillTreeViewer extends EditableInventory {
|
||||
|
||||
@Override
|
||||
public Placeholders getPlaceholders(SkillTreeInventory inv, int n) {
|
||||
int index = 4 * inv.treeListPage + n;
|
||||
int index = inv.getEditable().getByFunction("skill-tree").getSlots().size() * inv.treeListPage + n;
|
||||
SkillTree skillTree = MMOCore.plugin.skillTreeManager.get(index);
|
||||
Placeholders holders = new Placeholders();
|
||||
holders.register("name", skillTree.getName());
|
||||
@ -111,146 +145,65 @@ public class SkillTreeViewer extends EditableInventory {
|
||||
|
||||
|
||||
public class SkillTreeNodeItem extends InventoryItem<SkillTreeInventory> {
|
||||
private final LockedSkillNodeItem lockedSkillNode;
|
||||
private final UnlockedSkillNodeItem unlockedSkillNode;
|
||||
private final PathTreeNodeItem pathTreeNode;
|
||||
|
||||
|
||||
public SkillTreeNodeItem(ConfigurationSection config) {
|
||||
super(config);
|
||||
Validate.isTrue(config.contains("locked-skill-node"));
|
||||
Validate.isTrue(config.contains("unlocked-skill-node"));
|
||||
Validate.isTrue(config.contains("path-tree-node"));
|
||||
lockedSkillNode = new LockedSkillNodeItem(config.getConfigurationSection("locked-skill-node"));
|
||||
unlockedSkillNode = new UnlockedSkillNodeItem(config.getConfigurationSection("unlocked-skill-node"));
|
||||
pathTreeNode = new PathTreeNodeItem(config.getConfigurationSection("path-tree-node"));
|
||||
super(Material.AIR, config);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasDifferentDisplay() {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the node/path with the lore and name filled in the yml of the skill tree node with the right material
|
||||
* and model-data.
|
||||
* You don't need to give any name or lore in the gui/skilltree.yml all the information are filled in
|
||||
* the yml of the skill tree.
|
||||
*/
|
||||
@Override
|
||||
public ItemStack display(SkillTreeInventory inv, int n) {
|
||||
int slot = getSlots().get(n);
|
||||
int deltaX = (slot - inv.getMinSlot()) % 9;
|
||||
int deltaY = (slot - inv.getMinSlot()) / 9;
|
||||
IntegerCoordinates coordinates = new IntegerCoordinates(inv.getX() + deltaX, inv.getY() + deltaY);
|
||||
ItemStack item=null;
|
||||
if (inv.getSkillTree().isNode(coordinates)) {
|
||||
SkillTreeNode node = inv.getSkillTree().getNode(coordinates);
|
||||
if (inv.getPlayerData().getNodeState(node).equals(NodeState.UNLOCKED))
|
||||
item = unlockedSkillNode.display(inv, n, coordinates);
|
||||
else if (inv.getPlayerData().getNodeState(node).equals(NodeState.LOCKED))
|
||||
item = lockedSkillNode.display(inv, n, coordinates);
|
||||
|
||||
} //We check if is a path only if the skillTree is an automatic Skill Tree
|
||||
else if (inv.getSkillTree().isPath(coordinates))
|
||||
item = pathTreeNode.display(inv, n);
|
||||
else
|
||||
//If it is none of the above we just display air
|
||||
return new ItemStack(Material.AIR);
|
||||
|
||||
//We save the coordinates of the node
|
||||
ItemMeta meta = item.getItemMeta();
|
||||
PersistentDataContainer container = meta.getPersistentDataContainer();
|
||||
container.set(new NamespacedKey(MMOCore.plugin, "coordinates.x"), PersistentDataType.INTEGER, coordinates.getX());
|
||||
container.set(new NamespacedKey(MMOCore.plugin, "coordinates.y"), PersistentDataType.INTEGER, coordinates.getY());
|
||||
item.setItemMeta(meta);
|
||||
return item;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Placeholders getPlaceholders(SkillTreeInventory inv, int n) {
|
||||
return new Placeholders();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public class LockedSkillNodeItem extends InventoryItem<SkillTreeInventory> {
|
||||
|
||||
public LockedSkillNodeItem(ConfigurationSection config) {
|
||||
super(config);
|
||||
}
|
||||
|
||||
public ItemStack display(SkillTreeInventory inv, int n, IntegerCoordinates coordinates) {
|
||||
return super.display(inv, n);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Placeholders getPlaceholders(SkillTreeInventory inv, int n) {
|
||||
int slot = getSlots().get(n);
|
||||
int deltaX = (slot - inv.getMinSlot()) % 9;
|
||||
int deltaY = (slot - inv.getMinSlot()) / 9;
|
||||
IntegerCoordinates coordinates = new IntegerCoordinates(inv.getX() + deltaX, inv.getY() + deltaY);
|
||||
SkillTreeNode treeNode = inv.getSkillTree().getNode(coordinates);
|
||||
Placeholders holders = new Placeholders();
|
||||
holders.register("name", treeNode.getName());
|
||||
holders.register("node-state", inv.getPlayerData().getNodeState(treeNode));
|
||||
//Display what nodes this node unlocks
|
||||
String str = "";
|
||||
for (SkillTreeNode node : treeNode.getChildren())
|
||||
str += node.getName() + ",";
|
||||
//We remove the last comma
|
||||
str = str.substring(0, str.length() - 1);
|
||||
holders.register("unlocks", str);
|
||||
//Display all the modifiers this node gives
|
||||
str = "";
|
||||
for (PlayerModifier playerModifier : treeNode.getModifiers()) {
|
||||
//TODO
|
||||
str += "\n" + playerModifier.getKey();
|
||||
if (inv.getSkillTree().isNode(coordinates) || inv.getSkillTree().isPath(coordinates)) {
|
||||
Icon icon = inv.getPlayerData().getIcon(inv.getSkillTree(), coordinates);
|
||||
ItemStack item = super.display(inv, n, icon.getMaterial(), icon.getCustomModelData());
|
||||
ItemMeta meta = item.getItemMeta();
|
||||
if (inv.getSkillTree().isNode(coordinates)) {
|
||||
SkillTreeNode node = inv.getSkillTree().getNode(coordinates);
|
||||
List<String> lore = new ArrayList<>(node.getLore(inv.getPlayerData()));
|
||||
lore.add("");
|
||||
getLore().forEach(str -> lore.add(MythicLib.plugin.parseColors(getPlaceholders(inv, n).apply(inv.getPlayer(), str))));
|
||||
meta.setLore(lore);
|
||||
meta.setDisplayName(node.getName());
|
||||
}
|
||||
//If it is path we remove the display name and the lore.
|
||||
else {
|
||||
meta.setLore(new ArrayList<>());
|
||||
meta.setDisplayName("");
|
||||
}
|
||||
meta.addItemFlags(ItemFlag.HIDE_ATTRIBUTES);
|
||||
PersistentDataContainer container = meta.getPersistentDataContainer();
|
||||
container.set(new NamespacedKey(MMOCore.plugin, "coordinates.x"), PersistentDataType.INTEGER, coordinates.getX());
|
||||
container.set(new NamespacedKey(MMOCore.plugin, "coordinates.y"), PersistentDataType.INTEGER, coordinates.getY());
|
||||
item.setItemMeta(meta);
|
||||
return item;
|
||||
}
|
||||
return new ItemStack(Material.AIR);
|
||||
}
|
||||
|
||||
holders.register("modifiers", str);
|
||||
|
||||
@Override
|
||||
public Placeholders getPlaceholders(SkillTreeInventory inv, int n) {
|
||||
Placeholders holders = new Placeholders();
|
||||
holders.register("skill-tree", inv.getSkillTree().getName());
|
||||
holders.register("skill-tree-points", inv.getPlayerData().getSkillTreePoint(inv.getSkillTree().getId()));
|
||||
holders.register("global-points", inv.getPlayerData().getSkillTreePoint("global"));
|
||||
return holders;
|
||||
}
|
||||
}
|
||||
|
||||
public class UnlockedSkillNodeItem extends InventoryItem<SkillTreeInventory> {
|
||||
public UnlockedSkillNodeItem(ConfigurationSection config) {
|
||||
super(config);
|
||||
}
|
||||
|
||||
|
||||
public ItemStack display(SkillTreeInventory inv, int n, IntegerCoordinates coordinates) {
|
||||
return super.display(inv, n);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Placeholders getPlaceholders(SkillTreeInventory inv, int n) {
|
||||
int slot = getSlots().get(n);
|
||||
int deltaX = (slot - inv.getMinSlot()) % 9;
|
||||
int deltaY = (slot - inv.getMinSlot()) / 9;
|
||||
IntegerCoordinates coordinates = new IntegerCoordinates(inv.getX() + deltaX, inv.getY() + deltaY);
|
||||
SkillTreeNode treeNode = inv.getSkillTree().getNode(coordinates);
|
||||
Placeholders holders = new Placeholders();
|
||||
holders.register("name", treeNode.getName());
|
||||
holders.register("node-state", inv.getPlayerData().getNodeState(treeNode));
|
||||
String str = "";
|
||||
for (SkillTreeNode node : treeNode.getChildren())
|
||||
str += node.getName() + ",";
|
||||
//We remove the last comma
|
||||
str = str.substring(0, str.length() - 1);
|
||||
holders.register("unlocks", str);
|
||||
str = "";
|
||||
for (PlayerModifier playerModifier : treeNode.getModifiers()) {
|
||||
//TODO
|
||||
str += "\n" + playerModifier.getKey();
|
||||
}
|
||||
|
||||
holders.register("modifiers", str);
|
||||
return holders;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public class PathTreeNodeItem extends SimplePlaceholderItem<SkillTreeInventory> {
|
||||
public PathTreeNodeItem(ConfigurationSection config) {
|
||||
super(config);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
public class SkillTreeInventory extends GeneratedInventory {
|
||||
private int x, y;
|
||||
@ -265,11 +218,9 @@ public class SkillTreeViewer extends EditableInventory {
|
||||
public SkillTreeInventory(PlayerData playerData, EditableInventory editable) {
|
||||
super(playerData, editable);
|
||||
skillTree = playerData.getCachedSkillTree();
|
||||
|
||||
maxTreeListPage = MMOCore.plugin.skillTreeManager.getAll().size() / 4;
|
||||
|
||||
maxTreeListPage = (MMOCore.plugin.skillTreeManager.getAll().size() - 1) / editable.getByFunction("skill-tree").getSlots().size();
|
||||
//We get the width and height of the GUI(corresponding to the slots given)
|
||||
List<Integer> slots = getByFunction("skill-tree-node").getSlots();
|
||||
List<Integer> slots = editable.getByFunction("skill-tree-node").getSlots();
|
||||
minSlot = 64;
|
||||
maxSlot = 0;
|
||||
for (int slot : slots) {
|
||||
@ -281,6 +232,8 @@ public class SkillTreeViewer extends EditableInventory {
|
||||
width = (maxSlot - minSlot) % 9;
|
||||
height = (maxSlot - minSlot) / 9;
|
||||
middleSlot = minSlot + width / 2 + 9 * (height / 2);
|
||||
x -= width / 2;
|
||||
y -= height / 2;
|
||||
}
|
||||
|
||||
public int getX() {
|
||||
@ -314,13 +267,8 @@ public class SkillTreeViewer extends EditableInventory {
|
||||
|
||||
@Override
|
||||
public void whenClicked(InventoryClickEvent event, InventoryItem item) {
|
||||
if (event.getAction().equals(InventoryAction.MOVE_TO_OTHER_INVENTORY)) {
|
||||
int offset = event.getSlot() - middleSlot;
|
||||
x += offset % 9;
|
||||
y += offset / 9;
|
||||
open();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (item.getFunction().equals("next-tree-list-page")) {
|
||||
treeListPage++;
|
||||
open();
|
||||
@ -330,16 +278,100 @@ public class SkillTreeViewer extends EditableInventory {
|
||||
treeListPage--;
|
||||
open();
|
||||
}
|
||||
if (item.getFunction().equals("reallocation")) {
|
||||
int spent = playerData.countSkillTreePoints(skillTree);
|
||||
if (spent < 1) {
|
||||
MMOCore.plugin.configManager.getSimpleMessage("no-skill-tree-points-spent").send(player);
|
||||
MMOCore.plugin.soundManager.getSound(SoundEvent.NOT_ENOUGH_POINTS).playTo(getPlayer());
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
|
||||
if (getPlayerData().getSkillTreeReallocationPoints() <= 0) {
|
||||
MMOCore.plugin.configManager.getSimpleMessage("not-skill-tree-reallocation-point").send(player);
|
||||
MMOCore.plugin.soundManager.getSound(SoundEvent.NOT_ENOUGH_POINTS).playTo(getPlayer());
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
} else {
|
||||
int reallocated = playerData.countSkillTreePoints(skillTree);
|
||||
//We remove all the nodeStates progress
|
||||
playerData.giveSkillTreePoints(skillTree.getId(), reallocated);
|
||||
playerData.giveSkillTreeReallocationPoints(-1);
|
||||
for (SkillTreeNode node : skillTree.getNodes()) {
|
||||
playerData.setNodeLevel(node, 0);
|
||||
playerData.setNodeState(node, NodeState.LOCKED);
|
||||
}
|
||||
skillTree.setupNodeState(playerData);
|
||||
MMOCore.plugin.configManager.getSimpleMessage("reallocated-points", "points", "" + playerData.getSkillTreePoint(skillTree.getId()), "skill-tree", skillTree.getName()).send(player);
|
||||
MMOCore.plugin.soundManager.getSound(SoundEvent.RESET_SKILL_TREE).playTo(player);
|
||||
event.setCancelled(true);
|
||||
open();
|
||||
return;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (item.getFunction().equals("skill-tree")) {
|
||||
String id = event.getCurrentItem().getItemMeta().getPersistentDataContainer().get(
|
||||
new NamespacedKey(MMOCore.plugin, "skill-tree-id"), PersistentDataType.STRING);
|
||||
playerData.setCachedSkillTree(MMOCore.plugin.skillTreeManager.get(id));
|
||||
MMOCore.plugin.soundManager.getSound(SoundEvent.CHANGE_SKILL_TREE).playTo(player);
|
||||
|
||||
newInventory(playerData).open();
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
|
||||
if (item.getFunction().equals("skill-tree-node")) {
|
||||
|
||||
if (event.getAction().equals(InventoryAction.PICKUP_HALF)) {
|
||||
int offset = event.getSlot();
|
||||
int xOffset=offset%9-middleSlot%9;
|
||||
int yOffset=offset/9-middleSlot/9;
|
||||
x += xOffset;
|
||||
y += yOffset;
|
||||
open();
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
|
||||
else if (event.getAction() == InventoryAction.PICKUP_ALL) {
|
||||
PersistentDataContainer container = event.getCurrentItem().getItemMeta().getPersistentDataContainer();
|
||||
int x = container.get(new NamespacedKey(MMOCore.plugin, "coordinates.x"), PersistentDataType.INTEGER);
|
||||
int y = container.get(new NamespacedKey(MMOCore.plugin, "coordinates.y"), PersistentDataType.INTEGER);
|
||||
SkillTreeNode node = skillTree.getNode(new IntegerCoordinates(x, y));
|
||||
if (playerData.canIncrementNodeLevel(node)) {
|
||||
playerData.incrementNodeLevel(node);
|
||||
MMOCore.plugin.configManager.getSimpleMessage("upgrade-skill-node", "skill-node", node.getName(), "level", "" + playerData.getNodeLevel(node)).send(player);
|
||||
MMOCore.plugin.soundManager.getSound(SoundEvent.LEVEL_UP).playTo(getPlayer());
|
||||
open();
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
} else if (playerData.getNodeState(node) == NodeState.LOCKED || playerData.getNodeState(node) == NodeState.FULLY_LOCKED) {
|
||||
MMOCore.plugin.configManager.getSimpleMessage("locked-node").send(player);
|
||||
MMOCore.plugin.soundManager.getSound(SoundEvent.NOT_ENOUGH_POINTS).playTo(getPlayer());
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
|
||||
} else if (playerData.getNodeLevel(node) >= node.getMaxLevel()) {
|
||||
MMOCore.plugin.configManager.getSimpleMessage("skill-node-max-level-hit").send(player);
|
||||
MMOCore.plugin.soundManager.getSound(SoundEvent.NOT_ENOUGH_POINTS).playTo(getPlayer());
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
|
||||
//Else the player doesn't doesn't have the skill tree points
|
||||
else {
|
||||
MMOCore.plugin.configManager.getSimpleMessage("not-enough-skill-tree-points").send(player);
|
||||
MMOCore.plugin.soundManager.getSound(SoundEvent.NOT_ENOUGH_POINTS).playTo(getPlayer());
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -133,16 +133,20 @@ public abstract class InventoryItem<T extends GeneratedInventory> {
|
||||
return display(inv, 0);
|
||||
}
|
||||
|
||||
public ItemStack display(T inv,int n) {
|
||||
return display(inv,n,null);
|
||||
public ItemStack display(T inv, int n) {
|
||||
return display(inv, n, null);
|
||||
}
|
||||
|
||||
public ItemStack display(T inv, int n,Material specificMaterial) {
|
||||
public ItemStack display(T inv, int n, Material specificMaterial) {
|
||||
return display(inv, n, specificMaterial, 0);
|
||||
}
|
||||
|
||||
public ItemStack display(T inv, int n, Material specificMaterial, int modelData) {
|
||||
|
||||
Placeholders placeholders = getPlaceholders(inv, n);
|
||||
ItemStack item = new ItemStack(specificMaterial==null?material:specificMaterial);
|
||||
ItemStack item = new ItemStack(specificMaterial == null ? material : specificMaterial);
|
||||
ItemMeta meta = item.getItemMeta();
|
||||
|
||||
meta.setCustomModelData(modelData);
|
||||
if (texture != null && meta instanceof SkullMeta)
|
||||
applyTexture(texture, (SkullMeta) meta);
|
||||
|
||||
@ -165,6 +169,7 @@ public abstract class InventoryItem<T extends GeneratedInventory> {
|
||||
return item;
|
||||
}
|
||||
|
||||
|
||||
private void applyTexture(String value, SkullMeta meta) {
|
||||
try {
|
||||
GameProfile profile = new GameProfile(UUID.randomUUID(), null);
|
||||
|
@ -74,6 +74,9 @@ public class ConfigManager {
|
||||
loadDefaultFile("expcurves", "levels.txt");
|
||||
loadDefaultFile("expcurves", "mining.txt");
|
||||
}
|
||||
if(!new File(MMOCore.plugin.getDataFolder()+"/skilltree").exists()) {
|
||||
loadDefaultFile("skilltree","combat.yml");
|
||||
}
|
||||
|
||||
loadDefaultFile("attributes.yml");
|
||||
loadDefaultFile("items.yml");
|
||||
|
@ -32,7 +32,7 @@ public class InventoryManager {
|
||||
public static final QuestViewer QUEST_LIST = new QuestViewer();
|
||||
public static final AttributeView ATTRIBUTE_VIEW = new AttributeView();
|
||||
public static final SkillTreeViewer TREE_VIEW = new SkillTreeViewer();
|
||||
public static final List<EditableInventory> list = Arrays.asList(PLAYER_STATS, ATTRIBUTE_VIEW, SKILL_LIST, CLASS_SELECT, SUBCLASS_SELECT, SUBCLASS_CONFIRM, QUEST_LIST, WAYPOINTS, CLASS_CONFIRM, FRIEND_LIST, FRIEND_REMOVAL, PARTY_VIEW, PARTY_CREATION, GUILD_VIEW, GUILD_CREATION);
|
||||
public static final List<EditableInventory> list = Arrays.asList(PLAYER_STATS, ATTRIBUTE_VIEW, TREE_VIEW,SKILL_LIST, CLASS_SELECT, SUBCLASS_SELECT, SUBCLASS_CONFIRM, QUEST_LIST, WAYPOINTS, CLASS_CONFIRM, FRIEND_LIST, FRIEND_REMOVAL, PARTY_VIEW, PARTY_CREATION, GUILD_VIEW, GUILD_CREATION);
|
||||
|
||||
public static void load() {
|
||||
list.forEach(inv -> {
|
||||
|
@ -1,7 +1,6 @@
|
||||
package net.Indyuce.mmocore.manager;
|
||||
|
||||
import net.Indyuce.mmocore.MMOCore;
|
||||
import net.Indyuce.mmocore.gui.SkillTreeViewer;
|
||||
import net.Indyuce.mmocore.manager.registry.MMOCoreRegister;
|
||||
import net.Indyuce.mmocore.tree.SkillTreeNode;
|
||||
import net.Indyuce.mmocore.tree.skilltree.SkillTree;
|
||||
@ -23,6 +22,18 @@ public class SkillTreeManager extends MMOCoreRegister<SkillTree> {
|
||||
tree.getNodes().forEach((node)->skillTreeNodes.add(node));
|
||||
}
|
||||
|
||||
public boolean has(int index) {
|
||||
return index>=0 &&index<registered.values().stream().collect(Collectors.toList()).size();
|
||||
}
|
||||
|
||||
/**
|
||||
* Useful to recursively go trough trees
|
||||
*
|
||||
* @return The list of all the roots (e.g the nodes without any parents
|
||||
*/
|
||||
public List<SkillTreeNode> getRootNodes() {
|
||||
return skillTreeNodes.stream().filter(treeNode -> treeNode.getSoftParents().size()==0).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
public ArrayList<SkillTreeNode> getAllNodes() {
|
||||
return skillTreeNodes;
|
||||
|
@ -29,6 +29,7 @@ public class MySQLPlayerDataManager extends PlayerDataManager {
|
||||
this.provider = provider;
|
||||
}
|
||||
|
||||
//TODO SkillTree pour SQL
|
||||
@Override
|
||||
public void loadData(PlayerData data) {
|
||||
provider.getResult("SELECT * FROM mmocore_playerdata WHERE uuid = '" + data.getUniqueId() + "';", (result) -> {
|
||||
|
@ -10,9 +10,11 @@ import net.Indyuce.mmocore.api.player.stats.StatType;
|
||||
import net.Indyuce.mmocore.guild.provided.Guild;
|
||||
import net.Indyuce.mmocore.manager.data.DataProvider;
|
||||
import net.Indyuce.mmocore.manager.data.PlayerDataManager;
|
||||
import net.Indyuce.mmocore.tree.NodeState;
|
||||
import net.Indyuce.mmocore.tree.SkillTreeNode;
|
||||
import net.Indyuce.mmocore.tree.skilltree.SkillTree;
|
||||
import org.apache.commons.lang.Validate;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.configuration.ConfigurationSection;
|
||||
import org.bukkit.configuration.file.FileConfiguration;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
@ -72,13 +74,36 @@ public class YAMLPlayerDataManager extends PlayerDataManager {
|
||||
if (config.contains("times-claimed"))
|
||||
for (String key : config.getConfigurationSection("times-claimed").getKeys(true))
|
||||
data.getItemClaims().put(key, config.getInt("times-claimed." + key));
|
||||
//Load skill tree nodes
|
||||
|
||||
for (SkillTreeNode node : MMOCore.plugin.skillTreeManager.getAllNodes()) {
|
||||
String str = config.getString("skill-tree-nodes." + node.getTree().getId() + "." + node.getId());
|
||||
if (str == null)
|
||||
data.setNodeState(node, NodeState.LOCKED);
|
||||
else
|
||||
data.setNodeState(node,NodeState.valueOf(str));
|
||||
String path = "skill-tree-nodes." + node.getTree().getId() + "." + node.getId();
|
||||
|
||||
if (config.contains(path))
|
||||
data.setNodeLevel(node, config.getInt(path));
|
||||
else {
|
||||
data.setNodeLevel(node, 0);
|
||||
}
|
||||
}
|
||||
//Setup the nodeStates
|
||||
data.setupNodeState();
|
||||
//Load skill tree points
|
||||
ConfigurationSection section = config.getConfigurationSection("skill-tree-points");
|
||||
if (section != null) {
|
||||
for (String key : section.getKeys(false))
|
||||
data.setSkillTreePoints(key, section.getInt(key));
|
||||
|
||||
}
|
||||
//Put 0 to the rest of the values if nothing has been given
|
||||
List<String> skillTreeIds = MMOCore.plugin.skillTreeManager.getAll().stream().map(SkillTree::getId).collect(Collectors.toList());
|
||||
skillTreeIds.add("global");
|
||||
for (String treeId : skillTreeIds) {
|
||||
if (!data.containsSkillPointTreeId(treeId))
|
||||
data.setSkillTreePoints(treeId, 0);
|
||||
}
|
||||
|
||||
data.setSkillTreeReallocationPoints(config.getInt("skill-tree-reallocation-points",0));
|
||||
|
||||
// Load class slots, use try so the player can log in.
|
||||
if (config.contains("class-info"))
|
||||
for (String key : config.getConfigurationSection("class-info").getKeys(false))
|
||||
@ -115,10 +140,17 @@ public class YAMLPlayerDataManager extends PlayerDataManager {
|
||||
data.mapSkillLevels().forEach((key1, value) -> config.set("skill." + key1, value));
|
||||
data.getItemClaims().forEach((key, times) -> config.set("times-claimed." + key, times));
|
||||
|
||||
//Save the node states for the player
|
||||
//Save the node levels for the player
|
||||
for (SkillTreeNode node : MMOCore.plugin.skillTreeManager.getAllNodes()) {
|
||||
config.set("skill-tree-nodes." + node.getTree().getId() + "." + node.getId(),data.getNodeState(node));
|
||||
config.set("skill-tree-nodes." + node.getTree().getId() + "." + node.getId(), data.getNodeLevel(node));
|
||||
}
|
||||
|
||||
//Saves skill tree points
|
||||
for (String treeId : data.getSkillTreePoints().keySet()) {
|
||||
config.set("skill-tree-points." + treeId, data.getSkillTreePoint(treeId));
|
||||
}
|
||||
config.set("skill-tree-reallocation-points",data.getSkillTreeReallocationPoints());
|
||||
|
||||
List<String> boundSkills = new ArrayList<>();
|
||||
data.getBoundSkills().forEach(skill -> boundSkills.add(skill.getSkill().getHandler().getId()));
|
||||
config.set("bound-skills", boundSkills);
|
||||
|
@ -21,6 +21,9 @@ public abstract class MMOCoreRegister<T extends RegisterObject> implements MMOCo
|
||||
public T get(String id) {
|
||||
return Objects.requireNonNull(registered.get(id), "Could not find " + getRegisteredObjectName() + " with ID '" + id + "'");
|
||||
}
|
||||
public boolean has(String id){
|
||||
return registered.containsKey(id);
|
||||
}
|
||||
|
||||
public Collection<T> getAll() {
|
||||
return registered.values();
|
||||
|
@ -1,5 +1,6 @@
|
||||
package net.Indyuce.mmocore.tree;
|
||||
|
||||
public enum NodeState {
|
||||
LOCKED,UNLOCKED;
|
||||
LOCKED,UNLOCKED,UNLOCKABLE,FULLY_LOCKED;
|
||||
|
||||
}
|
||||
|
5
src/main/java/net/Indyuce/mmocore/tree/ParentType.java
Normal file
5
src/main/java/net/Indyuce/mmocore/tree/ParentType.java
Normal file
@ -0,0 +1,5 @@
|
||||
package net.Indyuce.mmocore.tree;
|
||||
|
||||
public enum ParentType {
|
||||
SOFT,STRONG;
|
||||
}
|
@ -1,141 +1,258 @@
|
||||
package net.Indyuce.mmocore.tree;
|
||||
|
||||
import com.gmail.nossr50.mcmmo.acf.annotation.HelpSearchTags;
|
||||
import io.lumine.mythic.lib.MythicLib;
|
||||
import io.lumine.mythic.lib.player.modifier.PlayerModifier;
|
||||
import io.lumine.mythic.lib.util.configobject.ConfigSectionObject;
|
||||
import net.Indyuce.mmocore.MMOCore;
|
||||
import net.Indyuce.mmocore.api.player.PlayerData;
|
||||
import net.Indyuce.mmocore.api.quest.trigger.Trigger;
|
||||
import net.Indyuce.mmocore.api.util.MMOCoreUtils;
|
||||
import net.Indyuce.mmocore.gui.api.item.Placeholders;
|
||||
import net.Indyuce.mmocore.player.Unlockable;
|
||||
import net.Indyuce.mmocore.tree.skilltree.AutomaticSkillTree;
|
||||
import net.Indyuce.mmocore.tree.skilltree.SkillTree;
|
||||
import org.apache.commons.lang.Validate;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.configuration.ConfigurationSection;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
//We must use generics to get the type of the corresponding tree
|
||||
public class SkillTreeNode implements Unlockable {
|
||||
private final SkillTree tree;
|
||||
private final String name,id;
|
||||
private final String name, id;
|
||||
private IntegerCoordinates coordinates;
|
||||
private final List<String> lore;
|
||||
private final Set<PlayerModifier> modifiers = new HashSet<>();
|
||||
private final ArrayList<SkillTreeNode> children = new ArrayList<>();
|
||||
private final ArrayList<SkillTreeNode> parents=new ArrayList<>();
|
||||
private boolean isRoot;
|
||||
/**
|
||||
* The lore corresponding to each level
|
||||
*/
|
||||
private final HashMap<NodeContext, List<String>> lores = new HashMap<>();
|
||||
|
||||
//TODO modifiers depending on level with drop tables
|
||||
private final HashMap<Integer, HashSet<PlayerModifier>> modifiers = new HashMap<>();
|
||||
private final HashMap<Integer, HashSet<Trigger>> triggers = new HashMap<>();
|
||||
//The max level the skill tree node can have and the max amount of children it can have.
|
||||
private final int maxLevel, maxChildren, size;
|
||||
private final ArrayList<SkillTreeNode> children = new ArrayList<>();
|
||||
/**
|
||||
* Associates the required level to each parent
|
||||
* You only need to have the requirement for one of your softParents but you need to fulfill the requirements
|
||||
* of all of your strong parents.
|
||||
**/
|
||||
|
||||
|
||||
private final HashMap<SkillTreeNode, Integer> softParents = new HashMap<>();
|
||||
private final HashMap<SkillTreeNode ,Integer> strongParents = new HashMap<>();
|
||||
|
||||
|
||||
public SkillTreeNode(SkillTree tree, ConfigurationSection config) {
|
||||
|
||||
Validate.notNull(config, "Config cannot be null");
|
||||
this.id=config.getName();
|
||||
this.id = config.getName();
|
||||
this.tree = tree;
|
||||
name = Objects.requireNonNull(config.getString("name"), "Could not find node name");
|
||||
lore = config.getStringList("lore");
|
||||
Validate.isTrue(config.contains("node-type"),"Could not find the node type");
|
||||
size = Objects.requireNonNull(config.getInt("size"));
|
||||
isRoot = config.contains("is-root") ? config.getBoolean("is-root") ? true : false : false;
|
||||
|
||||
//We initialize the value of the lore for each skill tree node.
|
||||
for (String state : Objects.requireNonNull(config.getConfigurationSection("lores")).getKeys(false)) {
|
||||
NodeState nodeState = NodeState.valueOf(MMOCoreUtils.toEnumName(state));
|
||||
if (nodeState == NodeState.UNLOCKED) {
|
||||
//TODO: Message could'nt load ... instead of exception
|
||||
ConfigurationSection section = config.getConfigurationSection("lores." + state);
|
||||
for (String level : section.getKeys(false)) {
|
||||
lores.put(new NodeContext(nodeState, Integer.parseInt(level)), section.getStringList(level));
|
||||
}
|
||||
} else {
|
||||
lores.put(new NodeContext(nodeState, 0), config.getStringList("lores." + state));
|
||||
}
|
||||
}
|
||||
maxLevel = config.contains("max-level") ? config.getInt("max-level") : 1;
|
||||
maxChildren = config.contains("max-children") ? config.getInt("max-children") : 1;
|
||||
//If coordinates are precised adn we are not wiht an automaticTree we set them up
|
||||
if ((!(tree instanceof AutomaticSkillTree)) && config.contains("coordinates.x") && config.contains("coordinates.y")) {
|
||||
coordinates = new IntegerCoordinates(config.getInt("coordinates.x"), config.getInt("coordinates.y"));
|
||||
}
|
||||
/*
|
||||
if (config.contains("modifiers")) {
|
||||
for (String key : config.getConfigurationSection("modifiers").getKeys(false)) {
|
||||
PlayerModifier mod = MythicLib.plugin.getModifiers().loadPlayerModifier(new ConfigSectionObject(config.getConfigurationSection(key)));
|
||||
modifiers.put(1, mod);
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
//If coordinates are precised adn we are not wiht an automaticTreewe set them up
|
||||
if((!(tree instanceof AutomaticSkillTree))&&config.contains("coordinates.x")&&config.contains("coordinates.y")) {
|
||||
coordinates=new IntegerCoordinates(config.getInt("coordinates.x"),config.getInt("coordinates.y"));
|
||||
}
|
||||
for (String key : config.getConfigurationSection("modifiers").getKeys(false)) {
|
||||
PlayerModifier mod = MythicLib.plugin.getModifiers().loadPlayerModifier(new ConfigSectionObject(config.getConfigurationSection(key)));
|
||||
modifiers.add(mod);
|
||||
}
|
||||
}
|
||||
|
||||
public SkillTreeNode(SkillTree tree, int x, int y, ConfigurationSection config) {
|
||||
Validate.notNull(config, "Config cannot be null");
|
||||
this.id=config.getName();
|
||||
this.tree = tree;
|
||||
name = Objects.requireNonNull(config.getString("name"), "Could not find node name");
|
||||
Validate.isTrue(config.contains("node-type"),"Could not find the node type");
|
||||
coordinates = new IntegerCoordinates(x, y);
|
||||
lore = config.getStringList("lore");
|
||||
for (String key : config.getConfigurationSection("modifiers").getKeys(false)) {
|
||||
PlayerModifier mod = MythicLib.plugin.getModifiers().loadPlayerModifier(new ConfigSectionObject(config.getConfigurationSection(key)));
|
||||
modifiers.add(mod);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
protected void whenPostLoaded(@NotNull ConfigurationSection config) {
|
||||
|
||||
}
|
||||
|
||||
public SkillTree getTree() {
|
||||
return tree;
|
||||
}
|
||||
|
||||
//Used when postLoaded
|
||||
public void addParent(SkillTreeNode parent) {
|
||||
parents.add(parent);
|
||||
public boolean isRoot() {
|
||||
return isRoot;
|
||||
}
|
||||
|
||||
public void addChild(SkillTreeNode child) {children.add(child);}
|
||||
//Used when postLoaded
|
||||
public void addParent(SkillTreeNode parent, int requiredLevel, ParentType parentType) {
|
||||
if (parentType == ParentType.SOFT)
|
||||
softParents.put(parent, requiredLevel);
|
||||
else
|
||||
strongParents.put(parent, requiredLevel);
|
||||
}
|
||||
|
||||
public void addChild(SkillTreeNode child) {
|
||||
children.add(child);
|
||||
}
|
||||
|
||||
public void setCoordinates(IntegerCoordinates coordinates) {
|
||||
this.coordinates = coordinates;
|
||||
}
|
||||
|
||||
public int getParentNeededLevel(SkillTreeNode parent) {
|
||||
return softParents.containsKey(parent) ? softParents.get(parent) : strongParents.containsKey(parent) ? strongParents.get(parent) : 0;
|
||||
}
|
||||
|
||||
public ArrayList<SkillTreeNode> getParents() {
|
||||
return parents;
|
||||
public boolean hasParent(SkillTreeNode parent) {
|
||||
return softParents.containsKey(parent) || strongParents.containsKey(parent);
|
||||
}
|
||||
|
||||
public int getMaxLevel() {
|
||||
return maxLevel;
|
||||
}
|
||||
|
||||
|
||||
public int getMaxChildren() {
|
||||
return maxChildren;
|
||||
}
|
||||
|
||||
public Set<SkillTreeNode> getSoftParents() {
|
||||
return softParents.keySet();
|
||||
}
|
||||
|
||||
public Set<SkillTreeNode> getStrongParents() {
|
||||
return strongParents.keySet();
|
||||
}
|
||||
|
||||
public ArrayList<SkillTreeNode> getChildren() {
|
||||
return children;
|
||||
}
|
||||
|
||||
|
||||
public int getSize() {
|
||||
return size;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
return MythicLib.plugin.parseColors( name);
|
||||
}
|
||||
|
||||
public IntegerCoordinates getCoordinates() {
|
||||
return coordinates;
|
||||
}
|
||||
|
||||
public Set<PlayerModifier> getModifiers() {
|
||||
return modifiers;
|
||||
public Set<PlayerModifier> getModifiers(int level) {
|
||||
return modifiers.get(level);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Uncolored lore with no placeholders
|
||||
*/
|
||||
public List<String> getLore() {
|
||||
return lore;
|
||||
|
||||
public Set<Trigger> getTriggers(int level) {
|
||||
return triggers.get(level);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String getUnlockNamespacedKey() {
|
||||
return "skill_tree:" + tree.getId() + "_" + coordinates.getX() + "_" + coordinates.getY();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
SkillTreeNode that = (SkillTreeNode) o;
|
||||
return tree.equals(that.tree) && coordinates.equals(that.coordinates);
|
||||
return tree.equals(that.tree) && (id.equals(that.id));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(tree, coordinates);
|
||||
return Objects.hash(tree, id);
|
||||
}
|
||||
|
||||
public Placeholders getPlaceholders(PlayerData playerData) {
|
||||
Placeholders holders = new Placeholders();
|
||||
holders.register("name", getName());
|
||||
holders.register("node-state", playerData.getNodeState(this));
|
||||
holders.register("size", getSize());
|
||||
holders.register("level", playerData.getNodeLevel(this));
|
||||
holders.register("max-level", getMaxLevel());
|
||||
holders.register("max-children", getMaxChildren());
|
||||
|
||||
//List of all the children of the node
|
||||
String str = "";
|
||||
for (SkillTreeNode node : getChildren())
|
||||
str += node.getName() + ",";
|
||||
//We remove the last comma
|
||||
if (str.length() != 0)
|
||||
str = str.substring(0, str.length() - 1);
|
||||
holders.register("children", str);
|
||||
|
||||
//list of parents with the level needed for each of them
|
||||
str = "";
|
||||
for (SkillTreeNode node : getSoftParents())
|
||||
str += node.getName() + " " + MMOCoreUtils.toRomanNumerals(getParentNeededLevel(node)) + ",";
|
||||
//We remove the last comma
|
||||
if (str.length() != 0)
|
||||
str = str.substring(0, str.length() - 1);
|
||||
holders.register("soft-parents-level", str);
|
||||
|
||||
//list of parents
|
||||
str = "";
|
||||
for (SkillTreeNode node : getSoftParents())
|
||||
str += node.getName() + ",";
|
||||
//We remove the last comma
|
||||
if (str.length() != 0)
|
||||
str = str.substring(0, str.length() - 1);
|
||||
holders.register("soft-parents", str);
|
||||
|
||||
//list of parents with the level needed for each of them
|
||||
str = "";
|
||||
for (SkillTreeNode node : getStrongParents())
|
||||
str += node.getName() + " " + MMOCoreUtils.toRomanNumerals(getParentNeededLevel(node)) + ",";
|
||||
//We remove the last comma
|
||||
if (str.length() != 0)
|
||||
str = str.substring(0, str.length() - 1);
|
||||
holders.register("strong-parents-level", str);
|
||||
|
||||
//list of parents
|
||||
str = "";
|
||||
for (SkillTreeNode node : getStrongParents())
|
||||
str += node.getName() + ",";
|
||||
//We remove the last comma
|
||||
if (str.length() != 0)
|
||||
str = str.substring(0, str.length() - 1);
|
||||
holders.register("strong-parents", str);
|
||||
|
||||
return holders;
|
||||
}
|
||||
|
||||
public List<String> getLore(PlayerData playerData) {
|
||||
Placeholders holders = getPlaceholders(playerData);
|
||||
List<String> parsedLore = new ArrayList<>();
|
||||
NodeContext context= new NodeContext(playerData.getNodeState(this),playerData.getNodeLevel(this));
|
||||
lores.get(context).forEach(string -> parsedLore.add(
|
||||
MythicLib.plugin.parseColors( holders.apply(playerData.getPlayer(), string))));
|
||||
return parsedLore;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @param namespacedKey Something like "skill_tree:tree_name_1_5"
|
||||
* @return The corresponding skill tree node
|
||||
@ -158,4 +275,46 @@ public class SkillTreeNode implements Unlockable {
|
||||
return MMOCore.plugin.skillTreeManager.get(treeId).getNode(coords);
|
||||
}
|
||||
|
||||
public class NodeContext {
|
||||
private final NodeState nodeState;
|
||||
private final int nodeLevel;
|
||||
|
||||
public NodeContext(NodeState nodeState, int nodeLevel) {
|
||||
this.nodeState = nodeState;
|
||||
this.nodeLevel = nodeLevel;
|
||||
}
|
||||
|
||||
public NodeState getNodeState() {
|
||||
return nodeState;
|
||||
}
|
||||
|
||||
public int getNodeLevel() {
|
||||
return nodeLevel;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
NodeContext that = (NodeContext) o;
|
||||
return nodeLevel == that.nodeLevel && nodeState == that.nodeState;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "NodeContext{" +
|
||||
"nodeState=" + nodeState +
|
||||
", nodeLevel=" + nodeLevel +
|
||||
'}';
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(nodeState, nodeLevel);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
@ -1,19 +1,25 @@
|
||||
package net.Indyuce.mmocore.tree.skilltree;
|
||||
|
||||
import net.Indyuce.mmocore.MMOCore;
|
||||
import net.Indyuce.mmocore.tree.IntegerCoordinates;
|
||||
import net.Indyuce.mmocore.tree.ParentType;
|
||||
import net.Indyuce.mmocore.tree.SkillTreeNode;
|
||||
import org.apache.commons.lang.Validate;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.configuration.ConfigurationSection;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import javax.swing.text.html.HTMLDocument;
|
||||
import java.util.HashMap;
|
||||
import java.util.Objects;
|
||||
import java.util.logging.Level;
|
||||
|
||||
/**
|
||||
* Skill Trees where you only need to fill the strong and soft
|
||||
*/
|
||||
public class AutomaticSkillTree extends SkillTree {
|
||||
private SkillTreeNode root;
|
||||
//Represents all the coordinates that will be displayed as a path (between 2 nodes of the tree)
|
||||
private final ArrayList<IntegerCoordinates> pathToParents = new ArrayList<>();
|
||||
|
||||
//Hash map to store the left and right branches of each node
|
||||
//Hash map to store the number of left and right branches of each node
|
||||
private final HashMap<SkillTreeNode, Branches> nodeBranches = new HashMap<>();
|
||||
|
||||
public AutomaticSkillTree(ConfigurationSection config) {
|
||||
@ -25,20 +31,31 @@ public class AutomaticSkillTree extends SkillTree {
|
||||
|
||||
|
||||
//We setup the children and parents for each node.
|
||||
for (SkillTreeNode node : nodes.values()) {
|
||||
ConfigurationSection section = config.getConfigurationSection(node.getId());
|
||||
for (String child : section.getStringList("children")) {
|
||||
node.addChild(getNode(child));
|
||||
getNode(child).addParent(node);
|
||||
for(SkillTreeNode node:nodes.values()) {
|
||||
ConfigurationSection section = config.getConfigurationSection("nodes."+node.getId() + ".children.soft");
|
||||
if(section!=null) {
|
||||
for (String child : section.getKeys(false)) {
|
||||
node.addChild(getNode(child));
|
||||
getNode(child).addParent(node, section.getInt(child), ParentType.SOFT);
|
||||
}
|
||||
}
|
||||
section = config.getConfigurationSection("nodes."+node.getId() + ".children.strong");
|
||||
|
||||
if(section!=null) {
|
||||
for (String child : section.getKeys(false)) {
|
||||
node.addChild(getNode(child));
|
||||
getNode(child).addParent(node, section.getInt(child), ParentType.STRONG);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
//We find the root of the tree wich is
|
||||
for (SkillTreeNode node : nodes.values()) {
|
||||
if (node.getParents().size() == 0) {
|
||||
Validate.isTrue(root == null, "Their can't be more than 1 root in the skillTree!");
|
||||
root = node;
|
||||
if (node.getSoftParents().size() == 0&&node.getStrongParents().size()==0) {
|
||||
Validate.isTrue(root == null, "You can't have 2 roots on one automatic skill tree. You have "+(root!=null?root.getName():"")+" and "+node.getName()+".");
|
||||
root = node;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
//We setup the width of all the nodes recursively
|
||||
@ -57,8 +74,8 @@ public class AutomaticSkillTree extends SkillTree {
|
||||
maxY = node.getCoordinates().getY();
|
||||
}
|
||||
|
||||
//Eventually we setup the coordinateNodesMap
|
||||
super.setupCoordinatesNodesMap();
|
||||
//Eventually we setup the skill tree info related to coordinates
|
||||
super.coordinatesSetup();
|
||||
|
||||
}
|
||||
|
||||
@ -85,6 +102,7 @@ public class AutomaticSkillTree extends SkillTree {
|
||||
rightOffset += 2 + nodeBranches.get(child).getRightBranches();
|
||||
} else if (i % 2 == 0) {
|
||||
child.setCoordinates(new IntegerCoordinates(x - leftOffset - 2 - nodeBranches.get(child).getWidth(), y + 2));
|
||||
for(SkillTreeNode skillTree : nodeBranches.keySet())
|
||||
leftOffset += 2 + nodeBranches.get(child).getWidth();
|
||||
} else {
|
||||
child.setCoordinates(new IntegerCoordinates(x + rightOffset + 2 + nodeBranches.get(child).getWidth(), y + 2));
|
||||
@ -95,11 +113,11 @@ public class AutomaticSkillTree extends SkillTree {
|
||||
int childX = child.getCoordinates().getX();
|
||||
int childY = child.getCoordinates().getY();
|
||||
|
||||
int parentX = node.getParents().get(0).getCoordinates().getX();
|
||||
pathToParents.add(new IntegerCoordinates(childX, childY - 1));
|
||||
int parentX = node.getSoftParents().size()!=0?((SkillTreeNode)node.getSoftParents().toArray()[0]).getCoordinates().getX():((SkillTreeNode)node.getStrongParents().toArray()[0]).getCoordinates().getX();
|
||||
paths.add(new IntegerCoordinates(childX, childY - 1));
|
||||
int offset = childX > parentX ? -1 : 1;
|
||||
while (childX != parentX) {
|
||||
pathToParents.add(new IntegerCoordinates(childX, childY - 2));
|
||||
paths.add(new IntegerCoordinates(childX, childY - 2));
|
||||
childX += offset;
|
||||
}
|
||||
|
||||
@ -118,13 +136,15 @@ public class AutomaticSkillTree extends SkillTree {
|
||||
* Recursively sed to setup all the right and left branches of the node to later determine its coordinates for GUI display
|
||||
*/
|
||||
public void setupTreeWidth(SkillTreeNode node) {
|
||||
|
||||
int childrenSize = node.getChildren().size();
|
||||
int leftBranches = 0;
|
||||
int rightBranches = 0;
|
||||
for (int i = 0; i < childrenSize; i++) {
|
||||
SkillTreeNode child = node.getChildren().get(i);
|
||||
setupTreeWidth(child);
|
||||
if (childrenSize % 2 == 0 && i == 0) {
|
||||
//If there is an odd number ob branches the first one will be at the center so we add to the left and to the right
|
||||
if (childrenSize % 2 == 1 && i == 0) {
|
||||
|
||||
leftBranches += nodeBranches.get(child).getLeftBranches();
|
||||
rightBranches += nodeBranches.get(child).getRightBranches();
|
||||
@ -133,16 +153,11 @@ public class AutomaticSkillTree extends SkillTree {
|
||||
} else {
|
||||
rightBranches += nodeBranches.get(child).getWidth() + 2;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isPath(IntegerCoordinates coordinates) {
|
||||
return pathToParents.contains(coordinates);
|
||||
nodeBranches.put(node,new Branches(leftBranches,rightBranches));
|
||||
}
|
||||
|
||||
|
||||
private class Branches {
|
||||
private final int leftBranches, rightBranches;
|
||||
|
||||
@ -162,6 +177,28 @@ public class AutomaticSkillTree extends SkillTree {
|
||||
public int getWidth() {
|
||||
return leftBranches + rightBranches;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
Branches branches = (Branches) o;
|
||||
return leftBranches == branches.leftBranches && rightBranches == branches.rightBranches;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Branches{" +
|
||||
"leftBranches=" + leftBranches +
|
||||
", rightBranches=" + rightBranches +
|
||||
'}';
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(leftBranches, rightBranches);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,21 +1,41 @@
|
||||
package net.Indyuce.mmocore.tree.skilltree;
|
||||
|
||||
import net.Indyuce.mmocore.tree.IntegerCoordinates;
|
||||
import net.Indyuce.mmocore.tree.ParentType;
|
||||
import net.Indyuce.mmocore.tree.SkillTreeNode;
|
||||
import org.bukkit.configuration.ConfigurationSection;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class CustomSkillTree extends SkillTree{
|
||||
public CustomSkillTree(ConfigurationSection config) {
|
||||
super(config);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void whenPostLoaded(@NotNull ConfigurationSection configurationSection) {
|
||||
//We setup the coordinate map because coordinates are given in the yml for linked skill tree
|
||||
super.coordinatesSetup();
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isPath(IntegerCoordinates coordinates) {
|
||||
return false;
|
||||
protected void whenPostLoaded(@NotNull ConfigurationSection config) {
|
||||
|
||||
//We setup the children and parents for each node.
|
||||
for (SkillTreeNode node : nodes.values()) {
|
||||
ConfigurationSection section = config.getConfigurationSection(node.getId() + ".children.soft");
|
||||
if(section!=null) {
|
||||
for (String child : section.getKeys(false)) {
|
||||
node.addChild(getNode(child));
|
||||
getNode(child).addParent(node, section.getInt(child), ParentType.SOFT);
|
||||
}
|
||||
}
|
||||
section = config.getConfigurationSection(node.getId() + ".children.strong");
|
||||
if(section!=null) {
|
||||
for (String child : section.getKeys(false)) {
|
||||
node.addChild(getNode(child));
|
||||
getNode(child).addParent(node, section.getInt(child), ParentType.STRONG);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,64 +1,154 @@
|
||||
package net.Indyuce.mmocore.tree.skilltree;
|
||||
|
||||
import io.netty.handler.codec.http.cookie.CookieDecoder;
|
||||
import net.Indyuce.mmocore.api.player.PlayerData;
|
||||
import net.Indyuce.mmocore.tree.IntegerCoordinates;
|
||||
import net.Indyuce.mmocore.tree.NodeState;
|
||||
import net.Indyuce.mmocore.tree.ParentType;
|
||||
import net.Indyuce.mmocore.tree.SkillTreeNode;
|
||||
import org.apache.commons.lang.Validate;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.configuration.ConfigurationSection;
|
||||
import org.bukkit.scheduler.BukkitTask;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public class LinkedSkillTree extends SkillTree{
|
||||
/**
|
||||
* For linked skillTrees there is no notion of children and parents you must have some neighbours unlocked in order to
|
||||
* be unlockable. All the relationships in the tree are defined by the coordinates you nodes have.
|
||||
*/
|
||||
public class LinkedSkillTree extends SkillTree {
|
||||
|
||||
|
||||
public LinkedSkillTree(ConfigurationSection config) {
|
||||
super(config);
|
||||
|
||||
//We setup the coordinate map because coordinates are given in the yml for linked skill tree
|
||||
setupCoordinatesNodesMap();
|
||||
coordinatesSetup();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
protected void whenPostLoaded(@NotNull ConfigurationSection configurationSection) {
|
||||
protected void whenPostLoaded(@NotNull ConfigurationSection config) {
|
||||
//We setup the children and parents if a node precise a required level for upgrade.
|
||||
//If it is not filled the algorithm will put the required level to 1
|
||||
for (SkillTreeNode node : nodes.values()) {
|
||||
if (config.contains(node.getId() + ".children")) {
|
||||
ConfigurationSection section = config.getConfigurationSection(node.getId() + ".children.soft");
|
||||
if (section != null) {
|
||||
for (String child : section.getKeys(false)) {
|
||||
node.addChild(getNode(child));
|
||||
getNode(child).addParent(node, section.getInt(child), ParentType.SOFT);
|
||||
}
|
||||
}
|
||||
section = config.getConfigurationSection(node.getId() + ".children.strong");
|
||||
if (section != null) {
|
||||
for (String child : section.getKeys(false)) {
|
||||
node.addChild(getNode(child));
|
||||
getNode(child).addParent(node, section.getInt(child), ParentType.STRONG);
|
||||
}
|
||||
}
|
||||
|
||||
SkillTreeNode root=getNode(new IntegerCoordinates(0,0));
|
||||
Validate.notNull(root,"Their must be a node(the root of the tree) at the coordinates (0,0) ");
|
||||
//We setup all the children and parent relations between the nodes
|
||||
setupChildren(root);
|
||||
}
|
||||
}
|
||||
|
||||
SkillTreeNode root = getNode(new IntegerCoordinates(0, 0));
|
||||
Validate.notNull(root, "Their must be a node(the root of the tree) at the coordinates (0,0) ");
|
||||
}
|
||||
|
||||
/**
|
||||
* There is no paths on a linked skill tree
|
||||
*/
|
||||
|
||||
@Override
|
||||
public boolean isPath(IntegerCoordinates coordinates) {
|
||||
return false;
|
||||
}
|
||||
public void setupNodeStateFrom(SkillTreeNode node, PlayerData playerData) {
|
||||
|
||||
/**
|
||||
* Recursive algorithm to setup the parents and children of each skillTreeNode
|
||||
*/
|
||||
public void setupChildren(SkillTreeNode node) {
|
||||
int x=node.getCoordinates().getX();
|
||||
int y=node.getCoordinates().getY();
|
||||
List<IntegerCoordinates> checkCoordinates= Arrays.asList(new IntegerCoordinates(x+1,y),
|
||||
new IntegerCoordinates(x-1,y),new IntegerCoordinates(x,y+1),new IntegerCoordinates(x,y-1));
|
||||
for(IntegerCoordinates coor:checkCoordinates) {
|
||||
//We add Parent and child only if the node exists and doesn't have a parent already
|
||||
int x = node.getCoordinates().getX();
|
||||
int y = node.getCoordinates().getY();
|
||||
List<IntegerCoordinates> checkCoordinates = Arrays.asList(new IntegerCoordinates(x + 1, y),
|
||||
new IntegerCoordinates(x - 1, y), new IntegerCoordinates(x, y + 1), new IntegerCoordinates(x, y - 1));
|
||||
if (playerData.getNodeLevel(node) > 0) {
|
||||
playerData.setNodeState(node, NodeState.UNLOCKED);
|
||||
} else if (playerData.getNodeLevel(node) == 0 && node.isRoot()) {
|
||||
playerData.setNodeState(node, NodeState.UNLOCKABLE);
|
||||
} else {
|
||||
boolean isUnlockable = false;
|
||||
for (IntegerCoordinates coordinates : checkCoordinates) {
|
||||
if (isNode(coordinates))
|
||||
if (isNode(coordinates) && playerData.getNodeState(getNode(coordinates)) == NodeState.UNLOCKED && numberNeighbours(coordinates, playerData) <= getNode(coordinates).getMaxChildren())
|
||||
isUnlockable = true;
|
||||
}
|
||||
if (isUnlockable)
|
||||
playerData.setNodeState(node, NodeState.UNLOCKABLE);
|
||||
else {
|
||||
List<SkillTreeNode> parents = new ArrayList<>();
|
||||
parents.add(node);
|
||||
boolean isFullyLocked = isFullyLockedFrom(node, parents, playerData);
|
||||
|
||||
if(isNode(coor)) {
|
||||
SkillTreeNode child=getNode(coor);
|
||||
if(child.getParents().size()==0) {
|
||||
child.addParent(node);
|
||||
node.addChild(child);
|
||||
//We call recursively the algorithm
|
||||
setupChildren(child);
|
||||
}}
|
||||
if (isFullyLocked)
|
||||
playerData.setNodeState(node, NodeState.FULLY_LOCKED);
|
||||
else
|
||||
playerData.setNodeState(node, NodeState.LOCKED);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//We call the recursive algorithm on the rest of the points. Doesn't call the algorithm if already loaded.
|
||||
for (IntegerCoordinates coordinates : checkCoordinates) {
|
||||
if (isNode(coordinates) && !playerData.hasNodeState(getNode(coordinates)))
|
||||
setupNodeStateFrom(getNode(coordinates), playerData);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//Counts the number of Unlocked Nieghbourgs of a node for a certain playerData
|
||||
private int numberNeighbours(IntegerCoordinates coor, PlayerData playerData) {
|
||||
int number = 0;
|
||||
int x = coor.getX();
|
||||
int y = coor.getY();
|
||||
List<IntegerCoordinates> checkCoordinates = Arrays.asList(new IntegerCoordinates(x + 1, y),
|
||||
new IntegerCoordinates(x - 1, y), new IntegerCoordinates(x, y + 1), new IntegerCoordinates(x, y - 1));
|
||||
for (IntegerCoordinates coordinates : checkCoordinates) {
|
||||
if (isNode(coordinates) && playerData.getNodeLevel(getNode(coordinates)) > 0)
|
||||
number++;
|
||||
}
|
||||
return number;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* A recursive algorithm to see if a node is fully locked or not in a linked skill tree
|
||||
*/
|
||||
public boolean isFullyLockedFrom(SkillTreeNode current, List<SkillTreeNode> parents, PlayerData playerData) {
|
||||
if (!parents.contains(current) && (playerData.getNodeState(current) == NodeState.UNLOCKABLE || playerData.getNodeState(current) == NodeState.UNLOCKED)) {
|
||||
//If the node is unlocked either we say it is not fully locked if a path can be found either wer return true is not path can be found down this way
|
||||
if (numberNeighbours(current.getCoordinates(), playerData) <= getNode(current.getCoordinates()).getMaxChildren()) {
|
||||
return false;
|
||||
} else
|
||||
return true;
|
||||
}
|
||||
//We verify that the node is unlocked or unlockable and can have links the first node
|
||||
|
||||
int x = current.getCoordinates().getX();
|
||||
int y = current.getCoordinates().getY();
|
||||
List<IntegerCoordinates> checkCoordinates = Arrays.asList(new IntegerCoordinates(x + 1, y),
|
||||
new IntegerCoordinates(x - 1, y), new IntegerCoordinates(x, y + 1), new IntegerCoordinates(x, y - 1));
|
||||
//We filter coordinates with only nodes that are not parents and not fully locked
|
||||
//We also need to have the number of neighbour <=max-child(max-child=1 -> can have 1 neighbour but if it has 2 it will make the other branches fully blocked
|
||||
checkCoordinates = checkCoordinates.stream().filter(coor -> isNode(coor)
|
||||
&& playerData.getNodeState(getNode(coor)) != NodeState.FULLY_LOCKED
|
||||
&& !parents.contains(getNode(coor))
|
||||
).collect(Collectors.toList());
|
||||
|
||||
boolean isFullyLocked = true;
|
||||
|
||||
parents.add(current);
|
||||
for (IntegerCoordinates coordinates : checkCoordinates) {
|
||||
if (!isFullyLockedFrom(getNode(coordinates), parents, playerData)) {
|
||||
isFullyLocked = false;
|
||||
//Very important to break to stop the recursion algorithm once one unlockable point has been found
|
||||
break;
|
||||
}
|
||||
}
|
||||
return isFullyLocked;
|
||||
}
|
||||
}
|
||||
|
@ -1,18 +1,25 @@
|
||||
package net.Indyuce.mmocore.tree.skilltree;
|
||||
|
||||
import io.lumine.mythic.lib.MythicLib;
|
||||
import io.lumine.mythic.lib.api.util.PostLoadObject;
|
||||
import net.Indyuce.mmocore.api.player.PlayerData;
|
||||
import net.Indyuce.mmocore.api.util.MMOCoreUtils;
|
||||
import net.Indyuce.mmocore.manager.registry.RegisterObject;
|
||||
import net.Indyuce.mmocore.tree.IntegerCoordinates;
|
||||
import net.Indyuce.mmocore.tree.NodeState;
|
||||
import net.Indyuce.mmocore.tree.skilltree.display.DisplayInfo;
|
||||
import net.Indyuce.mmocore.tree.skilltree.display.Icon;
|
||||
import net.Indyuce.mmocore.tree.IntegerCoordinates;
|
||||
import net.Indyuce.mmocore.tree.SkillTreeNode;
|
||||
import org.apache.commons.lang.Validate;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.configuration.ConfigurationSection;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.logging.Level;
|
||||
|
||||
/**
|
||||
* A passive skill tree that features nodes, or passive skills.
|
||||
@ -32,33 +39,92 @@ import java.util.*;
|
||||
*/
|
||||
public abstract class SkillTree extends PostLoadObject implements RegisterObject {
|
||||
private final String id, name;
|
||||
private final Material guiMaterial;
|
||||
private final List<String> lore=new ArrayList<>();
|
||||
private final Material item;
|
||||
//2 different maps to get the nodes
|
||||
|
||||
//Represents all the coordinates that will be displayed as a path (between 2 nodes of the tree)
|
||||
protected final ArrayList<IntegerCoordinates> paths = new ArrayList<>();
|
||||
//Represents all the nodes
|
||||
protected final Map<IntegerCoordinates, SkillTreeNode> coordinatesNodes = new HashMap<>();
|
||||
protected final Map<String, SkillTreeNode> nodes = new HashMap<>();
|
||||
//Caches the height of the skill tree
|
||||
protected int minX, minY, maxX, maxY;
|
||||
protected final HashMap<DisplayInfo, Icon> icons = new HashMap<>();
|
||||
protected final HashSet<SkillTreeNode> roots = new HashSet<>();
|
||||
|
||||
public SkillTree(ConfigurationSection config) {
|
||||
super(config);
|
||||
this.id = Objects.requireNonNull(config.getString("id"), "Could not find skill tree id");
|
||||
this.name = Objects.requireNonNull(config.getString("name"), "Could not find skill tree name");
|
||||
this.guiMaterial = Material.valueOf(MMOCoreUtils.toEnumName(Objects.requireNonNull(config.getString("material"))));
|
||||
this.name = MythicLib.plugin.parseColors(Objects.requireNonNull(config.getString("name"), "Could not find skill tree name"));
|
||||
Objects.requireNonNull(config.getStringList("lore"),"Could not find skill tree lore").forEach(str->lore.add(MythicLib.plugin.parseColors(str )));
|
||||
this.item = Material.valueOf(MMOCoreUtils.toEnumName(Objects.requireNonNull(config.getString("item"))));
|
||||
Validate.isTrue(config.isConfigurationSection("nodes"), "Could not find any nodes in the tree");
|
||||
for (String key : config.getConfigurationSection("nodes").getKeys(false)) {
|
||||
SkillTreeNode node = new SkillTreeNode(this, config.getConfigurationSection("nodes." + key));
|
||||
nodes.put(node.getId(), node);
|
||||
}
|
||||
try {
|
||||
if (config.contains("paths")) {
|
||||
ConfigurationSection section = config.getConfigurationSection("paths");
|
||||
for (String key : section.getKeys(false)) {
|
||||
if (section.contains(key + ".x") && section.contains(key + ".y")) {
|
||||
paths.add(new IntegerCoordinates(section.getInt(key + ".x"), section.getInt(key + ".y")));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
Bukkit.getLogger().log(Level.WARNING, "Couldn't load paths for skill tree: " + id);
|
||||
}
|
||||
|
||||
|
||||
try {
|
||||
//Load the icons of the skill tree.
|
||||
for (String key : config.getConfigurationSection("icons").getKeys(false)) {
|
||||
if (key.equalsIgnoreCase("path")) {
|
||||
icons.put(DisplayInfo.pathInfo, new Icon(config.getConfigurationSection("icons." + key)));
|
||||
}
|
||||
for (String size : config.getConfigurationSection("icons." + key).getKeys(false)) {
|
||||
if(key.equalsIgnoreCase("path")) {
|
||||
DisplayInfo displayInfo = DisplayInfo.pathInfo;
|
||||
Icon icon = new Icon(config.getConfigurationSection("icons." + key));
|
||||
icons.put(displayInfo, icon);
|
||||
|
||||
}
|
||||
else {
|
||||
DisplayInfo displayInfo = new DisplayInfo(NodeState.valueOf(MMOCoreUtils.toEnumName(key)), Integer.parseInt(size));
|
||||
Icon icon = new Icon(config.getConfigurationSection("icons." + key + "." + size));
|
||||
icons.put(displayInfo, icon);
|
||||
}}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
Bukkit.getLogger().log(Level.WARNING, "Couldn't load icons for the skill tree " + id);
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public void setupCoordinatesNodesMap() {
|
||||
/**
|
||||
* Used to setup everything related to coordinates when each node has its coordinates loaded.
|
||||
*/
|
||||
public void coordinatesSetup() {
|
||||
for (SkillTreeNode node : nodes.values()) {
|
||||
coordinatesNodes.put(node.getCoordinates(), node);
|
||||
if (node.isRoot())
|
||||
roots.add(node);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected abstract void whenPostLoaded(@NotNull ConfigurationSection configurationSection);
|
||||
|
||||
public Icon getIcon(DisplayInfo info) {
|
||||
Validate.isTrue(icons.containsKey(info),"The icon corresponding to "+(info.getNodeState()==null? "path": "node-state: "+info.getNodeState()
|
||||
+" ,size: "+info.getSize())+" doesn't exist in the icons of the skill-tree yml." );
|
||||
return icons.get(info);
|
||||
}
|
||||
|
||||
public int getMaxX() {
|
||||
return maxX;
|
||||
}
|
||||
@ -75,6 +141,9 @@ public abstract class SkillTree extends PostLoadObject implements RegisterObject
|
||||
return maxY;
|
||||
}
|
||||
|
||||
public List<String> getLore() {
|
||||
return lore;
|
||||
}
|
||||
|
||||
public static SkillTree loadSkillTree(ConfigurationSection config) {
|
||||
String string = config.getString("type");
|
||||
@ -98,6 +167,75 @@ public abstract class SkillTree extends PostLoadObject implements RegisterObject
|
||||
return skillTree;
|
||||
}
|
||||
|
||||
public void addRoot(SkillTreeNode node) {
|
||||
roots.add(node);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Recursively go through the skill trees to update the the node states
|
||||
*/
|
||||
public void setupNodeState(PlayerData playerData) {
|
||||
for (SkillTreeNode root : roots)
|
||||
root.getTree().setupNodeStateFrom(root, playerData);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Update recursively the state of all the nodes that are children of this node (Used when we change the state of a node)
|
||||
*/
|
||||
public void setupNodeStateFrom(SkillTreeNode node, PlayerData playerData) {
|
||||
if (playerData.getNodeLevel(node) > 0) {
|
||||
playerData.setNodeState(node, NodeState.UNLOCKED);
|
||||
} else if (playerData.getNodeLevel(node) == 0 && node.isRoot()) {
|
||||
playerData.setNodeState(node, NodeState.UNLOCKABLE);
|
||||
} else {
|
||||
boolean isUnlockableFromStrongParent = true;
|
||||
boolean isUnlockableFromSoftParent = false;
|
||||
boolean isFullyLockedFromStrongParent = false;
|
||||
boolean isFullyLockedFromSoftParent = true;
|
||||
|
||||
for (SkillTreeNode strongParent : node.getStrongParents()) {
|
||||
if (playerData.getNodeLevel(strongParent) < node.getParentNeededLevel(strongParent)) {
|
||||
isUnlockableFromStrongParent = false;
|
||||
}
|
||||
//We count the number of children the parent
|
||||
int numberChildren = 0;
|
||||
for (SkillTreeNode child : strongParent.getChildren())
|
||||
if (playerData.getNodeLevel(child) > 0)
|
||||
numberChildren++;
|
||||
|
||||
//We must check if the parent is Fully Locked or not and if it can unlock a new node(with its max children constraint)
|
||||
if (numberChildren >= strongParent.getMaxChildren() || playerData.getNodeState(strongParent) == NodeState.FULLY_LOCKED)
|
||||
isFullyLockedFromStrongParent = true;
|
||||
}
|
||||
for (SkillTreeNode softParent : node.getSoftParents()) {
|
||||
if (playerData.getNodeLevel(softParent) > node.getParentNeededLevel(softParent)) {
|
||||
isUnlockableFromSoftParent = true;
|
||||
}
|
||||
//We count the number of children the parent
|
||||
int numberChildren = 0;
|
||||
for (SkillTreeNode child : softParent.getChildren())
|
||||
if (playerData.getNodeLevel(child) > 0)
|
||||
numberChildren++;
|
||||
if (numberChildren < softParent.getMaxChildren() && playerData.getNodeState(softParent) != NodeState.FULLY_LOCKED)
|
||||
isFullyLockedFromStrongParent = false;
|
||||
}
|
||||
boolean isFullyLocked = isFullyLockedFromSoftParent || isFullyLockedFromStrongParent;
|
||||
boolean isUnlockable = isUnlockableFromSoftParent && isUnlockableFromStrongParent;
|
||||
if (isFullyLocked)
|
||||
playerData.setNodeState(node, NodeState.FULLY_LOCKED);
|
||||
else if (isUnlockable)
|
||||
playerData.setNodeState(node, NodeState.UNLOCKABLE);
|
||||
else
|
||||
playerData.setNodeState(node, NodeState.LOCKED);
|
||||
}
|
||||
//We recursively call the algorithm for all the children of the current node
|
||||
for (SkillTreeNode child : node.getChildren())
|
||||
setupNodeStateFrom(child, playerData);
|
||||
|
||||
}
|
||||
|
||||
@Nullable
|
||||
/**
|
||||
* Returns null if it is not a node and returns the node type if it a node
|
||||
@ -110,10 +248,12 @@ public abstract class SkillTree extends PostLoadObject implements RegisterObject
|
||||
return false;
|
||||
}
|
||||
|
||||
public abstract boolean isPath(IntegerCoordinates coordinates);
|
||||
public boolean isPath(IntegerCoordinates coordinates) {
|
||||
return paths.contains(coordinates);
|
||||
}
|
||||
|
||||
public Material getGuiMaterial() {
|
||||
return guiMaterial;
|
||||
public Material getItem() {
|
||||
return item;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -131,7 +271,7 @@ public abstract class SkillTree extends PostLoadObject implements RegisterObject
|
||||
|
||||
@NotNull
|
||||
public SkillTreeNode getNode(IntegerCoordinates coords) {
|
||||
return Objects.requireNonNull(nodes.get(coords), "Could not find node in tree '" + id + "' with coordinates '" + coords.toString() + "'");
|
||||
return Objects.requireNonNull(coordinatesNodes.get(coords), "Could not find node in tree '" + id + "' with coordinates '" + coords.toString() + "'");
|
||||
}
|
||||
|
||||
@NotNull
|
||||
|
@ -0,0 +1,55 @@
|
||||
package net.Indyuce.mmocore.tree.skilltree.display;
|
||||
|
||||
import net.Indyuce.mmocore.tree.NodeState;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* The information needed to determine the display type of a node
|
||||
*/
|
||||
public class DisplayInfo {
|
||||
private NodeState nodeState;
|
||||
private int size;
|
||||
|
||||
//this NodeDisplayInfo represent a path
|
||||
public static DisplayInfo pathInfo= new DisplayInfo();
|
||||
|
||||
|
||||
public DisplayInfo() {
|
||||
}
|
||||
|
||||
public DisplayInfo(NodeState nodeState, int size) {
|
||||
this.nodeState = nodeState;
|
||||
this.size = size;
|
||||
}
|
||||
|
||||
public NodeState getNodeState() {
|
||||
return nodeState;
|
||||
}
|
||||
|
||||
public int getSize() {
|
||||
return size;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(nodeState, size);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if(!(obj instanceof DisplayInfo))
|
||||
return false;
|
||||
DisplayInfo displayInfo= (DisplayInfo) obj;
|
||||
return nodeState==displayInfo.getNodeState()&&size==displayInfo.getSize();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "DisplayInfo{" +
|
||||
"nodeState=" + nodeState +
|
||||
", size=" + size +
|
||||
'}';
|
||||
}
|
||||
}
|
@ -0,0 +1,54 @@
|
||||
package net.Indyuce.mmocore.tree.skilltree.display;
|
||||
|
||||
import net.Indyuce.mmocore.api.util.MMOCoreUtils;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.configuration.ConfigurationSection;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* The material and custom model-data of a node
|
||||
*/
|
||||
public class Icon {
|
||||
private final Material material;
|
||||
private final int customModelData;
|
||||
|
||||
public Material getMaterial() {
|
||||
return material;
|
||||
}
|
||||
|
||||
public int getCustomModelData() {
|
||||
return customModelData;
|
||||
}
|
||||
public Icon(ConfigurationSection config) {
|
||||
this(Material.valueOf(Objects.requireNonNull(MMOCoreUtils.toEnumName(
|
||||
config.getString("item")))),config.contains("model-data")?config.getInt("model-data"):0);
|
||||
}
|
||||
|
||||
public Icon(Material material, int customModelData) {
|
||||
this.material = material;
|
||||
this.customModelData = customModelData;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
Icon icon = (Icon) o;
|
||||
return customModelData == icon.customModelData && material == icon.material;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(material, customModelData);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Icon{" +
|
||||
"material=" + material +
|
||||
", customModelData=" + customModelData +
|
||||
'}';
|
||||
}
|
||||
}
|
@ -140,6 +140,11 @@ public class Waypoint implements Unlockable {
|
||||
while (pointsToCheck.size() != 0) {
|
||||
PathInfo checked = pointsToCheck.get(0);
|
||||
pointsToCheck.remove(0);
|
||||
//If the point has already been checked we just pass.
|
||||
if(checkedPoints.contains(checked.getFinalWaypoint()))
|
||||
continue;
|
||||
Bukkit.broadcastMessage(checked.getFinalWaypoint().id+" cost: "+checked.cost);
|
||||
|
||||
paths.add(checked);
|
||||
checkedPoints.add(checked.getFinalWaypoint());
|
||||
|
||||
|
@ -210,6 +210,7 @@ command-verbose:
|
||||
experience: true
|
||||
level: true
|
||||
nocd: true
|
||||
skill-tree-points: true
|
||||
points: true
|
||||
reset: true
|
||||
resource: true
|
25
src/main/resources/default/expcurves/skill -tree-node.txt
Normal file
25
src/main/resources/default/expcurves/skill -tree-node.txt
Normal file
@ -0,0 +1,25 @@
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
10
|
||||
11
|
||||
12
|
||||
13
|
||||
14
|
||||
15
|
||||
16
|
||||
17
|
||||
18
|
||||
19
|
||||
20
|
||||
21
|
||||
22
|
||||
23
|
||||
24
|
||||
25
|
@ -1,5 +1,5 @@
|
||||
# GUI display name
|
||||
name: 'Current Skill Tree: &6{skill-tree-name}'
|
||||
name: '&eCurrent Skill Tree: &6{skill-tree-name}'
|
||||
|
||||
# Number of slots in your inventory. Must be
|
||||
# between 9 and 54 and must be a multiple of 9.
|
||||
@ -8,18 +8,26 @@ slots: 54
|
||||
items:
|
||||
skill-tree:
|
||||
name: '{skill-tree-node}'
|
||||
function: 'skill-tree'
|
||||
function: skill-tree
|
||||
slots: [9,18,27,36]
|
||||
lore: 'Description: {skill-tree-description}'
|
||||
|
||||
next-tree-list-page:
|
||||
function: 'next-tree-list-page'
|
||||
material: 'ARROW'
|
||||
item: ARROW
|
||||
slots: [ 45 ]
|
||||
|
||||
previous-tree-list-page:
|
||||
function: 'previous-tree-list-page'
|
||||
material: "ARROW"
|
||||
item: 'ARROW'
|
||||
slots: [ 0 ]
|
||||
|
||||
skill-tree-node:
|
||||
|
||||
function: 'skill-tree-node'
|
||||
slots: [2,3,4,5,6,7,8,11,12,13,14,15,16,17,20,21,22,23,24,25,26,29,30,31,32,33,34,35,38,39,40,41,42,43,44]
|
||||
#The lore that will be displayed after the lore of the node
|
||||
lore:
|
||||
- '&eCurrent {skill-tree} &epoints: &6{skill-tree-points}'
|
||||
- '&eCurrent global points: &6{global-points}'
|
||||
|
||||
|
@ -153,7 +153,7 @@ cant-choose-new-class:
|
||||
|
||||
# Attributes
|
||||
no-attribute-points-spent: '&cYou have not spent any attribute points.'
|
||||
not-attribute-reallocation-point: '&cYou do not have 1 reallocation point.'
|
||||
not-attribute-reallocation-point: '&cYou do not have 1 attribute reallocation point.'
|
||||
not-attribute-point: '&cYou do not have 1 attribute point.'
|
||||
attribute-points-reallocated: '&eYou successfully reset your attributes. You now have &6{points} &eattribute points.'
|
||||
attribute-max-points-hit: '&cYou cannot level up this attribute anymore.'
|
||||
@ -168,3 +168,12 @@ no-skill-bound: '&cYou don''t have any skill bound to this slot.'
|
||||
not-active-skill: '&cThis is not an active skill.'
|
||||
skill-max-level-hit: '&cYou already hit the max level for that skill.'
|
||||
no-skill-placeholder: 'No Skill Bound'
|
||||
|
||||
#Skill Tree
|
||||
no-skill-tree-points-spent: '&cYou have not spent any skill tree points.'
|
||||
locked-node: '&cThis skill is locked!'
|
||||
upgrade-skill-node: '&eYour skill node &6{skill-node} &eis now Level &6{level}&e!'
|
||||
skill-node-max-level-hit: '&cYou already hit the max level for that skill node.'
|
||||
not-enough-skill-tree-points: '&cYou need one skill tree point.'
|
||||
reallocated-points: '&eYou successfully reset the skill tree {skill-tree}. &eYou now have &6{points} &eskill tree points.'
|
||||
not-skill-tree-reallocation-point: '&cYou do not have 1 skill tree reallocation point.'
|
@ -11,8 +11,8 @@ name: 'Combat Skill Tree'
|
||||
|
||||
type: 'linked'
|
||||
|
||||
#The material that will represent the skill tree in the GUI
|
||||
material: 'DIAMOND_SWORD'
|
||||
#The item that will represent the skill tree in the GUI
|
||||
item: 'DIAMOND_SWORD'
|
||||
|
||||
nodes:
|
||||
strength:
|
||||
@ -27,3 +27,8 @@ nodes:
|
||||
x: 1
|
||||
y: 0
|
||||
|
||||
paths:
|
||||
coordinates:
|
||||
x: 2
|
||||
y: 2
|
||||
|
||||
|
@ -20,6 +20,10 @@ select-class: UI_TOAST_CHALLENGE_COMPLETE
|
||||
level-attribute: ENTITY_PLAYER_LEVELUP
|
||||
reset-attributes: ENTITY_PLAYER_LEVELUP
|
||||
|
||||
level-skill-tree-node: ENTITY_PLAYER_LEVELUP
|
||||
reset-skill-tree: ENTITY_PLAYER_LEVELUP
|
||||
change-skill-tree: ITEM_ARMOR_EQUIP_LEATHER
|
||||
|
||||
not-enough-points: ENTITY_VILLAGER_NO
|
||||
|
||||
cancel-quest: ENTITY_VILLAGER_NO
|
||||
|
Loading…
Reference in New Issue
Block a user