Custom Base Setup

This commit is contained in:
kitsushadow
2016-11-24 17:14:08 -05:00
parent bd006ca288
commit f969a7d24d
42 changed files with 208 additions and 4425 deletions

View File

@@ -1,4 +1,4 @@
package nmd.primal.forgecraft.common;
package nmd.primal.forgecraft;
/**
* Created by kitsu on 11/23/2016.

View File

@@ -1,6 +1,5 @@
package nmd.primal.forgecraft.common;
package nmd.primal.forgecraft;
import net.minecraft.init.Blocks;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.Mod.EventHandler;
import net.minecraftforge.fml.common.SidedProxy;
@@ -8,10 +7,9 @@ import net.minecraftforge.fml.common.event.FMLInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
import net.minecraftforge.fml.common.event.FMLServerStartingEvent;
import net.minecraftforge.fml.common.network.NetworkRegistry;
import nmd.primal.forgecraft.common.init.*;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import nmd.primal.forgecraft.Item.ModItems;
import nmd.primal.forgecraft.proxy.CommonProxy;
//import nmd.primal.forgecraft.common.init.*;
import java.util.Locale;
@@ -26,19 +24,19 @@ import java.util.Locale;
public class ForgeCraft
{
@Mod.Instance(ModInfo.MOD_ID)
public static ForgeCraft INSTANCE;
public static ForgeCraft INSTANCE = new ForgeCraft();
@SidedProxy(clientSide = ModInfo.CLIENT_PROXY, serverSide = ModInfo.COMMON_PROXY)
public static CommonProxy proxy;
public static Logger LOGGER = LogManager.getLogger(ModInfo.MOD_ID);
@EventHandler
public void preInit(FMLPreInitializationEvent event)
{
LOGGER.info("Pre-Init");
Locale.setDefault(Locale.ENGLISH);
//this.proxy.preInit(event);
ModItems.init();
//ModItems.createItems();
/*Configuration File*/
//CONFIG_DIRECTORY = new File(event.getModConfigurationDirectory(), "primal");
@@ -83,6 +81,8 @@ public class ForgeCraft
@EventHandler
public void init(FMLInitializationEvent event)
{
//this.proxy.init(event);
//LOGGER.info("Init");
// proxy.init();
@@ -105,6 +105,7 @@ public class ForgeCraft
@EventHandler
public void postInit(FMLPostInitializationEvent event)
{
//this.proxy.postInit(event);
//LOGGER.info("Post-Init");
//proxy.postInit();

View File

@@ -0,0 +1,30 @@
package nmd.primal.forgecraft.Item;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import nmd.primal.forgecraft.ForgeCraft;
import nmd.primal.forgecraft.ModInfo;
/**
* Created by kitsu on 11/24/2016.
*/
public class ItemBase extends Item implements ItemModelProvider{
protected String name;
public ItemBase(String name) {
this.name = name;
setUnlocalizedName(name);
setRegistryName(name);
}
public void registerItemModel(Item item) {
ForgeCraft.proxy.registerItemRenderer(this, 0, name);
}
@Override
public ItemBase setCreativeTab(CreativeTabs tab) {
super.setCreativeTab(tab);
return this;
}
}

View File

@@ -0,0 +1,12 @@
package nmd.primal.forgecraft.Item;
import net.minecraft.item.Item;
/**
* Created by kitsu on 11/24/2016.
*/
public interface ItemModelProvider {
void registerItemModel(Item item);
}

View File

@@ -0,0 +1,8 @@
package nmd.primal.forgecraft.Item;
/**
* Created by kitsu on 11/24/2016.
*/
public interface ItemOreDict {
void initOreDict();
}

View File

@@ -0,0 +1,33 @@
package nmd.primal.forgecraft.Item;
import net.minecraft.item.Item;
import net.minecraftforge.fml.common.registry.GameRegistry;
import nmd.primal.forgecraft.ModInfo;
/**
* Created by kitsu on 11/24/2016.
*/
public class ModItems {
public static Item test;
public static void init(){
test = register(new ItemBase("test").setCreativeTab(ModInfo.TAB_FORGECRAFT));
}
private static <T extends Item> T register(T item) {
GameRegistry.register(item);
if (item instanceof ItemModelProvider) {
((ItemModelProvider)item).registerItemModel(item);
}
if (item instanceof ItemOreDict) {
((ItemOreDict)item).initOreDict();
}
return item;
}
}

View File

@@ -0,0 +1,44 @@
package nmd.primal.forgecraft;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import nmd.primal.forgecraft.Item.ModItems;
/**
* Created by kitsu on 11/24/2016.
*/
public class ModInfo {
/** Mod Details**/
public static final String DEPENDENCIES = "after:primal;";
public static final String MOD_ID = "forgecraft";
public static final String MOD_PREFIX = MOD_ID + ":";
public static final String MOD_CHANNEL = MOD_ID;
public static final String MOD_VERSION = "0.0.0";
public static final String MC_VERSIONS = "[1.9.4, 1.11.0)";
/** Mod Structures **/
public static final String COMMON_PROXY = "nmd.primal.forgecraft.proxy.CommonProxy";
public static final String CLIENT_PROXY = "nmd.primal.forgecraft.proxy.ClientProxy";
public static final String GUI_FACTORY = "nmd.primal.forgecraft.gui.GuiFactory";
public static final String UPDATE_JSON = "";
/** GUI IDs **/
//public static final int WORKTABLE_BASIC = 0;
//public static final int WORKTABLE_SHELF = 1;
//public static final int WORKTABLE_CHEST = 2;
//public static final int STORAGE_CRATE = 4;
//public static final int CHEST_NETHER = 5;
//public static final int QUERN = 6;
//public static final int KLIN = 7;
//public static final int OVEN = 8;
/** Creative Tabs **/
public static CreativeTabs TAB_FORGECRAFT = new CreativeTabs(MOD_ID) {
@Override
@SideOnly(Side.CLIENT)
public Item getTabIconItem() { return ModItems.test; }
};
}

View File

@@ -1,12 +0,0 @@
package nmd.primal.forgecraft.api;
import net.minecraft.block.Block;
///
// import static nmd.primal.core.api.ForgeCraftBlocks.*;
///
public class ForgeCraftBlocks
{
public static Block FIREBOX;
}

View File

@@ -1,73 +0,0 @@
package nmd.primal.forgecraft.api;
import net.minecraft.util.math.AxisAlignedBB;
public class ForgeCraftBounds
{
// ***************************************************************************** //
// Common Bounding Boxes
// ***************************************************************************** //
public static final AxisAlignedBB AABB_SOULSAND = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 0.875D, 1.0D);
public static final AxisAlignedBB AABB_FARMLAND = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 0.9375D, 1.0D);
public static final AxisAlignedBB AABB_NARROW_CUBE = new AxisAlignedBB(0.26D, 0.0D, 0.26D, 0.74D, 1.0D, 0.74D);
public static final AxisAlignedBB AABB_BUSH = new AxisAlignedBB(0.30000001192092896D, 0.0D, 0.30000001192092896D, 0.699999988079071D, 0.6000000238418579D, 0.699999988079071D);
public static final AxisAlignedBB[] AABB_CROPS = new AxisAlignedBB[] {new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 0.125D, 1.0D), new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 0.25D, 1.0D), new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 0.375D, 1.0D), new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 0.5D, 1.0D), new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 0.625D, 1.0D), new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 0.75D, 1.0D), new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 0.875D, 1.0D), new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 1.0D, 1.0D)};
// ***************************************************************************** //
// Block/Model Specific Bounding Boxes
// ***************************************************************************** //
public static final AxisAlignedBB AABB_DRYING_RACK = new AxisAlignedBB(0.0625D, 0.0D, 0.0625D, 0.9375D, 0.9375D, 0.9375D);
// TODO: this should be broken into two, to account for orientation. For the time being one size fits either direction is OK.
public static final AxisAlignedBB AABB_FISH_TRAP = new AxisAlignedBB(0.15D, 0.0D, 0.15D, 0.85D, 0.5D, 0.85D);
public static final AxisAlignedBB AABB_LANTERN_UP = new AxisAlignedBB(0.32D, 0.0D, 0.32D, 0.68D, 0.75D, 0.68D);
public static final AxisAlignedBB AABB_LANTERN = new AxisAlignedBB(0.32D, 0.07D, 0.32D, 0.68D, 0.93D, 0.68D);
public static final AxisAlignedBB AABB_SLAT_TOP_FULL = new AxisAlignedBB(0.0D, 0.815D, 0.0D, 1.0D, 0.935D, 1.0D);
public static final AxisAlignedBB AABB_SLAT_BOTTOM_FULL = new AxisAlignedBB(0.0D, 0.065D, 0.0D, 1.0D, 0.185D, 1.0D);
public static final AxisAlignedBB AABB_SLAT_TOP_EAST = new AxisAlignedBB(0.0D, 0.815D, 0.0D, 0.875D, 0.935D, 1.0D);
public static final AxisAlignedBB AABB_SLAT_BOTTOM_EAST = new AxisAlignedBB(0.0D, 0.065D, 0.0D, 0.875D, 0.185D, 1.0D);
public static final AxisAlignedBB AABB_SLAT_TOP_WEST = new AxisAlignedBB(0.125D, 0.815D, 0.0D, 1.0D, 0.935D, 1.0D);
public static final AxisAlignedBB AABB_SLAT_BOTTOM_WEST = new AxisAlignedBB(0.125D, 0.065D, 0.0D, 1.0D, 0.185D, 1.0D);
public static final AxisAlignedBB AABB_SLAT_TOP_NORTH = new AxisAlignedBB(0.0D, 0.815D, 0.125D, 1.0D, 0.935D, 1.0D);
public static final AxisAlignedBB AABB_SLAT_BOTTOM_NORTH = new AxisAlignedBB(0.0D, 0.065D, 0.125D, 1.0D, 0.185D, 1.0D);
public static final AxisAlignedBB AABB_SLAT_TOP_SOUTH = new AxisAlignedBB(0.0D, 0.815D, 0.0D, 1.0D, 0.935D, 0.875D);
public static final AxisAlignedBB AABB_SLAT_BOTTOM_SOUTH = new AxisAlignedBB(0.0D, 0.065D, 0.0D, 1.0D, 0.185D, 0.875D);
public static final AxisAlignedBB AABB_SLAB_BOTTOM = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 0.5D, 1.0D);
public static final AxisAlignedBB AABB_SLAB_TOP = new AxisAlignedBB(0.0D, 0.5D, 0.0D, 1.0D, 1.0D, 1.0D);
public static final AxisAlignedBB AABB_SLAB_VERTICAL_SOUTH = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 1.0D, 0.5D);
public static final AxisAlignedBB AABB_SLAB_VERTICAL_NORTH = new AxisAlignedBB(0.0D, 0.0D, 0.5D, 1.0D, 1.0D, 1.0D);
public static final AxisAlignedBB AABB_SLAB_VERTICAL_WEST = new AxisAlignedBB(0.5D, 0.0D, 0.0D, 1.0D, 1.0D, 1.0D);
public static final AxisAlignedBB AABB_SLAB_VERTICAL_EAST = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 0.5D, 1.0D, 1.0D);
public static final AxisAlignedBB AABB_THIN_SLAB_BOTTOM = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 0.1875D, 1.0D);
public static final AxisAlignedBB AABB_THIN_SLAB_TOP = new AxisAlignedBB(0.0D, 0.8125D, 0.0D, 1.0D, 1.0D, 1.0D);
public static final AxisAlignedBB AABB_PALM_CORE = new AxisAlignedBB(0.32D, 0.0D, 0.32D, 0.68D, 1.0D, 0.68D);
public static final AxisAlignedBB AABB_IGNIS_FATUUS = new AxisAlignedBB(0.5D, 0.3D, 0.5D, 0.6D, 0.5D, 0.6D);
// ***************************************************************************** //
// Layers, pretty much the same as vanilla snow, why am I here?
// ***************************************************************************** //
public static final AxisAlignedBB[] AABB_LAYERS = new AxisAlignedBB[] {
new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 0.0D, 1.0D),
new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 0.125D, 1.0D),
new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 0.25D, 1.0D),
new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 0.375D, 1.0D),
new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 0.5D, 1.0D),
new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 0.625D, 1.0D),
new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 0.75D, 1.0D),
new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 0.875D, 1.0D),
new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 1.0D, 1.0D)};
}

View File

@@ -1,232 +0,0 @@
package nmd.primal.forgecraft.api;
import net.minecraft.item.Item;
///
// import static nmd.primal.core.api.ForgeCraftItems.*;
///
public class ForgeCraftItems
{
///
// Ores
///
public static Item TEST;
/*public static Item EARTHWAX_CLUMP;
public static Item CINISCLAY_CLUMP;
public static Item CINISCLAY;
public static Item CINISCOTTA;
public static Item TERRACLAY_CLUMP;
public static Item TERRACLAY;
public static Item TERRACOTTA;
public static Item MUDBRICK_SOFT;
public static Item MUDBRICK_DRY;
public static Item CARBONATE_SLACK;
public static Item CARBONATE_FERRO_SLACK;
public static Item BRASS_DUST;
public static Item BRASS_INGOT;
public static Item BRASS_NUGGET;
public static Item BRONZE_DUST;
public static Item BRONZE_INGOT;
public static Item BRONZE_NUGGET;
public static Item COPPER_DUST;
public static Item COPPER_INGOT;
public static Item COPPER_NUGGET;
public static Item LEAD_DUST;
public static Item LEAD_INGOT;
public static Item LEAD_NUGGET;
public static Item PIGIRON_DUST;
public static Item PIGIRON_INGOT;
public static Item PIGIRON_NUGGET;
public static Item SILVER_DUST;
public static Item SILVER_INGOT;
public static Item SILVER_NUGGET;
public static Item TIN_DUST;
public static Item TIN_INGOT;
public static Item TIN_NUGGET;
public static Item VANADIUM_DUST;
public static Item VANADIUM_INGOT;
public static Item VANADIUM_NUGGET;
public static Item WOOTZ_DUST;
public static Item WOOTZ_INGOT;
public static Item WOOTZ_NUGGET;
public static Item ZINC_DUST;
public static Item ZINC_INGOT;
public static Item ZINC_NUGGET;
public static Item SALT_HALITE_DUST;
public static Item SALT_NETJRY_DUST;
public static Item SALT_FIRE_DUST;
public static Item SALT_VOID_DUST;
///
// Parts
///
public static Item MUCK;
public static Item ROCK;
public static Item MORTAR;
public static Item MUD_CLUMP;
public static Item FLINT_KNAPP;
public static Item FLINT_POINT;
public static Item OBSIDIAN_SHARD;
public static Item OBSIDIAN_KNAPP;
public static Item OBSIDIAN_POINT;
public static Item OBSIDIAN_LENS;
public static Item OPAL_KNAPP;
public static Item OPAL_POINT;
public static Item DIAMOND_KNAPP;
public static Item DIAMOND_POINT;
public static Item EMERALD_KNAPP;
public static Item EMERALD_POINT;
public static Item PLANT_FIBER;
public static Item PLANT_CORDAGE;
public static Item PLANT_CLOTH;
public static Item PLANT_TINDER;
public static Item LEATHER_STRIP;
public static Item LEATHER_CORDAGE;
public static Item SILK_CORDAGE;
public static Item SILK_CORDAGE_COILED;
public static Item STONE_BASIN;
public static Item IRON_STRANDS;
public static Item IRON_PIN;
public static Item IRON_RING;
public static Item IRON_MESH;
public static Item IRON_PLATE;
public static Item IRON_SHEET;
public static Item WOOD_PIN;
public static Item THATCHING_WET;
public static Item THATCHING_DRY;
public static Item RUSH_STEMS;
public static Item RUSH_TIPS;
public static Item RUSH_TIPS_BLOOM;
//public static Item CORN_STALK;
public static Item BARK_ACACIA;
public static Item BARK_BIGOAK;
public static Item BARK_BIRCH;
public static Item BARK_IRONWOOD;
public static Item BARK_JUNGLE;
public static Item BARK_OAK;
public static Item BARK_NETHERPALM;
public static Item BARK_SPRUCE;
public static Item LEAF_ACACIA;
public static Item LEAF_BIGOAK;
public static Item LEAF_BIRCH;
public static Item LEAF_IRONWOOD;
public static Item LEAF_JUNGLE;
public static Item LEAF_NETHERPALM;
public static Item LEAF_SPRUCE;
///
// Foodstuff Items
///
public static Item SUET;
public static Item LARD;
public static Item SALO;
public static Item FISH_LAVAWORM_RAW;
public static Item FISH_LAVAWORM_SALTED;
public static Item FISH_LAVAWORM_DRIED;
public static Item FISH_LAVAWORM_CURED;
public static Item FISH_LAVAWORM_ROTTEN;
public static Item FISH_COD_ROTTEN;
public static Item FISH_COD_DRIED;
public static Item FISH_COD_SALTED;
public static Item FISH_COD_CURED;
public static Item FISH_SALMON_ROTTEN;
public static Item FISH_SALMON_DRIED;
public static Item FISH_SALMON_SALTED;
public static Item FISH_SALMON_CURED;
public static Item FISH_CLOWN_ROTTEN;
public static Item FISH_CLOWN_DRIED;
public static Item FISH_CLOWN_SALTED;
public static Item FISH_CLOWN_CURED;
public static Item FISH_PUFFER_ROTTEN;
public static Item FISH_PUFFER_DRIED;
public static Item FISH_PUFFER_SALTED;
public static Item FISH_PUFFER_CURED;
public static Item HORSE_MEAT_RAW;
public static Item HORSE_MEAT_COOKED;
public static Item CHEESE_WHITE;
public static Item CORN_COB;
public static Item CORN_BREAD;
public static Item CORN_GROUND;
public static Item WHEAT_GROUND;
///
// Seeds
///
public static Item CORN_SEEDS;
public static Item RUSH_SEEDS;
///
// Tools
///
public static Item GOLDEN_STICK;
public static Item FIRE_BOW;
public static Item SHARP_BONE;
public static Item STONE_GALLAGHER;
public static Item FLINT_WORKBLADE;
public static Item FLINT_SHEARS;
public static Item FLINT_HATCHET;
public static Item FLINT_AXE;
public static Item FLINT_PICKAXE;
public static Item FLINT_SHOVEL;
public static Item FLINT_HOE;
public static Item FLINT_SAW;
public static Item IRON_SAW;
public static Item IRON_CLIPPERS;
public static Item NETHER_FISHING_ROD;
///
// Nether
///
public static Item QUARTZ_KNAPP;
public static Item QUARTZ_POINT;
public static Item NETHER_FIBER;
public static Item NETHER_CORDAGE;
public static Item NETHER_CLOTH;
public static Item NETHER_TINDER;
public static Item NETHER_GALLAGHER;
public static Item QUARTZ_GALLAGHER;
public static Item QUARTZ_WORKBLADE;
public static Item QUARTZ_SHEARS;
public static Item QUARTZ_HATCHET;
public static Item QUARTZ_AXE;
public static Item QUARTZ_PICKAXE;
public static Item QUARTZ_SHOVEL;
public static Item QUARTZ_HOE;
public static Item QUARTZ_SAW;
public static Item QUARTZ_CLIPPERS;
public static Item TORCH_NETHER_LIT;
public static Item TORCH_WOOD_LIT;
public static Item IRONWOOD_STICK;
public static Item NETHERPALM_STICK;
public static Item NETHERPALM_PIN;
public static Item PALM_SEED;
public static Item VALUS_SEEDS;
///
// Projectiles
///
public static Item ARROW_QUARTZ;
public static Item ARROW_TORCH_WOOD;
public static Item ARROW_TORCH_NETHER;
public static Item ARROW_WATER;
public static Item ARROW_SILVER;
public static Item ARROW_GOLD;
*/
}

View File

