mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-11-15 17:45:08 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6a762101ad | ||
|
|
9eb040ee6f | ||
|
|
3ef15ad081 | ||
|
|
1d92c0dd7f | ||
|
|
13d6533edc | ||
|
|
a4373ebe5c | ||
|
|
f91de79376 | ||
|
|
567cd3e78b | ||
|
|
84e23b3e8e | ||
|
|
eba2bf1f86 | ||
|
|
47bd83e29e | ||
|
|
f7b49fccdd |
No files matched your search
+3
-3
@@ -1,4 +1,4 @@
|
||||
//version: 1696952014
|
||||
//version: 1695474595
|
||||
/*
|
||||
DO NOT CHANGE THIS FILE!
|
||||
Also, you may replace this file at any time if there is an update available.
|
||||
@@ -793,12 +793,12 @@ ext.java17PatchDependenciesCfg = configurations.create("java17PatchDependencies"
|
||||
}
|
||||
|
||||
dependencies {
|
||||
def lwjgl3ifyVersion = '1.5.1'
|
||||
def lwjgl3ifyVersion = '1.5.0'
|
||||
if (modId != 'lwjgl3ify') {
|
||||
java17Dependencies("com.github.GTNewHorizons:lwjgl3ify:${lwjgl3ifyVersion}")
|
||||
}
|
||||
if (modId != 'hodgepodge') {
|
||||
java17Dependencies('com.github.GTNewHorizons:Hodgepodge:2.3.7')
|
||||
java17Dependencies('com.github.GTNewHorizons:Hodgepodge:2.3.5')
|
||||
}
|
||||
|
||||
java17PatchDependencies("com.github.GTNewHorizons:lwjgl3ify:${lwjgl3ifyVersion}:forgePatches") {transitive = false}
|
||||
|
||||
+5
-5
@@ -1,20 +1,20 @@
|
||||
// Add your dependencies here
|
||||
|
||||
dependencies {
|
||||
api('com.github.GTNewHorizons:EnderCore:0.2.18:dev')
|
||||
api('com.github.GTNewHorizons:EnderCore:0.2.17:dev')
|
||||
implementation('com.github.GTNewHorizons:ForestryMC:4.6.14:dev')
|
||||
implementation('com.github.GTNewHorizons:NotEnoughItems:2.4.5-GTNH:dev')
|
||||
implementation('com.github.GTNewHorizons:NotEnoughItems:2.4.3-GTNH:dev')
|
||||
implementation("com.github.GTNewHorizons:GTNHLib:0.0.13:dev")
|
||||
api('com.github.GTNewHorizons:BuildCraft:7.1.36:dev')
|
||||
api('curse.maven:cofh-lib-220333:2388748') // https://www.curseforge.com/minecraft/mc-mods/cofh-lib/files/2388748
|
||||
shadowImplementation('cglib:cglib-nodep:3.3.0')
|
||||
|
||||
compileOnly('com.github.GTNewHorizons:waila:1.6.0:api') {transitive = false}
|
||||
compileOnly('com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-262-GTNH:api') {transitive = false}
|
||||
compileOnly('com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-259-GTNH:api') {transitive = false}
|
||||
compileOnly('com.github.GTNewHorizons:Baubles:1.0.1.16:dev') {transitive = false}
|
||||
compileOnly('com.github.GTNewHorizons:GT5-Unofficial:5.09.44.36:dev') {transitive = false}
|
||||
compileOnly('com.github.GTNewHorizons:GT5-Unofficial:5.09.44.29:dev') {transitive = false}
|
||||
compileOnly('com.github.GTNewHorizons:Railcraft:9.15.0:api') {transitive = false}
|
||||
compileOnly('com.github.GTNewHorizons:StorageDrawers:1.12.1-GTNH:api') {transitive = false}
|
||||
compileOnly('com.github.GTNewHorizons:StorageDrawers:1.12.0-GTNH:api') {transitive = false}
|
||||
implementation('com.github.GTNewHorizons:Chisel:2.11.4-GTNH:dev') {transitive = false}
|
||||
compileOnly('com.github.GTNewHorizons:OpenComputers:1.9.17-GTNH:api') {transitive = false}
|
||||
compileOnly('curse.maven:minefactory-reloaded-66672:2366150') // https://www.curseforge.com/minecraft/mc-mods/minefactory-reloaded/files/2366150
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
package crazypants.enderio;
|
||||
|
||||
import static crazypants.enderio.EnderIO.MODID;
|
||||
import static crazypants.enderio.EnderIO.MOD_NAME;
|
||||
import static crazypants.enderio.EnderIO.VERSION;
|
||||
import static crazypants.enderio.EnderIO.*;
|
||||
|
||||
import java.io.BufferedWriter;
|
||||
import java.io.File;
|
||||
|
||||
@@ -153,7 +153,7 @@ public abstract class AbstractConduit implements IConduit {
|
||||
}
|
||||
|
||||
protected ConnectionMode getDefaultConnectionMode() {
|
||||
return ConnectionMode.IN_OUT;
|
||||
return ConnectionMode.INPUT;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,15 +1,6 @@
|
||||
package crazypants.enderio.conduit;
|
||||
|
||||
import static crazypants.enderio.gui.IconEIO.CROSS;
|
||||
import static crazypants.enderio.gui.IconEIO.TICK;
|
||||
import static crazypants.enderio.gui.IconEIO.WRENCH_OVERLAY_FLUID;
|
||||
import static crazypants.enderio.gui.IconEIO.WRENCH_OVERLAY_FLUID_OFF;
|
||||
import static crazypants.enderio.gui.IconEIO.WRENCH_OVERLAY_ITEM;
|
||||
import static crazypants.enderio.gui.IconEIO.WRENCH_OVERLAY_ITEM_OFF;
|
||||
import static crazypants.enderio.gui.IconEIO.WRENCH_OVERLAY_POWER;
|
||||
import static crazypants.enderio.gui.IconEIO.WRENCH_OVERLAY_POWER_OFF;
|
||||
import static crazypants.enderio.gui.IconEIO.WRENCH_OVERLAY_REDSTONE;
|
||||
import static crazypants.enderio.gui.IconEIO.WRENCH_OVERLAY_REDSTONE_OFF;
|
||||
import static crazypants.enderio.gui.IconEIO.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@@ -1,20 +1,10 @@
|
||||
package crazypants.enderio.conduit;
|
||||
|
||||
import static crazypants.enderio.ModObject.blockPainter;
|
||||
import static crazypants.enderio.material.Alloy.CONDUCTIVE_IRON;
|
||||
import static crazypants.enderio.material.Alloy.ELECTRICAL_STEEL;
|
||||
import static crazypants.enderio.material.Alloy.END_STEEL;
|
||||
import static crazypants.enderio.material.Alloy.ENERGETIC_ALLOY;
|
||||
import static crazypants.enderio.material.Alloy.PHASED_GOLD;
|
||||
import static crazypants.enderio.material.Alloy.REDSTONE_ALLOY;
|
||||
import static crazypants.enderio.material.Alloy.*;
|
||||
import static crazypants.enderio.material.Material.CONDUIT_BINDER;
|
||||
import static crazypants.enderio.material.Material.PHASED_IRON_NUGGET;
|
||||
import static crazypants.enderio.material.endergy.AlloyEndergy.CRUDE_STEEL;
|
||||
import static crazypants.enderio.material.endergy.AlloyEndergy.CRYSTALLINE_ALLOY;
|
||||
import static crazypants.enderio.material.endergy.AlloyEndergy.CRYSTALLINE_PINK_SLIME;
|
||||
import static crazypants.enderio.material.endergy.AlloyEndergy.ENERGETIC_SILVER;
|
||||
import static crazypants.enderio.material.endergy.AlloyEndergy.MELODIC_ALLOY;
|
||||
import static crazypants.enderio.material.endergy.AlloyEndergy.STELLAR_ALLOY;
|
||||
import static crazypants.enderio.material.endergy.AlloyEndergy.*;
|
||||
import static crazypants.util.RecipeUtil.addShaped;
|
||||
|
||||
import net.minecraft.init.Blocks;
|
||||
|
||||
@@ -600,11 +600,6 @@ public class ItemConduit extends AbstractConduit implements IItemConduit {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ConnectionMode getDefaultConnectionMode() {
|
||||
return ConnectionMode.INPUT;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<? extends IConduit> getBaseConduitType() {
|
||||
return IItemConduit.class;
|
||||
|
||||
@@ -157,11 +157,11 @@ public abstract class AbstractLiquidConduit extends AbstractConduit implements I
|
||||
boolean res;
|
||||
if (mode == RedstoneControlMode.OFF) {
|
||||
// if checking for no signal, must be no signal from both
|
||||
res = RedstoneControlMode.isConditionMet(mode, signal)
|
||||
res = mode.isConditionMet(mode, signal)
|
||||
&& (col != DyeColor.RED || isConditionMetByExternalSignal(dir, mode, col));
|
||||
} else {
|
||||
// if checking for a signal, either is fine
|
||||
res = RedstoneControlMode.isConditionMet(mode, signal)
|
||||
res = mode.isConditionMet(mode, signal)
|
||||
|| (col == DyeColor.RED && isConditionMetByExternalSignal(dir, mode, col));
|
||||
}
|
||||
return res;
|
||||
@@ -180,12 +180,7 @@ public abstract class AbstractLiquidConduit extends AbstractConduit implements I
|
||||
}
|
||||
}
|
||||
|
||||
return RedstoneControlMode.isConditionMet(mode, externalSignal);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ConnectionMode getDefaultConnectionMode() {
|
||||
return ConnectionMode.INPUT;
|
||||
return mode.isConditionMet(mode, externalSignal);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,14 +1,7 @@
|
||||
package crazypants.enderio.conduit.render;
|
||||
|
||||
import static com.enderio.core.client.render.CubeRenderer.addVecWithUV;
|
||||
import static com.enderio.core.client.render.CubeRenderer.setupVertices;
|
||||
import static com.enderio.core.client.render.CubeRenderer.verts;
|
||||
import static net.minecraftforge.common.util.ForgeDirection.DOWN;
|
||||
import static net.minecraftforge.common.util.ForgeDirection.EAST;
|
||||
import static net.minecraftforge.common.util.ForgeDirection.NORTH;
|
||||
import static net.minecraftforge.common.util.ForgeDirection.SOUTH;
|
||||
import static net.minecraftforge.common.util.ForgeDirection.UP;
|
||||
import static net.minecraftforge.common.util.ForgeDirection.WEST;
|
||||
import static com.enderio.core.client.render.CubeRenderer.*;
|
||||
import static net.minecraftforge.common.util.ForgeDirection.*;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
@@ -84,6 +84,8 @@ public final class Config {
|
||||
public static boolean reinforcedObsidianEnabled = true;
|
||||
public static boolean reinforcedObsidianUseDarkSteelBlocks = false;
|
||||
|
||||
public static boolean enforceOfflinePlayerUUID = false;
|
||||
|
||||
public static boolean useAlternateBinderRecipe = false;
|
||||
|
||||
public static boolean useAlternateTesseractModel = false;
|
||||
@@ -1035,6 +1037,13 @@ public final class Config {
|
||||
"Enable per tick sampling on individual power inputs and outputs. This allows slightly more detailed messages from the RF Reader but has a negative impact on server performance.")
|
||||
.getBoolean(detailedPowerTrackingEnabled);
|
||||
|
||||
enforceOfflinePlayerUUID = config.get(
|
||||
sectionAdvanced.name,
|
||||
"enforceOfflinePlayerUUID",
|
||||
false,
|
||||
"Enforces to use the players offline UUID. Recommendet to use before creating your world, otherwise it might breaks all secuity related things.")
|
||||
.getBoolean(enforceOfflinePlayerUUID);
|
||||
|
||||
useSneakMouseWheelYetaWrench = config.get(
|
||||
sectionPersonal.name,
|
||||
"useSneakMouseWheelYetaWrench",
|
||||
|
||||
@@ -1,11 +1,6 @@
|
||||
package crazypants.enderio.item;
|
||||
|
||||
import static crazypants.enderio.material.Alloy.CONDUCTIVE_IRON;
|
||||
import static crazypants.enderio.material.Alloy.DARK_STEEL;
|
||||
import static crazypants.enderio.material.Alloy.ELECTRICAL_STEEL;
|
||||
import static crazypants.enderio.material.Alloy.END_STEEL;
|
||||
import static crazypants.enderio.material.Alloy.ENERGETIC_ALLOY;
|
||||
import static crazypants.enderio.material.Alloy.SOULARIUM;
|
||||
import static crazypants.enderio.material.Alloy.*;
|
||||
import static crazypants.enderio.material.Material.VIBRANT_CYSTAL;
|
||||
import static crazypants.enderio.material.endergy.AlloyEndergy.STELLAR_ALLOY;
|
||||
import static crazypants.util.RecipeUtil.addShaped;
|
||||
|
||||
@@ -1,19 +1,8 @@
|
||||
package crazypants.enderio.machine;
|
||||
|
||||
import static crazypants.enderio.EnderIO.itemBasicCapacitor;
|
||||
import static crazypants.enderio.material.Alloy.DARK_STEEL;
|
||||
import static crazypants.enderio.material.Alloy.ELECTRICAL_STEEL;
|
||||
import static crazypants.enderio.material.Alloy.END_STEEL;
|
||||
import static crazypants.enderio.material.Alloy.ENERGETIC_ALLOY;
|
||||
import static crazypants.enderio.material.Alloy.PHASED_GOLD;
|
||||
import static crazypants.enderio.material.Alloy.PHASED_IRON;
|
||||
import static crazypants.enderio.material.Alloy.REDSTONE_ALLOY;
|
||||
import static crazypants.enderio.material.Alloy.SOULARIUM;
|
||||
import static crazypants.enderio.material.Material.CONDUIT_BINDER;
|
||||
import static crazypants.enderio.material.Material.ENDER_CRYSTAL;
|
||||
import static crazypants.enderio.material.Material.PULSATING_CYSTAL;
|
||||
import static crazypants.enderio.material.Material.SILICON;
|
||||
import static crazypants.enderio.material.Material.VIBRANT_CYSTAL;
|
||||
import static crazypants.enderio.material.Alloy.*;
|
||||
import static crazypants.enderio.material.Material.*;
|
||||
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
package crazypants.enderio.machine.farm;
|
||||
|
||||
import static org.lwjgl.opengl.GL11.GL_LIGHTING;
|
||||
import static org.lwjgl.opengl.GL11.glDisable;
|
||||
import static org.lwjgl.opengl.GL11.glEnable;
|
||||
import static org.lwjgl.opengl.GL11.*;
|
||||
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
@@ -1,14 +1,6 @@
|
||||
package crazypants.enderio.machine.obelisk;
|
||||
|
||||
import static org.lwjgl.opengl.GL11.GL_ALL_ATTRIB_BITS;
|
||||
import static org.lwjgl.opengl.GL11.glDepthMask;
|
||||
import static org.lwjgl.opengl.GL11.glPopAttrib;
|
||||
import static org.lwjgl.opengl.GL11.glPopMatrix;
|
||||
import static org.lwjgl.opengl.GL11.glPushAttrib;
|
||||
import static org.lwjgl.opengl.GL11.glPushMatrix;
|
||||
import static org.lwjgl.opengl.GL11.glRotatef;
|
||||
import static org.lwjgl.opengl.GL11.glScalef;
|
||||
import static org.lwjgl.opengl.GL11.glTranslated;
|
||||
import static org.lwjgl.opengl.GL11.*;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
|
||||
@@ -1,28 +1,9 @@
|
||||
package crazypants.enderio.material;
|
||||
|
||||
import static crazypants.enderio.material.Alloy.DARK_STEEL;
|
||||
import static crazypants.enderio.material.Alloy.END_STEEL;
|
||||
import static crazypants.enderio.material.Alloy.ENERGETIC_ALLOY;
|
||||
import static crazypants.enderio.material.Alloy.PHASED_GOLD;
|
||||
import static crazypants.enderio.material.Alloy.PHASED_IRON;
|
||||
import static crazypants.enderio.material.Alloy.SOULARIUM;
|
||||
import static crazypants.enderio.material.Material.BINDER_COMPOSITE;
|
||||
import static crazypants.enderio.material.Material.CONDUIT_BINDER;
|
||||
import static crazypants.enderio.material.Material.PRECIENT_CRYSTAL;
|
||||
import static crazypants.enderio.material.endergy.AlloyEndergy.CRYSTALLINE_ALLOY;
|
||||
import static crazypants.enderio.material.endergy.AlloyEndergy.ENERGETIC_SILVER;
|
||||
import static crazypants.enderio.material.endergy.AlloyEndergy.MELODIC_ALLOY;
|
||||
import static crazypants.enderio.material.endergy.AlloyEndergy.STELLAR_ALLOY;
|
||||
import static crazypants.enderio.material.endergy.AlloyEndergy.VIVID_ALLOY;
|
||||
import static crazypants.enderio.power.Capacitors.ACTIVATED_CAPACITOR;
|
||||
import static crazypants.enderio.power.Capacitors.BASIC_CAPACITOR;
|
||||
import static crazypants.enderio.power.Capacitors.CRYSTALLINE_CAPACITOR;
|
||||
import static crazypants.enderio.power.Capacitors.ENDERGETIC_CAPACITOR;
|
||||
import static crazypants.enderio.power.Capacitors.ENDERGISED_CAPACITOR;
|
||||
import static crazypants.enderio.power.Capacitors.ENDER_CAPACITOR;
|
||||
import static crazypants.enderio.power.Capacitors.MELODIC_CAPACITOR;
|
||||
import static crazypants.enderio.power.Capacitors.SILVER_CAPACITOR;
|
||||
import static crazypants.enderio.power.Capacitors.STELLAR_CAPACITOR;
|
||||
import static crazypants.enderio.material.Alloy.*;
|
||||
import static crazypants.enderio.material.Material.*;
|
||||
import static crazypants.enderio.material.endergy.AlloyEndergy.*;
|
||||
import static crazypants.enderio.power.Capacitors.*;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
package crazypants.enderio.material;
|
||||
|
||||
import static com.enderio.core.common.util.OreDictionaryHelper.DUST_ENDERPEARL;
|
||||
import static com.enderio.core.common.util.OreDictionaryHelper.INGOT_COPPER;
|
||||
import static com.enderio.core.common.util.OreDictionaryHelper.INGOT_ENDERIUM;
|
||||
import static com.enderio.core.common.util.OreDictionaryHelper.INGOT_TIN;
|
||||
import static com.enderio.core.common.util.OreDictionaryHelper.isRegistered;
|
||||
import static com.enderio.core.common.util.OreDictionaryHelper.*;
|
||||
|
||||
public enum PowderIngot {
|
||||
|
||||
|
||||
@@ -1,23 +1,6 @@
|
||||
package crazypants.enderio.teleport.telepad;
|
||||
|
||||
import static org.lwjgl.opengl.GL11.GL_ALL_ATTRIB_BITS;
|
||||
import static org.lwjgl.opengl.GL11.GL_ALPHA_TEST;
|
||||
import static org.lwjgl.opengl.GL11.GL_BLEND;
|
||||
import static org.lwjgl.opengl.GL11.GL_CULL_FACE;
|
||||
import static org.lwjgl.opengl.GL11.GL_LIGHTING;
|
||||
import static org.lwjgl.opengl.GL11.GL_ONE;
|
||||
import static org.lwjgl.opengl.GL11.GL_SMOOTH;
|
||||
import static org.lwjgl.opengl.GL11.GL_SRC_ALPHA;
|
||||
import static org.lwjgl.opengl.GL11.GL_TEXTURE_2D;
|
||||
import static org.lwjgl.opengl.GL11.GL_ZERO;
|
||||
import static org.lwjgl.opengl.GL11.glDepthMask;
|
||||
import static org.lwjgl.opengl.GL11.glDisable;
|
||||
import static org.lwjgl.opengl.GL11.glEnable;
|
||||
import static org.lwjgl.opengl.GL11.glPushAttrib;
|
||||
import static org.lwjgl.opengl.GL11.glPushMatrix;
|
||||
import static org.lwjgl.opengl.GL11.glRotatef;
|
||||
import static org.lwjgl.opengl.GL11.glShadeModel;
|
||||
import static org.lwjgl.opengl.GL11.glTranslated;
|
||||
import static org.lwjgl.opengl.GL11.*;
|
||||
|
||||
import net.minecraft.client.renderer.OpenGlHelper;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
package crazypants.enderio.waila;
|
||||
|
||||
import static crazypants.enderio.waila.IWailaInfoProvider.BIT_BASIC;
|
||||
import static crazypants.enderio.waila.IWailaInfoProvider.BIT_COMMON;
|
||||
import static crazypants.enderio.waila.IWailaInfoProvider.BIT_DETAILED;
|
||||
import static crazypants.enderio.waila.IWailaInfoProvider.*;
|
||||
|
||||
import java.text.MessageFormat;
|
||||
import java.util.List;
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
package crazypants.util;
|
||||
|
||||
import static crazypants.enderio.material.Material.BINDER_COMPOSITE;
|
||||
import static crazypants.enderio.material.Material.CONDUIT_BINDER;
|
||||
import static crazypants.enderio.material.Material.PHASED_IRON_NUGGET;
|
||||
import static crazypants.enderio.material.Material.SILICON;
|
||||
import static crazypants.enderio.material.Material.*;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
|
||||
@@ -6,6 +6,7 @@ import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraftforge.common.UsernameCache;
|
||||
|
||||
import com.enderio.core.common.util.PlayerUtil;
|
||||
@@ -13,6 +14,7 @@ import com.google.common.base.Charsets;
|
||||
import com.mojang.authlib.GameProfile;
|
||||
|
||||
import crazypants.enderio.Log;
|
||||
import crazypants.enderio.config.Config;
|
||||
|
||||
public class UserIdent {
|
||||
|
||||
@@ -76,7 +78,7 @@ public class UserIdent {
|
||||
* changes, implement them and write a log message.
|
||||
*/
|
||||
public static @Nonnull UserIdent create(@Nonnull String suuid, @Nullable String playerName) {
|
||||
if (NONE_MARKER.equals(suuid)) {
|
||||
if (NONE_MARKER.equals(suuid) || Config.enforceOfflinePlayerUUID) {
|
||||
return new UserIdent(null, playerName);
|
||||
}
|
||||
try {
|
||||
@@ -110,8 +112,7 @@ public class UserIdent {
|
||||
*/
|
||||
public static @Nonnull UserIdent create(@Nullable GameProfile gameProfile) {
|
||||
if (gameProfile != null && (gameProfile.getId() != null || gameProfile.getName() != null)) {
|
||||
if (gameProfile.getId() != null && gameProfile.getName() != null
|
||||
&& gameProfile.getId().equals(offlineUUID(gameProfile.getName()))) {
|
||||
if (gameProfile.getName() != null && (Config.enforceOfflinePlayerUUID || !isOnlineMode())) {
|
||||
return new UserIdent(null, gameProfile.getName());
|
||||
} else {
|
||||
return new UserIdent(gameProfile.getId(), gameProfile.getName());
|
||||
@@ -121,6 +122,11 @@ public class UserIdent {
|
||||
}
|
||||
}
|
||||
|
||||
private static boolean isOnlineMode() {
|
||||
MinecraftServer server = MinecraftServer.getServer();
|
||||
return server != null ? server.isServerInOnlineMode() : true;
|
||||
}
|
||||
|
||||
private static @Nonnull UUID offlineUUID(String playerName) {
|
||||
UUID result = UUID.nameUUIDFromBytes(("OfflinePlayer:" + playerName).getBytes(Charsets.UTF_8));
|
||||
return result != null ? result : new UUID(-1, -1);
|
||||
@@ -221,6 +227,9 @@ public class UserIdent {
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (obj instanceof UUID) {
|
||||
return getUUID().equals(obj);
|
||||
}
|
||||
return this == obj;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user