mirror of
https://github.com/loganintech/render-region-forcefield.git
synced 2026-05-30 14:21:14 +00:00
More updates
This commit is contained in:
21
README.md
21
README.md
@@ -75,39 +75,32 @@ update-interval-ticks: 20
|
||||
# Maximum render distance in blocks
|
||||
max-render-distance: 100
|
||||
|
||||
# Spacing between particles
|
||||
particle-spacing: 0.5
|
||||
|
||||
# Render walls or just edges
|
||||
render-walls: true
|
||||
|
||||
# Particle color (RGB 0-255)
|
||||
# Particle rendering
|
||||
render-particles: true
|
||||
particle-spacing: 0.5
|
||||
particle-color:
|
||||
red: 147
|
||||
green: 112
|
||||
blue: 219
|
||||
|
||||
# Particle size (0.5-2.0 recommended)
|
||||
particle-size: 1.0
|
||||
|
||||
# Block rendering settings
|
||||
# Whether to render actual blocks (glass panes) in addition to particles
|
||||
# Block rendering
|
||||
render-blocks: true
|
||||
|
||||
# Distance between blocks (in blocks)
|
||||
block-spacing: 1.0
|
||||
|
||||
# Block material to use (e.g., PURPLE_STAINED_GLASS_PANE, BARRIER, GLASS)
|
||||
block-material: PURPLE_STAINED_GLASS_PANE
|
||||
```
|
||||
|
||||
## Performance Tips
|
||||
|
||||
- Reduce `max-render-distance` for servers with many regions
|
||||
- Set `render-particles: false` to disable particles and only show blocks
|
||||
- Set `render-blocks: false` to disable glass panes and only use particles
|
||||
- Increase `particle-spacing` to reduce particle count
|
||||
- Increase `block-spacing` to reduce block count
|
||||
- Set `render-blocks: false` to disable glass panes and only use particles
|
||||
- Set `render-walls: false` to only show edges
|
||||
- Set `render-walls: false` to only show edges (not faces)
|
||||
- Increase `update-interval-ticks` if you don't need real-time updates
|
||||
- Use `BARRIER` blocks instead of glass panes (less visible but lighter)
|
||||
|
||||
|
||||
@@ -111,17 +111,28 @@ public class ForcefieldCommand implements CommandExecutor, TabCompleter {
|
||||
plugin.getConfig().getLong("update-interval-ticks", 20L) + " ticks");
|
||||
sender.sendMessage(ChatColor.YELLOW + "Max Render Distance: " + ChatColor.WHITE +
|
||||
plugin.getConfig().getInt("max-render-distance", 100) + " blocks");
|
||||
sender.sendMessage(ChatColor.YELLOW + "Particle Spacing: " + ChatColor.WHITE +
|
||||
plugin.getConfig().getDouble("particle-spacing", 0.5) + " blocks");
|
||||
sender.sendMessage(ChatColor.YELLOW + "Render Walls: " + ChatColor.WHITE +
|
||||
(plugin.getConfig().getBoolean("render-walls", true) ? "Yes" : "No"));
|
||||
|
||||
sender.sendMessage(ChatColor.GOLD + "Particles:");
|
||||
sender.sendMessage(ChatColor.YELLOW + " Enabled: " + ChatColor.WHITE +
|
||||
(plugin.getConfig().getBoolean("render-particles", true) ? "Yes" : "No"));
|
||||
sender.sendMessage(ChatColor.YELLOW + " Spacing: " + ChatColor.WHITE +
|
||||
plugin.getConfig().getDouble("particle-spacing", 0.5) + " blocks");
|
||||
int red = plugin.getConfig().getInt("particle-color.red", 147);
|
||||
int green = plugin.getConfig().getInt("particle-color.green", 112);
|
||||
int blue = plugin.getConfig().getInt("particle-color.blue", 219);
|
||||
sender.sendMessage(ChatColor.YELLOW + "Particle Color: " + ChatColor.WHITE +
|
||||
sender.sendMessage(ChatColor.YELLOW + " Color: " + ChatColor.WHITE +
|
||||
"RGB(" + red + ", " + green + ", " + blue + ")");
|
||||
|
||||
sender.sendMessage(ChatColor.GOLD + "Blocks:");
|
||||
sender.sendMessage(ChatColor.YELLOW + " Enabled: " + ChatColor.WHITE +
|
||||
(plugin.getConfig().getBoolean("render-blocks", true) ? "Yes" : "No"));
|
||||
sender.sendMessage(ChatColor.YELLOW + " Spacing: " + ChatColor.WHITE +
|
||||
plugin.getConfig().getDouble("block-spacing", 1.0) + " blocks");
|
||||
sender.sendMessage(ChatColor.YELLOW + " Material: " + ChatColor.WHITE +
|
||||
plugin.getConfig().getString("block-material", "PURPLE_STAINED_GLASS_PANE"));
|
||||
|
||||
sender.sendMessage(ChatColor.YELLOW + "Online Players: " + ChatColor.WHITE +
|
||||
plugin.getServer().getOnlinePlayers().size());
|
||||
|
||||
|
||||
@@ -269,6 +269,10 @@ public class ForcefieldRenderer {
|
||||
* Spawns a single particle at the specified location for a player.
|
||||
*/
|
||||
private void spawnParticle(@NotNull Player player, @NotNull World world, double x, double y, double z) {
|
||||
if (!plugin.getConfig().getBoolean("render-particles", true)) {
|
||||
return;
|
||||
}
|
||||
|
||||
Location location = new Location(world, x, y, z);
|
||||
player.spawnParticle(Particle.DUST, location, 1, 0, 0, 0, 0, dustOptions);
|
||||
}
|
||||
|
||||
@@ -10,14 +10,18 @@ update-interval-ticks: 20
|
||||
# Reducing this can improve performance on servers with many regions
|
||||
max-render-distance: 100
|
||||
|
||||
# Distance between particles (in blocks)
|
||||
# Smaller values = more particles = more detailed forcefields but more performance intensive
|
||||
particle-spacing: 0.5
|
||||
|
||||
# Whether to render the walls (faces) of regions, or just the edges
|
||||
# Setting to false will only render the outlines/edges
|
||||
render-walls: true
|
||||
|
||||
# Particle rendering settings
|
||||
# Whether to render particles
|
||||
render-particles: true
|
||||
|
||||
# Distance between particles (in blocks)
|
||||
# Smaller values = more particles = more detailed forcefields but more performance intensive
|
||||
particle-spacing: 0.5
|
||||
|
||||
# Particle color (RGB values from 0-255)
|
||||
particle-color:
|
||||
red: 147
|
||||
|
||||
Reference in New Issue
Block a user