Skip to content

Commit

Permalink
1.3.8.8
Browse files Browse the repository at this point in the history
  • Loading branch information
jtrent238 committed Apr 20, 2017
1 parent fba4620 commit e86e8ce
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 12 deletions.
6 changes: 6 additions & 0 deletions ChangeLog.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
Epic Proportions Mod ChangeLog

1.3.8.8
- Added Config option to disable giving player a Present on join
- Added Config option to disable giving player a Present on jtrent238's Birthday (April 4)
- Added Special join message for jtrent238's Birthday
- Fixed giving player another Birthday Present when they have already received one

1.3.8.7
- Added Config option to Enable/Disable Birthday Presents
- Added Sound Sparky Growl
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/jtrent238/epicproportions/EntityLoader.java
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,8 @@ public static void LoadEntitys() {
VillagerRegistry.instance().getClass();

//Santa Registry
VillagerRegistry.instance().registerVillagerId(64/*/EpicProportionsMod.getVILLAGER_ID_5()/*/);
VillagerRegistry.instance().registerVillageTradeHandler(64/*/EpicProportionsMod.getVILLAGER_ID_5()/*/, new TradeHandler());
VillagerRegistry.instance().registerVillagerId(/*64*/29627/*/EpicProportionsMod.getVILLAGER_ID_5()/*/);
VillagerRegistry.instance().registerVillageTradeHandler(/*64*/29627 /*/EpicProportionsMod.getVILLAGER_ID_5()/*/, new TradeHandler());
VillagerRegistry.instance().getRegisteredVillagers();
VillagerRegistry.instance().getClass();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import com.jtrent238.epicproportions.dim.Dimension;
import com.jtrent238.epicproportions.dim.EpicProportionsBiomes;
import com.jtrent238.epicproportions.dim.WorldProviderEpicProportions;
import com.jtrent238.epicproportions.entity.EntityCaptianCookie;
import com.jtrent238.epicproportions.eventhandler.OnJoinEvent;
import com.jtrent238.epicproportions.items.structureplacers.itemTNTSwordSpawner;
import com.jtrent238.epicproportions.lib.LogHelper;
Expand Down Expand Up @@ -108,15 +109,15 @@ public class EpicProportionsMod implements ITweaker
@Instance(MODID)
public static EpicProportionsMod instance;

public static final String MODVERSION = "1.3.8.7";
public static final String MODVERSION = "1.3.8.8";

public static final String APIVERSION = "1.0.0.0";
public static final String MODNAME = "jtrent238's EpicProportions Mod";
public static final String MODAUTHOR = "jtrent238";
public static final String MC = "1.7.10";

public static final String WIKI_URL = "https://github.com/jtrent238/PopularMMOS-EpicProportions-Mod/wiki";
public static final String CHANGELOG_URL = "";
public static final String CHANGELOG_URL = "https://raw.githubusercontent.com/jtrent238/PopularMMOS-EpicProportions-Mod/master/ChangeLog.txt";

//public static final LogManager logger = LogManager.getLogManager();
public static final Class<LogHelper> logger = LogHelper.class;
Expand Down Expand Up @@ -171,7 +172,7 @@ public class EpicProportionsMod implements ITweaker
static boolean JTRENT238_SPAWN;

static boolean ENABLE_SWORD_OF_EPICPROPORTIONS;
private boolean PRESENT_ON_JOIN_CHANCE;
public static boolean PRESENT_ON_JOIN;
public static boolean BIRTHDAYPRESENT_CUSTOM;
public static boolean ENABLE_DEVMODE;
public static boolean ENABLE_DEVLOGGING;
Expand All @@ -190,6 +191,8 @@ public class EpicProportionsMod implements ITweaker

private boolean ENABLE_BOMBY_STRUCTURE_GEN;

public static boolean PRESENT_ON_DEVBIRTHDAY;

static int ENTITY_ID_PGOLEM;

static int ENTITY_ID_JGOLEM;
Expand Down Expand Up @@ -287,6 +290,7 @@ public class EpicProportionsMod implements ITweaker
public static final BiomeGenBase BIOMEJEN = (new BiomeGenJen(getBIOME_ID_JEN())).setColor(9286496).setBiomeName("SuperGirlyGamer");



@ForgeSubscribe(priority = EventPriority.NORMAL)
public void eventHandler(RenderGameOverlayEvent event) {

Expand Down Expand Up @@ -417,7 +421,8 @@ public void preInit(FMLPreInitializationEvent event) throws IOException
BIRTHDAYPRESENT_CREATIVE = config.get(CATEGORY_TWEAKS, "Allow Present Drops in Creative", false).getBoolean(false);
BIRTHDAYPRESENT_CUSTOM_DROPS = config.get(CATEGORY_TWEAKS, "Allow Custom Present Drops", false).getBoolean(false);
BIRTHDAYPRESENT_CUSTOM = config.get(CATEGORY_TWEAKS, "Allow Custom Birthday Presents", false).getBoolean(false);
PRESENT_ON_JOIN_CHANCE= config.get(CATEGORY_TWEAKS, "Chance to get a present on Join New world", 100) != null;
PRESENT_ON_JOIN = config.get(CATEGORY_TWEAKS, "Give player a Free Birthday Present when joining a New world", true).getBoolean(true);
PRESENT_ON_DEVBIRTHDAY = config.get(CATEGORY_TWEAKS, "Give player a Free Birthday Present on jtrent238's Birthday (April 4)", true).getBoolean(true);
JTRENT238_SPAWN = config.get(CATEGORY_TWEAKS, "Allow jtrent238 to Spawn", true).getBoolean(true);
ENABLE_SWORD_OF_EPICPROPORTIONS = config.get(CATEGORY_TWEAKS, "Enable Sword of Epic Proportions", true).getBoolean(true);
ENABLE_SUPER_JEN_ARMOR = config.get(CATEGORY_TWEAKS, "Enable Super FuriousDestroyer Armor", true).getBoolean(true);
Expand Down Expand Up @@ -707,7 +712,14 @@ public void init(FMLInitializationEvent event)
}*/



/*
try {
ganymedes01.headcrumbs.utils.HeadUtils.createHeadFor("jtrent238");
}
catch (Throwable e) {
System.err.println(e);
}
*/
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import net.minecraft.util.ChatComponentText;
//import sun.applet.Main;
//import sun.rmi.runtime.Log;
import net.minecraft.util.EnumChatFormatting;

import java.sql.Date;
import java.time.Month;
Expand Down Expand Up @@ -71,17 +72,34 @@ public void firstJoin(PlayerLoggedInEvent event) {
*/

@SubscribeEvent
public void firstJoin(PlayerLoggedInEvent event) {
public void JoinWorld(PlayerLoggedInEvent event) {
EntityPlayer player = event.player;
NBTTagCompound entityData = player.getEntityData();
String joinedBefore = "HasPlayerJoinedWorldBefore"/*player.PERSISTED_NBT_TAG*/;
Calendar calendar = Calendar.getInstance();
if(!entityData.getBoolean("joinedBefore")) {
entityData.setBoolean("joinedBefore", true);

//String PlayerName = null;
//entityData.setString(PlayerName, player.getDisplayName());

entityData.getBoolean(joinedBefore);

if(entityData.getBoolean(joinedBefore) == false) {

entityData.setBoolean(joinedBefore, true);

if(EpicProportionsMod.PRESENT_ON_JOIN == true){
player.inventory.addItemStackToInventory(new ItemStack(ItemLoader.itemBirthdayPresent));
}

player.inventory.addItemStackToInventory(new ItemStack(ItemLoader.itemBirthdayPresent));

if (calendar.get(2) + 1 == 4 && calendar.get(5) == 4){
player.inventory.addItemStackToInventory(new ItemStack(ItemLoader.itemBirthdayPresent));

event.player.addChatComponentMessage(new ChatComponentText(EnumChatFormatting.GOLD + "Happy Birthday, " + EnumChatFormatting.GREEN + "jtrent238" + EnumChatFormatting.GOLD + "."));

if(EpicProportionsMod.PRESENT_ON_DEVBIRTHDAY == true){
player.inventory.addItemStackToInventory(new ItemStack(ItemLoader.itemBirthdayPresent));
event.player.addChatComponentMessage(new ChatComponentText(EnumChatFormatting.LIGHT_PURPLE + "Have a Free Birthday Present to Celebrate."));
}
}
}
}
Expand Down

0 comments on commit e86e8ce

Please sign in to comment.