Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
93 commits
Select commit Hold shift + click to select a range
a2fadcb
Update .gitignore
Gordon-Frohman Feb 24, 2024
b4a3f5e
Trophy pedestal tweaks
Gordon-Frohman Feb 24, 2024
c3d40fe
Add mini-bosses and Questing Ram trophies
Gordon-Frohman Feb 24, 2024
0bcbc12
Merge branch 'GTNewHorizons:master' into master
Gordon-Frohman Feb 25, 2024
41e211c
Add trophy drops
Gordon-Frohman Feb 25, 2024
814c52e
Spotless apply
Gordon-Frohman Feb 25, 2024
f343614
Fix Aurora Palace map icon
Gordon-Frohman Feb 25, 2024
8553656
Add trophy pedestal comparator output
Gordon-Frohman Feb 25, 2024
8ea612a
Change trophy sound to cloth
Gordon-Frohman Feb 25, 2024
96e409b
Add yeti sounds
Gordon-Frohman Feb 27, 2024
0651591
Add trophy sounds
Gordon-Frohman Feb 27, 2024
3c82956
Trophies are now wearable
Gordon-Frohman Feb 27, 2024
54f2c9b
Move Knightmetal Ring texture to center
Gordon-Frohman Feb 28, 2024
6877a79
Custom stalactite generation
Gordon-Frohman Feb 29, 2024
9312582
Remove test stalactite generator
Gordon-Frohman Feb 29, 2024
291c490
Merge branch 'GTNewHorizons:master' into master
Gordon-Frohman Mar 2, 2024
a7fa7a4
Update TFGenCaveStalactite.java
Gordon-Frohman Mar 2, 2024
f293f52
Merge branch 'GTNewHorizons:master' into master
Gordon-Frohman Mar 3, 2024
38cf90a
Add tooltips for compressed blocks
Gordon-Frohman Mar 4, 2024
ff85f73
Add traits for compressed blocks
Gordon-Frohman Mar 4, 2024
3bc57f7
Add fiery block renderer
Gordon-Frohman Mar 4, 2024
51dae4b
Fiery blood/tears are now interchangeable in NEI
Gordon-Frohman Mar 5, 2024
d02bf95
Add direct fiery armor crafting from iron armor
Gordon-Frohman Mar 5, 2024
7202217
Attempt to fix server crash
Gordon-Frohman Mar 5, 2024
ecfd4cf
Update ItemBlockTFCompressed.java
Gordon-Frohman Mar 5, 2024
96e2acc
IDK, maybe this should help
Gordon-Frohman Mar 5, 2024
bfa25e4
Spotless applied
Gordon-Frohman Mar 5, 2024
f71fb32
Revert "Spotless applied"
Gordon-Frohman Mar 5, 2024
2ec308f
Revert "IDK, maybe this should help"
Gordon-Frohman Mar 5, 2024
966e653
Revert "Update ItemBlockTFCompressed.java"
Gordon-Frohman Mar 5, 2024
3edfab3
Remove 'static' from renderer methods
Gordon-Frohman Mar 5, 2024
f6ea6fa
Revert "Remove 'static' from renderer methods"
Gordon-Frohman Mar 5, 2024
377061c
Please work
Gordon-Frohman Mar 5, 2024
0fcb148
Remove item renderer registeration
Gordon-Frohman Mar 6, 2024
2786b7c
Make fiery block item render client only
Gordon-Frohman Mar 6, 2024
8506c9b
Make trophies equippable with Shift+rightclicking
Gordon-Frohman Mar 7, 2024
93ead5e
Make outdated tooltip universal
Gordon-Frohman Mar 7, 2024
0573864
Rename "Trophy armor" to "Decorative armor"
Gordon-Frohman Mar 7, 2024
48304b3
Make fireflies, cicadas and moonworms wearable
Gordon-Frohman Mar 7, 2024
d986398
Revert "Update TFGenCaveStalactite.java"
Gordon-Frohman Mar 8, 2024
cf5f351
Revert "Remove test stalactite generator"
Gordon-Frohman Mar 8, 2024
348d677
Revert "Custom stalactite generation"
Gordon-Frohman Mar 8, 2024
e73449f
Update TFRecipes.java
Gordon-Frohman Mar 8, 2024
d60d710
Wispy clouds can now be harvested
Gordon-Frohman Mar 8, 2024
3094aa6
Achievements tuning
Gordon-Frohman Mar 9, 2024
180f6b5
Mosquitos are now count as arthropods
Gordon-Frohman Mar 9, 2024
92b9bf4
Druid skeletons now don't cast without a hoe
Gordon-Frohman Mar 9, 2024
6253352
Add missing boss spawners
Gordon-Frohman Mar 11, 2024
d17c83d
Fix boss spawner names
Gordon-Frohman Mar 11, 2024
22261e1
Every boss now leave behind its spawner when going into peaceful
Gordon-Frohman Mar 11, 2024
6a71fcf
Spotless applied
Gordon-Frohman Mar 11, 2024
adcc368
Ice bomb tweaks
Gordon-Frohman Mar 11, 2024
24b5acb
Charms effects finally render properly
Gordon-Frohman Mar 11, 2024
9dd5fe8
Thorn rose tweaking
Gordon-Frohman Mar 11, 2024
c80182d
Add way of getting progression achievements using new trophies
Gordon-Frohman Mar 13, 2024
8b21ba7
Charms of Keeping now keep inventory even if you log out instead of r…
Gordon-Frohman Apr 8, 2024
eeea1da
Update TFEventListener.java
Gordon-Frohman Apr 8, 2024
2a8b808
Phantom armor features
Gordon-Frohman Apr 8, 2024
e3f9174
Crumble horn can now crumble much more blocks
Gordon-Frohman Apr 8, 2024
2cc585e
Fixed generated water not flowing
Gordon-Frohman Apr 8, 2024
4b5db8c
Fixed (another) nagastone crash
Gordon-Frohman Apr 8, 2024
4fa988a
Add chests made of twilight wood
Gordon-Frohman Apr 8, 2024
0e63e8a
Fix chests render
Gordon-Frohman Apr 9, 2024
22ccc67
Allow projectiles to break burnt thorns
Gordon-Frohman Apr 9, 2024
76c0ed8
Bugs can now be killed with projectiles
Gordon-Frohman Apr 9, 2024
54cbd9d
Cicadas now shut up once broken
Gordon-Frohman Apr 10, 2024
5bd59b0
Merge branch 'GTNewHorizons:master' into master
Gordon-Frohman Apr 10, 2024
621e4b7
Update to match the master branch
Gordon-Frohman May 4, 2024
dbddd92
Merge branch 'master' into master
Gordon-Frohman May 4, 2024
bd3b9da
Merge branch 'GTNewHorizons:master' into master
Gordon-Frohman May 6, 2024
5bc4038
Merge branch 'master' into master
Gordon-Frohman May 11, 2024
3408c01
Remove broken import
Gordon-Frohman May 11, 2024
58871c6
Etched nagastone direction is now never null
Gordon-Frohman May 27, 2024
97acd3d
Add missing check for Baubles
Gordon-Frohman May 27, 2024
44ca9f2
Add cicada client check
Gordon-Frohman May 27, 2024
5d51c7c
Update BlockTFCicada.java
Gordon-Frohman May 27, 2024
7c208bf
Register missing tile entities
Gordon-Frohman May 27, 2024
0228473
Remove ISound from TileEntityTFCicada
Gordon-Frohman May 27, 2024
802eeda
Fix a stupid mistake
Gordon-Frohman May 27, 2024
c3bc4ef
Remove @SideOnly(Side.CLIENT) from BlockTFCicada
Gordon-Frohman May 29, 2024
7f029d5
Remove ISound from BlockTFCicada as well
Gordon-Frohman May 31, 2024
9143d32
Remove ALL client-related stuff from TileEntityTFCicada
Gordon-Frohman Jun 1, 2024
86ae171
Remove unnecessary stuff
Gordon-Frohman Jun 1, 2024
8a13fff
Update TFClientProxy.java
Gordon-Frohman Jun 1, 2024
b75082c
Spotless applied
Gordon-Frohman Jun 1, 2024
f9f2e4f
Update BlockTFCicada.java
Gordon-Frohman Jun 6, 2024
5c16a31
Remove unnecessary tessellator calls
Gordon-Frohman Jun 20, 2024
6d3cfbf
Fix fiery metal block brightness
Gordon-Frohman Jun 20, 2024
ac19cb0
Add GTNH check for recipes
Gordon-Frohman Jun 20, 2024
d2f1578
Fix cicada crash
Gordon-Frohman Jun 27, 2024
c20ead7
Merge branch 'master' into master
Dream-Master Jun 27, 2024
b971a1f
Spotless applied
Gordon-Frohman Jun 27, 2024
874fc2c
Fix chest issues
Gordon-Frohman Jun 28, 2024
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
86 changes: 0 additions & 86 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,89 +36,3 @@ addon.local.gradle.kts
addon.late.local.gradle
addon.late.local.gradle.kts
layout.json
src/main/resources/assets/tinker/textures/items/textures to draw/_sword_accessory.png
src/main/resources/assets/tinker/textures/items/textures to draw/_shuriken.png
src/main/resources/assets/tinker/textures/items/textures to draw/_shuriken (2).png
src/main/resources/assets/tinker/textures/items/textures to draw/_shovel_handle.png
src/main/resources/assets/tinker/textures/items/textures to draw/_scythe_handle.png
src/main/resources/assets/tinker/textures/items/textures to draw/_scythe_binding.png
src/main/resources/assets/tinker/textures/items/textures to draw/_scythe_accessory.png
src/main/resources/assets/tinker/textures/items/textures to draw/_rod.png
src/main/resources/assets/tinker/textures/items/textures to draw/_rapier_handle.png
src/main/resources/assets/tinker/textures/items/textures to draw/_rapier_accessory.png
src/main/resources/assets/tinker/textures/items/textures to draw/_pickaxe_handle.png
src/main/resources/assets/tinker/textures/items/textures to draw/_pickaxe_accessory.png
src/main/resources/assets/tinker/textures/items/textures to draw/_medium_guard.png
src/main/resources/assets/tinker/textures/items/textures to draw/_mattock_handle.png
src/main/resources/assets/tinker/textures/items/textures to draw/_lumberaxe_handle.png
src/main/resources/assets/tinker/textures/items/textures to draw/_lumberaxe_binding.png
src/main/resources/assets/tinker/textures/items/textures to draw/_longsword_handle.png
src/main/resources/assets/tinker/textures/items/textures to draw/_longsword_accessory.png
src/main/resources/assets/tinker/textures/items/textures to draw/_large_guard.png
src/main/resources/assets/tinker/textures/items/textures to draw/_knife_handle.png
src/main/resources/assets/tinker/textures/items/textures to draw/_knife_blade.png
src/main/resources/assets/tinker/textures/items/textures to draw/_knife_blade (2).png
src/main/resources/assets/tinker/textures/items/textures to draw/_javelin_head_broken.png
src/main/resources/assets/tinker/textures/items/textures to draw/_javelin_head.png
src/main/resources/assets/tinker/textures/items/textures to draw/_javelin_handle.png
src/main/resources/assets/tinker/textures/items/textures to draw/_javelin_accessory.png
src/main/resources/assets/tinker/textures/items/textures to draw/_hammer_handle_broken.png
src/main/resources/assets/tinker/textures/items/textures to draw/_hammer_handle.png
src/main/resources/assets/tinker/textures/items/textures to draw/_full_guard.png
src/main/resources/assets/tinker/textures/items/textures to draw/_frypan_handle.png
src/main/resources/assets/tinker/textures/items/textures to draw/_excavator_handle.png
src/main/resources/assets/tinker/textures/items/textures to draw/_excavator_grip.png
src/main/resources/assets/tinker/textures/items/textures to draw/_dagger_handle.png
src/main/resources/assets/tinker/textures/items/textures to draw/_dagger_blade_broken.png
src/main/resources/assets/tinker/textures/items/textures to draw/_dagger_blade.png
src/main/resources/assets/tinker/textures/items/textures to draw/_dagger_accessory.png
src/main/resources/assets/tinker/textures/items/textures to draw/_cutlass_handle.png
src/main/resources/assets/tinker/textures/items/textures to draw/_cutlass_guard.png
src/main/resources/assets/tinker/textures/items/textures to draw/_cutlass_blade_broken.png
src/main/resources/assets/tinker/textures/items/textures to draw/_cutlass_blade.png
src/main/resources/assets/tinker/textures/items/textures to draw/_crossbow_limb.png
src/main/resources/assets/tinker/textures/items/textures to draw/_crossbow_bow_3.png
src/main/resources/assets/tinker/textures/items/textures to draw/_crossbow_bow_2.png
src/main/resources/assets/tinker/textures/items/textures to draw/_crossbow_bow_1.png
src/main/resources/assets/tinker/textures/items/textures to draw/_crossbow_bow.png
src/main/resources/assets/tinker/textures/items/textures to draw/_crossbow_body.png
src/main/resources/assets/tinker/textures/items/textures to draw/_crossbow_body (2).png
src/main/resources/assets/tinker/textures/items/textures to draw/_crossbow_binding.png
src/main/resources/assets/tinker/textures/items/textures to draw/_crossbar.png
src/main/resources/assets/tinker/textures/items/textures to draw/_cleaver_handle.png
src/main/resources/assets/tinker/textures/items/textures to draw/_cleaver_guard.png
src/main/resources/assets/tinker/textures/items/textures to draw/_chisel_head_broken.png
src/main/resources/assets/tinker/textures/items/textures to draw/_chisel_head.png
src/main/resources/assets/tinker/textures/items/textures to draw/_chisel_head (2).png
src/main/resources/assets/tinker/textures/items/textures to draw/_chisel_handle.png
src/main/resources/assets/tinker/textures/items/textures to draw/_bow_top_3.png
src/main/resources/assets/tinker/textures/items/textures to draw/_bow_top_3 (2).png
src/main/resources/assets/tinker/textures/items/textures to draw/_bow_top_2.png
src/main/resources/assets/tinker/textures/items/textures to draw/_bow_top_2 (2).png
src/main/resources/assets/tinker/textures/items/textures to draw/_bow_top_1.png
src/main/resources/assets/tinker/textures/items/textures to draw/_bow_top_1 (2).png
src/main/resources/assets/tinker/textures/items/textures to draw/_bow_top.png
src/main/resources/assets/tinker/textures/items/textures to draw/_bow_top (2).png
src/main/resources/assets/tinker/textures/items/textures to draw/_bow_limb.png
src/main/resources/assets/tinker/textures/items/textures to draw/_bow_grip.png
src/main/resources/assets/tinker/textures/items/textures to draw/_bow_bottom_3.png
src/main/resources/assets/tinker/textures/items/textures to draw/_bow_bottom_3 (2).png
src/main/resources/assets/tinker/textures/items/textures to draw/_bow_bottom_2.png
src/main/resources/assets/tinker/textures/items/textures to draw/_bow_bottom_2 (2).png
src/main/resources/assets/tinker/textures/items/textures to draw/_bow_bottom_1.png
src/main/resources/assets/tinker/textures/items/textures to draw/_bow_bottom_1 (2).png
src/main/resources/assets/tinker/textures/items/textures to draw/_bow_bottom.png
src/main/resources/assets/tinker/textures/items/textures to draw/_bow_bottom (2).png
src/main/resources/assets/tinker/textures/items/textures to draw/_binding.png
src/main/resources/assets/tinker/textures/items/textures to draw/_battlesign_handle.png
src/main/resources/assets/tinker/textures/items/textures to draw/_battleaxe_head_broken.png
src/main/resources/assets/tinker/textures/items/textures to draw/_battleaxe_head.png
src/main/resources/assets/tinker/textures/items/textures to draw/_battleaxe_handle.png
src/main/resources/assets/tinker/textures/items/textures to draw/_battleaxe_fronthead_broken.png
src/main/resources/assets/tinker/textures/items/textures to draw/_battleaxe_fronthead.png
src/main/resources/assets/tinker/textures/items/textures to draw/_battleaxe_front.png
src/main/resources/assets/tinker/textures/items/textures to draw/_battleaxe_binding.png
src/main/resources/assets/tinker/textures/items/textures to draw/_battleaxe_backhead.png
src/main/resources/assets/tinker/textures/items/textures to draw/_battleaxe_back.png
src/main/resources/assets/tinker/textures/items/textures to draw/_axe_handle.png
src/main/resources/assets/tinker/textures/items/textures to draw/_arrow_shaft.png
26 changes: 26 additions & 0 deletions src/main/java/twilightforest/TFCommonProxy.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

