-
-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fd/activator setup #13
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good overall, but have another look at the formatting, naming conventions, and code comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clean up leftover log statements
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Easy fix
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"); | ||
// } | ||
// } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah no worries
* @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 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Man I love records
public static final Form STEP = new Form("step"); | ||
|
||
|
||
//These two may not be necessary. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't add them for now then
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could use a lil' rewrite
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah that's a bit old....
|
||
private int count; | ||
|
||
public MultiModifierData() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Be sure to document that the default is 1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.