Skip to content

Commit

Permalink
Merge branch 'master' into me-output-waila-info
Browse files Browse the repository at this point in the history
  • Loading branch information
Dream-Master authored Nov 9, 2024
2 parents 13b8e6c + e45f9d8 commit 8cad39f
Show file tree
Hide file tree
Showing 25 changed files with 168 additions and 173 deletions.
4 changes: 2 additions & 2 deletions dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
* For more details, see https://docs.gradle.org/8.0.1/userguide/java_library_plugin.html#sec:java_library_configurations_graph
*/
dependencies {
api("com.github.GTNewHorizons:StructureLib:1.3.4:dev")
api("com.github.GTNewHorizons:StructureLib:1.3.5:dev")
api("net.industrial-craft:industrialcraft-2:2.2.828-experimental:dev")
api("com.github.GTNewHorizons:NotEnoughItems:2.6.44-GTNH:dev")
api("com.github.GTNewHorizons:NotEnoughIds:2.1.6:dev")
Expand Down Expand Up @@ -70,7 +70,7 @@ dependencies {
compileOnly("com.github.GTNewHorizons:ThaumicBases:1.7.6:dev") { transitive = false }
compileOnly("com.github.GTNewHorizons:EnderCore:0.4.6:dev") { transitive = false }
compileOnly('com.github.GTNewHorizons:VisualProspecting:1.3.28:dev') { transitive = false }
compileOnly("com.github.GTNewHorizons:Galaxy-Space-GTNH:1.1.95-GTNH:dev") { transitive = false }
compileOnly("com.github.GTNewHorizons:Galaxy-Space-GTNH:1.1.96-GTNH:dev") { transitive = false }

compileOnlyApi("com.github.GTNewHorizons:Galacticraft:3.2.5-GTNH:dev") { transitive = false }
implementation("com.github.GTNewHorizons:TinkersConstruct:1.12.12-GTNH:dev")
Expand Down
5 changes: 4 additions & 1 deletion src/main/java/gregtech/api/enums/OrePrefixes.java
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,10 @@ public enum OrePrefixes {
blockCasingAdvanced("An Advanced Casing block for a Multiblock-Machine", "Rebolted ", " Casing", true, true, true,
true, false, true, false, true, false, false, 0, M * 9, 64, -1),
capsuleMolten("Capsule of Molten stuff", "Molten ", " Capsule", true, true, true, true, false, false, false, true,
false, false, 0, M * 1, 64, -1);
false, false, 0, M * 1, 64, -1),
// subatomic particles
particle("A Subatomic Particle", "", "", false, false, true, false, false, false, false, false, false, false, 0, -1,
64, -1);

public static final ImmutableList<OrePrefixes> CELL_TYPES = ImmutableList.of(
cell,
Expand Down
5 changes: 3 additions & 2 deletions src/main/java/gregtech/api/enums/Textures.java
Original file line number Diff line number Diff line change
Expand Up @@ -997,11 +997,12 @@ public enum BlockIcons implements IIconContainer, Runnable {
LARGETURBINE_TU_ACTIVE8,
LARGETURBINE_TU_ACTIVE9,

MACHINE_CASING_TURBINE,
MACHINE_CASING_TURBINE_HSSS,
MACHINE_CASING_TURBINE_STAINLESSSTEEL,
MACHINE_CASING_TURBINE_STEEL,
MACHINE_CASING_TURBINE_TITANIUM,
MACHINE_CASING_TURBINE_TUNGSTENSTEEL,
MACHINE_CASING_ADVANCEDGAS,

BLOCK_ADAMANTIUM,
BLOCK_ALUMINIUM,
BLOCK_AMERICIUM,
Expand Down
13 changes: 13 additions & 0 deletions src/main/java/gregtech/api/net/GTPacketInfiniteSpraycan.java
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,19 @@ boolean execute(final BehaviourSprayColorInfinite behavior, final ItemStack item
}
return false;
}
},
TOGGLE_SHAKE_LOCK {

@Override
boolean execute(final BehaviourSprayColorInfinite behavior, final ItemStack itemStack,
final EntityPlayerMP player, final int newColor) {
if (behavior.togglePreventShake(itemStack)) {
Action.playLockSound(player);
} else {
Action.playUnlockSound(player);
}
return true;
}
};

private static void playShakeSound(final EntityPlayerMP player) {
Expand Down
2 changes: 0 additions & 2 deletions src/main/java/gregtech/api/util/GTLog.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,9 @@ public class GTLog {
public static PrintStream out = System.out;
public static PrintStream err = System.err;
public static PrintStream ore = new LogBuffer();
public static PrintStream pal = null;
public static PrintStream exp = new LogBuffer();
public static File mLogFile;
public static File mOreDictLogFile;
public static File mPlayerActivityLogFile;
public static File mExplosionLog;

public static class LogBuffer extends PrintStream {
Expand Down
34 changes: 0 additions & 34 deletions src/main/java/gregtech/common/GTPlayerActivityLogger.java

This file was deleted.

59 changes: 0 additions & 59 deletions src/main/java/gregtech/common/GTProxy.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,9 @@
import static net.minecraftforge.fluids.FluidRegistry.getFluidStack;

import java.io.File;
import java.text.DateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Date;
import java.util.EnumSet;
import java.util.HashMap;
import java.util.HashSet;
Expand All @@ -49,10 +47,8 @@
import java.util.Locale;
import java.util.Map;
import java.util.UUID;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.locks.ReentrantLock;
import java.util.stream.Collectors;

Expand Down Expand Up @@ -535,8 +531,6 @@ public abstract class GTProxy implements IGTMod, IFuelHandler {
"infusedteslatiteInsulated",
"redalloyInsulated",
"infusedteslatiteBundled"));
private final DateFormat mDateFormat = DateFormat.getInstance();
public final BlockingQueue<String> mBufferedPlayerActivity = new LinkedBlockingQueue<>();
public final GTBlockMap<Boolean> mCTMBlockCache = new GTBlockMap<>();
public boolean mDisableVanillaOres = true;
public boolean mAllowSmallBoilerAutomation = false;
Expand Down Expand Up @@ -1226,13 +1220,6 @@ public void onLoad() {

public void onPostLoad() {
GTLog.out.println("GTMod: Beginning PostLoad-Phase.");
GTLog.ore.println("GTMod: Beginning PostLoad-Phase.");
if (GTLog.pal != null) {
final Thread playerActivityLogger = new Thread(new GTPlayerActivityLogger());
playerActivityLogger.setDaemon(true);
playerActivityLogger.setName("GT5U Player activity logger");
playerActivityLogger.start();
}
GregTechAPI.sPostloadStarted = true;

// This needs to happen late enough that all of the fluids we need have been registered.
Expand Down Expand Up @@ -1531,39 +1518,13 @@ public void onOreGenEvent(OreGenEvent.GenerateMinable aGenerator) {
}
}

private String getDataAndTime() {
return this.mDateFormat.format(new Date());
}

@SubscribeEvent
public void onPlayerInteraction(PlayerInteractEvent aEvent) {
if ((aEvent.entityPlayer == null) || (aEvent.entityPlayer.worldObj == null)
|| (aEvent.action == null)
|| (aEvent.world.provider == null)) {
return;
}
if ((!aEvent.entityPlayer.worldObj.isRemote) && (aEvent.action != PlayerInteractEvent.Action.RIGHT_CLICK_AIR)
&& (GTLog.pal != null)) {
this.mBufferedPlayerActivity.offer(
getDataAndTime() + ";"
+ aEvent.action.name()
+ ";"
+ aEvent.entityPlayer.getDisplayName()
+ ";DIM:"
+ aEvent.world.provider.dimensionId
+ ";"
+ aEvent.x
+ ";"
+ aEvent.y
+ ";"
+ aEvent.z
+ ";|;"
+ aEvent.x / 10
+ ";"
+ aEvent.y / 10
+ ";"
+ aEvent.z / 10);
}
ItemStack aStack = aEvent.entityPlayer.getCurrentEquippedItem();
if ((aStack != null) && (aEvent.action == PlayerInteractEvent.Action.RIGHT_CLICK_BLOCK)
&& (aStack.getItem() == Items.flint_and_steel)) {
Expand Down Expand Up @@ -1603,26 +1564,6 @@ public void onBlockBreakingEvent(BlockEvent.BreakEvent event) {
public void onBlockHarvestingEvent(BlockEvent.HarvestDropsEvent aEvent) {
if (aEvent.harvester == null) return;

if ((!aEvent.world.isRemote) && (GTLog.pal != null)) {
this.mBufferedPlayerActivity.offer(
getDataAndTime() + ";HARVEST_BLOCK;"
+ aEvent.harvester.getDisplayName()
+ ";DIM:"
+ aEvent.world.provider.dimensionId
+ ";"
+ aEvent.x
+ ";"
+ aEvent.y
+ ";"
+ aEvent.z
+ ";|;"
+ aEvent.x / 10
+ ";"
+ aEvent.y / 10
+ ";"
+ aEvent.z / 10);
}

ItemStack aStack = aEvent.harvester.getCurrentEquippedItem();
if (aStack == null) return;

Expand Down
12 changes: 7 additions & 5 deletions src/main/java/gregtech/common/blocks/BlockCasings4.java
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public IIcon getIcon(int ordinalSide, int aMeta) {
case 6 -> Textures.BlockIcons.MACHINE_CASING_FUSION.getIcon();
case 7 -> Textures.BlockIcons.MACHINE_CASING_FUSION_COIL.getIcon();
case 8 -> Textures.BlockIcons.MACHINE_CASING_FUSION_2.getIcon();
case 9 -> Textures.BlockIcons.MACHINE_CASING_TURBINE.getIcon();
case 9 -> Textures.BlockIcons.MACHINE_CASING_TURBINE_STEEL.getIcon();
case 10 -> Textures.BlockIcons.MACHINE_CASING_TURBINE_STAINLESSSTEEL.getIcon();
case 11 -> Textures.BlockIcons.MACHINE_CASING_TURBINE_TITANIUM.getIcon();
case 12 -> Textures.BlockIcons.MACHINE_CASING_TURBINE_TUNGSTENSTEEL.getIcon();
Expand All @@ -118,6 +118,9 @@ public IIcon getIcon(int ordinalSide, int aMeta) {
@Deprecated
public IIcon getTurbineCasing(int meta, int iconIndex, boolean active, boolean hasTurbine) {
return switch (meta) {
case 9 -> active ? Textures.BlockIcons.TURBINE_ACTIVE[iconIndex].getIcon()
: hasTurbine ? Textures.BlockIcons.TURBINE[iconIndex].getIcon()
: Textures.BlockIcons.TURBINE_EMPTY[iconIndex].getIcon();
case 10 -> active ? Textures.BlockIcons.TURBINE_ACTIVE1[iconIndex].getIcon()
: hasTurbine ? Textures.BlockIcons.TURBINE1[iconIndex].getIcon()
: Textures.BlockIcons.TURBINE_EMPTY1[iconIndex].getIcon();
Expand All @@ -127,9 +130,7 @@ public IIcon getTurbineCasing(int meta, int iconIndex, boolean active, boolean h
case 12 -> active ? Textures.BlockIcons.TURBINE_ACTIVE3[iconIndex].getIcon()
: hasTurbine ? Textures.BlockIcons.TURBINE3[iconIndex].getIcon()
: Textures.BlockIcons.TURBINE_EMPTY3[iconIndex].getIcon();
default -> active ? Textures.BlockIcons.TURBINE_ACTIVE[iconIndex].getIcon()
: hasTurbine ? Textures.BlockIcons.TURBINE[iconIndex].getIcon()
: Textures.BlockIcons.TURBINE_EMPTY[iconIndex].getIcon();
default -> throw new IllegalStateException("Unexpected value: " + meta);
};
}

Expand Down Expand Up @@ -216,10 +217,11 @@ public IIcon getIcon(IBlockAccess aWorld, int xCoord, int yCoord, int zCoord, in
}
}
return switch (tMeta) {
case 9 -> Textures.BlockIcons.MACHINE_CASING_TURBINE_STEEL.getIcon();
case 10 -> Textures.BlockIcons.MACHINE_CASING_TURBINE_STAINLESSSTEEL.getIcon();
case 11 -> Textures.BlockIcons.MACHINE_CASING_TURBINE_TITANIUM.getIcon();
case 12 -> Textures.BlockIcons.MACHINE_CASING_TURBINE_TUNGSTENSTEEL.getIcon();
default -> Textures.BlockIcons.MACHINE_CASING_SOLID_STEEL.getIcon();
default -> throw new IllegalStateException("Unexpected value: " + tMeta);
};
}
int tStartIndex = tMeta == 6 ? 1 : 13;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/gregtech/common/blocks/BlockCasings8.java
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public IIcon getIcon(int ordinalSide, int aMeta) {
case 6 -> Textures.BlockIcons.MACHINE_CASING_RHODIUM_PALLADIUM.getIcon();
case 7 -> Textures.BlockIcons.MACHINE_CASING_IRIDIUM.getIcon();
case 8 -> Textures.BlockIcons.MACHINE_CASING_MAGICAL.getIcon();
case 9 -> Textures.BlockIcons.MACHINE_CASING_ADVANCEDGAS.getIcon();
case 9 -> Textures.BlockIcons.MACHINE_CASING_TURBINE_HSSS.getIcon();
case 10 -> Textures.BlockIcons.MACHINE_CASING_RADIANT_NAQUADAH_ALLOY.getIcon();
case 11 -> Textures.BlockIcons.MACHINE_CASING_PCB_TIER_1.getIcon();
case 12 -> Textures.BlockIcons.MACHINE_CASING_PCB_TIER_2.getIcon();
Expand Down Expand Up @@ -183,6 +183,6 @@ public IIcon getIcon(IBlockAccess aWorld, int xCoord, int yCoord, int zCoord, in
}
}

return Textures.BlockIcons.MACHINE_CASING_ADVANCEDGAS.getIcon();
return Textures.BlockIcons.MACHINE_CASING_TURBINE_HSSS.getIcon();
}
}
7 changes: 1 addition & 6 deletions src/main/java/gregtech/common/config/Gregtech.java
Original file line number Diff line number Diff line change
Expand Up @@ -368,15 +368,10 @@ public static class General {
@Config.RequiresMcRestart
public boolean loggingOreDict;

@Config.Comment("if true, logs all the oredict in logs/Explosion.log.")
@Config.Comment("if true, logs all the explosions in logs/Explosion.log.")
@Config.DefaultBoolean(true)
@Config.RequiresMcRestart
public boolean loggingExplosions;

@Config.Comment("if true, log all the oredict in logs/PlayerActivity.log.")
@Config.DefaultBoolean(true)
@Config.RequiresMcRestart
public boolean loggingPlayerActicity;
}

@Config.LangKey("GT5U.gui.config.gregtech.harvest_level")
Expand Down
Loading

0 comments on commit 8cad39f

Please sign in to comment.