Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .classpath
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
Expand Down
6 changes: 3 additions & 3 deletions .settings/org.eclipse.jdt.core.prefs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
org.eclipse.jdt.core.compiler.compliance=1.7
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.source=1.7
org.eclipse.jdt.core.compiler.source=1.8
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# AngryWolves
Bukkit plugin to control aggression on wolf spawns

In reality what this plugin does is annoy your players and make them have to think harder to protect their sheep and to not stay out at night.

Chance of changing wolves into angry wolves, sheep into wolves, villagers into angry wolves, hellhound spawning in nether, and there's a fullmoon where spawn rates are increased.

Version 3.1337 *SHOULD* compile and work for Spigot 1.13.2.
12 changes: 8 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,18 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>2.0.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>

</build>
<repositories>
<repository>
<id>spigot-repo</id>
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
</repository>
<repository>
<releases>
</releases>
Expand All @@ -48,9 +52,9 @@
<dependency>
<groupId>org.bukkit</groupId>
<artifactId>bukkit</artifactId>
<version>1.8-R0.1-SNAPSHOT</version>
<version>1.13.2-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
</dependencies>
<version>2.5-SNAPSHOT</version>
<version>3.1337-FUCKYEAH</version>
</project>
94 changes: 94 additions & 0 deletions src/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
# Configuration file for AngryWolves);
# spawn-anger-rate is percentage of normal wolf spawns that spawn angry
# If undefined, spawn-anger-rate defaults to 0
spawn-anger-rate: 5
# hellhound-rate is percentage of angry wolfs that are hellhounds (flaming-fireproof-wolves)
# If undefined, hellhound-rate defaults to 10. In Nether, 100% of angry wolves are hellhounds.
hellhound-rate: 10
# mob-to-wolf-rate is the TENTHS of a percent of monster spawns that are replaced with angry wolves
# spider-to-wolf-rate is the TENTHS of a percent of spider spawns that are replaced with angry wolves
# zombie-to-wolf-rate is the TENTHS of a percent of zombie spawns that are replaced with angry wolves
# skeleton-to-wolf-rate is the TENTHS of a percent of skeleton spawns that are replaced with angry wolves
# creeper-to-wolf-rate is the TENTHS of a percent of creeper spawns that are replaced with angry wolves
# pig-zombie-to-wolf-rate is the TENTHS of a percent of pig-zombie spawns that are replaced with angry wolves
# note: if monster type specific rate is defined, it supercedes the mob-to-wolf-rate for that monster type
# If undefined, mob-to-wolf-rate defaults to 10, others are null
mob-to-wolf-rate: 10
# spider-to-wolf-rate: 20
# zombie-to-wolf-rate: 0
# skeleton-to-wolf-rate: 5
# creeper-to-wolf-rate: 1000
# pigzombie-to-wolf-rate: 20
# mob-to-spawn-based spawns are normally limited to spawns occuring in valid biomes for wolves, as well as over valid wolf spawn terrain (grass)
# mobtowolf-ignore-terrain can be set to 'true' to disable biome and terrain restrictions
# mobtowolf-ignore-terrain: true
# (Optional) Make non-angry (wild) wolf spawns from mob spawns, at given rate (in TENTHS of a percent) - make wolves more common
mob-to-wildwolf-rate: 10
# (Optional) Spawn wolf pup when wolf kills sheep (rate in percent)
# pup-on-sheep-kill-rate: 10
# If defined, can also have a 'full moon night' one out of every days-per-moon (if 8, will match 1.0.0+ moon phases)
# During this, anger-rate-fullmoon percent of non-tame wolves go angry
# At the end of the full moon, fullmoon-stay-angry-rate percent of angry wolves stay angry
days-between-fullmoons: 8
anger-rate-fullmoon: 25
fullmoonmsg: "&4The wolves are baying at the full moon ..."
fullmoon-stay-angry-rate: 0
# Optional - mob-to-wolf-rate to apply during full moon (if set - otherwise, same rate used)
# fullmoon-mob-to-wolf-rate: 50
# Optional spawn message
# spawnmsg: There's a bad moon on the rise...
# Also, optional spawn message radius - limits message to only players within given number of blocks of spawn
# spawnmsgradius: 50
# Wolf-in-sheeps-clothing rate : in 10ths of a percent
wolf-in-sheep-rate: 0
wolf-in-sheep-msg: "Oh, no! A wolf in sheep's clothing!"
# Optional - enable 'wolf-friends' : players with the 'angrywolves.wolf-friend' privilege will not be targetted by angry wolves!
# wolf-friends: true
# Optional - enable wolf loot - wolf-loot-rate is percent change of drop, wolf-loot is list of item ids to select from (1 randomly picked), wolf-xp is experience orbs dropped
# wolf-loot-rate: 20
# wolf-loot: [ 334, 352, 319 ]
# wolf-xp: 5
# Optional - enable different loot for angry wolves (if not defined, wolf loot settings are used)
# angry-wolf-loot-rate: 70
# angry-wolf-loot: [ 334, 352, 319 ]
# angry-wolf-xp: 5
# Optional - enable different loot for hellhounds (if not defined, wolf loot settings are used)
# hellhound-loot-rate: 90
# hellhound-loot: [ 334, 352, 319 ]
# hellhound-xp: 10
# Population limit for Angry Wolves and Hellhounds (combined for server)
angrywolf-pop-limit: 200
# Angry Wolf initial health - normal wild wolves are 8, tamed wolves are 20
angrywolf-health: 8
# Hellhound initial health - normal wild wolves are 8, tamed wolves are 20
hellhound-health: 10
# Hellhound damage scale - multiplier for general damage to hellhounds (less that 1.0 reduces damage done to them)
hellhound-damagescale: 0.5
# (optional) have hellhounds shoot fireballs! Control range, rate (seconds between shots), and whether they cause fires
# hellhound-fireball-range: 10
# hellhound-fireball-rate: 3
#hellhound-fireball-incendiary: false

