Commit Graph

31 Commits

Author SHA1 Message Date
shedaniel
5e338b40da Update to Loom 0.10 2021-12-09 01:40:05 +08:00
shedaniel
6b2506d1fd Add support for PacketTransformer and a SplitPacketTransformer (#142)
* Add support for PacketTransformer and a SplitPacketTransformer

* Add testmod and make it work

* Add experimental, Remove generics, they are pointless
2021-10-23 18:44:16 +08:00
lythowastaken
0fcbf40c7f Feature/villager trades (#122)
* Add modify and removing for villager trades

- Add mixin for villager trades
- Add methods to register modify and removing
- Implement base for VillagerMixin to provide additional villager data
- Basic Access & Mixin change
- Add AT and AW
- Add overriding for max offers a villager or the wanderer can have

* Add rare check for wandering trader

* Remove todo comment

* rename some methods

* Solve reviews for #122

Move non api stuff into TradeRegistryData
Rename fields in MerchantOfferAccess
Move trade stuff into internal package
Mark internal trade classes as ApiStatus.Internal

* Minor refactors (discussed on Discord)

* Add doc for AbstractVillagerMixin

* Reformat code

* Update gradle.properties

Co-authored-by: Max <maxh2709@gmail.com>
2021-09-17 16:36:12 +02:00
shedaniel
a8c546b1c1 Add license headers 2021-08-24 03:31:17 +08:00
Leo40Git
98395b6735 Add tool interaction hooks (#128)
Co-authored-by: shedaniel <daniel@shedaniel.me>
2021-08-24 03:28:18 +08:00
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
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
1ba9ae1a0b Add testmod
Added public static modifiers to methods (OOPS)
2021-06-20 19:43:19 +03: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
shedaniel
d737e8e2b7 Fix #94
Signed-off-by: shedaniel <daniel@shedaniel.me>
2021-05-26 14:53:19 +08:00
Max
43c8bae105 [norelease] Update to archloom 0.7.2 and Gradle 7 2021-05-18 17:49:41 +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
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
35145b9acb Add getCustomEquipmentSlot 2021-04-10 20:33:26 +08:00
Max
28d986a3cc Add EntityHooks.fromCollision to retrieve an entity from block collision (#64) 2021-03-21 20:20:25 +01:00
shedaniel
833d6014ea Rewrite the GuiEvent.SET_SCREEN mixin to fix #35 2021-03-11 21:09:22 +08:00
shedaniel
6cbafd06a7 Add lightning strikes to the debug mod 2021-03-07 21:10:48 +08:00
shedaniel
c8aeff0823 Update architectury-plugin to 3.0.88 2021-02-26 02:16:53 +08:00
shedaniel
a7a98aa19f Add license 2021-02-23 00:58:04 +08:00
shedaniel
4f333f7ec7 Add test mod and fix game rules on forge 2021-02-23 00:56:50 +08:00
Max
b78cce58ee Add LightningEvent, FallingBlock land, move break/place to BlockEvent 2021-02-15 18:59:31 +01:00
Juuxel
6de010f71a Add game rule API 2021-01-27 15:14:42 +02:00
Max
0b7e29cd2d [ci skip] Add SET_SCREEN test to testmod 2021-01-25 19:10:27 +01:00
shedaniel
492521dfe3 Add PlayerEvent#CHANGE_DIMENSION 2021-01-25 17:52:39 +08:00
shedaniel
de90542afd Add raw input events, close #16 2021-01-20 21:21:23 +08:00
shedaniel
9c6101835d Close #18 Currently testing item / block addition, keybinds and creative tabs. 2021-01-20 20:28:15 +08:00