Commit Graph

149 Commits

Author SHA1 Message Date
Kristiāns Micītis
289dd026f2 Added SimpleNetworkManager (#120)
* Added SimpleNetworkManager

* Implemented requested changes for SimpleNetworkManager

* Add javadoc to networking.simple

* Finish up PacketID docs

* Fix javadoc building

* Added license headers

* Renamed BasePacket to Message and PacketID to MessageType

* PacketDecoder -> MessageDecoder

Signed-off-by: shedaniel <daniel@shedaniel.me>

* Rename constructor parameters

Signed-off-by: shedaniel <daniel@shedaniel.me>

* Final touches

Signed-off-by: shedaniel <daniel@shedaniel.me>

* Apply suggestions from code review

Co-authored-by: Juuxel <6596629+Juuxel@users.noreply.github.com>

* Fixes to the javadocs

Signed-off-by: shedaniel <daniel@shedaniel.me>

* Bump to 1.20

Signed-off-by: shedaniel <daniel@shedaniel.me>

Co-authored-by: Juuz <6596629+Juuxel@users.noreply.github.com>
Co-authored-by: shedaniel <daniel@shedaniel.me>
2021-07-12 12:00:55 +08:00
shedaniel
5e0091e533 Merge remote-tracking branch 'Leo40Git/feature/food-props' into 1.16
Signed-off-by: shedaniel <daniel@shedaniel.me>
2021-07-04 18:36:29 +08:00
Leo40Git
f019deb815 Testmod
Restore variance
2021-07-01 15:52:49 +03:00
Leo40Git
b644d103fa Forge implementation 2021-07-01 15:16:23 +03:00
Leo40Git
b7c5a106c1 Repackaging and such 2021-07-01 15:13:49 +03:00
Leo40Git
1d10df6bb3 Make Fabric impl way simpler
Yeet NonNull annotations
2021-07-01 15:06:26 +03:00
Leo40Git
b682f3d9b7 Allow adding supplied effects to FoodProperties 2021-07-01 15:06:13 +03:00
shedaniel
790dafb0b5 Make ColorHandlers wildcard, fix #114
Signed-off-by: shedaniel <daniel@shedaniel.me>
2021-07-01 03:00:40 +08:00
shedaniel
9f8140fdec Some changes
- Migrate from ParticleFactories to ParticleProviderRegistry (We are not yarn)
- Format Code

Signed-off-by: shedaniel <daniel@shedaniel.me>
2021-06-25 18:57:31 +03:00
Leo40Git
2c16f7ac09 Requested changes
PendingParticleProvider -> DeferredParticleProvider
parameter constructor -> provider
2021-06-25 15:06:26 +03:00
Leo40Git
1ba9ae1a0b Add testmod
Added public static modifiers to methods (OOPS)
2021-06-20 19:43:19 +03:00
Leo40Git
81b0cc5821 Particle Factory API (closes architectury#93) 2021-06-20 17:30:32 +03:00
Max
375c56999f Address code review, add utility method to get features for specific step 2021-06-09 13:14:00 +02:00
Max
f3f881960f Add basic Javadoc to BiomeModifications 2021-06-09 01:57:34 +02:00
shedaniel
85b3b3909d Add Deprecated and ScheduledForRemoval while appropriate
Signed-off-by: shedaniel <daniel@shedaniel.me>
2021-05-30 19:07:35 +08:00
canitzp
66bcf630eb Add Javadocs for all events (#91)
* javadoc for ClientChatEvent

* javadoc for ClientPlayerEvent

* javadoc for ClientRawInputEvent

* Added javadoc for ClientScreenInputEvent

* Bit refactoring and removed javadoc @see to the caller methods

* Add javadoc for BlockEvent

* Add javadoc for ChatEvent

* Add javadoc for CommandPerformEvent and CommandRegistrationEvent

* Add javadoc for EntityEvent

* Add javadoc for ExplosionEvent

* Add javadoc for GuiEvent

* Add javadoc for InteractionEvent

* Add javadoc for LightningEvent, RecipeUpdateEvent & TextureStitchEvent

* Add javadoc for LifecycleEvent & ClientLifecycleEvent

* Add javadoc for TooltipEvent

* Add javadoc for TickEvent and partly PlayerEvent

* More javadoc for PlayerEvent

* Finally all event have javadoc

* Update common/src/main/java/me/shedaniel/architectury/event/events/CommandPerformEvent.java

Co-authored-by: Juuxel <6596629+Juuxel@users.noreply.github.com>

* Update common/src/main/java/me/shedaniel/architectury/event/events/CommandPerformEvent.java

Co-authored-by: Juuxel <6596629+Juuxel@users.noreply.github.com>

* Update common/src/main/java/me/shedaniel/architectury/event/events/CommandPerformEvent.java

Co-authored-by: Juuxel <6596629+Juuxel@users.noreply.github.com>

* Update common/src/main/java/me/shedaniel/architectury/event/events/ChatEvent.java

Co-authored-by: Juuxel <6596629+Juuxel@users.noreply.github.com>

* Update common/src/main/java/me/shedaniel/architectury/event/events/CommandRegistrationEvent.java

Co-authored-by: Juuxel <6596629+Juuxel@users.noreply.github.com>

* Update common/src/main/java/me/shedaniel/architectury/event/events/EntityEvent.java

Co-authored-by: Juuxel <6596629+Juuxel@users.noreply.github.com>

* Update common/src/main/java/me/shedaniel/architectury/event/events/EntityEvent.java

Co-authored-by: Juuxel <6596629+Juuxel@users.noreply.github.com>

* Update common/src/main/java/me/shedaniel/architectury/event/events/EntityEvent.java

Co-authored-by: Juuxel <6596629+Juuxel@users.noreply.github.com>

* Update common/src/main/java/me/shedaniel/architectury/event/events/EntityEvent.java

Co-authored-by: Juuxel <6596629+Juuxel@users.noreply.github.com>

* Update common/src/main/java/me/shedaniel/architectury/event/events/client/ClientScreenInputEvent.java

Co-authored-by: Juuxel <6596629+Juuxel@users.noreply.github.com>

* Update common/src/main/java/me/shedaniel/architectury/event/events/client/ClientScreenInputEvent.java

Co-authored-by: Juuxel <6596629+Juuxel@users.noreply.github.com>

* Update common/src/main/java/me/shedaniel/architectury/event/events/BlockEvent.java

Co-authored-by: Max <maxh2709@gmail.com>

* Update common/src/main/java/me/shedaniel/architectury/event/events/BlockEvent.java

Co-authored-by: Max <maxh2709@gmail.com>

* Update common/src/main/java/me/shedaniel/architectury/event/events/BlockEvent.java

Co-authored-by: Max <maxh2709@gmail.com>

* Update common/src/main/java/me/shedaniel/architectury/event/events/BlockEvent.java

Co-authored-by: Max <maxh2709@gmail.com>

* Update common/src/main/java/me/shedaniel/architectury/event/events/LifecycleEvent.java

Co-authored-by: Max <maxh2709@gmail.com>

* Update common/src/main/java/me/shedaniel/architectury/event/events/LifecycleEvent.java

Co-authored-by: Max <maxh2709@gmail.com>

* Update common/src/main/java/me/shedaniel/architectury/event/events/LifecycleEvent.java

Co-authored-by: Max <maxh2709@gmail.com>

* Update common/src/main/java/me/shedaniel/architectury/event/events/PlayerEvent.java

Co-authored-by: Max <maxh2709@gmail.com>

* Apply suggestions from code review

Co-authored-by: Max <maxh2709@gmail.com>
Co-authored-by: Juuxel <6596629+Juuxel@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Juuxel <6596629+Juuxel@users.noreply.github.com>
Co-authored-by: Max <maxh2709@gmail.com>

* Apply suggestions from code review

Co-authored-by: Max <maxh2709@gmail.com>
Co-authored-by: Juuxel <6596629+Juuxel@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Max <maxh2709@gmail.com>
Co-authored-by: Juuxel <6596629+Juuxel@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Max <maxh2709@gmail.com>
Co-authored-by: Juuxel <6596629+Juuxel@users.noreply.github.com>

* Apply suggestions from code review

* Apply suggestions from code review

Co-authored-by: shedaniel <daniel@shedaniel.me>

* Applied some more reviews

* Applied some more reviews

* Applied suggestions

* Reformat and apply some minor suggestions

* Apply suggestions from review (first batch)

* Remove double return javadoc

* Apply suggestions from code review

Co-authored-by: shedaniel <daniel@shedaniel.me>

* Add "scaled" to mouse coordinates

* Final touches

Signed-off-by: shedaniel <daniel@shedaniel.me>

* Remove invalid tips

Signed-off-by: shedaniel <daniel@shedaniel.me>

Co-authored-by: Juuxel <6596629+Juuxel@users.noreply.github.com>
Co-authored-by: Max <maxh2709@gmail.com>
Co-authored-by: shedaniel <daniel@shedaniel.me>
2021-05-28 17:14:55 +02:00
canitzp
371925b28d Add NetworkManager hook for Entity spawn packets (#88)
* New utility hook for creating a entity spawn packet. before every mod had to implement this in itself.

* Apply suggestions from code review

Co-authored-by: shedaniel <daniel@shedaniel.me>

* Update common/src/main/java/me/shedaniel/architectury/networking/NetworkManager.java

* Update common/src/main/java/me/shedaniel/architectury/networking/NetworkManager.java

* Properly implement SpawnEntityPacket & Format style

Signed-off-by: shedaniel <daniel@shedaniel.me>

* Format

Signed-off-by: shedaniel <daniel@shedaniel.me>

* createEntitySpawnPacket -> createAddEntityPacket for mojmap consistency

Signed-off-by: shedaniel <daniel@shedaniel.me>

* Bump version to 1.17

Co-authored-by: Max <maxh2709@gmail.com>
Co-authored-by: shedaniel <daniel@shedaniel.me>
2021-05-27 19:34:50 +02:00
canitzp
582ededddd Add Chunk data save and load events, closes #89 (#92)
* Created Chunk save and load event. Closes #89

* Fixed missing licence

* Update common/src/main/java/me/shedaniel/architectury/event/events/ChunkEvent.java

* Update common/src/main/java/me/shedaniel/architectury/event/events/ChunkEvent.java

* Update common/src/main/java/me/shedaniel/architectury/event/events/ChunkEvent.java

* Supply ServerLevel in ChunkEvent.LOAD, style cleanup

Signed-off-by: shedaniel <daniel@shedaniel.me>

* Add "Data" suffix to Chunk IO Events and mark level as nullable for load

* Update common/src/main/java/me/shedaniel/architectury/event/events/ChunkEvent.java

* Bump to 1.16

Co-authored-by: shedaniel <daniel@shedaniel.me>
Co-authored-by: Max <maxh2709@gmail.com>
2021-05-27 01:03:20 +02:00
Max
428f98be44 Reformat and bump version 2021-05-15 00:13:39 +02:00
canitzp
2ff5dd500d Add an easy way to register Villager and Wandering Trader trades (#84)
* Add TradeRegistry to add Trades a bit more easily. Uses the VillagerTradesEvent on forge

* Added TradeRegistry#registerTradeForWanderer which uses the WandererTraderEvent on forge

* Added javadoc

* Use Fabric own Trade implementation and fixed Test Mod

* Update common/src/main/java/me/shedaniel/architectury/registry/TradeRegistry.java

Co-authored-by: Juuxel <6596629+Juuxel@users.noreply.github.com>

* Update common/src/main/java/me/shedaniel/architectury/registry/TradeRegistry.java

Co-authored-by: Juuxel <6596629+Juuxel@users.noreply.github.com>

* Update common/src/main/java/me/shedaniel/architectury/registry/TradeRegistry.java

Co-authored-by: Juuxel <6596629+Juuxel@users.noreply.github.com>

* Update common/src/main/java/me/shedaniel/architectury/registry/TradeRegistry.java

Co-authored-by: Juuxel <6596629+Juuxel@users.noreply.github.com>

* Added javadoc for SimpleTrade

* Use two lists instead of Int2ObjectMap

* Use "registerTradeForWanderingTrader" instead of "registerTradeForWanderer" for better clarification

* Use IllegalArgumentException instead of RuntimeException

* Remove level limit (Mods may be able to remove this restriction in VillagerData#canLevelUp), Clean up forge's implementation

Signed-off-by: shedaniel <daniel@shedaniel.me>

* Clean up TestTrades and add licenses

Signed-off-by: shedaniel <daniel@shedaniel.me>

* [ciskip] Reintroduce lower bound validation for level

Co-authored-by: Juuxel <6596629+Juuxel@users.noreply.github.com>
Co-authored-by: shedaniel <daniel@shedaniel.me>
Co-authored-by: Max <maxh2709@gmail.com>
2021-05-14 23:59:58 +02:00
shedaniel
c675bf6625 Adds EntityAttributes (#83)
* Adds EntityAttributes

Signed-off-by: shedaniel <daniel@shedaniel.me>

* Switch to ConcurrentHashMap

Signed-off-by: shedaniel <daniel@shedaniel.me>
2021-05-13 13:13:40 +08:00
shedaniel
cfef5f28b7 Allow being more flexible in registering
Signed-off-by: shedaniel <daniel@shedaniel.me>
2021-05-12 15:05:04 +08:00
shedaniel
2eef26f632 Add FuelRegistry (#81)
* Add FuelRegistry

Signed-off-by: shedaniel <daniel@shedaniel.me>

* Fix compilation

Signed-off-by: shedaniel <daniel@shedaniel.me>

* Remove redundant generic

Signed-off-by: shedaniel <daniel@shedaniel.me>

* Change to MinecraftForge.EVENT_BUS

Signed-off-by: shedaniel <daniel@shedaniel.me>

* A few docs, and switch to returning 0 for non-fuels

Signed-off-by: shedaniel <daniel@shedaniel.me>

* Bump to 1.13
2021-05-12 13:43:03 +08:00
shedaniel
9f07f65196 Remove @NotNull spam
Things should be non null by default, and we mark @Nullable otherwise

Signed-off-by: shedaniel <daniel@shedaniel.me>
2021-05-11 01:08:08 +08:00
shedaniel
4ef8729174 Update to Architectury Plugin 3.1 to support detecting the api FabricLoader
Signed-off-by: shedaniel <daniel@shedaniel.me>
2021-05-03 01:53:45 +08:00
shedaniel
5accb65ee8 Add interruptTrue/Default/False as util methods 2021-04-17 22:05:43 +08:00
Max
ca2a528160 Some more (mostly Entity-based) Events (#75)
* Add FarmlandTrample event

* FarmlandTrample debug event

* Add FILL_BUCKET event and testmod

* Add ENTER_CHUNK event and testmod

* Add CHECK_SPAWN on Forge

* CHECK_SPAWN on Fabric part 1 aka: The Concernening

* CHECK_SPAWN on Fabric part 2: I kinda don't hate this as much

* CHECK_SPAWN on Fabric part 3: Patrols

* CHECK_SPAWN on Fabric part 4: catJAM

* CHECK_SPAWN on Fabric part 5: Phantoms

* Fix CHECK_SPAWN for patrols

* Add mod metadata (#73)

* new event system

* Revert patrol spawner behaviour

* Implement CheckSpawn behaviour for spawners and add test (forgot about that)

* Revert "Revert patrol spawner behaviour"

This reverts commit 1da3fb73

* Change MixinPhantomSpawner to SOFT

* Edit forge mods.toml
We support 1.16.2+ on forge

Co-authored-by: shedaniel <daniel@shedaniel.me>
2021-04-15 23:26:48 +08:00
shedaniel
ac94c33e07 Re-license header 2021-04-13 19:40:44 +08:00
shedaniel
ec06bd3b96 Add docs 2021-04-10 21:28:48 +08:00
shedaniel
35145b9acb Add getCustomEquipmentSlot 2021-04-10 20:33:26 +08:00
shedaniel
27addc91d9 Close #39 2021-04-10 20:13:19 +08:00
shedaniel
2af34feb2a Fix invalid events 2021-03-30 01:19:43 +08:00
Max
28d986a3cc Add EntityHooks.fromCollision to retrieve an entity from block collision (#64) 2021-03-21 20:20:25 +01:00
shedaniel
d9b43e71e6 Add EntityRenderers (#52)
Close #45
2021-02-27 17:48:51 +08:00
shedaniel
927bd08f8c Revert "Remove locals requirements from BlockLandingInvoker"
This reverts commit 0eb7bd5b
2021-02-26 03:47:23 +08:00
shedaniel
0eb7bd5b1e Remove locals requirements from BlockLandingInvoker 2021-02-26 02:16:55 +08:00
shedaniel
5dc01b0a19 Implement onDataPacket (#48) 2021-02-26 00:36:06 +08:00
shedaniel
b93cb04b6f Add null checks to networking for better errors. 2021-02-25 15:00:34 +08:00
shedaniel
7e743dcb64 Add licenses and implement optional tags, requires some testing. 2021-02-23 00:16:26 +08:00
Max
0ec068cc1e Fix falling block land event to handle all (vanilla) blocks correctly
(Modded blocks need to have super.onLand(...) and then they'll be fine too)
2021-02-15 19:50:19 +01:00
Max
1918ec1132 Delay the breakage of ALL THE THINGS™ until 1.17
You're safe, NetworkChannel... for now
2021-02-15 19:45:28 +01:00
Max
b78cce58ee Add LightningEvent, FallingBlock land, move break/place to BlockEvent 2021-02-15 18:59:31 +01:00
Max
2d1a9791f6 Remove collisions from packet ids 2021-02-11 19:12:42 +01:00
Max
54650b3e2e Mark old @ExpectPlatform for removal (2.0) 2021-02-11 19:12:23 +01:00
Max
382d677663 Mark old sided register methods for removal (1.6) 2021-02-11 19:12:23 +01:00
shedaniel
77413eb808 Fix NetworkChannel client-server desync 2021-02-09 01:02:27 +08:00
shedaniel
70d5de3186 Migrate to my maven + make NetworkChannel side-agnostic 2021-02-08 21:49:58 +08:00
shedaniel
be28ae081c Merge remote-tracking branch 'architectury/1.16' into 1.16 2021-02-06 22:56:22 +08:00
shedaniel
e66a57bc80 Add some null checks 2021-02-06 22:56:12 +08:00
Max
38af2f1fc4 Remove (probably incorrect) client annotation from some hooks 2021-02-05 21:33:08 +01:00