More configs & start fixing cable models
This commit is contained in:
parent
ad36dfcddb
commit
2b7868c651
46 changed files with 738 additions and 309 deletions
|
@ -26,17 +26,21 @@ package techreborn.events;
|
|||
|
||||
import net.minecraftforge.event.world.BlockEvent;
|
||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||
import reborncore.common.registration.RebornRegistry;
|
||||
import reborncore.common.registration.impl.ConfigRegistry;
|
||||
import techreborn.items.ItemGems;
|
||||
import techreborn.lib.ModInfo;
|
||||
import techreborn.utils.OreDictUtils;
|
||||
|
||||
/**
|
||||
* Created by McKeever on 10/16/2016.
|
||||
*/
|
||||
@RebornRegistry(modID = ModInfo.MOD_ID)
|
||||
public class BlockBreakHandler {
|
||||
|
||||
@ConfigRegistry(config = "misc", category = "general", key = "RubyRedGarnetDrops", comment = "Give red garnet drops to any harvested oreRuby")
|
||||
public static boolean rubyGarnetDrops = true;
|
||||
|
||||
@SubscribeEvent
|
||||
public void onBlockHarvest(BlockEvent.HarvestDropsEvent event) {
|
||||
if (OreDictUtils.isOre(event.getState(), "oreRuby")) {
|
||||
if (rubyGarnetDrops && OreDictUtils.isOre(event.getState(), "oreRuby")) {
|
||||
event.getDrops().add(ItemGems.getGemByName("red_garnet").copy());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -31,13 +31,19 @@ import net.minecraft.util.EnumHand;
|
|||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||
import net.minecraftforge.fml.common.gameevent.TickEvent;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
import reborncore.common.registration.RebornRegistry;
|
||||
import reborncore.common.registration.impl.ConfigRegistry;
|
||||
import reborncore.common.util.ItemUtils;
|
||||
import techreborn.config.ConfigTechReborn;
|
||||
import techreborn.lib.ModInfo;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
@RebornRegistry(modID = ModInfo.MOD_ID)
|
||||
public class OreUnifier {
|
||||
|
||||
@ConfigRegistry(config = "misc", category = "general", key = "OreUnifier", comment = "Convert any ore itemstacks into Tech Reborn ores")
|
||||
public static boolean oreUnifier = false;
|
||||
|
||||
public static HashMap<String, ItemStack> oreHash = new HashMap<>();
|
||||
|
||||
public static void registerOre(String name, ItemStack ore) {
|
||||
|
@ -55,7 +61,7 @@ public class OreUnifier {
|
|||
|
||||
@SubscribeEvent
|
||||
public void itemTick(TickEvent.PlayerTickEvent event) {
|
||||
if (ConfigTechReborn.OreUnifer && !event.player.world.isRemote
|
||||
if (oreUnifier && !event.player.world.isRemote
|
||||
&& event.player.world.getTotalWorldTime() % 10 == 0) {
|
||||
if (event.player.getHeldItem(EnumHand.MAIN_HAND) != ItemStack.EMPTY) {
|
||||
int[] oreIds = OreDictionary.getOreIDs(event.player.getHeldItem(EnumHand.MAIN_HAND));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue