Fake players don't drop spell books (#818)
Magic shouldn't be automated Co-authored-by: DrParadox7 <47131096+DrParadox7@users.noreply.github.com>
This commit is contained in:
+15
-2
@@ -1,14 +1,27 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
mavenCentral()
|
||||
|
||||
// [HTTPS FIX] Replace mavenCentral() with the code block below
|
||||
maven {
|
||||
url = "https://maven.minecraftforge.net/"
|
||||
}
|
||||
|
||||
maven {
|
||||
name = "forge"
|
||||
url = "http://files.minecraftforge.net/maven"
|
||||
url = "https://files.minecraftforge.net/maven"
|
||||
}
|
||||
maven {
|
||||
name = "forge2"
|
||||
url = "https://maven.minecraftforge.net/"
|
||||
}
|
||||
maven {
|
||||
name = "sonatype"
|
||||
url = "https://oss.sonatype.org/content/repositories/snapshots/"
|
||||
}
|
||||
|
||||
flatDir {
|
||||
dirs 'libs'
|
||||
}
|
||||
}
|
||||
dependencies {
|
||||
classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT'
|
||||
|
||||
@@ -801,7 +801,7 @@ public class WizardryEventHandler {
|
||||
@SubscribeEvent
|
||||
public void onLivingDropsEvent(LivingDropsEvent event){
|
||||
// Evil wizards drop spell books themselves
|
||||
if(event.entityLiving instanceof EntityMob && !(event.entityLiving instanceof EntityEvilWizard) && event.source.getEntity() instanceof EntityPlayer && Wizardry.spellBookDropChance > 0){
|
||||
if(event.entityLiving instanceof EntityMob && !(event.entityLiving instanceof EntityEvilWizard) && event.source.getEntity() instanceof EntityPlayer && !(event.source.getEntity() instanceof FakePlayer) && Wizardry.spellBookDropChance > 0){
|
||||
|
||||
// This does exactly what the entity drop method does, but with a different random number so that the
|
||||
// spell book doesn't always drop with other rare drops.
|
||||
|
||||
Reference in New Issue
Block a user