355 Commits

Author SHA1 Message Date
38021852d0
Made inventory windows draggable 2021-12-22 01:41:55 +03:00
9c85164ed1
Fixed inventory hiding and improved HUD event handling 2021-12-21 23:28:19 +03:00
ce573b51ce
Merge branch 'master' into add-items 2021-12-21 17:12:45 +03:00
92f9639c4b
Improved input event handling
- Added Component.passInputToChildren()
- Input events can now be processed in parallel or recursively
2021-12-21 00:31:35 +03:00
f350467942
Removed jCenter(); formatted build.gradle
- Fixed #23
- Fixed whitespace in build.gradle
2021-12-21 00:13:04 +03:00
a028f6f3c7
Merge branch 'master' into add-items
If I ever become a supervillain, I will torture my victims by forcing
them to merge branches in Progressia

Does not work properly, waiting for an additional patch from master
2021-12-20 23:36:55 +03:00
23b0af1731
Update log4j dependency to version 2.17.0 😡
Fix for CVE-2021-45105
2021-12-19 23:46:30 +03:00
0389f97e59
Update log4j dependency to version 2.16.0
Fix for CVE-2021-45046
2021-12-16 18:09:37 +03:00
706800218c
Merge branch 'overhaul-input'
Summary of changes:
- Refactored input handling
- Added noclip/freecam mode for debugging
- Added drag events
- Removed useless info from debug layer
- Movement controls now work in menus (feature? bug? not sure)
2021-12-16 15:17:08 +03:00
ca2c7b58d8
Added drag events 2021-12-16 15:12:49 +03:00
359879b0fe
Completed input refactoring
- Moved everything related to controls into controls package
- Moved controls related to placing/breaking stuff into
InteractionControls
- Localizer now provides access to the list of languages
- Fixed a random bug in TestMusicPlayer because why not amirite
2021-12-15 00:20:50 +03:00
a06d8ee056
Fixed temporary player entity data transfer 2021-12-13 20:49:32 +03:00
c8138faabe
Refactored camera controls and added noclip mode
- Refactored camera controls into a separate class
- Added noclip mode
  - Toggle with V
  - Simply uncouples camera from character; does not change interactions
or load chunks!
  - Implemented sloppily, expect bugs in the future
- EntityData's .equals() is now equivalent to == and .hashCode() hashes
entity ID only
- Collision can now be disabled for an object by setting its
CollisionModel to null
2021-12-13 19:36:26 +03:00
49d283e7a3
Refactored F3 layer
- Renamed from LayerTestGUI to LayerDebug
- Many of the displays have been removed
- Fullscreen and VSync displays have been merged with FPS display
- Updates are automatic
2021-12-13 17:03:23 +03:00
c93f0df30d
Refactored movement controls
- Movement control code is now in its own class
- Movement direction controls are now more bug-resistant
  - No longer event-driven; uses InputTracker instead
  - Temporarily? function with menus open
- Other movement controls are now registered local Controls
- Removed flying and sprinting indicators from F3 layer
- TestPlayerControls is now a singleton
  - resetInstance() now resets the instance's fields
2021-12-13 11:06:28 +03:00
75ea7baf9c
Update junit dependency to version 4.13.2
Fix for CVE-2020-15250
2021-12-12 15:41:10 +03:00
c4a9a17c7c Update log4j dependency to version 2.15.0 2021-12-10 11:05:30 +03:00
b4ff5114bd
Refactored input event pipeline
- Merged Input functionality into InputEvent; removed Input
  - InputEvents can now be consumed directly
  - Removed Input.Target; functionality moved into InputBus
- Refactored GUI input event handling
  - Optimized and reduced recursion by unrolling recursion
  - All input events are now delivered to all components
    - Filtering occurs at listener level
- Refactored InputBus
  - Listeners may override former Input.Target logic
  - Improved registration method
  - Added exception handling
- Improved KeyMatcher
  - Removed builder in favour of copying with modifications
  - Added String parsing
  - Added KeyMatcher.matchesIgnoringAction()
  - Added integration with InputBus
- Renamed Component.{add,remove}Listener methods about InputListeners to
Component.{add,remove}InputListener to avoid confusion
2021-12-08 18:06:30 +03:00
9b67897896
Moved window layout into a separate file 2021-12-07 14:40:31 +03:00
efc6a8ecd0
Hastily added pine trees and hazel bushes
- Added ShapePrototype wrapper for ShapePart batch creation
- Added pine trees and hazel bushes
  - Leaves with custom block models
  - Improved tree generator
2021-11-19 21:26:04 +03:00
3641c4130b
Rewrote ItemContainers from scratch
- ItemContainers have been entirely rewritten
  - ItemSlots are now wrappers, not owners
- Added InventoryOwners
  - Not yet used
- Added ItemDataWithContainers
- Added some basic windowing functionality to WindowedHUD
2021-11-16 23:49:17 +03:00
4b10dc82ed
Improved formatting and phrasing 2021-10-31 16:19:21 +03:00
be6203719a
Attempted to make slots dynamic and failed 2021-10-31 15:26:48 +03:00
opfromthestart
c04894a0c9 Finally made this
I think its pretty good, but I cant think very well rn.
2021-10-24 20:09:44 -04:00
9885a1ca42
Visual improvements
- Added a custom font for item amount displays
- Added an indicator for openable items
- Changed open item indicator to be more obvious
- Fixed ExponentAnimation overshooting target during FPS spikes
2021-10-17 15:10:24 +03:00
c6e6dc6851
Added the concept of inventories
I'll end myself if I spend any more time on this neverending commit
2021-10-17 14:02:54 +03:00
28b19c8f35
Added more flowers and more grass types, fixed cross tile render
- Added Clover, Daisy, Dandelion, Geranium, Knapweed, Yellow Pea,
Bluegrass
- Renamed grass herbs and flat flowers
- Cross tile renderer now uses a kostyl that forces face normals to be
oriented vertically
- Refactored flower generation
- Added a coherent error message when a texture could not be found
2021-09-22 23:48:38 +03:00
eb5aa59941
Removed plain sand block and tile; incremented version
To be honest, I kinda forgot to increment version in last commit, so I
decided to make a pointless change to justify an entire commit =\
v0.3.0
2021-09-11 21:12:42 +03:00
409bbdb680
Merge branch 'save-world' 2021-09-11 19:42:36 +03:00
opfromthestart
0c41350ae7 Added file identification header
-All files now start with a 16 byte header consisting of "PROG" followed
by the integer position of the region in region coordinates.
	-regionCoords is passed through some functions to allow for this to be
confirmed.
2021-09-10 22:19:18 -04:00
a633c8324e
Added Reset World button and fixed some translations 2021-09-11 00:47:28 +03:00
6b33f231b4 Moved region implementation to .server.world.io.region 2021-09-10 23:59:03 +03:00
e2308b825d
Removed warnings and formatted code 2021-09-10 23:31:14 +03:00
30464febf6 Added item containers
- Added ItemDataContainer. It is an item that has a container
  - Added Test:CardboardBackpack