@@ -1,75 +0,0 @@
package nmd.primal.forgecraft.api;
import net.minecraft.block.material.MapColor;
import net.minecraft.block.material.Material;
import net.minecraft.init.SoundEvents;
import net.minecraft.item.Item;
import net.minecraft.item.ItemArmor;
import net.minecraftforge.common.util.EnumHelper;
public class ForgeCraftMaterials
{
/**
* Vanilla ToolMaterials
* ToolMaterial addToolMaterial(String name, int harvestLevel, int maxUses, float efficiency, float damage, int enchantability)
*
* WOOD(0, 59, 2.0F, 0.0F, 15),
* STONE(1, 131, 4.0F, 1.0F, 5),
* IRON(2, 250, 6.0F, 2.0F, 14),
* DIAMOND(3, 1561, 8.0F, 3.0F, 10),
* GOLD(0, 32, 12.0F, 0.0F, 22);
*
* CLOTH(5, new int[]{1, 3, 2, 1}, 15), CHAIN(15, new int[]{2, 5, 4, 1}, 12), IRON(15, new int[]{2, 6, 5, 2}, 9), GOLD(7, new int[]{2, 5, 3, 1}, 25), DIAMOND(33, new int[]{3, 8, 6, 3}, 10);
*
* survivalist
* "flint", 1, 150, 5.0F, 1.5F, 5
*/
//Tool ToolMaterials
//public static Item.ToolMaterial TOOL_BONE = EnumHelper.addToolMaterial("BONE", 0, 64, 2.0F, 0, 16);
//Armor ToolMaterials
//public static ItemArmor.ArmorMaterial ARMOR_BONE = EnumHelper.addArmorMaterial("BONE", "", 8, new int[]{3, 7, 6, 3}, 10, SoundEvents.ITEM_ARMOR_EQUIP_LEATHER, 1.0F);
///
// Block Materials
///
public boolean canBurn;
public boolean replaceable;
public boolean isTranslucent;
public boolean requiresNoTool = true;
//public static final Material CRAFTED_SNOW = (new Material(MapColor.SNOW)).setRequiresTool();
//public static final Material ASH;
/**
* Marks the material as translucent
*/
private Material setTranslucent(Material material)
{
this.isTranslucent = true;
return material;
}
/**
* Makes blocks with this material require the correct tool to be harvested.
*/
protected Material setRequiresTool(Material material)
{
this.requiresNoTool = false;
return material;
}
/**
* Set the canBurn bool to True and return the current object.
*/
protected Material setBurning(Material material)
{
this.canBurn = true;
return material;
}
}

View File

@@ -1,6 +0,0 @@
package nmd.primal.forgecraft.api;
public enum ForgeCraftParticles
{
MUCK, ROCK, SMOKE, STEAM;
}

View File

@@ -1,259 +0,0 @@
package nmd.primal.forgecraft.api;
import com.google.common.collect.Lists;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.SoundEvent;
import org.apache.commons.lang3.tuple.Triple;
import javax.annotation.Nullable;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Hashtable;
import java.util.List;
public class ForgeCraftRegistries
{
/*******************************************************************************
*
*/
/*******************************************************************************
* Parent Block Registry, this will kick off crafting for slabs, stairs, etc..
*/
public static List<ItemStack> PARENT_BLOCK_REGISTRY = new ArrayList<>();
public static void addParentBlock(ItemStack stack)
{
ForgeCraftRegistries.PARENT_BLOCK_REGISTRY.add(stack);
}
/*******************************************************************************
* Fuel Registry
*/
public static Hashtable<ItemStack, Integer> FUEL_REGISTRY = new Hashtable<>();
public static void addFuel(ItemStack stack, int value)
{
ForgeCraftRegistries.FUEL_REGISTRY.put(stack, value);
}
/*******************************************************************************
* Torch Registry
*/
public static List<ItemStack> TORCH_REGISTRY = new ArrayList<>();
public static void addTorch(ItemStack stack)
{
ForgeCraftRegistries.TORCH_REGISTRY.add(stack);
}
public static boolean isTorch(ItemStack stack)
{
for (ItemStack list : ForgeCraftRegistries.TORCH_REGISTRY) {
if (list.isItemEqual(stack))
return true;
}
return false;
}
/*******************************************************************************
* Crafting Registries
*
* EXAMPLE:
* ForgeCraftRegistries.addBladeRecipe(new ItemStack(ModItems.CORN_COB), new ItemStack(ModItems.CORN_SEEDS, 1));
* ForgeCraftRegistries.addBladeRecipe("bone", new ItemStack(ModItems.SHARP_BONE, 1));
*
*/
///
// crafting matrix items
///
public static Hashtable<Item, SoundEvent> CRAFTING_MATRIX_ITEM_REGISTRY = new Hashtable<>();
public static void addCraftingItem(Item item, @Nullable SoundEvent sound)
{
ForgeCraftRegistries.CRAFTING_MATRIX_ITEM_REGISTRY.put(item, sound);
}
///
// in-world knapping recipes
///
public static final List<Triple<ItemStack, ItemStack, Float>> KNAPPING_RECIPE_REGISTRY = Lists.newArrayList();
public static Hashtable<Item, ItemStack> CRAFTING_KNAPPING_OUTPUT_REGISTRY = new Hashtable<>();
public static Hashtable<Item, Float> CRAFTING_KNAPPING_HARDNESS_REGISTRY = new Hashtable<>();
public static void addKnappingRecipe(Item item, ItemStack output, float hardness)
{
ForgeCraftRegistries.CRAFTING_KNAPPING_OUTPUT_REGISTRY.put(item, output);
ForgeCraftRegistries.CRAFTING_KNAPPING_HARDNESS_REGISTRY.put(item, hardness);
}
///
// Stone Basin Recipes
///
public static Hashtable<Object, ItemStack> BASIC_KERN_CRAFTING_REGISTRY = new Hashtable<>();
public static void addBasicKernRecipe(String in, ItemStack out)
{
ForgeCraftRegistries.BASIC_KERN_CRAFTING_REGISTRY.put(in, out);
}
public static void addBasicKernRecipe(ItemStack in, ItemStack out)
{
ForgeCraftRegistries.BASIC_KERN_CRAFTING_REGISTRY.put(in, out);
}
///
// Axe Recipes
///
public static final List<Triple<Object, ItemStack, String[]>> AXE_RECIPES = Lists.newArrayList();
public static Hashtable<Object, ItemStack> AXE_CRAFTING_REGISTRY = new Hashtable<>();
public static Hashtable<Object, ItemStack> AXE_SIDE_CRAFTING_REGISTRY = new Hashtable<>();
public static Hashtable<Item, Integer> AXE_REGISTRY = new Hashtable<>();
public static void addAxe(Item item, Integer level)
{
ForgeCraftRegistries.AXE_REGISTRY.put(item, level);
}
public static void addAxeRecipe(String in, ItemStack out)
{
ForgeCraftRegistries.AXE_CRAFTING_REGISTRY.put(in, out);
}
public static void addAxeRecipe(ItemStack in, ItemStack out)
{
ForgeCraftRegistries.AXE_CRAFTING_REGISTRY.put(in, out);
}
public static void addAxeSideRecipe(String in, ItemStack out)
{
ForgeCraftRegistries.AXE_SIDE_CRAFTING_REGISTRY.put(in, out);
}
public static void addAxeSideRecipe(ItemStack in, ItemStack out)
{
ForgeCraftRegistries.AXE_SIDE_CRAFTING_REGISTRY.put(in, out);
}
///
// HandClipper Recipes
///
public static Hashtable<Object, ItemStack> BASIC_CLIPPER_CRAFTING_REGISTRY = new Hashtable<>();
public static Hashtable<Item, Integer> CLIPPER_REGISTRY = new Hashtable<>();
public static void addClipper(Item item, Integer level)
{
ForgeCraftRegistries.CLIPPER_REGISTRY.put(item, level);
}
public static void addBasicClipperRecipe(String in, ItemStack out)
{
ForgeCraftRegistries.BASIC_CLIPPER_CRAFTING_REGISTRY.put(in, out);
}
public static void addBasicClipperRecipe(ItemStack in, ItemStack out)
{
ForgeCraftRegistries.BASIC_CLIPPER_CRAFTING_REGISTRY.put(in, out);
}
///
// WorkBlade Recipes
///
public static Hashtable<Object, ItemStack> WORKBLADE_CRAFTING_REGISTRY = new Hashtable<>();
public static Hashtable<Item, Integer> WORKBLADE_REGISTRY = new Hashtable<>();
public static void addBlade(Item item, Integer level)
{
ForgeCraftRegistries.WORKBLADE_REGISTRY.put(item, level);
}
public static void addBladeRecipe(String in, ItemStack out)
{
ForgeCraftRegistries.WORKBLADE_CRAFTING_REGISTRY.put(in, out);
}
public static void addBladeRecipe(ItemStack in, ItemStack out)
{
ForgeCraftRegistries.WORKBLADE_CRAFTING_REGISTRY.put(in, out);
}
///
// Gallagher Recipes
///
public static Hashtable<Object, ItemStack> GALLAGHER_CRAFTING_REGISTRY = new Hashtable<>();
public static Hashtable<Item, Integer> GALLAGHER_REGISTRY = new Hashtable<>();
public static void addGallagher(Item item, Integer level)
{
ForgeCraftRegistries.GALLAGHER_REGISTRY.put(item, level);
}
public static void addGallagherRecipe(String in, ItemStack out)
{
ForgeCraftRegistries.GALLAGHER_CRAFTING_REGISTRY.put(in, out);
}
public static void addGallagherRecipe(ItemStack in, ItemStack out)
{
ForgeCraftRegistries.GALLAGHER_CRAFTING_REGISTRY.put(in, out);
}
///
// Drying Rack
///
//public static final List<Triple<ItemStack, ItemStack, Integer>> DRYING_RACK_CRAFTING_REGISTRY = Lists.newArrayList();
//public static HashMap<ItemStack, ItemStack> DRYING_RACK_CRAFTING_REGISTRY = new HashMap<>();
public static HashMap<Item, Item> DRYING_RACK_CRAFTING_REGISTRY = new HashMap<>();
public static void addDryingRackRecipe(Item in, Item out)
{
ForgeCraftRegistries.DRYING_RACK_CRAFTING_REGISTRY.put(in, out);
}
/*******************************************************************************
* Tool & Armor Registries
*/
///
// Tool Repair Materials
///
public static Hashtable<ItemStack, Item.ToolMaterial> TOOL_REPAIR_MATERIALS = new Hashtable<>();
public static void addToolRepairItem(Item.ToolMaterial toolMaterial, ItemStack repairStack)
{
ForgeCraftRegistries.TOOL_REPAIR_MATERIALS.put(repairStack, toolMaterial);
}
///
// Tool Break by-Products
///
public static Hashtable<Item, ItemStack[]> TOOL_BREAK_ITEMS = new Hashtable<>();
public static void addToolBreakItem(Item tool, ItemStack[] stacks)
{
ForgeCraftRegistries.TOOL_BREAK_ITEMS.put(tool, stacks);
}
/*******************************************************************************
* Entity Registries
*/
///
// Entity Drops
///
//public static Hashtable<EntityLivingBase, ItemStack[]> ENTITY_CUSTOM_DROP_REGISTRY = new Hashtable<>();
//public static void addEntityDrop(EntityLivingBase entity, ItemStack[] stacks)
//{
// ForgeCraftRegistries.ENTITY_CUSTOM_DROP_REGISTRY.put(entity, stacks);
//}
/*******************************************************************************
* ..
*/
}

View File

@@ -1,43 +0,0 @@
package nmd.primal.forgecraft.api;
import net.minecraft.block.properties.PropertyBool;
import net.minecraft.block.properties.PropertyDirection;
import net.minecraft.block.properties.PropertyInteger;
/**
* Any Blockstate that might need to be shared or accessed through the API should be created here
*/
public class ForgeCraftStates
{
public static final PropertyBool BLOOM = PropertyBool.create("bloom");
public static final PropertyBool LIT = PropertyBool.create("lit");
public static final PropertyDirection FACING = PropertyDirection.create("facing");
public static final PropertyInteger DENSITY = PropertyInteger.create("density", 0, 7);
public static final PropertyInteger SOIL = PropertyInteger.create("soil", 0, 15);
public static final PropertyInteger AGE = PropertyInteger.create("age", 0, 7);
/**
* this is basically the same as vanilla snow
*/
public static final PropertyInteger LAYERS = PropertyInteger.create("layers", 1, 8);
/**
* vanilla mining overlay consists of 0-9 states
*
*/
public static final PropertyInteger CRACKED = PropertyInteger.create("layers", 0, 9);
/**
* Vanilla MOISTURE levels for farmland 0-7
* Primal DAMPNESS levels 0-2 leaving space to support horizontal facing
* simulate the higher resolution by slowing down DAMPNESS changes
*/
public static final PropertyInteger MOISTURE = PropertyInteger.create("moisture", 0, 7);
public static final PropertyInteger DAMPNESS = PropertyInteger.create("dampness", 0, 2);
// old states
// PrimalFacing-like Block positions, TOP = true, BOTTOM = false
//public static final PropertyBool HALF = PropertyBool.create("half");
}

View File

@@ -1,6 +0,0 @@
package nmd.primal.forgecraft.client;
public class ClientEvents
{
}

View File

@@ -1,340 +0,0 @@
package nmd.primal.forgecraft.client;
import net.minecraft.block.Block;
import net.minecraft.block.state.IBlockState;
import net.minecraft.client.Minecraft;
import net.minecraft.client.particle.Particle;
import net.minecraft.client.renderer.block.model.ModelBakery;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.client.renderer.block.statemap.StateMapperBase;
import net.minecraft.client.renderer.entity.Render;
import net.minecraft.client.renderer.entity.RenderManager;
import net.minecraft.entity.Entity;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumParticleTypes;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.MathHelper;
import net.minecraft.world.World;
import net.minecraftforge.client.model.ModelLoader;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.fluids.IFluidBlock;
import net.minecraftforge.fml.client.FMLClientHandler;
import net.minecraftforge.fml.client.registry.ClientRegistry;
import net.minecraftforge.fml.client.registry.IRenderFactory;
import net.minecraftforge.fml.client.registry.RenderingRegistry;
import nmd.primal.forgecraft.client.render.MeshDefinitionFix;
import nmd.primal.forgecraft.common.init.ModFluids;
import nmd.primal.forgecraft.common.init.ModInfo;
import java.util.ArrayList;
import java.util.List;
import nmd.primal.forgecraft.common.CommonProxy;
import nmd.primal.forgecraft.common.CommonUtils;
/**
* Created by kitsu on 11/23/2016.
*/
public class ClientProxy extends CommonProxy
{
public static Minecraft minecraft = Minecraft.getMinecraft();
@Override
public Object getClient() {
return FMLClientHandler.instance().getClient();
}
@Override
public World getClientWorld() {
return FMLClientHandler.instance().getClient().theWorld;
}
@Override
public void registerClientEvents()
{
//CommonUtils.debugLogger(2, "proxy test", "client events");
//MinecraftForge.EVENT_BUS.register(new GuiEventHandler());
MinecraftForge.EVENT_BUS.register(new ClientEvents());
}
@Override
public void preInit() {
this.registerRendering();
this.registerFluidModels();
}
@Override
public void init() {
this.registerTileRendering();
}
@Override
public void postInit() {
}
@Override
public void registerRendering()
{
///
// Projectile Entities
///
//registerEntityRenderer(EntityMuckBall.class, RenderMuck.class);
//registerEntityRenderer(EntityRock.class, RenderRock.class);
//registerEntityRenderer(EntityQuartzArrow.class, RenderArrowQuartz.class);
//registerEntityRenderer(EntityTorchArrow.class, RenderArrowTorchWood.class);
//registerEntityRenderer(EntityTorchArrowNether.class, RenderArrowTorchNether.class);
//registerEntityRenderer(EntityTorchArrow.class, RenderArrowTorchWood.class);
}
@Override
public void registerTileRendering()
{
///
// Tiles
///
//ClientRegistry.bindTileEntitySpecialRenderer(TileWorkTableBasic.class, new TileWorkTableBasicRender());
//ClientRegistry.bindTileEntitySpecialRenderer(TileWorkTableShelf.class, new TileWorkTableShelfRender());
//ClientRegistry.bindTileEntitySpecialRenderer(TileShelf.class, new TileShelfRender());
//ClientRegistry.bindTileEntitySpecialRenderer(TileDryingRack.class, new TileDryingRackRender());
}
@Override
public void renderBlock(Block block)
{
minecraft.getRenderItem().getItemModelMesher().register(Item.getItemFromBlock(block), 0, new ModelResourceLocation(block.getRegistryName(), "inventory"));
}
@Override
public void renderItem(Item item)
{
minecraft.getRenderItem().getItemModelMesher().register(item, 0, new ModelResourceLocation(item.getRegistryName(), "inventory"));
}
@Override
public void registerBlockSided(Block block)
{
Item item = Item.getItemFromBlock(block);
ResourceLocation location = block.getRegistryName();
//CommonUtils.debugLogger(2, "block item render", "1: " + location);
if (item!=null)
{
ModelBakery.registerItemVariants(item, new ResourceLocation(ModInfo.MOD_ID, block.getUnlocalizedName()));
ModelLoader.setCustomModelResourceLocation(item, block.getMetaFromState(block.getDefaultState()), new ModelResourceLocation(location, "inventory"));
}
//Register colour handlers
//if (bopBlock.getBlockColor() != null || bopBlock.getItemColor() != null)
//{
// blocksToColour.add(block);
//}
}
@Override
public void registerItemSided(Item item)
{
// register sub types if there are any
if (item.getHasSubtypes())
{
List<ItemStack> subItems = new ArrayList<ItemStack>();
item.getSubItems(item, ModInfo.TAB_FORGECRAFT, subItems);
for (ItemStack subItem : subItems)
{
String subItemName = item.getUnlocalizedName(subItem);
subItemName = subItemName.substring(subItemName.indexOf(".") + 1); // remove 'item.' from the front
//CommonUtils.debugLogger(2, "item render", "1: " + subItemName.substring(7));
//ModelBakery.registerItemVariants(item, new ResourceLocation(ModInfo.MOD_ID, subItemName));
ModelBakery.registerItemVariants(item, new ResourceLocation(ModInfo.MOD_ID, subItemName.substring(7)));
ModelLoader.setCustomModelResourceLocation(item, subItem.getMetadata(), new ModelResourceLocation(ModInfo.MOD_ID + ":" + subItemName, "inventory"));
}
}
else
{
//CommonUtils.debugLogger(2, "item render", "2: " + item.delegate.name().getResourcePath());
ModelLoader.setCustomModelResourceLocation(item, 0, new ModelResourceLocation(ModInfo.MOD_ID + ":" + item.delegate.name().getResourcePath(), "inventory"));
}
//Register colour handlers
//if (item instanceof IColoredItem && ((IColoredItem)item).getItemColor() != null)
//{
// this.itemsToColor.add(item);
//}
}
@Override
public void registerItemVariantModel(Item item, String name, int metadata)
{
if (item != null)
{
ModelBakery.registerItemVariants(item, new ResourceLocation(ModInfo.MOD_PREFIX + name));
ModelLoader.setCustomModelResourceLocation(item, metadata, new ModelResourceLocation(ModInfo.MOD_PREFIX + name, "inventory"));
}
}
@Override
public void registerFluidBlockRendering(Block block, String name)
{
final ModelResourceLocation fluidLocation = new ModelResourceLocation(ModInfo.MOD_ID.toLowerCase() + ":fluids", name);
// use a custom state mapper which will ignore the LEVEL property
ModelLoader.setCustomStateMapper(block, new StateMapperBase()
{
@Override
protected ModelResourceLocation getModelResourceLocation(IBlockState state)
{
return fluidLocation;
}
});
}
//@Override
//public void registerFluidModels()
{
ModFluids.FLUID_BLOCKS.forEach(this::registerFluidModel);
}
@Override
public void registerFluidModel(IFluidBlock fluidBlock)
{
//ModelResourceLocation location = new ModelResourceLocation(ModInfo.MOD_PREFIX, fluidBlock.getFluid().getName());
ModelResourceLocation location = new ModelResourceLocation(ModInfo.MOD_PREFIX + "fluids", fluidBlock.getFluid().getName());
//CommonUtils.debugLogger(2, "Fluid models", "location: " + location);
final Item item = Item.getItemFromBlock((Block) fluidBlock);
assert item != null;
ModelBakery.registerItemVariants(item);
ModelLoader.setCustomMeshDefinition(item, MeshDefinitionFix.create(stack -> location));
//ModelLoader.setCustomStateMapper((Block) fluidBlock, new StateMapperBase()
/*{
@Override
protected ModelResourceLocation getModelResourceLocation(IBlockState p_178132_1_)
{
return location;
}
});
*/
//itemsRegistered.add(item);
}
public void registerFluidRendering2(IFluidBlock fluidBlock, String name)
{
ModelResourceLocation location = new ModelResourceLocation(ModInfo.MOD_PREFIX + "fluids", name);
//CommonUtils.debugLogger(2, "Fluid models", "location: " + location);
Item item = Item.getItemFromBlock((Block) fluidBlock);
assert item != null;
ModelBakery.registerItemVariants(item);
//ModelLoader.setCustomMeshDefinition(item, MeshDefinitionFix.create(stack -> location));
ModelLoader.setCustomMeshDefinition(item, new ItemMeshDefinition() {
@Override
public ModelResourceLocation getModelLocation(ItemStack stack) {
return location;
}
});
ModelLoader.setCustomStateMapper((Block) fluidBlock, new StateMapperBase() {
@Override
protected ModelResourceLocation getModelResourceLocation(IBlockState state) {
return location;
}
});
}
/*@Override
public void spawnParticle(ForgeCraftParticles particle, double x, double y, double z, Object... info)
{
Minecraft minecraft = Minecraft.getMinecraft();
Particle entityFx;
int item_id;
switch (particle)
{
case MUCK:
item_id = Item.getIdFromItem(ForgeCraftItems.MUCK);
minecraft.theWorld.spawnParticle(EnumParticleTypes.ITEM_CRACK, x, y, z, MathHelper.getRandomDoubleInRange(minecraft.theWorld.rand, -0.08D, 0.08D), MathHelper.getRandomDoubleInRange(minecraft.theWorld.rand, -0.08D, 0.08D), MathHelper.getRandomDoubleInRange(minecraft.theWorld.rand, -0.08D, 0.08D), new int[] { item_id });
return;
case ROCK:
item_id = Item.getIdFromItem(ForgeCraftItems.ROCK);
minecraft.theWorld.spawnParticle(EnumParticleTypes.ITEM_CRACK, x, y, z, MathHelper.getRandomDoubleInRange(minecraft.theWorld.rand, -0.08D, 0.08D), MathHelper.getRandomDoubleInRange(minecraft.theWorld.rand, -0.08D, 0.08D), MathHelper.getRandomDoubleInRange(minecraft.theWorld.rand, -0.08D, 0.08D), new int[] { item_id });
return;
default:
entityFx = null;
break;
}
if (entityFx != null) {
minecraft.effectRenderer.addEffect(entityFx);
}
}*/
private static <E extends Entity> void registerEntityRenderer(Class<E> entityClass, Class<? extends Render<E>> renderClass)
{
RenderingRegistry.registerEntityRenderingHandler(entityClass, new EntityRenderFactory<E>(renderClass));
}
private static class EntityRenderFactory<E extends Entity> implements IRenderFactory<E>
{
private Class<? extends Render<E>> renderClass;
private EntityRenderFactory(Class<? extends Render<E>> renderClass)
{
this.renderClass = renderClass;
}
@Override
public Render<E> createRenderFor(RenderManager manager)
{
Render<E> renderer = null;
try {
renderer = renderClass.getConstructor(RenderManager.class).newInstance(manager);
}
catch (Exception e) {
e.printStackTrace();
}
return renderer;
}
}
/**
@Override
public int registerArmor(String armor)
{
return RenderingRegistry.addNewArmourRendererPrefix(armor);
}
**/
/**
@Override
public void setClientEnvironment()
{
//if (ModConfig.enableRealisticDarkness)
}
**/
@Override
public void registerSounds() {
//MinecraftForge.EVENT_BUS.register(new ModSounds());//register the sound event handling class
}
@Override
public void registerTickHandler()
{
//FMLCommonHandler.instance().bus().register(new ClientTickHandler());
}
}