import net.minecraft.client.model.ModelBiped;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.ChunkCoordinates;
import net.minecraft.util.ResourceLocation;
import net.minecraft.world.World;

import cpw.mods.fml.common.network.IGuiHandler;
Expand Down Expand Up @@ -39,6 +41,10 @@ public int getCakeBlockRenderID() {
return 0;
}

public int getChestBlockRenderID() {
return 0;
}

public int getComplexBlockRenderID() {
return 0;
}
Expand Down Expand Up @@ -75,6 +81,10 @@ public int getKnightmetalBlockRenderID() {
return 0;
}

public int getFieryMetalBlockRenderID() {
return 0;
}

public int getHugeLilyPadBlockRenderID() {
return 0;
}
Expand Down Expand Up @@ -142,6 +152,22 @@ public ModelBiped getFieryArmorModel(int armorSlot) {
return null;
}

public ModelBiped getTrophyArmorModel(int boss) {
return null;
}

public ModelBiped getCritterArmorModel(int critter) {
return null;
}

public void doBlockAnnihilateEffect(World worldObj, int blockX, int blockY, int blockZ) {}

public boolean checkForSound(ChunkCoordinates chunkcoordinates) {
return true;
}

public void stopSound(World worldIn, int x, int y, int z) {}

public void playSound(World worldObj, ChunkCoordinates chunkcoordinates, ResourceLocation soundResource) {}

}
119 changes: 80 additions & 39 deletions src/main/java/twilightforest/TFEventListener.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package twilightforest;

