Skip to content

Commit

Permalink
Code reformat
Browse files Browse the repository at this point in the history
This is optional, revert if not liked.
Code behaviour is the same as before.
  • Loading branch information
Big-Iron-Cheems committed Oct 15, 2023
1 parent b3baa3b commit 019b0cc
Show file tree
Hide file tree
Showing 3 changed files with 196 additions and 221 deletions.
16 changes: 8 additions & 8 deletions src/main/java/maxsuperman/addons/roller/VillagerRollerAddon.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@
import org.apache.logging.log4j.Logger;

public class VillagerRollerAddon extends MeteorAddon {
public static final Logger LOG = LogManager.getLogger();
public static final Logger LOG = LogManager.getLogger();

@Override
public void onInitialize() {
LOG.info("Initializing Meteor Villager Roller");
@Override
public void onInitialize() {
LOG.info("Initializing Meteor Villager Roller");

// Modules
Modules.get().add(new VillagerRoller());
}
// Modules
Modules.get().add(new VillagerRoller());
}

@Override
public void onRegisterCategories() {
//Modules.registerCategory(CATEGORY);
// Custom category not defined
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ class VillagerInteractMixin {
@Inject(at = @At("HEAD"), method = "interactMob(Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/util/Hand;)Lnet/minecraft/util/ActionResult;", cancellable = true)
public void interactMob(CallbackInfoReturnable<ActionResult> cir) {
VillagerRoller roller = Modules.get().get(VillagerRoller.class);
if (VillagerRoller.currentState == VillagerRoller.State.WaitingForTargetVillager) {
VillagerRoller.currentState = VillagerRoller.State.RollingBreakingBlock;
if (roller.currentState == VillagerRoller.State.WaitingForTargetVillager) {
roller.currentState = VillagerRoller.State.RollingBreakingBlock;
roller.rollingVillager = (VillagerEntity) (Object) this;
roller.info("We got your villager");
cir.setReturnValue(ActionResult.CONSUME);
Expand Down
Loading

0 comments on commit 019b0cc

Please sign in to comment.