Skip to content

Commit

Permalink
Added clay's torture mode: Deletes all items on death. Have fun!
Browse files Browse the repository at this point in the history
  • Loading branch information
dries007 committed Feb 26, 2016
1 parent 73a086f commit 002a6b0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Expand Up @@ -28,7 +28,7 @@ apply plugin: "maven"
apply plugin: "idea-utils"

group = "net.doubledoordev.d3core"
version = "1.1.0"
version = "1.1.1"

targetCompatibility = 1.7
sourceCompatibility = 1.7
Expand Down
1 change: 1 addition & 0 deletions src/main/java/net/doubledoordev/d3core/D3Core.java
Expand Up @@ -282,6 +282,7 @@ public void syncConfig()
FML_EVENT_HANDLER.lilypad = configuration.getBoolean("lilypad", MODID, FML_EVENT_HANDLER.lilypad, "Spawn the player on a lilypad when in or above water.", "d3.core.config.lilypad");
FORGE_EVENT_HANDLER.nosleep = configuration.getBoolean("nosleep", MODID, FORGE_EVENT_HANDLER.nosleep, "No sleep at all", "d3.core.config.nosleep");
FORGE_EVENT_HANDLER.printDeathCoords = configuration.getBoolean("printDeathCoords", MODID, FORGE_EVENT_HANDLER.printDeathCoords, "Print your death coordinates in chat (client side)", "d3.core.config.printDeathCoords");
FORGE_EVENT_HANDLER.claysTortureMode = configuration.getBoolean("claysTortureMode", MODID, FORGE_EVENT_HANDLER.claysTortureMode, "Deletes all drops on death.", "d3.core.config.claystorturemode");
getDevPerks().update(sillyness);

final String catTooltips = MODID + ".tooltips";
Expand Down
Expand Up @@ -64,6 +64,7 @@ public class ForgeEventHandler
public boolean enableOreDictionary;
public boolean nosleep;
public boolean printDeathCoords = true;
public boolean claysTortureMode;

private ForgeEventHandler() {}

Expand All @@ -81,7 +82,11 @@ public void itemTooltipEventHandler(ItemTooltipEvent event)
@SubscribeEvent()
public void entityDeathEvent(LivingDropsEvent event)
{
if (event.entityLiving instanceof EntityEnderman && EndermanGriefing.dropCarrying)
if (event.entityLiving instanceof EntityPlayer && claysTortureMode)
{
event.setCanceled(true);
}
else if (event.entityLiving instanceof EntityEnderman && EndermanGriefing.dropCarrying)
{
EntityEnderman entityEnderman = ((EntityEnderman) event.entityLiving);
if (entityEnderman.func_146080_bZ() != Blocks.air)
Expand Down

0 comments on commit 002a6b0

Please sign in to comment.