import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;

Expand Down Expand Up @@ -34,14 +36,15 @@
import net.minecraftforge.event.entity.living.LivingHurtEvent;
import net.minecraftforge.event.entity.player.BonemealEvent;
import net.minecraftforge.event.entity.player.EntityItemPickupEvent;
import net.minecraftforge.event.entity.player.PlayerEvent;
import net.minecraftforge.event.entity.player.PlayerInteractEvent;
import net.minecraftforge.event.entity.player.PlayerInteractEvent.Action;
import net.minecraftforge.event.world.BlockEvent.BreakEvent;
import net.minecraftforge.event.world.BlockEvent.HarvestDropsEvent;
import net.minecraftforge.event.world.WorldEvent;

import baubles.common.container.InventoryBaubles;
import baubles.common.lib.PlayerHandler;
import com.google.common.io.Files;

import cpw.mods.fml.common.FMLLog;
import cpw.mods.fml.common.eventhandler.Event.Result;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
Expand All @@ -61,6 +64,7 @@
import twilightforest.entity.EntityTFPinchBeetle;
import twilightforest.entity.EntityTFYeti;
import twilightforest.integration.TFBaublesIntegration;
import twilightforest.item.ItemTFPhantomArmor;
import twilightforest.item.TFItems;
import twilightforest.world.ChunkProviderTwilightForest;
import twilightforest.world.TFWorldChunkManager;
Expand All @@ -71,6 +75,9 @@
*/
public class TFEventListener {

public static String fileName = "tf";
public static String fileNameBackup = "tfback";

protected HashMap<String, InventoryPlayer> playerKeepsMap = new HashMap<>();
protected HashMap<String, ItemStack[]> playerBaublesMap = new HashMap<>();
private boolean isBreakingWithGiantPick = false;
Expand Down Expand Up @@ -102,6 +109,9 @@ public void pickupItem(EntityItemPickupEvent event) {
case 2 -> event.entityPlayer.triggerAchievement(TFAchievementPage.twilightKillLich);
case 3 -> event.entityPlayer.triggerAchievement(TFAchievementPage.twilightProgressUrghast);
case 4 -> event.entityPlayer.triggerAchievement(TFAchievementPage.twilightProgressGlacier);
case 5 -> event.entityPlayer.triggerAchievement(TFAchievementPage.twilightProgressLabyrinth);
case 6 -> event.entityPlayer.triggerAchievement(TFAchievementPage.twilightProgressKnights);
case 7 -> event.entityPlayer.triggerAchievement(TFAchievementPage.twilightProgressYeti);
}
// mazebreaker
} else if (item == TFItems.mazebreakerPick) {
Expand Down Expand Up @@ -421,24 +431,19 @@ public void entityHurts(LivingHurtEvent event) {
EntityTFCharmEffect effect = new EntityTFCharmEffect(
player.worldObj,
player,
charm1 ? TFItems.charmOfLife1 : TFItems.charmOfLife2);
charm1 ? TFItems.charmOfLife1 : TFItems.charmOfLife2,
0);
player.worldObj.spawnEntityInWorld(effect);

EntityTFCharmEffect effect2 = new EntityTFCharmEffect(
player.worldObj,
player,
charm1 ? TFItems.charmOfLife1 : TFItems.charmOfLife2);
effect2.offset = (float) Math.PI;
charm1 ? TFItems.charmOfLife1 : TFItems.charmOfLife2,
(float) Math.PI);
player.worldObj.spawnEntityInWorld(effect2);

