improvements
This commit is contained in:
parent
a45ce796ac
commit
fab391f782
4 changed files with 14 additions and 11 deletions
|
@ -1,9 +1,9 @@
|
||||||
eclipse.preferences.version=1
|
eclipse.preferences.version=1
|
||||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||||
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
|
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
|
||||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
|
org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
|
||||||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
||||||
org.eclipse.jdt.core.compiler.compliance=1.8
|
org.eclipse.jdt.core.compiler.compliance=17
|
||||||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
||||||
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
||||||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
||||||
|
@ -13,4 +13,4 @@ org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||||
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
|
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
|
||||||
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
|
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
|
||||||
org.eclipse.jdt.core.compiler.release=disabled
|
org.eclipse.jdt.core.compiler.release=disabled
|
||||||
org.eclipse.jdt.core.compiler.source=1.8
|
org.eclipse.jdt.core.compiler.source=17
|
||||||
|
|
4
pom.xml
4
pom.xml
|
@ -2,10 +2,10 @@
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>giants</groupId>
|
<groupId>giants</groupId>
|
||||||
<artifactId>giants</artifactId>
|
<artifactId>giants</artifactId>
|
||||||
<version>22.9.0</version>
|
<version>22.10.0</version>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<maven.compiler.source>1.8</maven.compiler.source>
|
<maven.compiler.source>17</maven.compiler.source>
|
||||||
<maven.compiler.target>17</maven.compiler.target>
|
<maven.compiler.target>17</maven.compiler.target>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,7 @@ import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
|
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
import org.bstats.bukkit.Metrics;
|
import org.bstats.bukkit.Metrics;
|
||||||
|
@ -14,6 +15,7 @@ import org.bstats.charts.SimplePie;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
|
import org.bukkit.attribute.Attribute;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandExecutor;
|
import org.bukkit.command.CommandExecutor;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
|
@ -161,6 +163,7 @@ public class Main extends JavaPlugin implements Listener, CommandExecutor {
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void entityDamage(EntityDamageByEntityEvent e) {
|
public void entityDamage(EntityDamageByEntityEvent e) {
|
||||||
|
if (!(e.getDamager() instanceof LivingEntity)) return;
|
||||||
LivingEntity entity = (LivingEntity) e.getDamager();
|
LivingEntity entity = (LivingEntity) e.getDamager();
|
||||||
if (entity.hasMetadata("giant")) {
|
if (entity.hasMetadata("giant")) {
|
||||||
entity.setInvulnerable(false);
|
entity.setInvulnerable(false);
|
||||||
|
@ -191,12 +194,12 @@ public class Main extends JavaPlugin implements Listener, CommandExecutor {
|
||||||
LivingEntity passenger = (LivingEntity) pos.getWorld().spawnEntity(pos, EntityType.HUSK);
|
LivingEntity passenger = (LivingEntity) pos.getWorld().spawnEntity(pos, EntityType.HUSK);
|
||||||
new PotionEffect(PotionEffectType.INVISIBILITY, Integer.MAX_VALUE, 1)
|
new PotionEffect(PotionEffectType.INVISIBILITY, Integer.MAX_VALUE, 1)
|
||||||
.apply((LivingEntity) passenger);
|
.apply((LivingEntity) passenger);
|
||||||
passenger.setCustomName("Giant");
|
//passenger.setCustomName("Giant");
|
||||||
passenger.setCustomNameVisible(false);
|
passenger.setCustomNameVisible(false);
|
||||||
passenger.setInvulnerable(true);
|
passenger.setInvulnerable(true);
|
||||||
passenger.setPersistent(true);
|
passenger.setPersistent(true);
|
||||||
passenger.setMetadata("giant", new FixedMetadataValue(this, "y"));
|
passenger.setMetadata("giant", new FixedMetadataValue(this, "y"));
|
||||||
passenger.setHealth(Integer.MAX_VALUE);
|
passenger.setHealth(20);
|
||||||
entity.addPassenger(passenger);
|
entity.addPassenger(passenger);
|
||||||
}
|
}
|
||||||
for (Entry<PotionEffectType, Integer> t : effects.entrySet()) {
|
for (Entry<PotionEffectType, Integer> t : effects.entrySet()) {
|
||||||
|
|
|
@ -4,13 +4,13 @@ ai: true
|
||||||
# 0.5 is half a heart
|
# 0.5 is half a heart
|
||||||
attackDamage: 1.0
|
attackDamage: 1.0
|
||||||
|
|
||||||
# Spawning chance, from 0 to 1
|
# Spawning chance, from 0 to 1. "Spawning" means hijacking zombie spawns (natural or not)
|
||||||
chance: 0.02
|
chance: 0.02
|
||||||
|
|
||||||
# Attack delay in ticks, smaller values will lag the server more
|
# Attack delay (in ticks)
|
||||||
hitDelay: 20
|
hitDelay: 20
|
||||||
|
|
||||||
# 0 - attack only entities touching the giant, if too high the giant will hit through walls
|
# 0 - attack only entities touching the giant. There's nothing preventing us from hitting through walls.
|
||||||
attackReach: 2
|
attackReach: 2
|
||||||
|
|
||||||
# Additional potion effects
|
# Additional potion effects
|
||||||
|
@ -29,9 +29,9 @@ effects: []
|
||||||
drops: []
|
drops: []
|
||||||
# - "APPLE:1:3:25"
|
# - "APPLE:1:3:25"
|
||||||
|
|
||||||
# Head rotations, disabling can slightly improve performance
|
|
||||||
headRotations: true
|
headRotations: true
|
||||||
refreshDelay: 20
|
refreshDelay: 20
|
||||||
|
|
||||||
# No need to change this
|
# No need to change this
|
||||||
expandUp: 0
|
expandUp: 0
|
||||||
attack: true
|
attack: true
|
Loading…
Reference in a new issue