Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase elevator pulley view distance to 512 #7854

Closed
wants to merge 1 commit into from

Conversation

KCreate
Copy link

@KCreate KCreate commented Mar 8, 2025

This change ensures that elevator pulley cables are still visible even if the elevator contraption drops below 128 blocks from the elevator pulley block.

Please tell me if this won't have the effect I'm expecting it to have.

Feedback is greatly appreciated!

@VoidLeech
Copy link
Collaborator

VoidLeech commented Mar 8, 2025

The latest (edit: earliest lol) supported version is 1.20.1

This change ensures that elevator pulley cables are still visible even if the elevator contraption drops below 128 blocks from the elevator pulley block.
@KCreate
Copy link
Author

KCreate commented Mar 8, 2025

Done

@KCreate KCreate changed the base branch from mc1.18/dev to mc1.20.1/dev March 8, 2025 23:00
@VoidLeech VoidLeech added area: rendering Issue or PR is related to rendering pr type: fix PR fixes a bug pr flag: simple PR has minimal changes labels Mar 8, 2025
@VoidLeech
Copy link
Collaborator

Related: #4836

@IThundxr
Copy link
Member

Thanks, I've implemented a alternative fix for this that changes based on the user's config

@IThundxr IThundxr closed this Mar 12, 2025
@KCreate
Copy link
Author

KCreate commented Mar 12, 2025

Cool! Where can I find those changes? I'm curious how you implemented that.

@IThundxr
Copy link
Member

Cool! Where can I find those changes? I'm curious how you implemented that.

Subject: [PATCH] Patched up

- Bump rope pulley view distance
---
Index: src/main/java/com/simibubi/create/content/contraptions/pulley/AbstractPulleyRenderer.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/src/main/java/com/simibubi/create/content/contraptions/pulley/AbstractPulleyRenderer.java b/src/main/java/com/simibubi/create/content/contraptions/pulley/AbstractPulleyRenderer.java
--- a/src/main/java/com/simibubi/create/content/contraptions/pulley/AbstractPulleyRenderer.java	(revision b180f9acd068a225de7f6e8c9bb17420e8257a7e)
+++ b/src/main/java/com/simibubi/create/content/contraptions/pulley/AbstractPulleyRenderer.java	(date 1741658225800)
@@ -5,6 +5,8 @@
 import com.simibubi.create.content.kinetics.base.KineticBlockEntity;
 import com.simibubi.create.content.kinetics.base.KineticBlockEntityRenderer;
 
+import com.simibubi.create.infrastructure.config.AllConfigs;
+
 import dev.engine_room.flywheel.api.visualization.VisualizationManager;
 import dev.engine_room.flywheel.lib.model.baked.PartialModel;
 import net.createmod.catnip.render.CachedBuffers;
@@ -90,7 +92,7 @@
 	protected abstract Axis getShaftAxis(T be);
 
 	protected abstract PartialModel getCoil();
-	
+
 	protected abstract SpriteShiftEntry getCoilShift();
 
 	protected abstract SuperByteBuffer renderRope(T be);
@@ -126,7 +128,7 @@
 
 	@Override
 	public int getViewDistance() {
-		return 256;
+		return AllConfigs.server().kinetics.maxRopeLength.get();
 	}
 
 }
Index: src/main/java/com/simibubi/create/content/contraptions/pulley/PulleyRenderer.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/src/main/java/com/simibubi/create/content/contraptions/pulley/PulleyRenderer.java b/src/main/java/com/simibubi/create/content/contraptions/pulley/PulleyRenderer.java
--- a/src/main/java/com/simibubi/create/content/contraptions/pulley/PulleyRenderer.java	(revision b180f9acd068a225de7f6e8c9bb17420e8257a7e)
+++ b/src/main/java/com/simibubi/create/content/contraptions/pulley/PulleyRenderer.java	(date 1741658225793)
@@ -58,7 +58,7 @@
 	protected SpriteShiftEntry getCoilShift() {
 		return AllSpriteShifts.ROPE_PULLEY_COIL;
 	}
-	
+
 	public static float getBlockEntityOffset(float partialTicks, PulleyBlockEntity blockEntity) {
 		float offset = blockEntity.getInterpolatedOffset(partialTicks);
 
@@ -72,9 +72,4 @@
 		return offset;
 	}
 
-	@Override
-	public int getViewDistance() {
-		return 128;
-	}
-
 }
Index: src/main/java/com/simibubi/create/content/contraptions/elevator/ElevatorPulleyRenderer.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/src/main/java/com/simibubi/create/content/contraptions/elevator/ElevatorPulleyRenderer.java b/src/main/java/com/simibubi/create/content/contraptions/elevator/ElevatorPulleyRenderer.java
--- a/src/main/java/com/simibubi/create/content/contraptions/elevator/ElevatorPulleyRenderer.java	(revision b180f9acd068a225de7f6e8c9bb17420e8257a7e)
+++ b/src/main/java/com/simibubi/create/content/contraptions/elevator/ElevatorPulleyRenderer.java	(date 1741658225776)
@@ -103,11 +103,6 @@
 			blockState.getValue(ElevatorPulleyBlock.HORIZONTAL_FACING));
 	}
 
-	@Override
-	public int getViewDistance() {
-		return 128;
-	}
-
 	@Override
 	public boolean shouldRenderOffScreen(ElevatorPulleyBlockEntity p_188185_1_) {
 		return true;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: rendering Issue or PR is related to rendering pr flag: simple PR has minimal changes pr type: fix PR fixes a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants