Skip to content

Commit

Permalink
- fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Grzybol committed Apr 9, 2024
1 parent 80fe767 commit dee1ddf
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>betterbox.mine.game</groupId>
<artifactId>BetterElo</artifactId>
<version>4.1.30-SNAPSHOT</version>
<version>4.1.37-SNAPSHOT</version>
<packaging>jar</packaging>

<name>BetterElo</name>
Expand Down
10 changes: 6 additions & 4 deletions src/main/java/betterbox/mine/game/betterelo/CustomMobs.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@ static class CustomMob {
LivingEntity entity;
ItemStack helmet, chestplate, leggings, boots,weapon;
HashMap< Double,ItemStack> dropTable;
double armor, speed, attackDamage, EMKSchance, attackSpeed;
int hp;
double armor, speed, attackDamage, EMKSchance;
int hp,attackSpeed;
Map<String, Object> customMetadata; // Nowe pole do przechowywania niestandardowych metadanych
JavaPlugin plugin;
CustomMobsFileManager dropFileManager;

CustomMob(JavaPlugin plugin,CustomMobsFileManager dropFileManager, String mobName, EntityType entityType, ItemStack helmet, ItemStack chestplate, ItemStack leggings, ItemStack boots,ItemStack weapon, double armor, int hp, double speed, double attackDamage, double attackSpeed, Map<String, Object> customMetadata, String dropTableName, Boolean dropEMKS, double EMKSchance) {
CustomMob(JavaPlugin plugin,CustomMobsFileManager dropFileManager, String mobName, EntityType entityType, ItemStack helmet, ItemStack chestplate, ItemStack leggings, ItemStack boots,ItemStack weapon, double armor, int hp, double speed, double attackDamage, int attackSpeed, Map<String, Object> customMetadata, String dropTableName, Boolean dropEMKS, double EMKSchance) {
this.plugin = plugin;
this.dropEMKS = dropEMKS;
this.EMKSchance = EMKSchance;
Expand Down Expand Up @@ -118,7 +118,9 @@ private void setupMob() {
entity.setHealth(hp);
entity.getAttribute(Attribute.GENERIC_MOVEMENT_SPEED).setBaseValue(speed);
entity.getAttribute(Attribute.GENERIC_ATTACK_DAMAGE).setBaseValue(attackDamage);
entity.getAttribute(Attribute.GENERIC_ATTACK_SPEED).setBaseValue(attackSpeed);
//plugin.getLogger().info("attackSpeed: "+attackSpeed);
//entity.getAttribute(Attribute.GENERIC_ATTACK_SPEED).setBaseValue(attackSpeed);


entity.setCustomName(mobName);
entity.setCustomNameVisible(true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -248,9 +248,9 @@ public CustomMobs.CustomMob loadCustomMob(JavaPlugin plugin, FileRewardManager d
int hp = mobData.getInt("hp");
double speed = mobData.getDouble("speed");
double attackDamage = mobData.getDouble("attackDamage");
double EKMSchance = 0.0f;
double EKMSchance = 0.0d;
boolean dropEMKS = false;
double attackSpeed = 1;
int attackSpeed = 1;


if(mobData.contains("dropEMKS")){
Expand All @@ -262,7 +262,7 @@ public CustomMobs.CustomMob loadCustomMob(JavaPlugin plugin, FileRewardManager d
pluginLogger.log(PluginLogger.LogLevel.DEBUG, "CustomMobsFileManager.loadCustomMob loaded EKMSchance:" + EKMSchance);
}
if(mobData.contains("attackSpeed")){
attackSpeed = mobData.getDouble("AttackSpeed");
attackSpeed = mobData.getInt("attackSpeed");
pluginLogger.log(PluginLogger.LogLevel.DEBUG, "CustomMobsFileManager.loadCustomMob loaded AttackSpeed:" + attackSpeed);
}
String entityTypeString = mobData.getString("type");
Expand Down

0 comments on commit dee1ddf

Please sign in to comment.