Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spotless apply for branch rework-aggro for #7 #8

Merged
merged 1 commit into from
May 28, 2024
Merged
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
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
package com.github.namikon.angermod.events;

import com.github.namikon.angermod.AngerMod;
import com.github.namikon.angermod.auxiliary.MinecraftBlock;
import com.github.namikon.angermod.config.AngerModConfig;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.List;

import net.minecraft.entity.Entity;
import net.minecraft.entity.monster.EntityEnderman;
import net.minecraft.entity.monster.EntityPigZombie;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.AxisAlignedBB;
import net.minecraftforge.event.world.BlockEvent.BreakEvent;

import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.List;
import com.github.namikon.angermod.AngerMod;
import com.github.namikon.angermod.auxiliary.MinecraftBlock;
import com.github.namikon.angermod.config.AngerModConfig;

import cpw.mods.fml.common.eventhandler.SubscribeEvent;

/**
* Class for handling all block-break code that will cause mobs become hostile against the player, depending on the
Expand Down Expand Up @@ -59,7 +61,7 @@ public static void aggroEndermenInRange(EntityPlayer player, int range) {

// Define the area to check for entities
AxisAlignedBB tBoundingBox = AxisAlignedBB
.getBoundingBox(x - range, y - range, z - range, x + range, y + range, z + range);
.getBoundingBox(x - range, y - range, z - range, x + range, y + range, z + range);

nearbyEntities = player.worldObj.getEntitiesWithinAABB(EntityEnderman.class, tBoundingBox);

Expand Down Expand Up @@ -88,7 +90,8 @@ public static void aggroZombiePigmenInRange(EntityPlayer player, int range) {
int z = (int) player.posZ;

// Define the area to check for entities
AxisAlignedBB boundingBox = AxisAlignedBB.getBoundingBox(x - range, y - range, z - range, x + range, y + range, z + range);
AxisAlignedBB boundingBox = AxisAlignedBB
.getBoundingBox(x - range, y - range, z - range, x + range, y + range, z + range);

List<Entity> nearbyEntities = player.worldObj.getEntitiesWithinAABB(EntityPigZombie.class, boundingBox);

Expand Down