Render Block Entities from further away
This commit is contained in:
11
README.md
11
README.md
@ -49,12 +49,21 @@ As a challenge I'm trying to make it as user-friendly as possible.
|
||||
- Toggleable
|
||||
- Keybinding for /camera
|
||||
|
||||
# Currently working on
|
||||
|
||||
## Client Side
|
||||
|
||||
- [x] Render block entities from a longer range
|
||||
- [x] Toggleable via GUI
|
||||
- [x] Configurable value
|
||||
- [ ] In GUI
|
||||
|
||||
# To-do
|
||||
|
||||
## General
|
||||
- Rework config system
|
||||
- Store server settings in world folder for better singleplayer use
|
||||
- Rework Mod Menu integration to be more flexible
|
||||
- Rework Mod Menu integration to be more flexible
|
||||
|
||||
## Server Side
|
||||
- Telekinesis
|
||||
|
@ -11,4 +11,6 @@ public class ClientConfig {
|
||||
public boolean renderSnowFog = false;
|
||||
public boolean removeDarknessEffect = true;
|
||||
public boolean lockTeleportHeadMovement = true;
|
||||
public boolean alwaysRenderBlockEntities = true;
|
||||
public int renderBlockEntitiesRange = 512;
|
||||
}
|
||||
|
@ -0,0 +1,22 @@
|
||||
package wtf.hak.survivalfabric.mixin.client;
|
||||
|
||||
import net.minecraft.block.entity.BlockEntity;
|
||||
import net.minecraft.client.render.Camera;
|
||||
import net.minecraft.client.render.block.entity.BlockEntityRenderDispatcher;
|
||||
import net.minecraft.client.render.block.entity.BlockEntityRenderer;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
||||
import wtf.hak.survivalfabric.config.ConfigManager;
|
||||
import wtf.hak.survivalfabric.config.client.ClientConfigManager;
|
||||
|
||||
@Mixin(BlockEntityRenderer.class)
|
||||
public interface BlockEntityRendererMixin<T extends BlockEntity> {
|
||||
|
||||
@Inject(method = "getRenderDistance", at = @At("HEAD"), cancellable = true)
|
||||
private void getRenderDistance(CallbackInfoReturnable<Integer> cir) {
|
||||
if(ClientConfigManager.getConfig().alwaysRenderBlockEntities)
|
||||
cir.setReturnValue(ClientConfigManager.getConfig().renderBlockEntitiesRange);
|
||||
}
|
||||
}
|
@ -4,6 +4,7 @@
|
||||
"compatibilityLevel": "JAVA_21",
|
||||
"client": [
|
||||
"BackgroundRendererMixin",
|
||||
"BlockEntityRendererMixin",
|
||||
"EntityMixin"
|
||||
],
|
||||
"injectors": {
|
||||
|
Reference in New Issue
Block a user