// sound
player.worldObj.playSoundEffect(
player.posX + 0.5D,
player.posY + 0.5D,
player.posZ + 0.5D,
"mob.zombie.unfect",
1.5F,
1.0F);
player.worldObj.playSoundEffect(player.posX, player.posY, player.posZ, "mob.zombie.unfect", 1.5F, 1.0F);

}
}
Expand Down Expand Up @@ -570,6 +575,17 @@ public void livingDies(LivingDeathEvent event) {
}
playerKeepsMap.put(player.getCommandSenderName(), keepInventory);
}

// check for phantom armor
for (int i = 0; i < 4; i++) {
if (player.inventory.armorInventory[i] != null
&& player.inventory.armorInventory[i].getItem() instanceof ItemTFPhantomArmor) {
InventoryPlayer keepInventory = retrieveOrMakeKeepInventory(player);
keepInventory.armorInventory[i] = ItemStack.copyItemStack(player.inventory.armorInventory[i]);
player.inventory.armorInventory[i] = null;
playerKeepsMap.put(player.getCommandSenderName(), keepInventory);
}
}
}

if (playerKeepsMap.size() > 1) {
Expand Down Expand Up @@ -599,6 +615,51 @@ private void keepAllArmor(EntityPlayer player, InventoryPlayer keepInventory) {
}
}