# Rate of villagers becoming angry wolves during full moon (AKA werewolves) (percent)
villager-werewolf-rate: 0.0
# If true, angry wolves/hellhounds will hunt villagers
angrywolf-hunts-villagers: false

# For multi-world specific rates, fill in rate under section for each world
worlds:
- name: transylvania
spawn-anger-rate: 90
mob-to-wolf-rate: 100
spawnmsg: Something evil has entered the world...
# Optional - for special settings limited to an area on one world
# 'coords' define the area, as a list of two or more coordinate values (each of which has an x and z attribute).
areas:
- name: ExampleArea
worldname: transylvania
coords:
- x: 200
z: 40
- x: 60
z: 100
spawn-anger-rate: 100
mob-to-wolf-rate: 100
Original file line number Diff line number Diff line change
Expand Up @@ -123,14 +123,14 @@ public void onCreatureSpawn(CreatureSpawnEvent event) {
Block b = loc.getBlock();
Biome bio = b.getBiome();
/* See if hellhound - only hellhounds substitute in Nether, use hellhound_rate elsewhere */
boolean do_hellhound = angry && ((bio.equals(Biome.HELL) || (rnd.nextInt(100) <= cfg.getHellhoundRate())));
boolean do_hellhound = angry && ((bio.equals(Biome.NETHER) || (rnd.nextInt(100) <= cfg.getHellhoundRate())));

if(plugin.verbose) AngryWolves.log.info("biome=" + bio + ", ignore=" + ignore_terrain + ", angry=" + angry + ", hellhound=" + do_hellhound);
/* If valid biome for wolf (or hellhound) */
if(ignore_terrain || (bio == Biome.FOREST) || (bio == Biome.TAIGA) ||
(bio == Biome.HELL) || (bio == Biome.FOREST_HILLS) || (bio == Biome.TAIGA_HILLS)) {
(bio == Biome.NETHER) || (bio == Biome.WOODED_HILLS) || (bio == Biome.TAIGA_HILLS)) {
/* If hellhound in hell, we're good */
if(bio.equals(Biome.HELL)) {
if(bio.equals(Biome.NETHER)) {
if(!do_hellhound) /* Only angry hellhounds in nether */
return;
}
Expand Down Expand Up @@ -407,7 +407,7 @@ else if(w.isAngry() && (cfg.getAngryWolfLoot() != null))
int id = loot.get(rnd.nextInt(sz));
List<ItemStack> drop = event.getDrops();
if(drop != null) {
drop.add(new ItemStack(id, 1));
drop.add(new ItemStack(Material.GOLDEN_APPLE , 1));
}
}
}
Expand Down
8 changes: 6 additions & 2 deletions src/main/resources/plugin.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
name: AngryWolves
main: com.mikeprimm.bukkit.AngryWolves.AngryWolves
version: "${project.version}-${BUILD_NUMBER}"
author: mikeprimm
version: "${project.version}-${BUILD_NUMBER}"
authors: [MikePrimm, CindyKer, AeSix]
description: Make wolves moar wolffy and warewolves and hellhounds
website: https://github.com/AeSix/AngryWolves
api-version: 1.13

permissions:
angrywolves.wolf-friend:
description: Will not be attacked by Angry Wolves
default: op

8 changes: 8 additions & 0 deletions src/plugin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name: AngryWolves
version: ${project.version}
authors: [MikePrimm, CindyKer, AeSix]
description: Make wolves moar wolffy and warewolves and hellhounds
website: https://github.com/AeSix/AngryWolves
api-version: 1.13

main: com.mikeprimm.bukkit.AngryWolves