View File

@@ -1,30 +0,0 @@
package nmd.primal.forgecraft.client.gui;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiScreen;
import net.minecraftforge.fml.client.IModGuiFactory;
import java.util.Set;
/**
* Created by kitsu on 11/24/2016.
public class GuiFactory implements IModGuiFactory
{
@Override
public void initialize(Minecraft minecraftInstance) { }
/*@Override
public Class<? extends GuiScreen> mainConfigGuiClass()
{
//return GuiWorkTableBasic.class;
}
@Override
public Set<RuntimeOptionCategoryElement> runtimeGuiCategories() { return null; }
@Override
public IModGuiFactory.RuntimeOptionGuiHandler getHandlerFor(IModGuiFactory.RuntimeOptionCategoryElement element) { return null; }
}
*/

View File

@@ -1,47 +0,0 @@
package nmd.primal.forgecraft.client.gui;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import net.minecraftforge.fml.common.network.IGuiHandler;
/**
* Created by kitsu on 11/24/2016.
*/
public class GuiHandler implements IGuiHandler
{
/**
* Returns a Server side Container to be displayed to the user.
*/
@Override
public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z)
{
TileEntity tile = world.getTileEntity(new BlockPos(x, y, z));
switch (ID)
{
//case ModInfo.WORKTABLE_BASIC: return new ContainerWorkTableBasic(player.inventory, (TileWorkTableBasic)tile, world);
//case ModInfo.WORKTABLE_SHELF: return new ContainerWorkTableShelf(player.inventory, (TileWorkTableShelf)tile, world);
//case ModInfo.WORKTABLE_CHEST: return new ContainerWorkTableChest(player.inventory, (TileWorkTableChest)tile, world);
default: return null;
}
}
/**
* Returns a Container to be displayed to the user. On the client side, this
* needs to return a instance of GuiScreen On the server side, this needs to
* return a instance of Container
*/
@Override
public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z)
{
TileEntity tile = world.getTileEntity(new BlockPos(x, y, z));
switch (ID)
{
//case ModInfo.WORKTABLE_BASIC: return new GuiWorkTableBasic(player.inventory, (TileWorkTableBasic) tile, world);
//case ModInfo.WORKTABLE_SHELF: return new GuiWorkTableShelf(player.inventory, (TileWorkTableShelf) tile, world);
//case ModInfo.WORKTABLE_CHEST: return new GuiWorkTableBasic(player.inventory, (TileWorkTableChest) tile, world);
default: return null;
}
}
}

View File

@@ -1,37 +0,0 @@
package nmd.primal.forgecraft.client.models;
/**
* Created by kitsu on 11/24/2016.
*/
import net.minecraft.client.renderer.ItemMeshDefinition;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
/**
* A hackish adapter that allows lambdas to be used as {@link ItemMeshDefinition} implementations without breaking ForgeGradle's
* reobfuscation and causing {@link AbstractMethodError}s.
* <p>
* Written by diesieben07 in this thread:
* http://www.minecraftforge.net/forum/index.php/topic,34034.0.html
*
* @author diesieben07
*/
/*
@SideOnly(Side.CLIENT)
public interface MeshDefinitionFix extends ItemMeshDefinition
{
ModelResourceLocation getLocation(ItemStack stack);
// Helper method to easily create lambda instances of this class
static ItemMeshDefinition create(MeshDefinitionFix lambda) {
return lambda;
}
default ModelResourceLocation getModelLocation(ItemStack stack) {
return getLocation(stack);
}
}
*/

View File

@@ -1,32 +0,0 @@
package nmd.primal.forgecraft.client.render;
import net.minecraft.client.renderer.ItemMeshDefinition;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
/**
* A hackish adapter that allows lambdas to be used as {@link ItemMeshDefinition} implementations without breaking ForgeGradle's
* reobfuscation and causing {@link AbstractMethodError}s.
* <p>
* Written by diesieben07 in this thread:
* http://www.minecraftforge.net/forum/index.php/topic,34034.0.html
*
* @author diesieben07
*/
@SideOnly(Side.CLIENT)
public interface MeshDefinitionFix extends ItemMeshDefinition
{
ModelResourceLocation getLocation(ItemStack stack);
//Helper method to easily create lambda instances of this class
static ItemMeshDefinition create(MeshDefinitionFix lambda) {
return lambda;
}
default ModelResourceLocation getModelLocation(ItemStack stack) {
return getLocation(stack);
}
}

View File

@@ -1,117 +0,0 @@
package nmd.primal.forgecraft.common;
import net.minecraft.block.Block;
import net.minecraft.item.Item;
import net.minecraft.world.World;
import net.minecraftforge.fluids.IFluidBlock;
/**
* Created by kitsu on 11/23/2016.
*/
public class CommonProxy
{
public void registerClientEvents()
{
}
public void renderBlock(Block block)
{
// see ClientProxy
}
public void renderItem(Item item)
{
// see ClientProxy
}
public void preInit() {
}
public void init() {
}
public void postInit() {
}
public void registerFluidBlockRendering(Block block, String name) {
// see ClientProxy
}
public void registerItemVariantModel(Item item, String name, int metadata) {
// see ClientProxy
}
public void registerFluidRendering(IFluidBlock fluidBlock, String name) {
// see ClientProxy
}
public void registerBlockSided(Block block)
{
//
}
public void registerItemSided(Item item)
{
// register sub types if there are any
}
public void registerFluidModels() {
// see ClientProxy
}
public void registerFluidModel(IFluidBlock fluidBlock) {
// see ClientProxy
}
public void registerTickHandler() {
// see ClientProxy
}
public void registerSounds() {
// see ClientProxy
}
public void registerRendering() {
//see ClientProxy
}
public void registerTileRendering()
{
}
/*public void spawnParticle(ForgeCraftParticles particle, double x, double y, double z, Object... info) {
//see ClientProxy
}*/
public int registerArmor(String armor) {
//see ClientProxy
return 0;
}
public Object getClient() {
//see ClientProxy
return null;
}
public World getClientWorld() {
//see ClientProxy
return null;
}
public void setClientEnvironment() {
//see ClientProxy
}
/**
@Override
public World getServerWorld() {
return FMLServerHandler.instance().getServer().getEntityWorld();
}
**/
}

View File

