Commit 583e036b authored by Koward's avatar Koward

First pass of updating to Forge 2114 with 25/10/16 mappings.

parent 860f7139
......@@ -17,6 +17,10 @@ out
build
.gradle
# profiling
*.hprof
classes
# other
eclipse
run*
......@@ -12,7 +12,6 @@ buildscript {
}
apply plugin: 'net.minecraftforge.gradle.forge'
version = "0.11-1.10.2-hotfix1"
group = "betterwithmods"
archivesBaseName = "Better With Mods"
......@@ -21,9 +20,9 @@ sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
minecraft {
version = "1.10.2-12.18.1.2076"
version = "1.10.2-12.18.2.2114"
runDir = "run"
mappings = "snapshot_20160518"
mappings = "snapshot_20161025"
}
repositories {
......@@ -54,22 +53,21 @@ artifacts {
archives deobfJar
}
processResources
{
// this will ensure that this task is redone when the versions change.
inputs.property "version", project.version
inputs.property "mcversion", project.minecraft.version
processResources {
// this will ensure that this task is redone when the versions change.
inputs.property "version", project.version
inputs.property "mcversion", project.minecraft.version
// replace stuff in mcmod.info, nothing else
from(sourceSets.main.resources.srcDirs) {
include 'mcmod.info'
// replace stuff in mcmod.info, nothing else
from(sourceSets.main.resources.srcDirs) {
include 'mcmod.info'
// replace version and mcversion
expand 'version': project.version, 'mcversion': project.minecraft.version
}
// replace version and mcversion
expand 'version': project.version, 'mcversion': project.minecraft.version
}
// copy everything else, thats not the mcmod.info
from(sourceSets.main.resources.srcDirs) {
exclude 'mcmod.info'
}
}
// copy everything else, thats not the mcmod.info
from(sourceSets.main.resources.srcDirs) {
exclude 'mcmod.info'
}
}
#Mon Sep 14 12:28:28 PDT 2015
#Mon Oct 24 23:29:23 CEST 2016
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.7-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-2.7-all.zip
File mode changed from 100644 to 100755
......@@ -4,25 +4,23 @@ import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fml.common.IFuelHandler;
public class BWFuelHandler implements IFuelHandler
{
public class BWFuelHandler implements IFuelHandler {
@Override
public int getBurnTime(ItemStack fuel)
{
Item item = fuel.getItem();
int meta = fuel.getItemDamage();
if(item == BWMItems.MATERIAL && meta == 1)
return 3200;
else if(item == BWMItems.BARK)
return 100;
else if(item == Item.getItemFromBlock(BWMBlocks.WOOD_SIDING))
return 150;
else if(item == Item.getItemFromBlock(BWMBlocks.WOOD_MOULDING))
return 75;
else if(item == Item.getItemFromBlock(BWMBlocks.WOOD_CORNER))
return 38;
return 0;
}
@Override
public int getBurnTime(ItemStack fuel) {
Item item = fuel.getItem();
int meta = fuel.getItemDamage();
if (item == BWMItems.MATERIAL && meta == 1)
return 3200;
else if (item == BWMItems.BARK)
return 100;
else if (item == Item.getItemFromBlock(BWMBlocks.WOOD_SIDING))
return 150;
else if (item == Item.getItemFromBlock(BWMBlocks.WOOD_MOULDING))
return 75;
else if (item == Item.getItemFromBlock(BWMBlocks.WOOD_CORNER))
return 38;
return 0;
}
}
This diff is collapsed.
This diff is collapsed.
......@@ -34,17 +34,27 @@ import java.io.File;
@Mod(modid = BWMod.MODID, name = BWMod.NAME, version = BWMod.VERSION, dependencies = "required-after:Forge@[12.18.1.2076,);before:survivalist;after:tconstruct;after:minechem;after:natura;after:terrafirmacraft;after:immersiveengineering", guiFactory = "betterwithmods.client.gui.BWGuiFactory")
public class BWMod {
public static final String MODID = "betterwithmods";
public static final String VERSION = "0.13.1 Beta";
public static final String NAME = "Better With Mods";
public static final Logger logger = LogManager.getLogger(BWMod.MODID);
@SidedProxy(serverSide = "betterwithmods.proxy.CommonProxy", clientSide = "betterwithmods.proxy.ClientProxy")
public static CommonProxy proxy;
public static final String MODID = "betterwithmods";
public static final String VERSION = "0.13.1 Beta";
public static final String NAME = "Better With Mods";
@Mod.Instance(BWMod.MODID)
public static BWMod instance;
public static final Logger logger = LogManager.getLogger(BWMod.MODID);
private static void registerEventHandlers() {
MinecraftForge.EVENT_BUS.register(new BWConfig());
MinecraftForge.EVENT_BUS.register(new HungerEventHandler());
MinecraftForge.EVENT_BUS.register(new BuoyancyEventHandler());
MinecraftForge.EVENT_BUS.register(new RespawnEventHandler());
MinecraftForge.EVENT_BUS.register(new MobDropEvent());
MinecraftForge.EVENT_BUS.register(new BucketEvent());
MinecraftForge.EVENT_BUS.register(new NetherSpawnEvent());
MinecraftForge.EVENT_BUS.register(new LogHarvestEvent());
MinecraftForge.EVENT_BUS.register(new PotionEventHandler());
MinecraftForge.EVENT_BUS.register(new MobAIEvent());
}
@EventHandler
public void preInit(FMLPreInitializationEvent evt) {
......@@ -60,7 +70,7 @@ public class BWMod {
BWRegistry.registerEntity(EntityExtendingRope.class, "ExtendingRope", 64, 20, true);
BWRegistry.registerEntity(EntityDynamite.class, "BWMDynamite", 10, 50, true);
BWRegistry.registerEntity(EntityMiningCharge.class, "BWMMiningCharge", 10, 50, true);
BWRegistry.registerEntity(EntityItemBuoy.class, "entityItemBuoy", 64, 20, true);
BWRegistry.registerEntity(EntityItemBuoy.class, "entityItemBuoy", 64, 20, true);
BWRegistry.registerEntity(EntityShearedCreeper.class, "entityShearedCreeper", 64, 1, true);
proxy.registerRenderInformation();
proxy.initRenderers();
......@@ -76,9 +86,9 @@ public class BWMod {
BWRegistry.registerNetherWhitelist();
ModIntegration.loadInit();
BWSounds.registerSounds();
ItemExt.initBuoyancy();
ItemExt.initDesserts();
ItemExt.initWeights();
ItemExt.initBuoyancy();
ItemExt.initDesserts();
ItemExt.initWeights();
}
@EventHandler
......@@ -97,17 +107,4 @@ public class BWMod {
ModIntegration.loadPostInit();
BucketEvent.editModdedFluidDispenseBehavior();
}
private static void registerEventHandlers() {
MinecraftForge.EVENT_BUS.register(new BWConfig());
MinecraftForge.EVENT_BUS.register(new HungerEventHandler());
MinecraftForge.EVENT_BUS.register(new BuoyancyEventHandler());
MinecraftForge.EVENT_BUS.register(new RespawnEventHandler());
MinecraftForge.EVENT_BUS.register(new MobDropEvent());
MinecraftForge.EVENT_BUS.register(new BucketEvent());
MinecraftForge.EVENT_BUS.register(new NetherSpawnEvent());
MinecraftForge.EVENT_BUS.register(new LogHarvestEvent());
MinecraftForge.EVENT_BUS.register(new PotionEventHandler());
MinecraftForge.EVENT_BUS.register(new MobAIEvent());
}
}
......@@ -4,23 +4,20 @@ import net.minecraft.util.ResourceLocation;
import net.minecraft.util.SoundEvent;
import net.minecraftforge.fml.common.registry.GameRegistry;
public class BWSounds
{
public class BWSounds {
public static SoundEvent WOODCREAK;
public static SoundEvent STONEGRIND;
public static SoundEvent WOODCHIME;
public static SoundEvent METALCHIME;
public static void registerSounds()
{
public static void registerSounds() {
WOODCREAK = registerSound("block.wood.creak");
STONEGRIND = registerSound("block.stone.grind");
WOODCHIME = registerSound("block.wood.chime");
METALCHIME = registerSound("block.metal.chime");
}
public static SoundEvent registerSound(String soundName)
{
public static SoundEvent registerSound(String soundName) {
ResourceLocation soundID = new ResourceLocation(BWMod.MODID, soundName);
return GameRegistry.register(new SoundEvent(soundID).setRegistryName(soundID));
}
......
......@@ -3,80 +3,64 @@ package betterwithmods.api;
import net.minecraft.block.Block;
import net.minecraft.item.ItemStack;
public class BWMRecipeHelper
{
public static void registerHardcoreLogs(Block log, int meta, ItemStack planks)
{
InterModCommsHelper.registerLogInteractionRecipe("addLogHarvest", log, meta, planks);
}
public static void addNetherWhitelistBlock(Block block, int meta)
{
InterModCommsHelper.registerWhitelistRecipe("addNetherSpawnBlock", block, meta);
}
public static void addHeatRegistry(Block block, int meta, int heatValue)
{
InterModCommsHelper.registerHeatInteractionRecipe("addHeatRegistry", block, meta, heatValue);
}
public static void addTurntableRecipe(Block block, int meta, Block output, int outMeta, ItemStack... scraps)
{
InterModCommsHelper.registerTurntableRecipe(block, meta, output, outMeta, scraps);
}
public static void addKilnRecipe(Block block, int meta, ItemStack output)
{
InterModCommsHelper.registerInteractionRecipe("addKilnRecipe", block, meta, output);
}
public static void addMillRecipe(ItemStack output, Object[] input)
{
addMillRecipe(output, null, input);
}
public static void addMillRecipe(ItemStack output, ItemStack secondary, Object[] input)
{
InterModCommsHelper.registerBulkRecipe("addMillRecipe", output, secondary, input);
}
public static void addStokedCrucibleRecipe(ItemStack output, Object[] input)
{
addStokedCrucibleRecipe(output, null, input);
}
public static void addStokedCrucibleRecipe(ItemStack output, ItemStack secondary, Object[] input)
{
InterModCommsHelper.registerBulkRecipe("addStokedCrucibleRecipe", output, secondary, input);
}
public static void addCrucibleRecipe(ItemStack output, Object[] input)
{
addCrucibleRecipe(output, null, input);
}
public static void addCrucibleRecipe(ItemStack output, ItemStack secondary, Object[] input)
{
InterModCommsHelper.registerBulkRecipe("addCrucibleRecipe", output, secondary, input);
}
public static void addStokedCauldronRecipe(ItemStack output, Object[] input)
{
addStokedCauldronRecipe(output, null, input);
}
public static void addStokedCauldronRecipe(ItemStack output, ItemStack secondary, Object[] input)
{
InterModCommsHelper.registerBulkRecipe("addStokedCauldronRecipe", output, secondary, input);
}
public static void addCauldronRecipe(ItemStack output, Object[] input)
{
addCauldronRecipe(output, null, input);
}
public static void addCauldronRecipe(ItemStack output, ItemStack secondary, Object[] input)
{
InterModCommsHelper.registerBulkRecipe("addCauldronRecipe", output, secondary, input);
}
public class BWMRecipeHelper {
public static void registerHardcoreLogs(Block log, int meta, ItemStack planks) {
InterModCommsHelper.registerLogInteractionRecipe("addLogHarvest", log, meta, planks);
}
public static void addNetherWhitelistBlock(Block block, int meta) {
InterModCommsHelper.registerWhitelistRecipe("addNetherSpawnBlock", block, meta);
}
public static void addHeatRegistry(Block block, int meta, int heatValue) {
InterModCommsHelper.registerHeatInteractionRecipe("addHeatRegistry", block, meta, heatValue);
}
public static void addTurntableRecipe(Block block, int meta, Block output, int outMeta, ItemStack... scraps) {
InterModCommsHelper.registerTurntableRecipe(block, meta, output, outMeta, scraps);
}
public static void addKilnRecipe(Block block, int meta, ItemStack output) {
InterModCommsHelper.registerInteractionRecipe("addKilnRecipe", block, meta, output);
}
public static void addMillRecipe(ItemStack output, Object[] input) {
addMillRecipe(output, null, input);
}
public static void addMillRecipe(ItemStack output, ItemStack secondary, Object[] input) {
InterModCommsHelper.registerBulkRecipe("addMillRecipe", output, secondary, input);
}
public static void addStokedCrucibleRecipe(ItemStack output, Object[] input) {
addStokedCrucibleRecipe(output, null, input);
}
public static void addStokedCrucibleRecipe(ItemStack output, ItemStack secondary, Object[] input) {
InterModCommsHelper.registerBulkRecipe("addStokedCrucibleRecipe", output, secondary, input);
}
public static void addCrucibleRecipe(ItemStack output, Object[] input) {
addCrucibleRecipe(output, null, input);
}
public static void addCrucibleRecipe(ItemStack output, ItemStack secondary, Object[] input) {
InterModCommsHelper.registerBulkRecipe("addCrucibleRecipe", output, secondary, input);
}
public static void addStokedCauldronRecipe(ItemStack output, Object[] input) {
addStokedCauldronRecipe(output, null, input);
}
public static void addStokedCauldronRecipe(ItemStack output, ItemStack secondary, Object[] input) {
InterModCommsHelper.registerBulkRecipe("addStokedCauldronRecipe", output, secondary, input);
}
public static void addCauldronRecipe(ItemStack output, Object[] input) {
addCauldronRecipe(output, null, input);
}
public static void addCauldronRecipe(ItemStack output, ItemStack secondary, Object[] input) {
InterModCommsHelper.registerBulkRecipe("addCauldronRecipe", output, secondary, input);
}
}
......@@ -2,13 +2,14 @@ package betterwithmods.api;
/**
* Used by Items and Blocks with a model location relative to their metadata.
*
*
* @author tyler
*/
public interface IMultiLocations {
/**
* Locations to be used as first parameter of {@link ModelResourceLocation}
* @return String array with all locations, WITHOUT modid.
*/
/**
* Locations to be used as first parameter of {@link ModelResourceLocation}
*
* @return String array with all locations, WITHOUT modid.
*/
public String[] getLocations();
}
package betterwithmods.api;
import net.minecraftforge.fml.common.Loader;
import net.minecraftforge.fml.common.event.FMLInterModComms;
import betterwithmods.BWMod;
import net.minecraft.block.Block;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraftforge.fml.common.Loader;
import net.minecraftforge.fml.common.event.FMLInterModComms;
public class InterModCommsHelper {
public static void registerLogInteractionRecipe(String message, Block inputBlock, int inputMeta, ItemStack output) {
ItemStack input = new ItemStack(inputBlock, 1, inputMeta);
NBTTagCompound tag = new NBTTagCompound();
NBTTagCompound inputTag = new NBTTagCompound();
input.writeToNBT(inputTag);
tag.setTag("Input", inputTag);
if (output != null) {
NBTTagCompound outputTag = new NBTTagCompound();
output.writeToNBT(outputTag);
tag.setTag("Output", outputTag);
}
sendMessage(message, tag);
}
public static void registerWhitelistRecipe(String message, Block block, int meta) {
ItemStack input = new ItemStack(block, 1, meta);
NBTTagCompound tag = new NBTTagCompound();
NBTTagCompound inputTag = new NBTTagCompound();
input.writeToNBT(inputTag);
tag.setTag("Spawn", inputTag);
sendMessage(message, tag);
}
public static void registerHeatInteractionRecipe(String message, Block inputBlock, int inputMeta, int heatValue) {
ItemStack input = new ItemStack(inputBlock, 1, inputMeta);
NBTTagCompound tag = new NBTTagCompound();
tag.setInteger("HeatValue", heatValue);
NBTTagCompound inputTag = new NBTTagCompound();
input.writeToNBT(inputTag);
tag.setTag("Input", inputTag);
sendMessage(message, tag);
}
public static void registerTurntableRecipe(Block input, int inputMeta, Block output, int outputMeta, ItemStack... scrap) {
ItemStack stack = new ItemStack(input, 1, inputMeta);
NBTTagCompound tag = new NBTTagCompound();
NBTTagCompound recipeTag = new NBTTagCompound();
stack.writeToNBT(recipeTag);
tag.setTag("Input", recipeTag);
stack = new ItemStack(output, 1, outputMeta);
recipeTag = new NBTTagCompound();
stack.writeToNBT(recipeTag);
tag.setTag("Output", recipeTag);
recipeTag = new NBTTagCompound();
if (scrap.length > 0) {
recipeTag.setInteger("ScrapCount", scrap.length);
for (int i = 0; i < scrap.length; i++) {
NBTTagCompound itemTag = new NBTTagCompound();
scrap[i].writeToNBT(itemTag);
recipeTag.setTag("Item_" + i, itemTag);
}
tag.setTag("Scrap", recipeTag);
}
sendMessage("addTurntableRecipe", tag);
}