Can't die when handcuffed; don't be criminal if kill a evil man; remove debug message
This commit is contained in:
parent
d53d2381f2
commit
ae2e652a47
|
@ -24,7 +24,7 @@ apply plugin: 'forge'
|
|||
sourceCompatibility = 1.8
|
||||
targetCompatibility = 1.8
|
||||
|
||||
version = "1.0.2"
|
||||
version = "1.1.2"
|
||||
group = "xamora.gp_dbc" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
|
||||
archivesBaseName = "gp_dbc"
|
||||
|
||||
|
|
|
@ -62,7 +62,7 @@ public class RenderHandcuffIcon extends Gui {
|
|||
&& playerAroundHandcuffed.containsKey(player.getUniqueID())) {
|
||||
|
||||
double distance = Math.sqrt(Math.pow(player.posX - mc_ply.posX, 2) + Math.pow(player.posY - mc_ply.posY, 2));
|
||||
System.out.println("distance: " + distance);
|
||||
//System.out.println("distance: " + distance);
|
||||
if (distance > 10)
|
||||
continue;
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package xamora.gp_dbc.system;
|
||||
|
||||
import JinRyuu.JRMCore.JRMCoreH;
|
||||
import JinRyuu.JRMCore.server.JGPlayerMP;
|
||||
import com.forgeessentials.chat.ModuleChat;
|
||||
import xamora.gp_dbc.Main;
|
||||
|
@ -42,8 +43,7 @@ public class Criminal {
|
|||
|
||||
public void addKill(EntityPlayer killed) {
|
||||
JGPlayerMP jgKilled = new JGPlayerMP(killed);
|
||||
NBTTagCompound nbt = jgKilled.connectBaseNBT();
|
||||
long add = Math.max(jgKilled.getAlignment() - 33, 0);
|
||||
long add = Math.max(jgKilled.getAlignment() - 32, 0);
|
||||
if (Main.gp.isInGalacticPatrol(killed))
|
||||
add *= 2;
|
||||
rate += add;
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package xamora.gp_dbc.system;
|
||||
|
||||
import JinRyuu.JRMCore.server.JGPlayerMP;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
@ -52,7 +53,12 @@ public class Criminals {
|
|||
return;
|
||||
}
|
||||
|
||||
Criminal criminal = null;
|
||||
JGPlayerMP jgKilled = new JGPlayerMP(dead);
|
||||
jgKilled.connectBaseNBT();
|
||||
if (jgKilled.getAlignment() < 33)
|
||||
return;
|
||||
|
||||
Criminal criminal;
|
||||
if (isCriminal(killer.getUniqueID()))
|
||||
criminal = getCriminal(killer.getUniqueID());
|
||||
else
|
||||
|
|
|
@ -24,7 +24,7 @@ import static xamora.gp_dbc.Main.gp;
|
|||
public class JailEvent {
|
||||
|
||||
int tick_time = 0;
|
||||
final int SLOWTICK_MAX = 20;//2000;
|
||||
final int SLOWTICK_MAX = 100;
|
||||
|
||||
@SideOnly(Side.SERVER)
|
||||
@SubscribeEvent
|
||||
|
@ -108,12 +108,12 @@ public class JailEvent {
|
|||
|
||||
@SideOnly(Side.SERVER)
|
||||
@SubscribeEvent
|
||||
public void checkDeathCancel(LivingHurtEvent event) {
|
||||
public void checkHurtCancel(LivingHurtEvent event) {
|
||||
if (!(event.entity instanceof EntityPlayer))
|
||||
return;
|
||||
|
||||
EntityPlayer player = (EntityPlayer)event.entity;
|
||||
if (gp.jail.isInJail(player))
|
||||
if (gp.jail.isInJail(player) || Handcuff.isHandcuffed(player))
|
||||
event.setCanceled(true);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue