Conversation
mahtaran
left a comment
There was a problem hiding this comment.
Looking good overall, but have another look at the formatting, naming conventions, and code comments
There was a problem hiding this comment.
Will need to be changed eventually when merging into Magus, but fine for now
| LOGGER.info("HELLO FROM PRE INIT"); | ||
| LOGGER.info("DIRT BLOCK >> {}", Blocks.DIRT.getName()); |
There was a problem hiding this comment.
Clean up leftover log statements
| private void doClientStuff(final FMLClientSetupEvent event) { | ||
| // do something that can only be done on the client | ||
| //todo call this anytime the key mappings are updated | ||
| } | ||
|
|
||
| private void enqueueIMC(final InterModEnqueueEvent event) { | ||
| // some example code to dispatch IMC to another mod | ||
| InterModComms.sendTo("magus", "helloworld", () -> { | ||
| LOGGER.info("Hello world from the MDK"); | ||
| return "Hello world"; | ||
| }); | ||
| } | ||
|
|
||
| private void processIMC(final InterModProcessEvent event) { | ||
| // some example code to receive and process InterModComms from other mods | ||
| LOGGER.info("Got IMC {}", | ||
| event.getIMCStream().map(message -> message.messageSupplier().get()).collect(Collectors.toList()) | ||
| ); | ||
| } | ||
|
|
||
| // You can use SubscribeEvent and let the Event Bus discover methods to call | ||
| @SubscribeEvent | ||
| public void onServerStarting(FMLDedicatedServerSetupEvent event) { | ||
| // do something when the server starts | ||
| LOGGER.info("HELLO from server starting"); | ||
| } | ||
|
|
||
| // You can use EventBusSubscriber to automatically subscribe events on the contained class (this is subscribing to the MOD | ||
| // Event bus for receiving Registry Events) | ||
| // @Mod.EventBusSubscriber(bus = Mod.EventBusSubscriber.Bus.MOD) | ||
| // public static class RegistryEvents { | ||
| // @SubscribeEvent | ||
| // public static void onBlocksRegistry(final RegistryEvent.Register<Block> blockRegistryEvent) { | ||
| // // register a new block here | ||
| // LOGGER.info("HELLO from Register Block"); | ||
| // } | ||
| // } |
| * @param inputs Generic list of InputData to turn into InputPermutations. Good for containing inputs of multiple things | ||
| * that happen simultaneously. | ||
| */ | ||
| public record InputPermutation(List<InputData> inputs) implements InputData { |
| public static final Form STEP = new Form("step"); | ||
|
|
||
|
|
||
| //These two may not be necessary. |
There was a problem hiding this comment.
Kk, they're mainly for testing; I'm not sure we should even be registering input groups for forms right now, we may want to leave that up to each individual mod author.
| /** | ||
| * Listeners store activators. Activators have a list of pre-requisites/events. | ||
| * Listeners search for those events and trigger all activators as needed. | ||
| * 1 listener per activator. | ||
| * Activators can have hard-coded pre-requisites or loaded ones from json files. | ||
| * Upon 'skill mode' being activated (whether through a toggle key or something else), all | ||
| * skill listeners are loaded. Listeners that are always active are the toggle listeners/initialise | ||
| * listeners. | ||
| **/ |
There was a problem hiding this comment.
Yeah that's a bit old....
|
|
||
| private int count; | ||
|
|
||
| public MultiModifierData() { |
There was a problem hiding this comment.
Be sure to document that the default is 1
There was a problem hiding this comment.
Ya, I'll get Aidan to help with his part of this
src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/XPTrait.java
Outdated
Show resolved
Hide resolved
5ea7ad4 to
b8a7337
Compare
Also ensured no mutability issues for a hashmap would arise
…into FD/activatorSetup
…into FD/activatorSetup
builds, but setupListener() not fully implemented
now all InputModules are inserting into static formsTree field
fixed InputConverter.buildPathFrom()
OnPlayerLeaveWorld() method not working for client side
…into FD/activatorSetup
…into FD/activatorSetup
Desc:
Primary focus on the Form implementations, rather than the input modules (blame Aidan for those).
Focuses on issue #2 . Does not close it, as there are issues to be solved and design ideas that need to be addressed- see my TODO and other relevant comments within the commit.
Impact:
This PR will add basic Form implementation to the API, as well as generic InputData support for chaining together any conceivable sequence of inputs from any compatible source. It does not include a thorough InputModule, but again, @aidan99davis for that.