@SubscribeEvent
public void playerLoad(PlayerEvent.LoadFromFile event) {
playerLoadDo(event.entityPlayer, event.playerDirectory);
}

private void playerLoadDo(EntityPlayer player, File directory) {
File file1, file2;

// look for normal files first
file1 = getPlayerFile(fileName, directory, player.getCommandSenderName());
file2 = getPlayerFile(fileNameBackup, directory, player.getCommandSenderName());

// look for uuid files when normal file missing
if (!file1.exists()) {
File filep = getPlayerFileUUID(fileName, directory, player.getGameProfile().getId().toString());
if (filep.exists()) {
try {
Files.copy(filep, file1);
System.out.println(
"Using and converting UUID Charm of Keeping savefile for " + player.getCommandSenderName());
filep.delete();
File fb = getPlayerFileUUID(fileNameBackup, directory, player.getGameProfile().getId().toString());
if (fb.exists()) fb.delete();
} catch (IOException e) {}
}
}

TFPlayerHandler.loadPlayerKeepInventory(player, file1, file2);
}

public static File getPlayerFile(String suffix, File playerDirectory, String playername) {
if ("dat".equals(suffix)) throw new IllegalArgumentException("The suffix 'dat' is reserved");
return new File(playerDirectory, playername + "." + suffix);
}