- Added back inventory GUIs
  - Now in window form!
    - *not interactive (don't sue us)
- Hand background icons now only render when an inventory is open
- Removed intrinsic player inventory because we're hardcore
2021-09-10 23:11:15 +03:00
opfromthestart
e0f6a08740 Bug fixes
-Now offset technically starts at 1, so any chunks with offset 0 are
ignored.
-Reduced number of unused chunks, storage efficiency is at about 99% (if
null sectors are counted as useful)
2021-09-10 14:14:18 -04:00
opfromthestart
2820e01974 Finished Partition Logic
Note: it still does waste a lot of space, I will work on that next
-Added back the confirmHeaderHealth logic
-Checks to make sure it will not overwrite important chunks
	-Uses PartitionLink chunks to move to a different part of the file
-Added allocateEmptySector() to allow for the file size to be increased
without moving the origin point of the chunk.
2021-09-10 13:51:37 -04:00
782b3ef553
Hotfixed custom renderables and Hider
Man, flat render code is a huge mess
2021-09-10 20:38:42 +03:00
opfromthestart
46bcb85044 Region File better????
-Moved most of the file accessing of Region to RegionFile
-Disabled most of the header check except the length check(it will be
back soon)
-Max chunk size arbitrarily raised to 4MiB because I wanted sectors
longer than 16B
-Sectors now have a mandatory 1B header that identifies it
	-0 is a null sector, it ends every chunk
	-1 is a normal data sector, it has a "parity" byte that makes sure it
is reading chunks in linear order(fun fact: it isnt at the moment)
	-2 is a jump to a different location. this isnt implemented well yet
	-3 will be a "bulk data" sector. Multiple chunks with identical data
can point here. Probably only useful when it is easily identifiable,
like multiple chunks being one entire block, like air.
-Removed all chunk length references as I think they do not make sense
when it can use different sectors for non-data purposes.
2021-09-09 19:58:44 -04:00
05b1c73fbc
Rewrote inventory GUI code to be more coherent. WIP
- Added an equipment slot
- Added equipment slot displays
- Added HUDManager and refactored layer management
- Moved most files from .test.inv to .client.graphics.world.hud
- Added component hider
  - Which is broken because z-index
    - Why do I use depth stencils in flat layers again?
- Refactored KeyMatcher: removed Builders, added action selection
2021-09-10 00:27:12 +03:00
opfromthestart
c5dfe3d0b7 Saving Modifications
-Safer saving, it waits for the file to stop being used to close(still
has holes)
-If a chunk is too large, it is moved to the end of the file.
	-Calculates the efficiency of each region file in confirmHeaderHealth
-Fixed import warning
2021-09-09 16:52:55 -04:00
IvanZ
bd6442318d
Added hand icons by IvanZ 2021-09-05 21:04:48 +03:00
6cd812f7c3 Added player species and refactored everything hands-related
- Players species is now a thing
  - Currently defines hands, equipment slots (unused), collision model
and appearance
  - EntityDataPlayer now contains a species-provided datalet
  - EntityRenderPlayer now searches for a species-defined delegate to
render players
- Hand count can now be arbitrary
- Split ItemContainerSingle into ItemContainerHand and
ItemContainerEquipment
- Added HUDTextures class
2021-09-05 11:16:54 +03:00
73ee339dcc
Working toward player species? I think?
- Left/right hand can now be permanently switched by tapping ctrl
- Moved LayerHUD into .hud subpackage
  - Extracted PermanentHUD out of LayerHUD
- Fixed the issuer of NewLocalEntityEvent
2021-09-04 17:12:54 +03:00
4749be6c60
Added hand item indicators, placeholder art included 2021-09-02 22:54:25 +03:00
a85fc27f8b
Added _UNFINISHED_ water, beaches and mantle
- Refactored terrain generation
- Added PiecewiseLinearFunction
- Added some placeholder content
  - Added Test:Water, the solid, opaque water
  - Added beaches
  - Added Test:Mantle
- Tweaked rock distribution parameters
2021-08-31 17:27:08 +03:00
a4b731e8a5
Added mass/volume limit enforcement and displays
- Also added Test:RedGraniteCobblestone
2021-08-30 23:36:13 +03:00
e7d0e8fe40
Added a visual indicator of selected hand and added scroll actions 2021-08-30 21:33:01 +03:00
711e4a2bb4
Added formatting templates guide for Intellij IDEA 2021-08-30 19:51:28 +03:00
0100c8791d
Added player saving and loading from disk 2021-08-30 18:23:42 +03:00
040a4f7fd7
Added stack merging, RMB actions, Sticks and fixed an unholy bug
- Added Test:Stick
- When left-clicking, stacks that can merge will
- Added right-clicking behavior straight from Minecraft
- hooooooly sh*t man StatefulObject.equals was totally broken omfg how
tf i did notice :o
2021-08-30 18:09:08 +03:00