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