mirror of
https://github.com/GTNewHorizons/Electro-Magic-Tools.git
synced 2026-11-21 12:32:12 +00:00
Lots of things. Read the description.
-Redid item and block unlocalized names to include the MODID -Revamped the ConfigGUI -Localize everything except Thaumonomicon titles -Fix config GUI refreshing config on change. -Fix custom mob drops -Make some tooltips easier to read -Organize Item/Block registry order to make things flow
This commit is contained in:
1 parent
121203da31
commit
cc08a6a8cb
121 files changed
+6705
-6529
No files matched your search
@@ -0,0 +1,58 @@
|
||||
/*******************************************************************************
|
||||
* Copyright (c) 2014 Tombenpotter.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This program and the accompanying materials are made available under the terms of the GNU Public License v3.0
|
||||
* which accompanies this distribution, and is available at http://www.gnu.org/licenses/gpl.html
|
||||
*
|
||||
* This class was made by Tombenpotter and is distributed as a part of the Electro-Magic Tools mod.
|
||||
* Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012.
|
||||
* http://www.minecraftforum.net/topic/1585216-
|
||||
******************************************************************************/
|
||||
|
||||
package tombenpotter.emt.common.util;
|
||||
|
||||
import cpw.mods.fml.client.event.ConfigChangedEvent;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.monster.EntityCreeper;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.event.entity.living.LivingDropsEvent;
|
||||
import thaumcraft.common.entities.monster.EntityTaintChicken;
|
||||
import tombenpotter.emt.ElectroMagicTools;
|
||||
import tombenpotter.emt.ModInformation;
|
||||
import tombenpotter.emt.common.module.ic2.IC2ModuleItemRegistry;
|
||||
|
||||
public class EventHandlerEMT {
|
||||
|
||||
@SubscribeEvent
|
||||
public void onEntityLivingDrops(LivingDropsEvent event) {
|
||||
if (event.source.getEntity() != null && event.source.getEntity() instanceof EntityPlayer) {
|
||||
if (event.entityLiving instanceof EntityCreeper) {
|
||||
EntityCreeper creeper = (EntityCreeper) event.entityLiving;
|
||||
if (creeper.getPowered()) {
|
||||
event.drops.add(new EntityItem(event.entityLiving.worldObj, event.entityLiving.posX, event.entityLiving.posY, event.entityLiving.posZ, new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 6)));
|
||||
}
|
||||
}
|
||||
if (event.entityLiving instanceof EntityTaintChicken) {
|
||||
event.drops.add(new EntityItem(event.entityLiving.worldObj, event.entityLiving.posX, event.entityLiving.posY, event.entityLiving.posZ, new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 14)));
|
||||
}
|
||||
}
|
||||
|
||||
if (event.entityLiving instanceof EntityCreeper) {
|
||||
event.entityLiving.entityDropItem(new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 6), 1);
|
||||
}
|
||||
if (event.entityLiving instanceof EntityTaintChicken) {
|
||||
event.entityLiving.entityDropItem(new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 14), 1);
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onConfigChanged(ConfigChangedEvent.OnConfigChangedEvent eventArgs) {
|
||||
if (eventArgs.modID.equals(ModInformation.modid)) {
|
||||
ConfigHandler.syncConfig();
|
||||
ElectroMagicTools.logger.info(TextHelper.localize("console.EMT.config.refresh"));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user