Fix compile errors
This commit is contained in:
parent
c5316a2763
commit
8c9fa42619
3 changed files with 6 additions and 7 deletions
|
@ -143,7 +143,7 @@ public class Bank
|
|||
protected static boolean postTx(Transaction tx) throws InvalidSideException, InvocationTargetException, IllegalAccessException {
|
||||
if(ServerUtilities.isClient())return false;
|
||||
TransactionEvent ev = new TransactionEvent(tx);
|
||||
if(Bus.Post(ev))
|
||||
if(MinecraftForge.EVENT_BUS.post(ev))
|
||||
{
|
||||
// Send the list of reasons to the user
|
||||
String reasonStr = String.join("\n", ev.reasons);
|
||||
|
|
|
@ -1,15 +1,13 @@
|
|||
package dev.zontreck.libzontreck.currency.events;
|
||||
|
||||
|
||||
import dev.zontreck.eventsbus.Cancellable;
|
||||
import dev.zontreck.eventsbus.Event;
|
||||
import dev.zontreck.libzontreck.currency.Transaction;
|
||||
import net.minecraftforge.eventbus.api.Cancelable;
|
||||
import net.minecraftforge.eventbus.api.Event;
|
||||
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.util.List;
|
||||
|
||||
@Cancellable
|
||||
@Cancelable
|
||||
public class TransactionEvent extends Event
|
||||
{
|
||||
public Transaction tx;
|
||||
|
|
|
@ -6,6 +6,7 @@ import dev.zontreck.libzontreck.currency.events.WalletUpdatedEvent;
|
|||
import dev.zontreck.libzontreck.util.ServerUtilities;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.network.FriendlyByteBuf;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.network.NetworkDirection;
|
||||
import net.minecraftforge.network.NetworkEvent;
|
||||
import net.minecraftforge.network.simple.SimpleChannel;
|
||||
|
@ -63,7 +64,7 @@ public class S2CWalletUpdatedPacket implements IPacket
|
|||
return ServerUtilities.handlePacket(supplier, new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Bus.Post(new WalletUpdatedEvent(ID, oldBal, balance, tx));
|
||||
MinecraftForge.EVENT_BUS.post(new WalletUpdatedEvent(ID, oldBal, balance, tx));
|
||||
|
||||
}
|
||||
});
|
||||
|
|
Reference in a new issue