Compare commits

..
19 Commits
Author SHA1 Message Date
Pilzinsel64 ec694d2833 revert improvements from b284f46 2023-10-15 13:59:23 +02:00
Pascal e878c8e276 Merge branch 'GTNewHorizons:master' into master 2023-10-15 13:54:42 +02:00
Alexdoru 1af6fcae0b set fluid conduit default to output only 2023-10-15 13:34:45 +02:00
Alexdoru f44111da96 revert changes to conduit default connection modes 2023-10-15 13:34:45 +02:00
Pilzinsel64 b284f46d45 revert/improve commit 538d87e 2023-10-08 17:20:07 +02:00
Pilzinsel64 a4dc958482 Merge branch 'GTNewHorizons:master' into master 2023-10-08 16:20:11 +02:00
Dream-MasterXXL 4ae9ff2d77 update bs+deps 2023-10-05 00:42:17 +02:00
Pilzinsel64 6a762101ad Merge branch 'GTNewHorizons:master' into master 2023-10-01 13:51:50 +02:00
Pilzinsel64 9eb040ee6f Merge branch 'GTNewHorizons:master' into master 2023-09-28 12:12:04 +02:00
Pilzinsel64 3ef15ad081 Merge branch 'GTNewHorizons:master' into master 2023-07-24 09:58:04 +02:00
Pilzinsel64 1d92c0dd7f Merge branch 'GTNewHorizons:master' into master 2023-05-09 20:21:53 +02:00
Pilzinsel64 13d6533edc Merge branch 'GTNewHorizons:master' into master 2023-05-08 18:14:50 +02:00
Pilzinsel64 a4373ebe5c Merge branch 'GTNewHorizons:master' into master 2023-05-08 08:05:01 +02:00
Pilzinsel64 f91de79376 Merge branch 'GTNewHorizons:master' into master 2023-05-01 23:14:59 +02:00
Pilzinsel64 567cd3e78b Merge branch 'GTNewHorizons:master' into master 2023-04-30 20:08:08 +02:00
Pilzinsel64 84e23b3e8e add config enforceOfflinePlayerUUID 2023-04-17 17:20:15 +02:00
Pilzinsel64 eba2bf1f86 re-add .github 2023-04-17 14:03:56 +02:00
Pilzinsel64 47bd83e29e remove .github 2023-04-17 14:03:43 +02:00
Pilzinsel64 f7b49fccdd Fix invalid check for offline UUID in UserIdent.create() (#2)
See more: https://github.com/GTNewHorizons/EnderIO/pull/118
2023-04-17 13:34:53 +02:00
7 changed files with 38 additions and 10 deletions

No files matched your search

+2 -2
View File
@@ -1,4 +1,4 @@
//version: 1695474595
//version: 1696265388
/*
DO NOT CHANGE THIS FILE!
Also, you may replace this file at any time if there is an update available.
@@ -798,7 +798,7 @@ dependencies {
java17Dependencies("com.github.GTNewHorizons:lwjgl3ify:${lwjgl3ifyVersion}")
}
if (modId != 'hodgepodge') {
java17Dependencies('com.github.GTNewHorizons:Hodgepodge:2.3.5')
java17Dependencies('com.github.GTNewHorizons:Hodgepodge:2.3.7')
}
java17PatchDependencies("com.github.GTNewHorizons:lwjgl3ify:${lwjgl3ifyVersion}:forgePatches") {transitive = false}
+1 -1
View File
@@ -12,7 +12,7 @@ dependencies {
compileOnly('com.github.GTNewHorizons:waila:1.6.0: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.29:dev') {transitive = false}
compileOnly('com.github.GTNewHorizons:GT5-Unofficial:5.09.44.30:dev') {transitive = false}
compileOnly('com.github.GTNewHorizons:Railcraft:9.15.0: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}
@@ -153,7 +153,7 @@ public abstract class AbstractConduit implements IConduit {
}
protected ConnectionMode getDefaultConnectionMode() {
return ConnectionMode.INPUT;
return ConnectionMode.IN_OUT;
}
@Override
@@ -600,6 +600,11 @@ 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 = mode.isConditionMet(mode, signal)
res = RedstoneControlMode.isConditionMet(mode, signal)
&& (col != DyeColor.RED || isConditionMetByExternalSignal(dir, mode, col));
} else {
// if checking for a signal, either is fine
res = mode.isConditionMet(mode, signal)
res = RedstoneControlMode.isConditionMet(mode, signal)
|| (col == DyeColor.RED && isConditionMetByExternalSignal(dir, mode, col));
}
return res;
@@ -180,7 +180,12 @@ public abstract class AbstractLiquidConduit extends AbstractConduit implements I
}
}
return mode.isConditionMet(mode, externalSignal);
return RedstoneControlMode.isConditionMet(mode, externalSignal);
}
@Override
protected ConnectionMode getDefaultConnectionMode() {
return ConnectionMode.INPUT;
}
@Override
@@ -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",
+12 -3
View File
@@ -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;
}