public File getPlayerFileUUID(String suffix, File playerDirectory, String playerUUID) {
if ("dat".equals(suffix)) throw new IllegalArgumentException("The suffix 'dat' is reserved");
return new File(playerDirectory, playerUUID + "." + suffix);
}

@SubscribeEvent
public void playerSave(PlayerEvent.SaveToFile event) {
TFBaublesIntegration.playerSaveDo(event.entityPlayer, event.playerDirectory);
}

/**
* Maybe we kept some stuff for the player!
*/
Expand Down Expand Up @@ -627,35 +688,25 @@ public void onPlayerRespawn(PlayerRespawnEvent event) {
}
}

if (TwilightForestMod.areBaublesLoaded && baublesInventory != null) {
InventoryBaubles inventoryBaubles = PlayerHandler.getPlayerBaubles(player);
for (int i = 0; i < inventoryBaubles.getSizeInventory(); i++) {
if (baublesInventory[i] != null) inventoryBaubles.setInventorySlotContents(i, baublesInventory[i]);
}
}
TFBaublesIntegration.restoreBaubles(player, baublesInventory);

// spawn effect thingers
if (keepInventory.getItemStack() != null) {
EntityTFCharmEffect effect = new EntityTFCharmEffect(
player.worldObj,
player,
keepInventory.getItemStack().getItem());
keepInventory.getItemStack().getItem(),
0);
player.worldObj.spawnEntityInWorld(effect);

