Update buildscript & spotlessApply

This commit is contained in:
DianeXD committed 2022-07-03 12:17:51 +08:00
1 parent e4329e2b8f
commit 8683a345c3
818 files changed
+51123 -49403

No files matched your search

@@ -11,38 +11,38 @@ import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
public enum BinnieCoreGUI implements IBinnieGUID {
Compartment,
FieldKit,
Genesis;
Compartment,
FieldKit,
Genesis;
public Window getWindow(EntityPlayer player, IInventory object, Side side) throws Exception {
switch (this) {
case Compartment:
return new WindowCompartment(player, object, side);
public Window getWindow(EntityPlayer player, IInventory object, Side side) throws Exception {
switch (this) {
case Compartment:
return new WindowCompartment(player, object, side);
case FieldKit:
return new WindowFieldKit(player, null, side);
case FieldKit:
return new WindowFieldKit(player, null, side);
case Genesis:
return new WindowGenesis(player, null, side);
}
return null;
}
case Genesis:
return new WindowGenesis(player, null, side);
}
return null;
}
@Override
public Window getWindow(EntityPlayer player, World world, int x, int y, int z, Side side) {
TileEntity tileEntity = world.getTileEntity(x, y, z);
IInventory object = null;
if (tileEntity instanceof IInventory) {
object = (IInventory) tileEntity;
}
@Override
public Window getWindow(EntityPlayer player, World world, int x, int y, int z, Side side) {
TileEntity tileEntity = world.getTileEntity(x, y, z);
IInventory object = null;
if (tileEntity instanceof IInventory) {
object = (IInventory) tileEntity;
}
Window window = null;
try {
window = getWindow(player, object, side);
} catch (Exception ex) {
ex.printStackTrace();
}
return window;
}
Window window = null;
try {
window = getWindow(player, object, side);
} catch (Exception ex) {
ex.printStackTrace();
}
return window;
}
}
@@ -9,41 +9,41 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.world.World;
public class BinnieGUIHandler implements IGuiHandler {
private AbstractMod mod;
private AbstractMod mod;
public BinnieGUIHandler(AbstractMod mod) {
this.mod = mod;
}
public BinnieGUIHandler(AbstractMod mod) {
this.mod = mod;
}
@Override
public Object getServerGuiElement(int id, EntityPlayer player, World world, int x, int y, int z) {
Window window = getWindow(id, player, world, x, y, z, Side.SERVER);
if (window == null) {
return null;
}
window.initialiseServer();
return window.getContainer();
}
@Override
public Object getServerGuiElement(int id, EntityPlayer player, World world, int x, int y, int z) {
Window window = getWindow(id, player, world, x, y, z, Side.SERVER);
if (window == null) {
return null;
}
window.initialiseServer();
return window.getContainer();
}
@Override
public Object getClientGuiElement(int id, EntityPlayer player, World world, int x, int y, int z) {
if (BinnieCore.proxy.isSimulating(world)) {
return getServerGuiElement(id, player, world, x, y, z);
}
@Override
public Object getClientGuiElement(int id, EntityPlayer player, World world, int x, int y, int z) {
if (BinnieCore.proxy.isSimulating(world)) {
return getServerGuiElement(id, player, world, x, y, z);
}
Window window = getWindow(id, player, world, x, y, z, Side.CLIENT);
if (window == null) {
return null;
}
return window.getGui();
}
Window window = getWindow(id, player, world, x, y, z, Side.CLIENT);
if (window == null) {
return null;
}
return window.getGui();
}
public Window getWindow(int id, EntityPlayer player, World world, int x, int y, int z, Side side) {
for (IBinnieGUID guid : mod.getGUIDs()) {
if (guid.ordinal() == id) {
return guid.getWindow(player, world, x, y, z, side);
}
}
return null;
}
public Window getWindow(int id, EntityPlayer player, World world, int x, int y, int z, Side side) {
for (IBinnieGUID guid : mod.getGUIDs()) {
if (guid.ordinal() == id) {
return guid.getWindow(player, world, x, y, z, side);
}
}
return null;
}
}
@@ -7,5 +7,5 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.world.World;
public interface IBinnieGUID extends IOrdinaled {
Window getWindow(EntityPlayer player, World world, int x, int y, int z, Side side);
Window getWindow(EntityPlayer player, World world, int x, int y, int z, Side side);
}