Skip to content

Commit

Permalink
Fix experience not giving anything on fabric. Close #105
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredlll08 committed Jul 20, 2022
1 parent 0f6b7c4 commit 867c8c1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ public class ValueEvent implements IValueEvent {

private int value;

public ValueEvent(int value) {

this.value = value;
}

/**
* Sets the value of the experience orb.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,9 @@ public class FabricEventHandler implements IEventHelper {
@Override
public Either<IValueEvent, Integer> fireValueEvent(int value) {

ValueEvent event = new ValueEvent();
ValueEvent event = new ValueEvent(value);
if(FabricLoader.getInstance().isModLoaded("fabric")) {
ClumpsEvents.VALUE_EVENT.invoker().handle(event);
return Either.right(event.getValue());
}

return Either.right(event.getValue());
Expand Down

0 comments on commit 867c8c1

Please sign in to comment.