@@ -1,77 +0,0 @@
package nmd.primal.forgecraft.common.blocks;
import net.minecraft.block.Block;
import net.minecraft.block.material.MapColor;
import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.MathHelper;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import nmd.primal.forgecraft.common.init.ModInfo;
import nmd.primal.forgecraft.common.tiles.TileFirebox;
/**
* Created by kitsu on 11/24/2016.
*/
public class FireBox extends Block{
public FireBox(Material material, MapColor mapColor, String blockName) {
super(material, mapColor);
setBlockName(this, blockName);
setCreativeTab(ModInfo.TAB_FORGECRAFT);
}
public FireBox(Material materialIn, String blockName) {
this(materialIn, materialIn.getMaterialMapColor(), blockName);
}
public static void setBlockName(Block block, String blockName) {
block.setRegistryName(ModInfo.MOD_ID, blockName);
block.setUnlocalizedName(block.getRegistryName().toString());
}
// ***************************************************************************** //
// Rendering
// ***************************************************************************** //
@Override
public boolean isFullCube(IBlockState state)
{
return false;
}
@Override
public boolean isFullyOpaque(IBlockState state)
{
return false;
}
@Override
public boolean isOpaqueCube(IBlockState state)
{
return false;
}
@Override
@SideOnly(Side.CLIENT)
public boolean shouldSideBeRendered(IBlockState blockState, IBlockAccess blockAccess, BlockPos pos, EnumFacing side)
{
return true;
}
// ***************************************************************************** //
// Placement
// ***************************************************************************** //
@Override
public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack)
{
((TileFirebox) world.getTileEntity(pos)).rotation = (byte) (((MathHelper.floor_double((double) (placer.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3) + 1) % 4);
}
}

View File

@@ -1,24 +0,0 @@
package nmd.primal.forgecraft.common.compat;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fml.common.IFuelHandler;
import java.util.Map;
/**
* Created by kitsu on 11/23/2016.
*/
public class FuelHandler implements IFuelHandler
{
@Override
public int getBurnTime(ItemStack fuelStack)
{
//if (ModConfig.FEATURE_ENABLE_FUELS) {
//CommonUtils.debugLogger(2, "fuel", "size: " + ModRegistries.FUEL_REGISTRY.size() + ", value: " + ModRegistries.FUEL_REGISTRY.get(fuelStack));
//}
return 0;
}
}

View File

@@ -1,472 +0,0 @@
package nmd.primal.forgecraft.common.init;
import net.minecraft.block.Block;
import net.minecraft.block.BlockPressurePlate;
import net.minecraft.block.material.Material;
import net.minecraft.init.Blocks;
import net.minecraft.item.Item;
import net.minecraft.item.ItemBlock;
import net.minecraftforge.fml.common.registry.ForgeRegistries;
import net.minecraftforge.oredict.OreDictionary;
import nmd.primal.core.common.PrimalCore;
import nmd.primal.core.common.blocks.lighting.IgnisFatuus;
import nmd.primal.core.common.blocks.lighting.JackOLanern;
import nmd.primal.core.common.blocks.lighting.Lantern;
import nmd.primal.core.common.blocks.lighting.Torch;
import nmd.primal.core.common.blocks.parts.*;
import nmd.primal.core.common.blocks.plants.*;
import nmd.primal.core.common.blocks.soil.*;
import nmd.primal.core.common.blocks.stone.*;
import nmd.primal.core.common.blocks.storage.*;
import nmd.primal.core.common.items.block.ItemAshBlock;
import nmd.primal.core.common.items.block.ItemTorchBlock;
import javax.annotation.Nullable;
import java.util.HashSet;
import java.util.Set;
import java.util.function.Function;
import static nmd.primal.core.api.PrimalBlocks.*;
public class ModBlocks
{
public static final Set<Block> BLOCKS = new HashSet<>();
/*******************************************************************************
* Blocks
*/
public static void registerBlocks()
{
// ***************************************************************************** //
// Thatch and Basic Building Materials
///
THATCH_WET = registerBlock("thatch_wet", new ThatchWet());
THATCH = registerBlock("thatch", new Thatch());
NETHER_WOOL = registerBlock("nether_wool", new NetherWool());
GRATED_GRAVEL = registerBlock("grated_gravel", new GratedGravel());
ASH_BLOCK = registerBlock("ash_block", new AshBlock(), "blockAsh");
ASH_LAYER = registerBlock("ash_layer", new AshLayer(), ItemAshBlock::new);
ASH_STABILIZED = registerBlock("ash_stabilized", new AshStabilized(), "blockAsh");
EARTHWAX_BLOCK = registerBlock("earthwax_block", new EarthWax().setHardness(1.2F).setResistance(0.8F), "blockFuel");
TERRACLAY_BLOCK = registerBlock("terraclay_block", new TerraClay().setHardness(2.2F).setResistance(1.5F), "blockTerra");
CINISCLAY_BLOCK = registerBlock("cinisclay_block", new TerraClay().setHardness(2.2F).setResistance(1.5F), "blockTerra");
DIRT_BRICK = registerBlock("dirt_brick", new Solum().setHardness(0.9F).setResistance(0.5F));
MUD_BRICK_DRY = registerBlock("mud_brick_dry", new Saxum().setHardness(1.6F).setResistance(1.6F));
MUD_BLOCK_DRY = registerBlock("mud_block_dry", new Saxum().setHardness(1.2F).setResistance(1.2F));
MUD_BRICK_WET = registerBlock("mud_brick_wet", new MudWet().setHardness(1.0F).setResistance(1.0F));
MUD_BLOCK_WET = registerBlock("mud_block_wet", new MudWet().setHardness(1.0F).setResistance(1.0F));
CINISCOTTA_BRICK = registerBlock("ciniscotta_brick", new Saxum().setHardness(1.2F).setResistance(2.0F), "blockCotta");
TERRACOTTA_BRICK = registerBlock("terracotta_brick", new Saxum().setHardness(1.2F).setResistance(2.0F), "blockCotta");
CARBONATE_STONE = registerBlock("carbonate_stone", new CarbonateStone().setHardness(1.5F).setResistance(10.0F), "blockLimestone");
CARBONATE_FLAG = registerBlock("carbonate_flag", new Saxum().setHardness(2.0F).setResistance(10.0F), "blockLimestone");
CARBONATE_BRICK = registerBlock("carbonate_brick", new Saxum().setHardness(2.0F).setResistance(10.0F), "blockLimestone");
FERRO_STONE = registerBlock("ferro_stone", new CarbonateStone().setHardness(1.5F).setResistance(10.0F), "blockLimestone");
FERRO_FLAG = registerBlock("ferro_flag", new Saxum().setHardness(2.0F).setResistance(10.0F), "blockLimestone");
FERRO_BRICK = registerBlock("ferro_brick", new Saxum().setHardness(2.0F).setResistance(10.0F), "blockLimestone");
NETHERPALM_LOG = registerBlock("netherpalm_log", new NetherPalm().setHardness(5.0F).setResistance(10.0F));
NETHERPALM_PLANK = registerBlock("netherpalm_plank", new WoodPlank().setHardness(5.0F).setResistance(10.0F));
IRONWOOD_LEAVES = registerBlock("ironwood_leaves", new TreeLeaves());
IRONWOOD_LOG = registerBlock("ironwood_log", new WoodLog().setHardness(5.0F).setResistance(10.0F));
IRONWOOD_PLANK = registerBlock("ironwood_plank", new WoodPlank().setHardness(5.0F).setResistance(10.0F));
NETHERSTONE = registerBlock("netherstone", new Saxum().setHardness(2.2F).setResistance(1.5F));
SOULSTONE_NORMAL = registerBlock("soulstone_normal", new SoulStone(), "blockSoulstone");
SOULSTONE_SMOOTH = registerBlock("soulstone_smooth", new SoulStone(), "blockSoulstone");
SOULSTONE_CHISELED = registerBlock("soulstone_chiseled", new SoulStone(), "blockSoulstone");
SOULSTONE_FLAGSTONE = registerBlock("soulstone_flagstone", new SoulStone(), "blockSoulstone");
CLEAN_OAK = registerBlock("clean_oak", new CleanOak(), "blockCleanOak");
CLEAN_BIRCH = registerBlock("clean_birch", new CleanBirch(), "blockCleanBirch");
CLEAN_SPRUCE = registerBlock("clean_spruce", new CleanSpruce(), "blockCleanSpruce");
CLEAN_JUNGLE = registerBlock("clean_jungle", new CleanJungle(), "blockCleanJungle");
CLEAN_BIG_OAK = registerBlock("clean_big_oak", new CleanBigOak(), "blockCleanBigOak");
CLEAN_ACACIA = registerBlock("clean_acacia", new CleanAcacia(), "blockCleanAcacia");
CLEAN_IRONWOOD = registerBlock("clean_ironwood", new CleanIronwood(), "blockCleanIronwood");
}
public static void registerSubBlocks()
{
///
// Thin PrimalFacing
///
///
// Slats
///
SLAT_ACACIA = registerBlock("slat_acacia", new Slats(Blocks.PLANKS.getDefaultState()));
SLAT_BIGOAK = registerBlock("slat_bigoak", new Slats(Blocks.PLANKS.getDefaultState()));
SLAT_BIRCH = registerBlock("slat_birch", new Slats(Blocks.PLANKS.getDefaultState()));
SLAT_JUNGLE = registerBlock("slat_jungle", new Slats(Blocks.PLANKS.getDefaultState()));
SLAT_OAK = registerBlock("slat_oak", new Slats(Blocks.PLANKS.getDefaultState()));
SLAT_SPRUCE = registerBlock("slat_spruce", new Slats(Blocks.PLANKS.getDefaultState()));
SLAT_IRON = registerBlock("slat_iron", new Slats(Blocks.IRON_BLOCK.getDefaultState()));
SLAT_NETHERPALM = registerBlock("slat_netherpalm", new Slats(NETHERPALM_PLANK.getDefaultState()));
SLAT_IRONWOOD = registerBlock("slat_ironwood", new Slats(IRONWOOD_PLANK.getDefaultState()));
///
// Stairs
///
STAIRS_DIRT = registerBlock("stairs_dirt", new Stairs(Blocks.DIRT.getDefaultState(), true));
STAIRS_GRASS = registerBlock("stairs_grass", new Stairs(Blocks.GRASS.getDefaultState(), true), true);
STAIRS_NETHERRACK = registerBlock("stairs_netherrack", new Stairs(Blocks.NETHERRACK.getDefaultState(), true), true);
STAIRS_MUD = registerBlock("stairs_mud", new Stairs(MUD_BLOCK_DRY.getDefaultState(), true));
STAIRS_NETHERPALM = registerBlock("stairs_nether_palm", new Stairs(NETHERPALM_PLANK.getDefaultState(), true), true);
STAIRS_IRONWOOD = registerBlock("stairs_ironwood", new Stairs(IRONWOOD_PLANK.getDefaultState(), true), true);
STAIRS_CARBONATE_FLAG = registerBlock("stairs_carbonate_flag", new Stairs(CARBONATE_FLAG.getDefaultState()), "blockStair");
STAIRS_CARBONATE_BRICK = registerBlock("stairs_carbonate_brick", new Stairs(CARBONATE_BRICK.getDefaultState()).setHardness(2.0F).setResistance(10.0F), "blockStair");
STAIRS_FERRO_FLAG = registerBlock("stairs_ferro_flag", new Stairs(FERRO_FLAG.getDefaultState()), "blockStair");
STAIRS_FERRO_BRICK = registerBlock("stairs_ferro_brick", new Stairs(FERRO_BRICK.getDefaultState()).setHardness(2.0F).setResistance(10.0F), "blockStair");
STAIRS_COBBLESTONE_MOSSY = registerBlock("stairs_cobblestone_mossy", new Stairs(Blocks.COBBLESTONE.getDefaultState()).setHardness(2.0F).setResistance(10.0F), "blockStair");
STAIRS_STONEBRICK_MOSSY = registerBlock("stairs_stonebrick_mossy", new Stairs(Blocks.STONEBRICK.getDefaultState()).setHardness(2.0F).setResistance(10.0F), "blockStair");
///
// Wall
///
WALL_NETHERRACK = registerBlock("wall_netherrack", new Wall(Blocks.NETHERRACK.getDefaultState()), "blockWall");
WALL_NETHERSTONE = registerBlock("wall_netherstone", new Wall(NETHERSTONE.getDefaultState()), "blockWall");
WALL_CARBONATE_FLAG = registerBlock("wall_carbonate_flag", new Wall(CARBONATE_FLAG.getDefaultState()), "blockWall");
WALL_CARBONATE_BRICK = registerBlock("wall_carbonate_brick", new Wall(CARBONATE_BRICK.getDefaultState()), "blockWall");
WALL_FERRO_FLAG = registerBlock("wall_ferro_flag", new Wall(CARBONATE_FLAG.getDefaultState()), "blockWall");
WALL_FERRO_BRICK = registerBlock("wall_ferro_brick", new Wall(CARBONATE_BRICK.getDefaultState()), "blockWall");
///
// Fence
///
FENCE_IRONWOOD = registerBlock("fence_ironwood", new Fence(IRONWOOD_PLANK.getDefaultState()));
FENCE_NETHERPALM = registerBlock("fence_netherpalm", new Fence(NETHERPALM_PLANK.getDefaultState()));
//GATE_IRONWOOD = registerBlock(new Gates("gate_ironwood", IRONWOOD_PLANK.getDefaultState()));
//GATE_NETHERPALM = registerBlock(new Gates("gate_netherpalm", NETHERPALM_PLANK.getDefaultState()));
///
// Pressure Plates
///
PRESSPLATE_DIRT = registerBlock("pressplate_dirt", new PressurePlate(Blocks.DIRT.getDefaultState(), BlockPressurePlate.Sensitivity.EVERYTHING)).setHardness(0.5F).setResistance(0.0F);
PRESSPLATE_GRASS = registerBlock("pressplate_grass", new PressurePlate(Blocks.GRASS.getDefaultState(), BlockPressurePlate.Sensitivity.EVERYTHING)).setHardness(0.6F).setResistance(0.0F);
PRESSPLATE_GLASS = registerBlock("pressplate_glass", new PressurePlate(Blocks.GLASS.getDefaultState(), BlockPressurePlate.Sensitivity.EVERYTHING)).setHardness(0.3F).setResistance(0.0F);
PRESSPLATE_NETHERRACK = registerBlock("pressplate_netherrack", new PressurePlate(Blocks.NETHERRACK.getDefaultState(), BlockPressurePlate.Sensitivity.EVERYTHING)).setHardness(2.0F).setResistance(10.0F);
PRESSPLATE_NETHERPALM = registerBlock("pressplate_netherpalm", new PressurePlate(NETHERPALM_PLANK.getDefaultState(), BlockPressurePlate.Sensitivity.EVERYTHING)).setHardness(2.0F).setResistance(5.0F);
PRESSPLATE_IRONWOOD = registerBlock("pressplate_ironwood", new PressurePlate(IRONWOOD_PLANK.getDefaultState(), BlockPressurePlate.Sensitivity.EVERYTHING)).setHardness(2.0F).setResistance(5.0F);
PRESSPLATE_THATCH = registerBlock("pressplate_thatch", new PressurePlateFacing(THATCH.getDefaultState(), BlockPressurePlate.Sensitivity.EVERYTHING)).setHardness(2.0F).setResistance(5.0F);
///
// Lever, Misc
///
LEVER_WOOD = registerBlock("lever_wood", new Lever(), "blockLever");
LEVER_NETHER = registerBlock("lever_nether", new Lever(), "blockLever");
}
public static void registerPlants()
{
///
// Solum Blocks
///
LOAM_BLOCK = registerBlock("loam_block", new Loam().setHardness(1.2F).setResistance(1.2F));
///
// Plants
///
RUSHES = registerBlock("rush", new Rushes());
CORN_STALK = registerBlock("corn_stalk", new CornStalk());
STRANGLE_WEED = registerBlock("strangle_weed", new StrangleWeed());
//NETHER_GRASS = registerBlock(new NetherGrass("nether_grass"));
//NETHER_GRASS_GROWING = registerBlock(new NetherGrassGrowing("nether_grass_growing"));
//SEARING_LACE = registerBlock(new SearingLace("searing_lace"));
//SEARING_LACE_GROWING = registerBlock(new SearingLaceGrowing("searing_lace_growing"));
}
public static void registerOres()
{
///
// ..
///
ORE_IRON = registerBlock("ore_iron", new OreDensity().setHardness(4.0F).setResistance(15.0F));
///
// Ferrum Storage Blocks
///
BRASS_BLOCK = registerBlock("brass_block", new Ferrum().setHardness(4.0F).setResistance(15.0F), "blockBrass");
BRONZE_BLOCK = registerBlock("bronze_block", new Ferrum().setHardness(4.0F).setResistance(15.0F), "blockBronze");
COPPER_BLOCK = registerBlock("copper_block", new Ferrum().setHardness(3.0F).setResistance(10.0F), "blockCopper");
LEAD_BLOCK = registerBlock("lead_block", new Ferrum().setHardness(2.0F).setResistance(18.0F), "blockLead");
PIGIRON_BLOCK = registerBlock("pigiron_block", new Ferrum().setHardness(5.0F).setResistance(10.0F), "blockPigiron");
SILVER_BLOCK = registerBlock("silver_block", new Ferrum().setHardness(5.0F).setResistance(12.0F), "blockSilver");
TIN_BLOCK = registerBlock("tin_block", new Ferrum().setHardness(2.0F).setResistance(10.0F), "blockTin");
VANADIUM_BLOCK = registerBlock("vanadium_block", new Ferrum().setHardness(10.0F).setResistance(20.0F), "blockVanadium");
WOOTZ_BLOCK = registerBlock("wootz_block", new Ferrum().setHardness(8.0F).setResistance(16.0F), "blockWootz");
ZINC_BLOCK = registerBlock("zinc_block", new Ferrum().setHardness(2.5F).setResistance(10.0F), "blockZinc");
///
// Salt Ores
///
SALT_HALITE_BLOCK = registerBlock("salt_halite_block", new SaltFlat(), "blockSalt");
SALT_NETJRY_BLOCK = registerBlock("salt_netjry_block", new SaltFlat(), "blockSalt");
SALT_FIRE_BLOCK = registerBlock("salt_fire_block", new SaltFlat(), "blockSalt");
SALT_VOID_BLOCK = registerBlock("salt_void_block", new SaltFlat(), "blockSalt");
}
public static void registerTablesShelves()
{
///
// Worktables + Shelves
///
WORKTABLE_SANDSTONE = registerBlock("worktable_sandstone", new WorkTableShelf(Blocks.SANDSTONE.getDefaultState()));
WORKTABLE_NETHERSTONE = registerBlock("worktable_netherstone", new WorkTableShelf(NETHERSTONE.getDefaultState()));
WORKTABLE_END = registerBlock("worktable_endstone", new WorkTableShelf(Blocks.END_STONE.getDefaultState()));
WORKTABLE_MUD = registerBlock("worktable_mud", new WorkTableShelf(MUD_BLOCK_DRY.getDefaultState()));
WORKTABLE_ACACIA_LOG = registerBlock("worktable_acacia_log", new WorkTableShelf(Blocks.LOG.getDefaultState()));
WORKTABLE_BIGOAK_LOG = registerBlock("worktable_bigoak_log", new WorkTableShelf(Blocks.LOG.getDefaultState()));
WORKTABLE_BIRCH_LOG = registerBlock("worktable_birch_log", new WorkTableShelf(Blocks.LOG.getDefaultState()));
WORKTABLE_JUNGLE_LOG = registerBlock("worktable_jungle_log", new WorkTableShelf(Blocks.LOG.getDefaultState()));
WORKTABLE_OAK_LOG = registerBlock("worktable_oak_log", new WorkTableShelf(Blocks.LOG.getDefaultState()));
WORKTABLE_SPRUCE_LOG = registerBlock("worktable_spruce_log", new WorkTableShelf(Blocks.LOG.getDefaultState()));
WORKTABLE_IRONWOOD_LOG = registerBlock("worktable_ironwood_log", new WorkTableShelf(IRONWOOD_LOG.getDefaultState()));
///
// Worktable PrimalFacing
///
WORKTABLE_MUD_SLAB = registerBlock("worktable_mud_slab", new WorkTableSlab(MUD_BLOCK_DRY.getDefaultState()));
WORKTABLE_ACACIA = registerBlock("worktable_acacia", new WorkTableSlab(Blocks.PLANKS.getDefaultState()));
WORKTABLE_BIGOAK = registerBlock("worktable_bigoak", new WorkTableSlab(Blocks.PLANKS.getDefaultState()));
WORKTABLE_BIRCH = registerBlock("worktable_birch", new WorkTableSlab(Blocks.PLANKS.getDefaultState()));
WORKTABLE_JUNGLE = registerBlock("worktable_jungle", new WorkTableSlab(Blocks.PLANKS.getDefaultState()));
WORKTABLE_OAK = registerBlock("worktable_oak", new WorkTableSlab(Blocks.PLANKS.getDefaultState()));
WORKTABLE_SPRUCE = registerBlock("worktable_spruce", new WorkTableSlab(Blocks.PLANKS.getDefaultState()));
WORKTABLE_NETHERPALM = registerBlock("worktable_netherpalm", new WorkTableSlab(NETHERPALM_PLANK.getDefaultState()));
WORKTABLE_IRONWOOD = registerBlock("worktable_ironwood", new WorkTableSlab(IRONWOOD_PLANK.getDefaultState()));
///
// Shelves
///
SHELF_FULL_ACACIA = registerBlock("shelf_full_acacia", new ShelfBasic(Blocks.PLANKS.getDefaultState()));
SHELF_FULL_BIGOAK = registerBlock("shelf_full_bigoak", new ShelfBasic(Blocks.PLANKS.getDefaultState()));
SHELF_FULL_BIRCH = registerBlock("shelf_full_birch", new ShelfBasic(Blocks.PLANKS.getDefaultState()));
SHELF_FULL_END = registerBlock("shelf_full_end", new ShelfBasic(Blocks.END_STONE.getDefaultState()));
SHELF_FULL_IRONWOOD = registerBlock("shelf_full_ironwood", new ShelfBasic(IRONWOOD_PLANK.getDefaultState()));
SHELF_FULL_JUNGLE = registerBlock("shelf_full_jungle", new ShelfBasic(Blocks.PLANKS.getDefaultState()));
SHELF_FULL_OAK = registerBlock("shelf_full_oak", new ShelfBasic(Blocks.PLANKS.getDefaultState()));
SHELF_FULL_MUD = registerBlock("shelf_full_mud", new ShelfBasic(MUD_BLOCK_DRY.getDefaultState()));
SHELF_FULL_NETHERPALM = registerBlock("shelf_full_netherpalm", new ShelfBasic(NETHERPALM_PLANK.getDefaultState()));
SHELF_FULL_NETHERRACK = registerBlock("shelf_full_netherrack", new ShelfBasic(Blocks.NETHERRACK.getDefaultState()));
SHELF_FULL_NETHERSTONE = registerBlock("shelf_full_netherstone", new ShelfBasic(NETHERSTONE.getDefaultState()));
SHELF_FULL_SANDSTONE = registerBlock("shelf_full_sandstone", new ShelfBasic(Blocks.SANDSTONE.getDefaultState()));
SHELF_FULL_SPRUCE = registerBlock("shelf_full_spruce", new ShelfBasic(Blocks.PLANKS.getDefaultState()));
SHELF_HALF_ACACIA = registerBlock("shelf_half_acacia", new ShelfHalf(Blocks.PLANKS.getDefaultState()));
SHELF_HALF_BIGOAK = registerBlock("shelf_half_bigoak", new ShelfHalf(Blocks.PLANKS.getDefaultState()));
SHELF_HALF_BIRCH = registerBlock("shelf_half_birch", new ShelfHalf(Blocks.PLANKS.getDefaultState()));
SHELF_HALF_END = registerBlock("shelf_half_end", new ShelfHalf(Blocks.END_STONE.getDefaultState()));
SHELF_HALF_IRONWOOD = registerBlock("shelf_half_ironwood", new ShelfHalf(IRONWOOD_PLANK.getDefaultState()));
SHELF_HALF_JUNGLE = registerBlock("shelf_half_jungle", new ShelfHalf(Blocks.PLANKS.getDefaultState()));
SHELF_HALF_OAK = registerBlock("shelf_half_oak", new ShelfHalf(Blocks.PLANKS.getDefaultState()));
SHELF_HALF_MUD = registerBlock("shelf_half_mud", new ShelfHalf(MUD_BLOCK_DRY.getDefaultState()));
SHELF_HALF_NETHERPALM = registerBlock("shelf_half_netherpalm", new ShelfHalf(NETHERPALM_PLANK.getDefaultState()));
SHELF_HALF_NETHERRACK = registerBlock("shelf_half_netherrack", new ShelfHalf(Blocks.NETHERRACK.getDefaultState()));
SHELF_HALF_NETHERSTONE = registerBlock("shelf_half_netherstone", new ShelfHalf(NETHERSTONE.getDefaultState()));
SHELF_HALF_SANDSTONE = registerBlock("shelf_half_sandstone", new ShelfHalf(Blocks.SANDSTONE.getDefaultState()));
SHELF_HALF_SPRUCE = registerBlock("shelf_half_spruce", new ShelfHalf(Blocks.PLANKS.getDefaultState()));
///
// Drying Racks
///
DRYING_RACK_ACACIA = registerBlock("drying_rack_acacia", new DryingRack(Blocks.PLANKS.getDefaultState()));
DRYING_RACK_BIGOAK = registerBlock("drying_rack_bigoak", new DryingRack(Blocks.PLANKS.getDefaultState()));
DRYING_RACK_BIRCH = registerBlock("drying_rack_birch", new DryingRack(Blocks.PLANKS.getDefaultState()));
DRYING_RACK_IRONWOOD = registerBlock("drying_rack_ironwood", new DryingRack(IRONWOOD_PLANK.getDefaultState()));
DRYING_RACK_JUNGLE = registerBlock("drying_rack_jungle", new DryingRack(Blocks.PLANKS.getDefaultState()));
DRYING_RACK_OAK = registerBlock("drying_rack_oak", new DryingRack(Blocks.PLANKS.getDefaultState()));
DRYING_RACK_NETHERPALM = registerBlock("drying_rack_netherpalm", new DryingRack(NETHERPALM_PLANK.getDefaultState()));
DRYING_RACK_SPRUCE = registerBlock("drying_rack_spruce", new DryingRack(Blocks.PLANKS.getDefaultState()));
FISH_TRAP_ACACIA = registerBlock("fish_trap_acacia", new FishTrap());
FISH_TRAP_BIGOAK = registerBlock("fish_trap_bigoak", new FishTrap());
FISH_TRAP_BIRCH = registerBlock("fish_trap_birch", new FishTrap());
FISH_TRAP_IRONWOOD = registerBlock("fish_trap_ironwood", new FishTrap());
FISH_TRAP_JUNGLE = registerBlock("fish_trap_jungle", new FishTrap());
FISH_TRAP_OAK = registerBlock("fish_trap_oak", new FishTrap());
FISH_TRAP_NETHERPALM = registerBlock("fish_trap_netherpalm", new FishTrap(Material.LAVA));
FISH_TRAP_SPRUCE = registerBlock("fish_trap_spruce", new FishTrap());
///
// Slabs
///
SLAB_CARBONATE_BRICK = registerBlock("slab_carbonate_brick", new SlabFull(CARBONATE_BRICK.getDefaultState()));
SLAB_CARBONATE_FLAG = registerBlock("slab_carbonate_flag", new SlabFull(CARBONATE_FLAG.getDefaultState()));
SLAB_ENDBRICK = registerBlock("slab_endbrick", new SlabFull(Blocks.END_BRICKS.getDefaultState()));
SLAB_ENDSTONE = registerBlock("slab_endstone", new SlabFull(Blocks.END_STONE.getDefaultState()));
SLAB_FERRO_BRICK = registerBlock("slab_ferro_brick", new SlabFull(FERRO_BRICK.getDefaultState()));
SLAB_FERRO_FLAG = registerBlock("slab_ferro_flag", new SlabFull(FERRO_FLAG.getDefaultState()));
SLAB_GLASS = registerBlock("slab_glass", new SlabFull(Blocks.GLASS.getDefaultState()));
SLAB_IRONWOOD = registerBlock("slab_ironwood", new SlabFull(IRONWOOD_PLANK.getDefaultState()));
SLAB_MUD = registerBlock("slab_mud", new SlabFull(MUD_BLOCK_DRY.getDefaultState()));
//SLAB_NETHERBRICK = registerBlock("slab_netherbrick", new SlabFull(Blocks.NETHER_BRICK.getDefaultState()));
SLAB_NETHERPALM = registerBlock("slab_netherpalm", new SlabFull(NETHERPALM_PLANK.getDefaultState()));
SLAB_NETHERRACK = registerBlock("slab_netherrack", new SlabFull(Blocks.NETHERRACK.getDefaultState()));
SLAB_NETHERSTONE = registerBlock("slab_netherstone", new SlabFull(NETHERSTONE.getDefaultState()));
//SLAB_SANDSTONE = registerBlock("slab_sandstone", new SlabFull(Blocks.SANDSTONE.getDefaultState()));
SLAB_SOULSTONE = registerBlock("slab_soulstone", new SlabFull(SOULSTONE_SMOOTH.getDefaultState()));
SLAB_STONEBRICK_MOSSY = registerBlock("slab_stonebrick_mossy", new SlabFull(Blocks.STONEBRICK.getDefaultState()));
///
// Thin Slabs
///
THIN_SLAB_ACACIA = registerBlock("thin_slab_acacia", new ThinSlab(Blocks.PLANKS.getDefaultState()));
THIN_SLAB_BIGOAK = registerBlock("thin_slab_bigoak", new ThinSlab(Blocks.PLANKS.getDefaultState()));
THIN_SLAB_BIRCH = registerBlock("thin_slab_birch", new ThinSlab(Blocks.PLANKS.getDefaultState()));
THIN_SLAB_CARBONATE_BRICK = registerBlock("thin_slab_carbonate_brick", new ThinSlab(CARBONATE_BRICK.getDefaultState()));
THIN_SLAB_CARBONATE_FLAG = registerBlock("thin_slab_carbonate_flag", new ThinSlab(CARBONATE_FLAG.getDefaultState()));
THIN_SLAB_ENDBRICK = registerBlock("thin_slab_endbrick", new ThinSlab(Blocks.END_BRICKS.getDefaultState()));
THIN_SLAB_ENDSTONE = registerBlock("thin_slab_endstone", new ThinSlab(Blocks.END_STONE.getDefaultState()));
THIN_SLAB_FERRO_BRICK = registerBlock("thin_slab_ferro_brick", new ThinSlab(FERRO_BRICK.getDefaultState()));
THIN_SLAB_FERRO_FLAG = registerBlock("thin_slab_ferro_flag", new ThinSlab(FERRO_FLAG.getDefaultState()));
THIN_SLAB_GLASS = registerBlock("thin_slab_glass", new ThinSlab(Blocks.GLASS.getDefaultState()));
THIN_SLAB_IRONWOOD = registerBlock("thin_slab_ironwood", new ThinSlab(IRONWOOD_PLANK.getDefaultState()));
THIN_SLAB_JUNGLE = registerBlock("thin_slab_jungle", new ThinSlab(Blocks.PLANKS.getDefaultState()));
THIN_SLAB_MUD = registerBlock("thin_slab_mud", new ThinSlab(MUD_BLOCK_DRY.getDefaultState()));
THIN_SLAB_NETHERBRICK = registerBlock("thin_slab_netherbrick", new ThinSlab(Blocks.NETHER_BRICK.getDefaultState()));
THIN_SLAB_NETHERPALM = registerBlock("thin_slab_netherpalm", new ThinSlab(NETHERPALM_PLANK.getDefaultState()));
THIN_SLAB_NETHERRACK = registerBlock("thin_slab_netherrack", new ThinSlab(Blocks.NETHERRACK.getDefaultState()));
THIN_SLAB_NETHERSTONE = registerBlock("thin_slab_netherstone", new ThinSlab(NETHERSTONE.getDefaultState()));
THIN_SLAB_OAK = registerBlock("thin_slab_oak", new ThinSlab(Blocks.PLANKS.getDefaultState()));
THIN_SLAB_SANDSTONE = registerBlock("thin_slab_sandstone", new ThinSlab(Blocks.SANDSTONE.getDefaultState()));
THIN_SLAB_SOULSTONE = registerBlock("thin_slab_soulstone", new ThinSlab(SOULSTONE_SMOOTH.getDefaultState()));
THIN_SLAB_SPRUCE = registerBlock("thin_slab_spruce", new ThinSlab(Blocks.PLANKS.getDefaultState()));
THIN_SLAB_STONEBRICK = registerBlock("thin_slab_stonebrick", new ThinSlab(Blocks.STONEBRICK.getDefaultState()));
THIN_SLAB_STONEBRICK_MOSSY = registerBlock("thin_slab_stonebrick_mossy", new ThinSlab(Blocks.STONEBRICK.getDefaultState()));
THIN_SLAB_THATCH = registerBlock("thin_slab_thatch", new ThinSlab(THATCH.getDefaultState(), true));
///
// Smoke Grates
///
GRATE_ACACIA = registerBlock("grate_acacia", new SmokeGrate(Blocks.PLANKS.getDefaultState()));
GRATE_BIGOAK = registerBlock("grate_bigoak", new SmokeGrate(Blocks.PLANKS.getDefaultState()));
GRATE_BIRCH = registerBlock("grate_birch", new SmokeGrate(Blocks.PLANKS.getDefaultState()));
GRATE_CARBONATE_BRICK = registerBlock("grate_carbonate_brick", new SmokeGrate(CARBONATE_BRICK.getDefaultState()));
GRATE_CARBONATE_FLAG = registerBlock("grate_carbonate_flag", new SmokeGrate(CARBONATE_FLAG.getDefaultState()));
GRATE_ENDBRICK = registerBlock("grate_endbrick", new SmokeGrate(Blocks.END_BRICKS.getDefaultState()));
GRATE_ENDSTONE = registerBlock("grate_endstone", new SmokeGrate(Blocks.END_STONE.getDefaultState()));
GRATE_FERRO_BRICK = registerBlock("grate_ferro_brick", new SmokeGrate(FERRO_BRICK.getDefaultState()));
GRATE_FERRO_FLAG = registerBlock("grate_ferro_flag", new SmokeGrate(FERRO_FLAG.getDefaultState()));
GRATE_IRONWOOD = registerBlock("grate_ironwood", new SmokeGrate(IRONWOOD_PLANK.getDefaultState()));
GRATE_JUNGLE = registerBlock("grate_jungle", new SmokeGrate(Blocks.PLANKS.getDefaultState()));
GRATE_MUD = registerBlock("grate_mud", new SmokeGrate(MUD_BLOCK_DRY.getDefaultState()));
GRATE_NETHERBRICK = registerBlock("grate_netherbrick", new SmokeGrate(Blocks.NETHER_BRICK.getDefaultState()));
GRATE_NETHERPALM = registerBlock("grate_netherpalm", new SmokeGrate(NETHERPALM_PLANK.getDefaultState()));
GRATE_NETHERRACK = registerBlock("grate_netherrack", new SmokeGrate(Blocks.NETHERRACK.getDefaultState()));
GRATE_NETHERSTONE = registerBlock("grate_netherstone", new SmokeGrate(NETHERSTONE.getDefaultState()));
GRATE_OAK = registerBlock("grate_oak", new SmokeGrate(Blocks.PLANKS.getDefaultState()));
GRATE_SANDSTONE = registerBlock("grate_sandstone", new SmokeGrate(Blocks.SANDSTONE.getDefaultState()));
GRATE_SOULSTONE = registerBlock("grate_soulstone", new SmokeGrate(SOULSTONE_SMOOTH.getDefaultState()));
GRATE_SPRUCE = registerBlock("grate_spruce", new SmokeGrate(Blocks.PLANKS.getDefaultState()));
GRATE_STONEBRICK = registerBlock("grate_stonebrick", new SmokeGrate(Blocks.STONEBRICK.getDefaultState()));
GRATE_STONEBRICK_MOSSY = registerBlock("grate_stonebrick_mossy", new SmokeGrate(Blocks.STONEBRICK.getDefaultState()));
GRATE_THATCH = registerBlock("grate_thatch", new SmokeGrate(THATCH.getDefaultState(), true));
DRAIN_CARBONATE_BRICK = registerBlock("drain_carbonate_brick", new Drain(CARBONATE_BRICK.getDefaultState()));
DRAIN_CARBONATE_FLAG = registerBlock("drain_carbonate_flag", new Drain(CARBONATE_FLAG.getDefaultState()));
DRAIN_ENDBRICK = registerBlock("drain_endbrick", new Drain(Blocks.END_BRICKS.getDefaultState()));
DRAIN_ENDSTONE = registerBlock("drain_endstone", new Drain(Blocks.END_STONE.getDefaultState()));
DRAIN_FERRO_BRICK = registerBlock("drain_ferro_brick", new Drain(FERRO_BRICK.getDefaultState()));
DRAIN_FERRO_FLAG = registerBlock("drain_ferro_flag", new Drain(FERRO_FLAG.getDefaultState()));
DRAIN_MUD = registerBlock("drain_mud", new Drain(MUD_BLOCK_DRY.getDefaultState()));
DRAIN_NETHERBRICK = registerBlock("drain_netherbrick", new Drain(Blocks.NETHER_BRICK.getDefaultState()));
DRAIN_NETHERRACK = registerBlock("drain_netherrack", new Drain(Blocks.NETHERRACK.getDefaultState()));
DRAIN_NETHERSTONE = registerBlock("drain_netherstone", new Drain(NETHERSTONE.getDefaultState()));
DRAIN_STONE = registerBlock("drain_stone", new Drain(Blocks.STONE.getDefaultState()));
DRAIN_STONEBRICK = registerBlock("drain_stonebrick", new Drain(Blocks.STONEBRICK.getDefaultState()));
DRAIN_STONEBRICK_MOSSY = registerBlock("drain_stonebrick_mossy", new Drain(Blocks.STONEBRICK.getDefaultState()));
DRAIN_THATCH = registerBlock("drain_thatch", new Drain(THATCH.getDefaultState()));
}
public static void registerLighting()
{
///
// Lanterns, Torch, etc
///
LANTERN_EMPTY = registerBlock("lantern_empty", new Lantern());
LANTERN_TORCH = registerBlock("lantern_torch", new Lantern(true, true, 0.8375F), false);
LANTERN_NETHER = registerBlock("lantern_nether", new Lantern(true, false, 0.7375F), false);
LANTERN_REDSTONE = registerBlock("lantern_redstone", new Lantern(true, false, 0.5F), false);
LANTERN_IGNIS = registerBlock("lantern_ignis", new Lantern(true, false, 0.8375F), false);
TORCH_WOOD = registerBlock("torch_wood", new Torch(0.9375F, ModConfig.LIGHTING_TORCH_BURN_CHANCE, true), ItemTorchBlock::new, "torchUnlit");
TORCH_NETHER = registerBlock("torch_nether", new Torch(0.8375F, 60, false), ItemTorchBlock::new, "torchUnlit");
//TORCH_SMOKER = registerBlock(new Torch("torch_smoker", 0.6375F, 500, true));
IGNIS_FATUUS = registerBlock("ignis_fatuus", new IgnisFatuus(), "torch");
JACK_O_LANTERN = registerBlock("jackolantern", new JackOLanern());
}
/*******************************************************************************
* Block Registration Methods
* https://github.com/Choonster/TestMod3/blob/1e3b9be1448a93ff1c6e3ef2e16fb4388eefc1a4/src/main/java/com/choonster/testmod3/init/ModBlocks.java#L94-L124
*/
public static <BLOCK extends Block> BLOCK registerBlock(String name, BLOCK block, @Nullable Function<BLOCK, ItemBlock> itemFactory, @Nullable String dictionary_names, boolean hidden)
{
block.setRegistryName(name);
block.setUnlocalizedName(block.getRegistryName().toString());
ForgeRegistries.BLOCKS.register(block);
//PrimalCore.proxy.renderBlock(block);
BLOCKS.add(block);
if (itemFactory != null)
{
//CommonUtils.debugLogger(2, "item register", "name: " + block.getRegistryName().toString().substring(7));
ItemBlock item = itemFactory.apply(block);
item.setRegistryName(block.getRegistryName().toString().substring(7));
ForgeRegistries.ITEMS.register(item);
PrimalCore.proxy.registerItemSided(item);
} else {
PrimalCore.proxy.registerItemSided(Item.getItemFromBlock(block));
}
if (dictionary_names != null)
{
String [] dictionary_name_array = dictionary_names.replaceAll("\\s+","").split(",");
//List<String> name_list = Arrays.asList(names);
for (String dictionary_name : dictionary_name_array) {
OreDictionary.registerOre(dictionary_name, block);
}
}
if (!hidden) {
block.setCreativeTab(ModInfo.TAB_PRIMAL);
}
return block;
}
public static <BLOCK extends Block> BLOCK registerBlock(String name, BLOCK block) {
return registerBlock(name, block, ItemBlock::new, null, false);
}
public static <BLOCK extends Block> BLOCK registerBlock(String name, BLOCK block, @Nullable String dictionary_names) {
return registerBlock(name, block, ItemBlock::new, dictionary_names, false);
}
public static <BLOCK extends Block> BLOCK registerBlock(String name, BLOCK block, @Nullable Function<BLOCK, ItemBlock> itemFactory) {
return registerBlock(name, block, itemFactory, null, false);
}
public static <BLOCK extends Block> BLOCK registerBlock(String name, BLOCK block, @Nullable Function<BLOCK, ItemBlock> itemFactory, @Nullable String dictionary_names) {
return registerBlock(name, block, itemFactory, dictionary_names, false);
}
public static <BLOCK extends Block> BLOCK registerBlock(String name, BLOCK block, boolean hidden) {
return registerBlock(name, block, ItemBlock::new, null, hidden);
}
public static <BLOCK extends Block> BLOCK registerBlock(String name, BLOCK block, @Nullable String dictionary_names, boolean hidden) {
return registerBlock(name, block, ItemBlock::new, dictionary_names, hidden);
}
public static <BLOCK extends Block> BLOCK registerBlock(String name, BLOCK block, @Nullable Function<BLOCK, ItemBlock> itemFactory, boolean hidden) {
return registerBlock(name, block, itemFactory, null, hidden);
}
}

View File

@@ -1,575 +0,0 @@
package nmd.primal.forgecraft.common.init;
import net.minecraftforge.common.config.ConfigCategory;
import net.minecraftforge.common.config.Configuration;
import net.minecraftforge.common.config.Property;
import java.io.File;
public class ModConfig
{
/// ************************************************************************ ///
// features
///
public static boolean FEATURE_ENABLE_FUELS;
public static boolean FEATURE_REPLACE_LEVERS;
public static boolean FEATURE_DISABLE_NETHER_PORTAL;
public static boolean FEATURE_DISABLE_BED_SLEEP;
public static boolean FEATURE_DISABLE_BED_SPAWN;
public static boolean FEATURE_AUTO_PLANT_SAPLINGS;
/// ************************************************************************ ///
// survival
///
public static int SURVIVAL_MUD_DRY_TIME;
public static int SURVIVAL_THATCH_DRY_TIME;
public static int SURVIVAL_THATCH_SUPPORT_RANGE;
public static int SURVIVAL_ROCK_STACKSIZE;
public static int SURVIVAL_FIREBOW_DIFFICULTY;
public static int SURVIVAL_EXTRA_ROCK_DROPS;
public static int SURVIVAL_EXTRA_FLINT_DROPS;
public static double SURVIVAL_ROCK_DAMAGE;
public static boolean SURVIVAL_PLANT_FIBER_DROP;
public static boolean SURVIVAL_LEAF_STICK_DROP;
public static boolean SURVIVAL_LEAF_BREAK_FALL;
public static boolean SURVIVAL_NETHER_EARLYGAME;
public static boolean SURVIVAL_WOOD_HARVESTING_TOOLS;
public static boolean SURVIVAL_STONE_HARVESTING_ROCKS;
public static boolean SURVIVAL_BETTER_THAN_PLANKS;
public static boolean SURVIVAL_SHELVES_ACCEPT_FULL_STACK;
/// ************************************************************************ ///
// lighting
///
public static int LIGHTING_TORCH_LIFESPAN;
public static int LIGHTING_TORCH_RECIPE_OUTPUT;
public static int LIGHTING_TORCH_LIT_STACKSIZE;
public static int LIGHTING_TORCH_BURN_CHANCE;
public static int LIGHTING_JACKOLANTERN_LIFESPAN;
public static int LIGHTING_SMOKE_TORCH_CHANCE;
public static int LIGHTING_SMOKE_TORCH_ARROW_CHANCE;
public static int LIGHTING_SMOKE_LANTERN_CHANCE;
public static double LIGHTING_JACKOLANTERN_LIGHT_LEVEL;
public static boolean LIGHTING_JACKOLANTERN_REPLACE_VANILLA;
public static boolean LIGHTING_JACKOLANTERN_CAN_EXPIRE;
public static boolean LIGHTING_TORCHES_REPLACE_VANILLA;
public static boolean LIGHTING_TORCHES_DIE;
/// ************************************************************************ ///
// worldgen primal
///
public static boolean WORLDGEN_ENABLE;
public static boolean WORLDGEN_IN_MOD_DIMENSIONS;
public static boolean WORLDGEN_OVERRIDE_NETHER;
public static boolean WORLDGEN_LIMESTONE;
public static boolean WORLDGEN_BASALT;
public static boolean WORLDGEN_EARTHWAX;
public static boolean WORLDGEN_TERRACOTTA;
public static boolean WORLDGEN_CINISCOTTA;
public static boolean WORLDGEN_MUD;
public static boolean WORLDGEN_RUSH;
public static boolean WORLDGEN_CORN;
public static boolean WORLDGEN_NETHER_GRASS;
public static boolean WORLDGEN_NETHER_PALM;
public static boolean WORLDGEN_END_GRASS;
public static boolean WORLDGEN_END_WOOD;
public static boolean WORLDGEN_IRONWOOD;
public static boolean WORLDGEN_SALT_FLATS;
public static boolean WORLDGEN_SALT_ROCK;
public static boolean WORLDGEN_SALT_NETHER;
public static boolean WORLDGEN_SALT_END;
public static boolean WORLDGEN_PRIMAL_ORE_IRON;
public static boolean WORLDGEN_PRIMAL_ORE_GOLD;
///
// worldgen vanilla
///
public static boolean WORLDGEN_DISABLE_VANILLA_ORE_IRON;
public static boolean WORLDGEN_DISABLE_VANILLA_ORE_GOLD;
public static boolean WORLDGEN_DISABLE_VANILLA_ORE_COAL;
public static boolean WORLDGEN_DISABLE_VANILLA_ORE_REDSTONE;
public static boolean WORLDGEN_DISABLE_VANILLA_ORE_LAPIS;
public static boolean WORLDGEN_DISABLE_VANILLA_ORE_DIAMOND;
public static boolean WORLDGEN_DISABLE_VANILLA_ORE_EMERALD;
public static boolean WORLDGEN_DISABLE_VANILLA_ORE_QUARTZ;
/// ************************************************************************ ///
// crafting overrides
///
public static boolean CRAFTING_PRIMAL_TOOLS;
public static boolean CRAFTING_ENABLE_SADDLE;
public static boolean CRAFTING_ENABLE_HORSE_ARMOR;
public static boolean CRAFTING_DISABLE_ENDEREYE;
public static boolean CRAFTING_DISABLE_TOOLS_WOOD;
public static boolean CRAFTING_DISABLE_TOOLS_STONE;
public static boolean CRAFTING_DISABLE_TOOLS_IRON;
public static boolean CRAFTING_DISABLE_TOOLS_DIAMOND;
public static boolean CRAFTING_DISABLE_TOOLS_GOLD;
public static boolean CRAFTING_REPLACE_CHISELED_RECIPE;
public static boolean CRAFTING_REPLACE_ARROW_RECIPE;
public static boolean CRAFTING_SURVIVAL_FLINTNSTEEL;
public static boolean CRAFTING_FARMLAND;
public static boolean CRAFTING_BARK_REMOVAL_ENABLE;
public static boolean CRAFTING_KNAPPING_ENABLE;
public static double CRAFTING_KNAPPING_DIFFICULTY_FLINT;
public static double CRAFTING_KNAPPING_DIFFICULTY_QUARTZ;
public static double CRAFTING_KNAPPING_DIFFICULTY_OBSIDIAN;
public static int CRAFTING_DRYING_RACK_BASE_TIME;
//public static int CRAFTING_KNAPPING_DIFFICULTY;
/// ************************************************************************ ///
// development
///
public static int DEBUG_LEVEL;
/// ************************************************************************ ///
// lists
///
public static String[] SURVIVAL_WOOD_HARVESTING_ADDITIONS = { };
public static String[] CRAFTING_REMOVE_NAMES = { };
public static String[] removeRecipeDisplayNames = { };
public static String[] FEATURE_CUSTOM_SAPLINGS = { };
/// ************************************************************************ ///
// init config defaults
///
public static void init(File configFile)
{
// you will be able to find the config file in .minecraft/config/ and it will be named "modname".cfg
// here our Configuration has been instantiated, and saved under the name "config"
Configuration config = new Configuration(configFile);
// loading the configuration from its file
config.load();
/// ************************************************************************ ///
// features
//
String features_title = "feature hooks";
ConfigCategory featuresCategory = config.getCategory(features_title);
featuresCategory.setComment("Hooks for controlling various aspects of the mod");
//
/// ************************************************************************ ///
Property feature_enable_fuels = config.get(features_title, "FEATURE_ENABLE_FUELS", true);
feature_enable_fuels.setComment("Registration of various fuel items");
FEATURE_ENABLE_FUELS = feature_enable_fuels.getBoolean(true);
Property feature_replace_levers = config.get(features_title, "FEATURE_REPLACE_LEVERS", true);
feature_replace_levers.setComment("Replace vanilla levers during block placement");
FEATURE_REPLACE_LEVERS = feature_replace_levers.getBoolean(true);
Property feature_disable_nether_portal = config.get(features_title, "FEATURE_DISABLE_NETHER_PORTAL", false);
feature_disable_nether_portal.setComment("Disable Nether Portal Creation");
FEATURE_DISABLE_NETHER_PORTAL = feature_disable_nether_portal.getBoolean(false);
Property feature_disable_bed_sleep = config.get(features_title, "FEATURE_DISABLE_BED_SLEEP", false);
feature_disable_bed_sleep.setComment("Disable sleeping in a bed, hackish method of preventing night skipping, if you have a better way plz let me know");
FEATURE_DISABLE_BED_SLEEP = feature_disable_bed_sleep.getBoolean(false);
Property feature_disable_bed_spawn = config.get(features_title, "FEATURE_DISABLE_BED_SPAWN", false);
feature_disable_bed_spawn.setComment("Disable setting of spawn via beds or bed-like blocks");
FEATURE_DISABLE_BED_SPAWN = feature_disable_bed_spawn.getBoolean(false);
Property feature_auto_plant_saplings = config.get(features_title, "FEATURE_AUTO_PLANT_SAPLINGS", true);
feature_auto_plant_saplings.setComment("Saplings will plant themselves when left in the world");
FEATURE_AUTO_PLANT_SAPLINGS = feature_auto_plant_saplings.getBoolean(true);
/// ************************************************************************ ///
// survival
//
String survival_title = "survival settings";
ConfigCategory survivalCategory = config.getCategory(survival_title);
survivalCategory.setComment("Options balanced toward a harder survival style game");
//
/// ************************************************************************ ///
Property survival_mud_dry_time = config.get(survival_title, "SURVIVAL_MUD_DRY_TIME", 40);
survival_mud_dry_time.setComment("Modifier for how long it takes wet mud to dry. Lack of air, rain, or near by water will slow or prevent mud from drying");
SURVIVAL_MUD_DRY_TIME = survival_mud_dry_time.getInt(40);
Property survival_thatch_dry_time = config.get(survival_title, "SURVIVAL_THATCH_DRY_TIME", 120);
survival_thatch_dry_time.setComment("Modifier for how long it takes wet thatch to dry, this values is reduced by half when thatch is exposed to the sun, however rain will pose a problem.");
SURVIVAL_THATCH_DRY_TIME = survival_thatch_dry_time.getInt(120);
Property survival_thatch_support_range = config.get(survival_title, "SURVIVAL_THATCH_SUPPORT_RANGE", 2);
survival_thatch_support_range.setComment("Modifier for how far away wooden slats can be from thatch and still provide support.");
SURVIVAL_THATCH_SUPPORT_RANGE = survival_thatch_support_range.getInt(2);
Property survival_rock_stacksize = config.get(survival_title, "SURVIVAL_ROCK_STACKSIZE", 16);
survival_rock_stacksize.setComment("How many rocks can a rock stacker stack?");
SURVIVAL_ROCK_STACKSIZE = survival_rock_stacksize.getInt(16);
Property survival_rock_damage = config.get(survival_title, "SURVIVAL_ROCK_DAMAGE", 1.5D);
survival_rock_damage.setComment("Amount of damage from a thrown rock");
SURVIVAL_ROCK_DAMAGE = survival_rock_damage.getDouble(1.5D);
Property survival_firebow_difficulty = config.get(survival_title, "SURVIVAL_FIREBOW_DIFFICULTY", 8);
survival_firebow_difficulty.setComment("Chance of success with the fire bow, higher is less likely.");
SURVIVAL_FIREBOW_DIFFICULTY = survival_firebow_difficulty.getInt(8);
Property survival_extra_rock_drops = config.get(survival_title, "SURVIVAL_EXTRA_ROCK_DROPS", 50);
survival_extra_rock_drops.setComment("Harvesting Ground or Sand materials has a chance of dropping rocks, 0 will disable drop while higher values are less and less likely");
SURVIVAL_EXTRA_ROCK_DROPS = survival_extra_rock_drops.getInt(50);
Property survival_extra_flint_drops = config.get(survival_title, "SURVIVAL_EXTRA_FLINT_DROPS", 50);
survival_extra_flint_drops.setComment("Harvesting Ground or Sand materials has a chance of dropping flint, 0 will disable drop while higher values are less and less likely");
SURVIVAL_EXTRA_FLINT_DROPS = survival_extra_flint_drops.getInt(50);
Property survival_plant_fiber_drop = config.get(survival_title, "SURVIVAL_PLANT_FIBER_DROP", true);
survival_plant_fiber_drop.setComment("Breaking GrassBlocks, TallGrass, and Vines drops plant fibers");
SURVIVAL_PLANT_FIBER_DROP = survival_plant_fiber_drop.getBoolean(true);
Property survival_leaf_stick_drop = config.get(survival_title, "SURVIVAL_LEAF_STICK_DROP", true);
survival_leaf_stick_drop.setComment("Breaking leaf blocks will sometimes drop sticks");
SURVIVAL_LEAF_STICK_DROP = survival_leaf_stick_drop.getBoolean(true);
Property survival_leaf_break_fall = config.get(survival_title, "SURVIVAL_LEAF_BREAK_FALL", true);
survival_leaf_break_fall.setComment("Falling or jumping onto leaf blocks absorbs some damage and breaks the associated blocks");
SURVIVAL_LEAF_BREAK_FALL = survival_leaf_break_fall.getBoolean(true);
Property survival_Nether_earlygame = config.get(survival_title, "SURVIVAL_NETHER_EARLYGAME", true);
survival_Nether_earlygame.setComment("Settings to smooth early gameplay in the Nether, such as harvesting Netherrack without a tool");
SURVIVAL_NETHER_EARLYGAME = survival_Nether_earlygame.getBoolean(true);
Property stone_harvesting_rocks = config.get(survival_title, "SURVIVAL_STONE_HARVESTING_ROCKS", false);
stone_harvesting_rocks.setComment("Harvesting smooth stone with a pick drops a number of rocks based on tool level, cobble stone must be crafted");
SURVIVAL_STONE_HARVESTING_ROCKS = stone_harvesting_rocks.getBoolean(false);
Property survival_better_than_planks = config.get(survival_title, "SURVIVAL_BETTER_THAN_PLANKS", true);
survival_better_than_planks.setComment("Crafting planks and sticks require the use of a saw and workblade respectively");
SURVIVAL_BETTER_THAN_PLANKS = survival_better_than_planks.getBoolean(true);
//Property survival_shelves_accept_full_stack = config.get(survival_title, "SURVIVAL_SHELVES_ACCEPT_FULL_STACK", false);
//survival_shelves_accept_full_stack.setComment("Shelves with load/unload full stacks as opposed to one item at a time.");
//SURVIVAL_SHELVES_ACCEPT_FULL_STACK = survival_shelves_accept_full_stack.getBoolean(false);
Property survival_wood_harvesting_tools = config.get(survival_title, "SURVIVAL_WOOD_HARVESTING_TOOLS", true);
survival_wood_harvesting_tools.setComment("Harvesting log blocks requires the use of appropriate tools");
SURVIVAL_WOOD_HARVESTING_TOOLS = survival_wood_harvesting_tools.getBoolean(true);
Property survival_wood_harvesting_additions = config.get(survival_title, "SURVIVAL_WOOD_HARVESTING_ADDITIONS", SURVIVAL_WOOD_HARVESTING_ADDITIONS);
survival_wood_harvesting_additions.setComment("List of Blocks to treat as wood logs, this is used by the SURVIVAL_WOOD_HARVESTING_TOOLS option.");
SURVIVAL_WOOD_HARVESTING_ADDITIONS = survival_wood_harvesting_additions.getStringList();
/// ************************************************************************ ///
// lighting
//
String lighting_title = "lighting";
ConfigCategory lightingCategory = config.getCategory(lighting_title);
lightingCategory.setComment("Torch, Lanterns, and other things");
//
/// ************************************************************************ ///
Property lighting_torch_lifespan = config.get(lighting_title, "LIGHTING_TORCH_LIFESPAN", 16);
lighting_torch_lifespan.setComment("How long will torches stay lit? higher is a longer life time, while 0 will disable the feature.");
LIGHTING_TORCH_LIFESPAN = lighting_torch_lifespan.getInt(16);
Property lighting_torch_burn_chance = config.get(lighting_title, "LIGHTING_TORCH_BURN_CHANCE", 500);
lighting_torch_burn_chance.setComment("How likely are Overworld torches to set entities touching them on fire. Higher is less likely, think in large numbers as the check runs continually on block collision.");
LIGHTING_TORCH_BURN_CHANCE = lighting_torch_burn_chance.getInt(500);
Property lighting_smoke_torch_chance = config.get(lighting_title, "LIGHTING_SMOKE_TORCH_CHANCE", 60);
lighting_smoke_torch_chance.setComment("How likely are torches to produce smoke when exposed to rain or snow. Higher is less likely.");
LIGHTING_SMOKE_TORCH_CHANCE = lighting_smoke_torch_chance.getInt(60);
Property lighting_smoke_torch_arrow_chance = config.get(lighting_title, "LIGHTING_SMOKE_TORCH_ARROW_CHANCE", 36);
lighting_smoke_torch_arrow_chance.setComment("How likely are torch arrows to produce smoke on impact with a block.");
LIGHTING_SMOKE_TORCH_ARROW_CHANCE = lighting_smoke_torch_arrow_chance.getInt(36);
Property lighting_smoke_lantern_chance = config.get(lighting_title, "LIGHTING_SMOKE_LANTERN_CHANCE", 40);
lighting_smoke_lantern_chance.setComment("How likely are lanterns to produce smoke when exposed to rain or snow. Higher is less likely.");
LIGHTING_SMOKE_LANTERN_CHANCE = lighting_smoke_lantern_chance.getInt(40);
//Property lighting_smoke_in_doors = config.get(lighting_title, "LIGHTING_SMOKE_IN_DOORS", false);
//lighting_smoke_in_doors.setComment("");
//LIGHTING_SMOKE_IN_DOORS = lighting_smoke_in_doors.getBoolean(false);
Property lighting_jackolantern_light_level = config.get(lighting_title, "LIGHTING_JACKOLANTERN_LIGHT_LEVEL", 0.5D);
lighting_jackolantern_light_level.setComment("Amount of light produced by Jack o'Lanterns. Redstone torches 0.5D, Torch 0.9375D.");
LIGHTING_JACKOLANTERN_LIGHT_LEVEL = lighting_jackolantern_light_level.getDouble(0.5D);
Property lighting_torch_recipe_output = config.get(lighting_title, "LIGHTING_TORCH_RECIPE_OUTPUT", 4);
lighting_torch_recipe_output.setComment("How many torches are produced from crafting. Currently you must also be overriding vanilla torches for this to work.");
LIGHTING_TORCH_RECIPE_OUTPUT = lighting_torch_recipe_output.getInt(4);
Property lighting_jackolantern_replace_vanilla = config.get(lighting_title, "LIGHTING_JACKOLANTERN_REPLACE_VANILLA", true);
lighting_jackolantern_replace_vanilla.setComment("Replace vanilla jack-o-lanterns during block placement");
LIGHTING_JACKOLANTERN_REPLACE_VANILLA = lighting_jackolantern_replace_vanilla.getBoolean(true);
Property lighting_jackolantern_can_expire = config.get(lighting_title, "LIGHTING_JACKOLANTERN_CAN_EXPIRE", true);
lighting_jackolantern_can_expire.setComment("Jack-o-lanterns can get put out, and or will naturally go out according to how torches are configured");
LIGHTING_JACKOLANTERN_CAN_EXPIRE = lighting_jackolantern_can_expire.getBoolean(true);
Property lighting_torches_replace_vanilla = config.get(lighting_title, "LIGHTING_TORCHES_REPLACE_VANILLA", true);
lighting_torches_replace_vanilla.setComment("Replace vanilla torches during block placement, Use an updated recipe and configurable output amount.");
LIGHTING_TORCHES_REPLACE_VANILLA = lighting_torches_replace_vanilla.getBoolean(true);
Property lighting_torches_die = config.get(lighting_title, "LIGHTING_TORCHES_DIE", false);
lighting_torches_die.setComment("Set this option for torches that will eventually go out even when not exposed to weather. This will also cause torches to create smoke regardless of weather. Separately weather sensitivity can be disabled by setting the lifespan to 0");
LIGHTING_TORCHES_DIE = lighting_torches_die.getBoolean(false);
/// ************************************************************************ ///
// crafting
//
String crafting_title = "crafting control";
ConfigCategory craftingCategory = config.getCategory(crafting_title);
craftingCategory.setComment("Control over Crafting");
//
/// ************************************************************************ ///
Property crafting_primal_tools = config.get(crafting_title, "CRAFTING_PRIMAL_TOOLS", true);
crafting_primal_tools.setComment("Enable crafting recipes for primal tools, currently: flint, quartz");
CRAFTING_PRIMAL_TOOLS = crafting_primal_tools.getBoolean(true);
Property crafting_enable_saddle = config.get(crafting_title, "CRAFTING_ENABLE_SADDLE", true);
crafting_enable_saddle.setComment("Enable Crafting recipe for the vanilla saddle");
CRAFTING_ENABLE_SADDLE = crafting_enable_saddle.getBoolean(true);
Property crafting_enable_horse_armor = config.get(crafting_title, "CRAFTING_ENABLE_HORSE_ARMOR", true);
crafting_enable_horse_armor.setComment("Enable Crafting recipe for the vanilla horse armor");
CRAFTING_ENABLE_HORSE_ARMOR = crafting_enable_horse_armor.getBoolean(true);
Property crafting_disable_endereye = config.get(crafting_title, "CRAFTING_DISABLE_ENDEREYE", false);
crafting_disable_endereye.setComment("Disable crafting recipe for ender eyes");
CRAFTING_DISABLE_ENDEREYE = crafting_disable_endereye.getBoolean(false);
Property crafting_disable_tools_wood = config.get(crafting_title, "CRAFTING_DISABLE_TOOLS_WOOD", true);
crafting_disable_tools_wood.setComment("Disable crafting recipes for vanilla wood tools, by default flint tools are meant to replace wood.");
CRAFTING_DISABLE_TOOLS_WOOD = crafting_disable_tools_wood.getBoolean(true);
Property crafting_disable_tools_stone = config.get(crafting_title, "CRAFTING_DISABLE_TOOLS_STONE", false);
crafting_disable_tools_stone.setComment("Disable crafting recipes for vanilla stone tools");
CRAFTING_DISABLE_TOOLS_STONE = crafting_disable_tools_stone.getBoolean(false);
Property crafting_disable_tools_iron = config.get(crafting_title, "CRAFTING_DISABLE_TOOLS_IRON", false);
crafting_disable_tools_iron.setComment("Disable crafting recipes for vanilla iron tools");
CRAFTING_DISABLE_TOOLS_IRON = crafting_disable_tools_iron.getBoolean(false);
Property crafting_disable_tools_gold = config.get(crafting_title, "CRAFTING_DISABLE_TOOLS_GOLD", false);
crafting_disable_tools_gold.setComment("Disable crafting recipes for vanilla gold tools");
CRAFTING_DISABLE_TOOLS_GOLD = crafting_disable_tools_gold.getBoolean(false);
Property crafting_disable_tools_diamond = config.get(crafting_title, "CRAFTING_DISABLE_TOOLS_DIAMOND", false);
crafting_disable_tools_diamond.setComment("Disable crafting recipes for vanilla diamond tools");
CRAFTING_DISABLE_TOOLS_DIAMOND = crafting_disable_tools_diamond.getBoolean(false);
Property crafting_replace_chiseled_recipe = config.get(crafting_title, "CRAFTING_REPLACE_CHISELED_RECIPE", true);
crafting_replace_chiseled_recipe.setComment("Replace chiseled block recipes to require a work blade");
CRAFTING_REPLACE_CHISELED_RECIPE = crafting_replace_chiseled_recipe.getBoolean(true);
Property crafting_replace_arrow_recipe = config.get(crafting_title, "CRAFTING_REPLACE_ARROW_RECIPE", true);
crafting_replace_arrow_recipe.setComment("Replace vanilla arrow recipe to use knapped flint");
CRAFTING_REPLACE_ARROW_RECIPE = crafting_replace_arrow_recipe.getBoolean(true);
Property survival_crafting_flintsteel = config.get(crafting_title, "CRAFTING_SURVIVAL_FLINTNSTEEL", true);
survival_crafting_flintsteel.setComment("Enable a more realistic recipe for flint and steel, this drastically reduces the iron cost for early game");
CRAFTING_SURVIVAL_FLINTNSTEEL = survival_crafting_flintsteel.getBoolean(true);
Property crafting_farmland = config.get(crafting_title, "CRAFTING_FARMLAND", false);
crafting_farmland.setComment("Tilling Farmland no longer works on vanilla dirt, replaced with a craftable dirt type called loam.");
CRAFTING_FARMLAND = crafting_farmland.getBoolean(false);
Property crafting_bark_removal_enable = config.get(crafting_title, "CRAFTING_BARK_REMOVAL_ENABLE", true);
crafting_bark_removal_enable.setComment("Enable the in-world bark removal. Used by the work blocks on log blocks");
CRAFTING_BARK_REMOVAL_ENABLE = crafting_bark_removal_enable.getBoolean(true);
Property crafting_in_world_knapping = config.get(crafting_title, "CRAFTING_KNAPPING_ENABLE", true);
crafting_in_world_knapping.setComment("Enable the in-world knapping event. Used by flint, quartz, and obsidian.");
CRAFTING_KNAPPING_ENABLE = crafting_in_world_knapping.getBoolean(true);
Property crafting_drying_rack_base_time = config.get(crafting_title, "CRAFTING_DRYING_RACK_BASE_TIME", 1000);
crafting_drying_rack_base_time.setComment("Base time for the drying rack to complete work on a stack, this is further modified by environment and the item being dried.");
CRAFTING_DRYING_RACK_BASE_TIME = crafting_drying_rack_base_time.getInt(1000);
Property crafting_knapping_difficulty_flint = config.get(crafting_title, "CRAFTING_KNAPPING_DIFFICULTY_FLINT", 0.40D);
crafting_knapping_difficulty_flint.setComment("Chance of dropping knapped flint from in-world knapping, 1.0D is 100% drop rate.");
CRAFTING_KNAPPING_DIFFICULTY_FLINT = crafting_knapping_difficulty_flint.getDouble(0.45D);
Property crafting_knapping_difficulty_quartz = config.get(crafting_title, "CRAFTING_KNAPPING_DIFFICULTY_QUARTZ", 0.35D);
crafting_knapping_difficulty_quartz.setComment("Chance of dropping knapped quartz from in-world knapping, 1.0D is 100% drop rate.");
CRAFTING_KNAPPING_DIFFICULTY_QUARTZ = crafting_knapping_difficulty_quartz.getDouble(0.50D);
Property crafting_knapping_difficulty_obsidian = config.get(crafting_title, "CRAFTING_KNAPPING_DIFFICULTY_OBSIDIAN", 0.25D);
crafting_knapping_difficulty_obsidian.setComment("Chance of dropping knapping output from in-world knapping, 1.0D is 100% drop rate.");
CRAFTING_KNAPPING_DIFFICULTY_OBSIDIAN = crafting_knapping_difficulty_obsidian.getDouble(0.30D);
Property crafting_remove_names = config.get(crafting_title, "CRAFTING_REMOVE_NAMES", CRAFTING_REMOVE_NAMES);
crafting_remove_names.setComment("List of item/block names to remove from crafting.");
CRAFTING_REMOVE_NAMES = crafting_remove_names.getStringList();
/// ************************************************************************ ///
// worldgen
//
String world_title = "world generation";
ConfigCategory worldCategory = config.getCategory(world_title);
worldCategory.setComment("Control the world and retro generation");
//
/// ************************************************************************ ///
Property worldgen_enable = config.get(world_title, "WORLDGEN_ENABLE", true);
worldgen_enable.setComment("Global control for all primal worldgen");
WORLDGEN_ENABLE = worldgen_enable.getBoolean(true);
Property worldgen_override_Nether = config.get(world_title, "WORLDGEN_OVERRIDE_NETHER", true);
worldgen_override_Nether.setComment("Override the Nether World Provider, allows Nether spawn mechanics and additional features. Trust us.");
WORLDGEN_OVERRIDE_NETHER = worldgen_override_Nether.getBoolean(true);
Property worldgen_in_mod_dimensions = config.get(world_title, "WORLDGEN_IN_MOD_DIMENSIONS", true);
worldgen_in_mod_dimensions.setComment("Allow Overworld generation to take place in custom dimensions");
WORLDGEN_IN_MOD_DIMENSIONS = worldgen_in_mod_dimensions.getBoolean(true);
Property worldgen_limestone = config.get(world_title, "WORLDGEN_LIMESTONE", true);
worldgen_limestone.setComment("Enable Worldgen for Limestone/Carbonate Stone, appears primarily in the Overworld");
WORLDGEN_LIMESTONE = worldgen_limestone.getBoolean(true);
Property worldgen_basalt = config.get(world_title, "WORLDGEN_BASALT", true);
worldgen_basalt.setComment("Enable Worldgen for Basalt/Ferrous Stone, appears primarily in the Nether");
WORLDGEN_BASALT = worldgen_basalt.getBoolean(true);
Property feature_worldgen_basalt = config.get(world_title, "WORLDGEN_EARTHWAX", true);
feature_worldgen_basalt.setComment("Enable Worldgen for Earthwax, appears in both Overworld and Nether");
WORLDGEN_EARTHWAX = feature_worldgen_basalt.getBoolean(true);
Property worldgen_earthwax = config.get(world_title, "WORLDGEN_EARTHWAX", true);
worldgen_earthwax.setComment("Enable Worldgen for Earthwax fuel, appears in both Overworld and Nether");
WORLDGEN_EARTHWAX = worldgen_earthwax.getBoolean(true);
Property worldgen_terracotta = config.get(world_title, "WORLDGEN_TERRACOTTA", true);
worldgen_terracotta.setComment("Enable Worldgen for Terracotta Clay, appears in Overworld");
WORLDGEN_TERRACOTTA = worldgen_terracotta.getBoolean(true);
Property worldgen_ciniscotta = config.get(world_title, "WORLDGEN_CINISCOTTA", true);
worldgen_ciniscotta.setComment("Enable Worldgen for Ciniscotta Clay, appears primarily in the Nether");
WORLDGEN_CINISCOTTA = worldgen_ciniscotta.getBoolean(true);
Property worldgen_mud = config.get(world_title, "WORLDGEN_MUD", true);
worldgen_mud.setComment("Enable Worldgen for Mud, appears in the Overworld near water");
WORLDGEN_MUD = worldgen_mud.getBoolean(true);
Property worldgen_rush = config.get(world_title, "WORLDGEN_RUSH", true);
worldgen_rush.setComment("Enable Worldgen for Rushes, primary resource for making Thatch, appears in the Overworld near water");
WORLDGEN_RUSH = worldgen_rush.getBoolean(true);
Property worldgen_corn = config.get(world_title, "WORLDGEN_CORN", true);
worldgen_corn.setComment("Enable Worldgen for Corn, appears in the Overworld");
WORLDGEN_CORN = worldgen_corn.getBoolean(true);
Property worldgen_Nether_grass = config.get(world_title, "WORLDGEN_NETHER_GRASS", true);
worldgen_Nether_grass.setComment("Enable Worldgen for Nether Grass, early game Nether progression");
WORLDGEN_NETHER_GRASS = worldgen_Nether_grass.getBoolean(true);
Property worldgen_Nether_palm = config.get(world_title, "WORLDGEN_NETHER_PALM", true);
worldgen_Nether_palm.setComment("Enable Worldgen for Nether Palm trees, also known as Corypha Pachyptila, early game Nether progression");
WORLDGEN_NETHER_PALM = worldgen_Nether_palm.getBoolean(true);
Property worldgen_end_grass = config.get(world_title, "WORLDGEN_END_GRASS", true);
worldgen_end_grass.setComment("Enable Worldgen for End Grass, early game End progression");
WORLDGEN_END_GRASS = worldgen_end_grass.getBoolean(true);
Property worldgen_end_wood = config.get(world_title, "WORLDGEN_END_WOOD", true);
worldgen_end_wood.setComment("Enable Worldgen for End trees, early game End progression");
WORLDGEN_END_WOOD = worldgen_end_wood.getBoolean(true);
Property worldgen_salt_flats = config.get(world_title, "WORLDGEN_SALT_FLATS", true);
worldgen_salt_flats.setComment("Enable Worldgen for Netjry Salt Falts, appears primarily in the Overworld");
WORLDGEN_SALT_FLATS = worldgen_salt_flats.getBoolean(true);
Property worldgen_salt_rock = config.get(world_title, "WORLDGEN_SALT_ROCK", true);
worldgen_salt_rock.setComment("Enable Worldgen for Halite Rock Salt, appears primarily in the Overworld");
WORLDGEN_SALT_ROCK = worldgen_salt_rock.getBoolean(true);
Property worldgen_salt_nether = config.get(world_title, "WORLDGEN_SALT_NETHER", true);
worldgen_salt_nether.setComment("Enable Worldgen for Fire Rock Salt, early game Nether progression");
WORLDGEN_SALT_NETHER = worldgen_salt_nether.getBoolean(true);
Property worldgen_salt_end = config.get(world_title, "WORLDGEN_SALT_END", true);
worldgen_salt_end.setComment("Enable Worldgen for End Rock Salt, early game End progression");
WORLDGEN_SALT_END = worldgen_salt_end.getBoolean(true);
Property worldgen_ironwood = config.get(world_title, "WORLDGEN_IRONWOOD", true);
worldgen_ironwood.setComment("Enable Worldgen for Ironwood trees, appear primarily in the Overworld");
WORLDGEN_IRONWOOD = worldgen_ironwood.getBoolean(true);
Property worldgen_primal_ore_iron = config.get(world_title, "WORLDGEN_PRIMAL_ORE_IRON", false);
worldgen_primal_ore_iron.setComment("Enable Worldgen for Primal Iron Ore, this generates in large deposits with ore blocks of varying density. EXPERIMENTAL");
WORLDGEN_PRIMAL_ORE_GOLD = worldgen_primal_ore_iron.getBoolean(false);
Property worldgen_primal_ore_gold = config.get(world_title, "WORLDGEN_PRIMAL_ORE_GOLD", false);
worldgen_primal_ore_gold.setComment("Enable Worldgen for Primal Gold Ore, this generates in large deposits with ore blocks of varying density. EXPERIMENTAL");
WORLDGEN_PRIMAL_ORE_GOLD = worldgen_primal_ore_gold.getBoolean(false);
Property vanilla_disable_ore_iron = config.get(world_title, "WORLDGEN_DISABLE_VANILLA_ORE_IRON", false);
vanilla_disable_ore_iron.setComment("Disable worldgen for vanilla iron ore.");
WORLDGEN_DISABLE_VANILLA_ORE_IRON = vanilla_disable_ore_iron.getBoolean(false);
Property vanilla_disable_ore_gold = config.get(world_title, "WORLDGEN_DISABLE_VANILLA_ORE_GOLD", false);
vanilla_disable_ore_gold.setComment("Disable worldgen for vanilla gold ore");
WORLDGEN_DISABLE_VANILLA_ORE_GOLD = vanilla_disable_ore_gold.getBoolean(false);
Property vanilla_disable_ore_coal = config.get(world_title, "WORLDGEN_DISABLE_VANILLA_ORE_COAL", false);
vanilla_disable_ore_coal.setComment("Disable worldgen for vanilla coal ore");
WORLDGEN_DISABLE_VANILLA_ORE_COAL = vanilla_disable_ore_coal.getBoolean(false);
Property vanilla_disable_ore_redstone = config.get(world_title, "WORLDGEN_DISABLE_VANILLA_ORE_REDSTONE", false);
vanilla_disable_ore_redstone.setComment("Disable worldgen for vanilla redstone ore");
WORLDGEN_DISABLE_VANILLA_ORE_REDSTONE = vanilla_disable_ore_redstone.getBoolean(false);
Property vanilla_disable_ore_lapis = config.get(world_title, "WORLDGEN_DISABLE_VANILLA_ORE_LAPIS", false);
vanilla_disable_ore_lapis.setComment("Disable worldgen for vanilla lapis ore");
WORLDGEN_DISABLE_VANILLA_ORE_LAPIS = vanilla_disable_ore_lapis.getBoolean(false);
Property vanilla_disable_ore_diamond = config.get(world_title, "WORLDGEN_DISABLE_VANILLA_ORE_DIAMOND", false);
vanilla_disable_ore_diamond.setComment("Disable worldgen for vanilla diamond ore");
WORLDGEN_DISABLE_VANILLA_ORE_DIAMOND = vanilla_disable_ore_diamond.getBoolean(false);
Property vanilla_disable_ore_emerald = config.get(world_title, "WORLDGEN_DISABLE_VANILLA_ORE_EMERALD", false);
vanilla_disable_ore_emerald.setComment("Disable worldgen for vanilla emerald ore");
WORLDGEN_DISABLE_VANILLA_ORE_EMERALD = vanilla_disable_ore_emerald.getBoolean(false);
Property vanilla_disable_ore_quartz = config.get(world_title, "WORLDGEN_DISABLE_VANILLA_ORE_QUARTZ", false);
vanilla_disable_ore_quartz.setComment("Disable worldgen for vanilla quartz ore");
WORLDGEN_DISABLE_VANILLA_ORE_QUARTZ = vanilla_disable_ore_quartz.getBoolean(false);
/// ************************************************************************ ///
// dev and debugging
//
String debug_title = "debug settings";
ConfigCategory settingCategory = config.getCategory(debug_title);
settingCategory.setComment("Options useful for debugging and server operators");
//
/// ************************************************************************ ///
Property dev_debug_level = config.get(debug_title, "DEBUG_LEVEL", 0);
dev_debug_level.setComment("Debug levels 0-3, by default a zero value disables debug features.");
DEBUG_LEVEL = dev_debug_level.getInt(0);
/// ************************************************************************ ///
// save config
//
if(config.hasChanged()) {
config.save();
}
//
/// ************************************************************************ ///
}
}

View File

@@ -1,57 +0,0 @@
package nmd.primal.forgecraft.common.init;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import net.minecraftforge.oredict.OreDictionary;
public class ModDictionary
{
/*******************************************************************************
* Register Only Vanilla OreDictionary Entries Here
* Mod Items/Blocks have their names added through the respective
* registration methods as a list of comma delineated strings.
*
* EXAMPLE:
* LEATHER_CORDAGE = registerItem(new PrimalItem("leather_cordage"), "cordageGeneral, cordageLeather");
*
*/
public static void registerDictionaryNames()
{
///
// slimeball
///
//OreDictionary.registerOre("slimeball", new ItemStack(Items.SLIME_BALL));
//OreDictionary.registerOre("slimeball", new ItemStack(Items.MAGMA_CREAM));
///
// paper
///
OreDictionary.registerOre("paper", new ItemStack(Items.PAPER, 1, 0));
///
// clay
///
OreDictionary.registerOre("clayball", new ItemStack(Items.CLAY_BALL, 1, 0));
///
// bone
///
OreDictionary.registerOre("bone", new ItemStack(Items.BONE, 1, 0));
///
// torch fuel
///
OreDictionary.registerOre("clumpFuel", new ItemStack(Items.COAL, 1, 0));
OreDictionary.registerOre("clumpFuel", new ItemStack(Items.COAL, 1, 1));
///
// Foodstuff
///
OreDictionary.registerOre("foodBread", new ItemStack(Items.BREAD, 1, 0));
///
// Thatching
///
//OreDictionary.registerOre("thatchingMaterial", new ItemStack(Blocks.TALLGRASS, 1, 0));
}
}

View File

@@ -1,41 +0,0 @@
package nmd.primal.forgecraft.common.init;
import net.minecraftforge.common.MinecraftForge;
//import nmd.primal.forgecraft.common.CommonEvents;
import nmd.primal.forgecraft.common.ForgeCraft;
//import nmd.primal.forgecraft.common.crafting.CraftingEvents;
//import nmd.primal.forgecraft.common.world.WorldEvents;
import nmd.primal.forgecraft.common.ForgeCraft;
public class ModEvents
{
public static void registerCommonEvents()
{
ForgeCraft.LOGGER.info("Register Events");
///
// Common Events
///
//MinecraftForge.EVENT_BUS.register(new CommonEvents());
//MinecraftForge.EVENT_BUS.register(new CraftingEvents());
///
// OreGen Bus
///
if (ModConfig.WORLDGEN_DISABLE_VANILLA_ORE_IRON)
//MinecraftForge.ORE_GEN_BUS.register(new WorldEvents());
///
// Client Events
///
ForgeCraft.proxy.registerClientEvents();
//if (FMLCommonHandler.instance().getSide() == Side.CLIENT) {
// registerClientEvents();
//}
}
//@SideOnly(Side.CLIENT)
//private static void registerClientEvents() {
// MinecraftForge.EVENT_BUS.register(new GuiEventHandler());
//}
}

View File

@@ -1,181 +0,0 @@
package nmd.primal.forgecraft.common.init;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.fluids.BlockFluidFinite;
import net.minecraftforge.fluids.Fluid;
import net.minecraftforge.fluids.FluidRegistry;
import net.minecraftforge.fluids.IFluidBlock;
import nmd.primal.core.common.PrimalCore;
import nmd.primal.core.common.fluids.Smoke;
import nmd.primal.core.common.fluids.Steam;
import java.util.HashSet;
import java.util.Set;
import java.util.function.Consumer;
import java.util.function.Function;
public class ModFluids
{
/**
* The fluid blocks from this mod only. Doesn't include blocks for fluids that were already registered by another mod.
*/
public static final Set<IFluidBlock> FLUID_BLOCKS = new HashSet<>();
public static final Set<Fluid> FLUIDS = new HashSet<>();
public static Fluid SMOKE;
public static Fluid STEAM;
public static Fluid WATER_CONDENSATION;
public static Fluid TANNIN;
public static ResourceLocation getStill(String fluid) {
return new ResourceLocation(ModInfo.MOD_ID, "blocks/fluids/" + fluid + "_still");
}
public static ResourceLocation getFlowing(String fluid) {
return new ResourceLocation(ModInfo.MOD_ID, "blocks/fluids/" + fluid + "_flow");
}
public static void registerFluids()
{
/**
STATIC = createFluid("static", false,
fluid -> fluid.setLuminosity(10).setDensity(800).setViscosity(1500),
fluid -> new BlockFluidNoFlow(fluid, new MaterialLiquid(MapColor.BROWN)));
STATIC_GAS = createFluid("staticGas", false,
fluid -> fluid.setLuminosity(10).setDensity(-800).setViscosity(1500).setGaseous(true),
fluid -> new BlockFluidNoFlow(fluid, new MaterialLiquid(MapColor.BROWN)));
NORMAL = createFluid("normal", true,
fluid -> fluid.setLuminosity(10).setDensity(1600).setViscosity(100),
fluid -> new BlockFluidClassic(fluid, new MaterialLiquid(MapColor.ADOBE)));
NORMAL_GAS = createFluid("normalGas", true,
fluid -> fluid.setLuminosity(10).setDensity(-1600).setViscosity(100).setGaseous(true),
fluid -> new BlockFluidClassic(fluid, new MaterialLiquid(MapColor.ADOBE)));
FINITE = createFluid("finite", false,
fluid -> fluid.setLuminosity(10).setDensity(800).setViscosity(1500),
fluid -> new BlockFluidFinite(fluid, new MaterialLiquid(MapColor.BLACK)));
**/
SMOKE = createFluid("smoke", false,
fluid -> fluid.setLuminosity(0).setDensity(-1600).setViscosity(2000).setTemperature(600).setGaseous(true),
fluid -> new Smoke(fluid));
STEAM = createFluid("steam", false,
fluid -> fluid.setLuminosity(0).setDensity(-1600).setViscosity(2000).setTemperature(1600).setGaseous(true),
fluid -> new Steam(fluid));
WATER_CONDENSATION = createFluid("water_condensation", false,
fluid -> fluid.setLuminosity(0).setDensity(1600).setViscosity(100).setGaseous(false),
fluid -> new BlockFluidFinite(fluid, Material.WATER));
//TANNIN = createFluid("tannin", true,
// fluid -> fluid.setLuminosity(0).setDensity(1600).setViscosity(100).setGaseous(false),
// fluid -> new BlockFluidClassic(fluid, new MaterialLiquid(MapColor.BROWN)));
}
/**
@SideOnly(Side.CLIENT)
public void registerRenderers() {
MinecraftForge.EVENT_BUS.register(this);
registerFluidBlockRendering(fluidNutrientDistillation, NUTRIENT_DISTILLATION_NAME);
registerFluidBlockRendering(fluidHootch, HOOTCH_NAME);
registerFluidBlockRendering(fluidFireWater, FIRE_WATER_NAME);
registerFluidBlockRendering(fluidRocketFuel, ROCKET_FUEL_NAME);
registerFluidBlockRendering(fluidLiquidSunshine, LIQUID_SUNSHINE_NAME);
registerFluidBlockRendering(fluidCloudSeed, CLOUD_SEED_NAME);
registerFluidBlockRendering(fluidCloudSeedConcentrated, CLOUD_SEED_CONCENTRATED_NAME);
}
@SideOnly(Side.CLIENT)
public void registerFluidBlockRendering(Fluid fluid, String name) {
FluidStateMapper mapper = new FluidStateMapper(fluid);
Block block = fluid.getBlock();
Item item = Item.getItemFromBlock(block);
// item-model
if (item != null) {
ModelLoader.registerItemVariants(item);
ModelLoader.setCustomMeshDefinition(item, mapper);
}
// block-model
if (block != null) {
ModelLoader.setCustomStateMapper(block, mapper);
}
}
**/
/*******************************************************************************
* Registration Methods
* https://github.com/Choonster/TestMod3/blob/1.10.2/src/main/java/choonster/testmod3/init/ModFluids.java
*/
/**
* Create a {@link Fluid} and its {@link IFluidBlock}, or use the existing ones if a fluid has already been registered with the same name.
*
* @param name The name of the fluid
* @param hasFlowIcon Does the fluid have a flow icon?
* @param fluidPropertyApplier A function that sets the properties of the {@link Fluid}
* @param blockFactory A function that creates the {@link IFluidBlock}
* @return The fluid and block
*
* PrimalCore.proxy.registerFluidRendering(fluidBlock, name);
*/
private static <T extends Block & IFluidBlock> Fluid createFluid(String name, boolean hasFlowIcon, Consumer<Fluid> fluidPropertyApplier, Function<Fluid, T> blockFactory)
{
final String texturePrefix = ModInfo.MOD_PREFIX + "blocks/fluids/";
final ResourceLocation still = new ResourceLocation(texturePrefix + name + "_still");
final ResourceLocation flowing = hasFlowIcon ? new ResourceLocation(texturePrefix + name + "_flow") : still;
//final ResourceLocation still = new ResourceLocation(ModInfo.MOD_PREFIX + "blocks/fluids/" + name + "_still");
///final ResourceLocation flowing = hasFlowIcon ? new ResourceLocation(ModInfo.MOD_PREFIX + "blocks/fluids/" + name + "_flow") : still;
Fluid fluid = new Fluid(name, still, flowing);
final boolean useOwnFluid = FluidRegistry.registerFluid(fluid);
if (useOwnFluid) {
fluidPropertyApplier.accept(fluid);
registerFluidBlock(blockFactory.apply(fluid), name);
} else {
fluid = FluidRegistry.getFluid(name);
}
FLUIDS.add(fluid);
return fluid;
}
private static <T extends Block & IFluidBlock> T registerFluidBlock(T block, String name)
{
//block.setRegistryName("fluid." + block.getFluid().getName());
//block.setRegistryName(block.getFluid().getName());
block.setUnlocalizedName(ModInfo.MOD_PREFIX + block.getFluid().getUnlocalizedName());
//block.setCreativeTab(ModInfo.TAB_PRIMAL);
ModBlocks.registerBlock("fluid." + name, block, true);
//PrimalCore.proxy.registerFluidModel(block, block.getFluid().getName());
//PrimalCore.proxy.registerFluidModel(block);
PrimalCore.proxy.registerFluidBlockRendering(block, name);
FLUID_BLOCKS.add(block);
return block;
}
/**
private static void registerBucket(Fluid fluid) {
FluidRegistry.addBucketForFluid(fluid);
}
private static void registerTank(Fluid fluid) {
final FluidStack fluidStack = new FluidStack(fluid, TileEntityFluidTank.CAPACITY);
((ItemFluidTank) Item.getItemFromBlock(ModBlocks.FLUID_TANK)).addFluid(fluidStack);
} **/
}

View File

@@ -1,47 +0,0 @@
package nmd.primal.forgecraft.common.init;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import nmd.primal.forgecraft.api.ForgeCraftItems;
//import nmd.primal.core.api.ForgeCraftItems;
public class ModInfo
{
/** Mod Details**/
public static final String DEPENDENCIES = "after:tconstruct;after:survivalist;after:BiomesOPlenty;after:biomesoplenty;after:natura;after:stellarapi;after:stellarsky;after:waila;after:IC2;after:ic2;";
public static final String MOD_ID = "forgecraft";
public static final String MOD_PREFIX = MOD_ID + ":";
public static final String MOD_CHANNEL = MOD_ID;
public static final String MOD_VERSION = "0.1";
public static final String MC_VERSIONS = "[1.9.4, 1.11.0)";
/** Mod Structures **/
public static final String COMMON_PROXY = "nmd.primal.forgecraft.common.CommonProxy";
public static final String CLIENT_PROXY = "nmd.primal.forgecraft.client.ClientProxy";
public static final String GUI_FACTORY = "nmd.primal.forgecraft.client.gui.GuiFactory";
public static final String UPDATE_JSON = "http://insecure.www.nmd.so/update-primal.json";
/** GUI IDs **/
public static final int WORKTABLE_BASIC = 0;
public static final int WORKTABLE_SHELF = 1;
public static final int WORKTABLE_CHEST = 2;
public static final int STORAGE_CRATE = 4;
public static final int CHEST_NETHER = 5;
public static final int QUERN = 6;
public static final int KLIN = 7;
public static final int OVEN = 8;
/** Creative Tabs **/
public static CreativeTabs TAB_FORGECRAFT = new CreativeTabs(MOD_ID)
{
@Override
@SideOnly(Side.CLIENT)
public Item getTabIconItem() {
return ForgeCraftItems.TEST;
}
};
}

View File

@@ -1,124 +0,0 @@
package nmd.primal.forgecraft.common.init;
import net.minecraft.init.MobEffects;
import net.minecraft.item.Item;
import net.minecraft.potion.PotionEffect;
import net.minecraftforge.fml.common.registry.ForgeRegistries;
import net.minecraftforge.oredict.OreDictionary;
import nmd.primal.forgecraft.api.ForgeCraftBlocks;
import nmd.primal.forgecraft.api.ForgeCraftMaterials;
import nmd.primal.forgecraft.common.ForgeCraft;
//import nmd.primal.forgecraft.common.items.*;
import nmd.primal.forgecraft.common.ForgeCraft;
import javax.annotation.Nullable;
import java.util.HashSet;
import java.util.Set;
//import static nmd.primal.core.api.PrimalItems.*;
public class ModItems
{
//public static final Set<Item> ITEMS = new HashSet<>();
public static final Set<Item> ITEMS = new HashSet<Item>();
/*******************************************************************************
* Items
*/
public static void registerItems()
{
// ***************************************************************************** //
// items
// plantTwine = new Cordage("plantTwine", plantFiber).thaumcraftAspects((new AspectList()).add(Aspect.PLANT, 1).add(Aspect.CRAFT, 1));
//
/// ***************************************************************************** //
// Projectiles
//
//MUCK = registerItem("muck", new Muck(), "muck");
/// ***************************************************************************** //
// parts
//
//EMERALD_POINT = registerItem("emerald_point", new PrimalItem());
// ***************************************************************************** //
// FoodStuff, Plants, Seeds, etc
// COD(0, "cod", 2, 0.1F, 5, 0.6F),
// SALMON(1, "salmon", 2, 0.1F, 6, 0.8F),
// CLOWNFISH(2, "clownfish", 1, 0.1F),
// PUFFERFISH(3, "pufferfish", 1, 0.1F);
//
//LARD = registerItem("lard", new Foodstuff(1, 0.5F, true).setPotionEffect(new PotionEffect(MobEffects.HUNGER, 200, 0), 0.6F), "foodFat");
// ***************************************************************************** //
// Ores
//
//ASH = registerItem("ash", new Ash(), "dustAsh");
// ***************************************************************************** //
// Tools and Armor
//
///
// crating tools
///
//STONE_BASIN = registerItem("stone_basin", new StoneBasin(16));
//FIRE_BOW = registerItem("fire_bow", new FireBow(24));
//QUARTZ_SAW = registerItem("quartz_saw", new HandSaw(ForgeCraftMaterials.TOOL_QUARTZ.getMaxUses()));
//QUARTZ_CLIPPERS = registerItem("quartz_clippers", new HandClipper(ForgeCraftMaterials.TOOL_QUARTZ));
//IRON_SAW = registerItem("iron_saw", new HandSaw(Item.ToolMaterial.IRON.getMaxUses()));
//IRON_CLIPPERS = registerItem("iron_clippers", new HandClipper(Item.ToolMaterial.IRON));
//TORCH_WOOD_LIT = registerItem("torch_wood_lit", new LitTorch(ForgeCraftBlocks.TORCH_WOOD), "torch");
//TORCH_NETHER_LIT = registerItem("torch_nether_lit", new LitTorch(ForgeCraftBlocks.TORCH_NETHER), "torch");
}
/*******************************************************************************
* Item Registration Methods
*/
private static <ITEM extends Item> ITEM registerItem(String name, ITEM item, @Nullable String dictionary_names, Boolean hidden)
{
item.setRegistryName(name);
item.setUnlocalizedName(item.getRegistryName().toString());
ForgeRegistries.ITEMS.register(item);
//PrimalCore.proxy.renderItem(item);
ForgeCraft.proxy.registerItemSided(item);
ITEMS.add(item);
if (dictionary_names != null)
{
String [] dictionary_name_array = dictionary_names.replaceAll("\\s+","").split(",");
//List<String> dictionary_name_list = Arrays.asList(dictionary_name_array);
for (String dictionary_name : dictionary_name_array) {
OreDictionary.registerOre(dictionary_name, item);
}
}
if (!hidden) {
item.setCreativeTab(ModInfo.TAB_FORGECRAFT);
}
return item;
}
private static <ITEM extends Item> ITEM registerItem(String name, ITEM item) {
return registerItem(name, item, null, false);
}
private static <ITEM extends Item> ITEM registerItem(String name, ITEM item, Boolean hidden) {
return registerItem(name, item, null, hidden);
}
private static <ITEM extends Item> ITEM registerItem(String name, ITEM item, @Nullable String dictionary_names) {
return registerItem(name, item, dictionary_names, false);
}
}

View File

@@ -1,117 +0,0 @@
package nmd.primal.forgecraft.common.init;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.init.SoundEvents;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fml.common.registry.GameRegistry;
//import nmd.primal.core.api.ForgeCraftBlocks;
//import nmd.primal.core.api.ForgeCraftItems;
//import nmd.primal.core.api.ForgeCraftMaterials;
//import nmd.primal.core.api.ForgeCraftRegistries;
import nmd.primal.forgecraft.common.compat.FuelHandler;
public class ModRegistries
{
//public static final IForgeRegistry<Block> HEATSOURCES ;
//public static final IForgeRegistry<ItemStack> KNAPPING;
/*******************************************************************************
* Parent Block Registry
*/
public static void registerVanillaParentBlocks()
{
//ForgeCraftRegistries.addParentBlock(new ItemStack(Blocks.DIRT));
//ForgeCraftRegistries.addParentBlock(new ItemStack(Blocks.GRASS));
//ForgeCraftRegistries.addParentBlock(new ItemStack(Blocks.GLASS));
//ForgeCraftRegistries.addParentBlock(new ItemStack(Blocks.NETHERRACK));
}
/*******************************************************************************
* Fuel Registry
*/
//public static Hashtable<ItemStack, Integer> FUEL_REGISTRY = new Hashtable<>();
//public static void addFuel(ItemStack stack, int value)
//{
// ModRegistries.FUEL_REGISTRY.put(stack, value);
//}
public static void registerFuels()
{
if (ModConfig.FEATURE_ENABLE_FUELS)
{
GameRegistry.registerFuelHandler(new FuelHandler());
//ForgeCraftRegistries.addFuel(new ItemStack(Items.PAPER), 48);
//ForgeCraftRegistries.addFuel(new ItemStack(Items.BOOK), 178);
//ForgeCraftRegistries.addFuel(new ItemStack(ForgeCraftItems.PLANT_FIBER), 16);
//ForgeCraftRegistries.addFuel(new ItemStack(ForgeCraftItems.PLANT_CORDAGE), 48);
//ForgeCraftRegistries.addFuel(new ItemStack(ForgeCraftItems.PLANT_TINDER), 64);
//ForgeCraftRegistries.addFuel(new ItemStack(ModItems.PLANT_PAPYRUS, 72);
//ForgeCraftRegistries.addFuel(new ItemStack(ForgeCraftItems.PLANT_CLOTH), 144);
/**
* new ItemStack(ModItems.netherPearl)) ) { return 6600
* new ItemStack(ModBlocks.earthWax)) ) { return 3600
* new ItemStack(ModItems.earthwaxClump)) ) { return 900
* new ItemStack(ModItems.clarifiedWax)) ) { return 900
* new ItemStack(ModItems.paraffinWax)) ) { return 900
* new ItemStack(ModBlocks.netherGrowth)) ) { return 625
* new ItemStack(ModBlocks.netherReed)) ) { return 127
* new ItemStack(ModItems.daucusMurnFronds)) ) { return 192
* new ItemStack(ModItems.daucusMurnStem)) ) { return 288
*/
}
}
public static void registerVanillaTorches()
{
//ForgeCraftRegistries.addTorch(new ItemStack(Blocks.TORCH));
//ForgeCraftRegistries.addTorch(new ItemStack(Blocks.MAGMA));
//ForgeCraftRegistries.addTorch(new ItemStack(Items.LAVA_BUCKET));
//ForgeCraftRegistries.addTorch(new ItemStack(ForgeCraftBlocks.IGNIS_FATUUS));
}
/*******************************************************************************
* Repair Registry
*/
public static void registerRepairItems()
{
/*
ForgeCraftRegistries.addToolRepairItem(ForgeCraftMaterials.TOOL_BONE, new ItemStack(Items.BONE));
ForgeCraftRegistries.addToolRepairItem(ForgeCraftMaterials.TOOL_FLINT, new ItemStack(Items.FLINT));
ForgeCraftRegistries.addToolRepairItem(ForgeCraftMaterials.TOOL_FLINT, new ItemStack(ForgeCraftItems.FLINT_KNAPP));
ForgeCraftRegistries.addToolRepairItem(ForgeCraftMaterials.TOOL_EMERALD, new ItemStack(Items.EMERALD));
ForgeCraftRegistries.addToolRepairItem(ForgeCraftMaterials.TOOL_OBSIDIAN, new ItemStack(Blocks.OBSIDIAN));
ForgeCraftRegistries.addToolRepairItem(ForgeCraftMaterials.TOOL_QUARTZ, new ItemStack(Items.QUARTZ));
ForgeCraftRegistries.addToolRepairItem(ForgeCraftMaterials.TOOL_QUARTZ, new ItemStack(Blocks.QUARTZ_BLOCK));
*/
}
public static void registerToolBreakItems()
{
/*
ForgeCraftRegistries.addToolBreakItem(ForgeCraftItems.SHARP_BONE, new ItemStack[] { new ItemStack(Items.DYE, 1)});
ForgeCraftRegistries.addToolBreakItem(ForgeCraftItems.FLINT_HATCHET, new ItemStack[] { new ItemStack(ForgeCraftItems.FLINT_KNAPP, 1)});
ForgeCraftRegistries.addToolBreakItem(ForgeCraftItems.FLINT_AXE, new ItemStack[] { new ItemStack(ForgeCraftItems.FLINT_KNAPP, 2), new ItemStack(Items.STICK, 1) });
ForgeCraftRegistries.addToolBreakItem(ForgeCraftItems.FLINT_PICKAXE, new ItemStack[] { new ItemStack(ForgeCraftItems.FLINT_KNAPP, 2), new ItemStack(Items.STICK, 1) });
ForgeCraftRegistries.addToolBreakItem(ForgeCraftItems.FLINT_SHOVEL, new ItemStack[] { new ItemStack(ForgeCraftItems.FLINT_KNAPP, 1), new ItemStack(Items.STICK, 1) });
ForgeCraftRegistries.addToolBreakItem(ForgeCraftItems.FLINT_HOE, new ItemStack[] { new ItemStack(ForgeCraftItems.FLINT_KNAPP, 1), new ItemStack(Items.STICK, 1) });
*/
}
/*******************************************************************************
* Repair Registry
*/
public static void registerAdditionalCraftingItems()
{
//ForgeCraftRegistries.addCraftingItem(Items.FLINT_AND_STEEL, SoundEvents.ITEM_FLINTANDSTEEL_USE);
}
///
// end
///
}

View File

@@ -1,33 +0,0 @@
package nmd.primal.forgecraft.common.init;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.SoundEvent;
/**
* Created by kitsu on 11/20/2016.
*/
public class ModSoundHandler {
//public static SoundEvent bulletCreate;
//public static SoundEvent woodsaw;
//public static SoundEvent scrape;
private static int size = 0;
public static void init() {
size = SoundEvent.REGISTRY.getKeys().size();
//woodsaw = register("woodsaw");
//scrape = register("scrape");
//bulletCreate = register("bulletCreate");
}
public static SoundEvent register(String name) {
ResourceLocation loc = new ResourceLocation("forgecraft:" + name);
SoundEvent e = new SoundEvent(loc);
SoundEvent.REGISTRY.register(size, loc, e);
size++;
return e;
}
}

View File

@@ -1,28 +0,0 @@
package nmd.primal.forgecraft.common.init;
import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.fml.common.registry.GameRegistry;
//import nmd.primal.forgecraft.common.tiles.*;
public class ModTileEntities
{
/*******************************************************************************
* Tile Entities
*/
public static void registerTileEntities() // init
{
//registerTileEntity(TileWorkTableBasic.class, "WORKTABLE_BASIC");
//registerTileEntity(TileWorkTableShelf.class, "WORKTABLE_SHELVES");
//registerTileEntity(TileShelf.class, "shelf");
//registerTileEntity(TileDryingRack.class, "rack");
//registerTileEntity(TileFishTrap.class, "fishtrap");
}
/*******************************************************************************
* registration Methods
*/
private static void registerTileEntity(Class<? extends TileEntity> tile_class, String baseName)
{
GameRegistry.registerTileEntity(tile_class, "tile.forgecraft." + baseName);
}
}

View File

@@ -1,36 +0,0 @@
package nmd.primal.forgecraft.common.init;
import net.minecraft.world.DimensionType;
import net.minecraftforge.common.DimensionManager;
import net.minecraftforge.fml.common.registry.GameRegistry;
//import nmd.primal.forgecraft.common.world.ForgeCraftWorldGenerator;
public class ModWorldGen
{
public static void registerMapGen()
{
//MapGenStructureIO.registerStructure(MapGenScatteredFeatureModBiomes.Start.class, "testmod3:MapGenScatteredFeatureModBiomes");
//MinecraftForge.TERRAIN_GEN_BUS.register(new MapGenHandler());
}
public static void registerWorldGenerators()
{
if (ModConfig.WORLDGEN_ENABLE)
{
//GameRegistry.registerWorldGenerator(new PrimalWorldGenerator(), 0);
}
}
/**
if (ModConfig.) {
}
if (ModConfig.FEA) {
GameRegistry.registerWorldGenerator(new ModWorldGen(), 0);
}
**/
}

View File

@@ -1,66 +0,0 @@
package nmd.primal.forgecraft.common.tiles;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
/**
* Created by kitsu on 11/24/2016.
*/
public class ForgeCraftTile extends TileEntity
{
/**
* Called from Chunk.setBlockIDWithMetadata and Chunk.fillChunk, determines if this tile entity should be re-created when the ID, or Metadata changes.
* Use with caution as this will leave straggler TileEntities, or create conflicts with other TileEntities if not used properly.
*
* @param world Current world
* @param pos Tile's world position
* @param oldState The old ID of the block
* @param newState The new ID of the block (May be the same)
* @return true forcing the invalidation of the existing TE, false not to invalidate the existing TE
*
* Override TileEntity#shouldRefresh to return oldState.getBlock() != newSate.getBlock().
* This way the TileEntity will only be recreated when the Block changes.
*
* In 1.9, override TileEntity#getDescriptionPacket to write the data that needs syncing to a compound tag
* and then create and return an SPacketUpdateTileEntity with the position and NBT.
* Override TileEntity#onDataPacket to read from the packet's NBT.
*
* In 1.9.4, override TileEntity#getUpdateTag to write the data that needs syncing to a compound tag and return it.
* Override TileEntity#getUpdatePacket to create and return an SPacketUpdateTileEntity with the position and update tag.
* Override TileEntity#onDataPacket to read from the packet's NBT.
*
*/
//public boolean shouldRefresh(World world, BlockPos pos, IBlockState oldState, IBlockState newSate)
//{
//return isVanilla ? (oldState.getBlock() != newSate.getBlock()) : oldState != newSate;
//}
/**
* NBT
*/
@Override
public void readFromNBT(NBTTagCompound nbt)
{
super.readFromNBT(nbt);
this.readNBT(nbt);
}
@Override
public NBTTagCompound writeToNBT(NBTTagCompound nbt)
{
nbt = super.writeToNBT(nbt);
return this.writeNBT(nbt);
}
public NBTTagCompound readNBT(NBTTagCompound nbt)
{
// Override in lower tile classes
return nbt;
}
public NBTTagCompound writeNBT(NBTTagCompound nbt)
{
// Override in lower tile classes
return nbt;
}
}

View File

@@ -1,14 +0,0 @@
package nmd.primal.forgecraft.common.tiles;
import net.minecraft.block.state.IBlockState;
import net.minecraft.item.ItemStack;
import nmd.primal.forgecraft.common.blocks.FireBox;
/**
* Created by kitsu on 11/24/2016.
*/
public class TileFirebox extends ForgeCraftTile{
private ItemStack[] iMatrix = new ItemStack[0];
private String fireboxCustomName;
}

View File

@@ -0,0 +1,21 @@
package nmd.primal.forgecraft.proxy;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.item.Item;
import net.minecraftforge.client.model.ModelLoader;
import nmd.primal.forgecraft.ModInfo;
/**
* Created by kitsu on 11/24/2016.
*/
public class ClientProxy extends CommonProxy {
public static Minecraft minecraft = Minecraft.getMinecraft();
@Override
public void renderItem(Item item, int meta, String id) {
ModelLoader.setCustomModelResourceLocation(item, meta, new ModelResourceLocation(ModInfo.MOD_ID + ":" + id, "inventory"));
//minecraft.getRenderItem().getItemModelMesher().register(item, 0, new ModelResourceLocation(item.getRegistryName(), "inventory"));
}
}

View File

@@ -0,0 +1,17 @@
package nmd.primal.forgecraft.proxy;
import net.minecraft.item.Item;
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
import nmd.primal.forgecraft.Item.ModItems;
/**
* Created by kitsu on 11/24/2016.
*/
public class CommonProxy {
public void registerItemRenderer(Item item, int meta, String id) {
}
}

View File

@@ -0,0 +1,25 @@
{
"parent": "builtin/generated",
"display": {
"ground": {
"rotation": [ 0, 0, 0 ],
"translation": [ 0, 2, 0],
"scale":[ 0.5, 0.5, 0.5 ]
},
"head": {
"rotation": [ 0, 180, 0 ],
"translation": [ 0, 13, 7],
"scale":[ 1, 1, 1]
},
"thirdperson_righthand": {
"rotation": [ 0, 0, 0 ],
"translation": [ 0, 3, 1 ],
"scale": [ 0.55, 0.55, 0.55 ]
},
"firstperson_righthand": {
"rotation": [ 0, -90, 25 ],
"translation": [ 1.13, 3.2, 1.13],
"scale": [ 0.68, 0.68, 0.68 ]
}
}
}

View File

@@ -0,0 +1,6 @@
{
"parent":"item/generated",
"textures": {
"layer0":"forgecraft:items/test"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 329 B