EntityTFCharmEffect effect2 = new EntityTFCharmEffect(
player.worldObj,
player,
keepInventory.getItemStack().getItem());
effect2.offset = (float) Math.PI;
keepInventory.getItemStack().getItem(),
(float) Math.PI);
player.worldObj.spawnEntityInWorld(effect2);

player.worldObj.playSoundEffect(
player.posX + 0.5D,
player.posY + 0.5D,
player.posZ + 0.5D,
"mob.zombie.unfect",
1.5F,
1.0F);
player.worldObj.playSoundEffect(player.posX, player.posY, player.posZ, "mob.zombie.unfect", 1.5F, 1.0F);
}
playerKeepsMap.remove(player.getCommandSenderName());
playerBaublesMap.remove(player.getCommandSenderName());
Expand All @@ -668,18 +719,8 @@ public void onPlayerRespawn(PlayerRespawnEvent event) {
@SubscribeEvent
public void onPlayerLogout(PlayerLoggedOutEvent event) {
EntityPlayer player = event.player;
if (playerKeepsMap.containsKey(player.getCommandSenderName())) {
FMLLog.warning(
"[TwilightForest] Mod was keeping inventory items in reserve for player %s but they logged out! Items are being dropped.",
player.getCommandSenderName());
InventoryPlayer keepInventory = playerKeepsMap.get(player.getCommandSenderName());

// set player to the player logging out
keepInventory.player = player;
keepInventory.dropAllItems();

if (playerKeepsMap.containsKey(player.getCommandSenderName()))
playerKeepsMap.remove(player.getCommandSenderName());
}
}

/**
Expand Down
Loading