Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
Dream-Master authored Dec 21, 2024
2 parents 96bb69b + a57bc82 commit 9cd628a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 32 deletions.
8 changes: 4 additions & 4 deletions dependencies.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
dependencies {
api('com.github.GTNewHorizons:GT5-Unofficial:5.09.51.00:dev')
api('com.github.GTNewHorizons:Galaxy-Space-GTNH:1.1.97-GTNH:dev')
api('com.github.GTNewHorizons:GTNHLib:0.5.21:dev')
api('com.github.GTNewHorizons:GT5-Unofficial:5.09.51.11:dev')
api('com.github.GTNewHorizons:Galaxy-Space-GTNH:1.1.100-GTNH:dev')
api('com.github.GTNewHorizons:GTNHLib:0.5.22:dev')
compileOnly('com.github.GTNewHorizons:BlockRenderer6343:1.2.16:dev') {transitive = false}
compileOnly("com.github.GTNewHorizons:Hodgepodge:2.5.82:dev") {transitive = false}
compileOnly("com.github.GTNewHorizons:Hodgepodge:2.6.2:dev") {transitive = false}
}
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.StatCollector;
import net.minecraft.world.ChunkCoordIntPair;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;

Expand Down Expand Up @@ -62,7 +61,6 @@
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.objects.GTChunkManager;
import gregtech.api.recipe.check.CheckRecipeResult;
import gregtech.api.recipe.check.CheckRecipeResultRegistry;
import gregtech.api.util.GTStructureUtility;
Expand Down Expand Up @@ -95,9 +93,6 @@ public class TileEntitySpaceElevator extends GT_MetaTileEntity_EnhancedMultiBloc
/** Motor tier of the Space Elevator */
protected int motorTier = 0;

/** Flag if the chunks of the machine are loaded by it */
private boolean isLoadedChunk;

/** Flag if the extension for more modules is enabled */
private boolean isExtensionEnabled = false;

Expand Down Expand Up @@ -601,33 +596,15 @@ public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
if (aTick == 1) {
SpaceProjectManager.checkOrCreateTeam(aBaseMetaTileEntity.getOwnerUuid());
}
if (!aBaseMetaTileEntity.isAllowedToWork()) {
// if machine has stopped, stop chunkloading
GTChunkManager.releaseTicket((TileEntity) aBaseMetaTileEntity);
isLoadedChunk = false;
} else if (!isLoadedChunk) {
// load a 3x3 area when machine is running
GTChunkManager.releaseTicket((TileEntity) aBaseMetaTileEntity);
int offX = aBaseMetaTileEntity.getFrontFacing().offsetX;
int offZ = aBaseMetaTileEntity.getFrontFacing().offsetZ;
for (int i = -1; i < 2; i++) {
for (int j = -1; j < 2; j++) {
GTChunkManager.requestChunkLoad(
(TileEntity) aBaseMetaTileEntity,
new ChunkCoordIntPair(getChunkX() + offX + i, getChunkZ() + offZ + j));
}
}
this.isLoadedChunk = true;
} else {

if (aBaseMetaTileEntity.isAllowedToWork()) {
if (elevatorCable != null && IGConfig.spaceElevator.isCableRenderingEnabled
&& elevatorCable.getAnimation() == TileEntitySpaceElevatorCable.ClimberAnimation.NO_ANIMATION
&& aTick % 2000 == 0) {
elevatorCable.startAnimation(TileEntitySpaceElevatorCable.ClimberAnimation.DELIVER_ANIMATION);
}
}

// Charge project modules
if (getBaseMetaTileEntity().isAllowedToWork()) {
// Charge project modules
if (aTick % MODULE_CHARGE_INTERVAL == 0) {
if (mProjectModuleHatches.size() > 0) {
long tEnergy = getEUVar() / mProjectModuleHatches.size() * MODULE_CHARGE_INTERVAL;
Expand Down Expand Up @@ -796,7 +773,7 @@ public void addGregTechLogo(ModularWindow.Builder builder) {
*/
@Override
protected void drawTexts(DynamicPositionedColumn screenElements, SlotWidget inventorySlot) {
screenElements.setSynced(false).setSpace(0).setPos(10, 7);
screenElements.setSynced(false).setSpace(0);

screenElements
.widget(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ public void addGregTechLogo(ModularWindow.Builder builder) {
*/
@Override
protected void drawTexts(DynamicPositionedColumn screenElements, SlotWidget inventorySlot) {
screenElements.setSynced(false).setSpace(0).setPos(10, 7);
screenElements.setSynced(false).setSpace(0);

screenElements
.widget(
Expand Down

0 comments on commit 9cd628a

Please sign in to comment.