510 Commits
Author SHA1 Message Date
zml ae86a5c88c *: apply the import order from SpongeAPI consistently
This mostly resolves the import order issues introduced when remapping
2022-10-16 16:41:40 -07:00
zml d8332fccdd build: Bump dependency versions
various gradle plugins
bump asm to 9.4 for compat with newer Java versions
misc build-time dependencies
2022-10-15 22:29:28 -07:00
Yeregorix 6ed72d7804 Implement translations for item name and lore (#3763)
* Implement translations for item name and lore

* Invert condition to reduce branching
2022-10-12 10:17:22 -05:00
Yeregorix 022f630316 Update MovementTest for vehicles 2022-08-27 22:53:18 +02:00
Yeregorix 0bff8a54e1 Merge branch 'api-8' into api8/move-vehicle 2022-08-27 12:05:59 +02:00
Yeregorix 34d5fee112 Fix MoveEntityEvent and RotateEntityEvent for players 2022-08-25 22:18:14 +02:00
Anselm Brehme d4c60fb241 custom data object serialize/deserialize example 2022-07-15 16:48:56 +02:00
Daniel Naylor 9acf6fd937 Fix empty lines being printed in SF when a CommandResult#error is returned 2022-06-13 20:01:08 +01:00
tyhdefu 08a827e50d Implement BlockEntityVolume methods for chunk (#3664) 2022-06-05 17:46:11 +01:00
SettingDust 459859fff4 test(data): test for StringDataFormats 2022-06-01 10:53:50 +08:00
SettingDust e832fdaa99 fix(event): ListenerSignatureVisitor accept more than two type wrongly (#3694)
* test(inventory): add test event with `@Getter`

* fix(event): `ListenerSignatureVisitor` accept more than two type wrongly
2022-05-26 21:57:12 +07:00
Anselm Brehme 5e7a24ce08 Revert "Use pick-block functionality for fromBlockSnapshot when possible"
This reverts commit 89596ddfbf.
2022-05-18 16:40:05 +02:00
Anselm Brehme 89596ddfbf Use pick-block functionality for fromBlockSnapshot when possible
fixes #3687
2022-05-17 19:52:03 +02:00
ImMorpheus ec6cf57ae2 update implementation to not use deprecated methods 2022-05-08 22:32:03 +02:00
SettingDust f66e86892d fix(vanilla): PluginPackResources#getResources not working (#3678)
* fix: PluginPackResources#getResources not working
fix #3677
Dupe resolve of namespace
Filter files
Output always input path

* test: add test for `PackContents#paths`

* chore: `GlobalTranslator#get` deprecated
2022-05-08 11:19:02 +01:00
Yeregorix 56ae70d01e Expose BlockState string representation 2022-04-28 20:22:10 +01:00
Anselm Brehme 84ea2013c1 Movement event fixes
fix normal player movement missing MOVEMENT_TYPE context
fix ender pearl teleport cancel
cleanup MovementTest

#3651
2022-03-19 17:42:19 +01:00
Anselm Brehme dc5e5cdf22 Improve DataView (de)serialize code
Make ParticleEffect serialize work

#3311
2022-03-18 21:05:35 +01:00
Anselm Brehme abed062d81 Provide registries for BlockStateProperties
Note that the properties used by vanilla are always the same instance.
API properties are clones of those.

Move duplicate code up into SpongeRegistryHolder.

#3611
2022-02-17 21:28:20 +01:00
Gabriel Harris-Rouquette 0e770d3315 Enable and implement Keys.HEALTH value change events
Signed-off-by: Gabriel Harris-Rouquette <gabizou@me.com>
2022-01-31 22:48:54 -08:00
Anselm Brehme b1e1791108 fixing a few inventory issues:
- missing menu client sync
- viewer tracking
- inventory data
- furnace lens
- ignore capture on open inventory of ticking blockentity
- add cooking event test
2022-01-26 23:56:14 +01:00
Gabriel Harris-Rouquette 533f0587b0 Implement VanishState 2022-01-07 22:53:47 -08:00
Daniel Naylor ade0602335 Conssitently use Ticks where tick based values are used
Also update a couple of stylistic mistakes
2022-01-02 15:00:46 +00:00
Gabriel Harris-Rouquette 5522a82375 Really fix vanish. Someone left a sneaky todo
Signed-off-by: Gabriel Harris-Rouquette <gabizou@me.com>
2022-01-01 15:32:25 -08:00
ImMorpheus f60c15cc80 fix vanish testplugin missing parametervalue key 2022-01-01 08:38:53 +01:00
Gabriel Harris-Rouquette e232f3e048 Uncomment and add VanishTest plugin 2021-12-31 10:59:00 -08:00
Chris SandersandDaniel Naylor ece3d7f502 Implement the resource pack API.
- Implement factories
- Remove remaining references to the AssetManager
- vanilla: Load plugins as resource packs
- common: API updates and bugfixes for resource pack API

Signed-off-by: Chris Sanders <zidane@spongepowered.org>

Fix compile and test issues

Co-authored-by: Daniel Naylor <dualspiral@spongepowered.org>
2021-12-28 16:11:51 +00:00
Yeregorix 9d635af9b5 Minor changes for AffectEntityEvent and ExplosionEvent.Detonate based events (#3564)
* Add entitytest plugin with a spawn filter
* Fix SpawnEntityEvent#filterEntities - fixes #3506
* Don't fire SpawnEntityEvent after a cancelled SpawnEntityEvent.Pre
* Add missing EventContextKeys.SPAWN_TYPE for SpawnEntityEvent.Pre
* Add missing EventContextKeys.SPAWN_TYPE for inventory drop events
2021-12-28 16:05:39 +00:00
James 0852eb1f66 Implement .entities and add test plugin 2021-12-28 15:37:39 +00:00
Daniel Naylor 135b241861 Make PotionEffect duration use Ticks 2021-12-28 13:37:18 +00:00
Anselm Brehme 6942515bc4 make the players enderchest viewable 2021-10-16 12:43:09 +02:00
Anselm Brehme 05993f6e22 fix building ViewableInventory and Testplugin
fixes #3545
2021-10-01 16:28:58 +02:00
Chris Sanders 19eda61d75 Update for API changes
- Remove double implemented Task.Builder
- Remove pointless volatile marked counter field in SyncScheduler as it
is always ticked on the same thread
- Actually submit the Async to Sync entity spawning task in the
PhaseTracker. Note that the actual callback to detect this is not being
called yet.
- Various other cleanup

Signed-off-by: Chris Sanders <zidane@spongepowered.org>
2021-09-27 23:16:37 -05:00
Daniel Naylor f4eb3f2165 Fix marking an arugment as terminal after a FirstOf parameter
See #2389
2021-09-19 14:57:20 +01:00
Daniel Naylor 14b2521be9 vanilla: Add dependency resolution and 0.3.0 plugin-spi
This ensures plugins are loaded in an appropriate order, so plugins without dependencies are loaded first, and the algorithm recursively determines the load order based on satisifed dependencies. BEFORE dependencies can be supported by uncommenting the code within the TODOs in DependencyResolver, it treats thouse as "optional after" deps on the target -- though will still fail if the dependency is not there and is not optional.

If we have optional dependencies, there is a chance that a cyclic chain may occur. For optional deps, however, they should be able to handle a dependent plugin being loaded before them because they are already "optional". Thus, if we find that no plugins were loaded in a pass and but there were optional dependencies that could be ignored in that scenario, we attempt to load plugins that only have their compulsory dependencies loaded.

As for plugin-spi 0.3.0, migrate to 'sponge_plugins.json' as the
standard metadata file that will be read by Sponge.
2021-09-04 16:04:41 -05:00
Anselm Brehme 66dd6c3074 fix data test check 2021-08-29 05:12:15 +02:00
Anselm Brehme 294f9772a9 include creative drop in test 2021-08-23 17:09:36 +02:00
Anselm Brehme dbfc9d5353 separate Drop from Inventory/Container events 2021-08-23 17:09:36 +02:00
Anselm Brehme ee207c5ac8 capture data for generic ChangeInventoryEvents 2021-08-23 17:09:36 +02:00
Anselm Brehme ca4003e8ca implement Pickup cancel logic using transactions and more cleanup 2021-08-23 17:09:36 +02:00
Anselm Brehme 80955fce74 finish crafting events using transactions 2021-08-23 17:09:36 +02:00
Anselm Brehme 16aae8c414 fixing stuff 2021-08-23 17:09:36 +02:00
Chris Sanders 238a2717b4 Update for API changes.
- Actually implement per-world registries for all world implementations

Signed-off-by: Chris Sanders <zidane@spongepowered.org>
2021-08-18 17:18:00 -05:00
Chris Sanders 715374d0e6 Whoops...
Signed-off-by: Chris Sanders <zidane@spongepowered.org>
2021-08-10 11:15:54 -05:00
Chris Sanders 63d2a21cf8 common: this isn't change block test lol
Signed-off-by: Chris Sanders <zidane@spongepowered.org>
2021-08-08 16:17:23 -05:00
Chris Sanders ba96fd748c common: Actually have ChannelTest run
Signed-off-by: Chris Sanders <zidane@spongepowered.org>
2021-08-08 16:15:41 -05:00
Daniel Naylor ec612bd184 Update for removal of "empty()" from API.
Fixes #3494

Also improves logic surrounding command results that contain error messages in general.
2021-07-29 19:54:34 +01:00
Daniel Naylor cfc3755f01 Refactor some movement logic to handle setting positions
* Also some related cleanup, specifically making bridges that shouldn't be bridges not bridges.
2021-07-25 16:49:49 +01:00
Daniel Naylor 92d90052b6 Perform various changes to support API updates to Chunk and Volume
Adds missing implementation on WorldChunk

Fixes #3478
2021-07-25 16:43:30 +01:00
Chris Sanders 6c94827cdf Update for event manager refactor.
- Cleanup the VanillaEventManager to improve code quality and maintainability

Signed-off-by: Chris Sanders <zidane@spongepowered.org>

Update for API changes.

Signed-off-by: Chris Sanders <zidane@spongepowered.org>
2021-07-23 22:53:07 -05:00