Merge remote-tracking branch 'origin/1.9.4' into 1.9.4

# Conflicts:

#	run/resourcepacks/unity/assets/techreborn/blockstates/machines/centrifuge.json
This commit is contained in:
Yulife 2016-06-04 12:30:23 +02:00
commit f174749f26
25 changed files with 265 additions and 102 deletions

View file

@ -0,0 +1,63 @@
{
"forge_marker":1,
"defaults":{
"transform":"forge:default-block",
"model":"orientable",
"textures":{
"particle":"techreborn:blocks/machine/advanced_machines/advanced_machine_west",
"down":"techreborn:blocks/machine/advanced_machines/advanced_machine_bottom",
"west":"techreborn:blocks/machine/advanced_machines/advanced_machine_west",
"east":"techreborn:blocks/machine/advanced_machines/advanced_machine_east",
"south":"techreborn:blocks/machine/advanced_machines/advanced_machine_back"
}
},
"variants":{
"inventory":{
"transform":"forge:default-block",
"textures":{
"top":"techreborn:blocks/machine/advanced_machines/industrial_centrifuge_top_off",
"front":"techreborn:blocks/machine/advanced_machines/industrial_centrifuge_front_off"
}
},
"facing":{
"north":{
},
"east":{
"y":90
},
"south":{
"y":180
},
"west":{
"y":270
}
},
"active":{
"true":{
"textures":{
"top":"techreborn:blocks/machine/advanced_machines/industrial_centrifuge_top_on",
"front":"techreborn:blocks/machine/advanced_machines/industrial_centrifuge_front_on"
}
},
"false":{
"textures":{
"top":"techreborn:blocks/machine/advanced_machines/industrial_centrifuge_top_off",
"front":"techreborn:blocks/machine/advanced_machines/industrial_centrifuge_front_off"
}
}
},
"inventory": {
"model": "orientable",
"textures": {
"particle":"techreborn:blocks/machine/advanced_machines/advanced_machine_west",
"top":"techreborn:blocks/machine/advanced_machines/industrial_centrifuge_top_off",
"down":"techreborn:blocks/machine/advanced_machines/advanced_machine_bottom",
"west":"techreborn:blocks/machine/advanced_machines/advanced_machine_west",
"east":"techreborn:blocks/machine/advanced_machines/advanced_machine_east",
"south":"techreborn:blocks/machine/advanced_machines/advanced_machine_back",
"front": "techreborn:blocks/machine/advanced_machines/industrial_centrifuge_front_off"
}
}
}
}

View file

@ -0,0 +1,59 @@
{
"forge_marker":1,
"defaults":{
"transform":"forge:default-block",
"model":"orientable",
"textures":{
"particle":"techreborn:blocks/machine/tier1_machines/machine_side",
"down":"techreborn:blocks/machine/tier1_machines/machine_bottom",
"side":"techreborn:blocks/machine/tier1_machines/machine_side"
}
},
"variants":{
"inventory":{
"transform":"forge:default-block",
"textures":{
"top":"techreborn:blocks/machine/tier1_machines/vacuum_freezer_top_off",
"front":"techreborn:blocks/machine/tier1_machines/vacuum_freezer_front_off"
}
},
"facing":{
"north":{
},
"east":{
"y":90
},
"south":{
"y":180
},
"west":{
"y":270
}
},
"active":{
"true":{
"textures":{
"top":"techreborn:blocks/machine/tier1_machines/vacuum_freezer_top_on",
"front":"techreborn:blocks/machine/tier1_machines/vacuum_freezer_front_on"
}
},
"false":{
"textures":{
"top":"techreborn:blocks/machine/tier1_machines/vacuum_freezer_top_off",
"front":"techreborn:blocks/machine/tier1_machines/vacuum_freezer_front_off"
}
}
},
"inventory": {
"model": "orientable",
"textures": {
"particle": "techreborn:blocks/machine/tier1_machines/machine_side",
"down":"techreborn:blocks/machine/tier1_machines/machine_bottom",
"side": "techreborn:blocks/machine/tier1_machines/machine_side",
"top":"techreborn:blocks/machine/tier1_machines/vacuum_freezer_top_off",
"front":"techreborn:blocks/machine/tier1_machines/vacuum_freezer_front_off"
}
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 781 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

View file

@ -0,0 +1,6 @@
{
"animation": {
"frametime": 10,
"interpolate": true
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 625 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

View file

@ -0,0 +1,6 @@
{
"animation": {
"frametime": 10,
"interpolate": true
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 914 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 912 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 913 B

View file

@ -141,6 +141,9 @@ public class ConfigTechReborn
// EMC // EMC
public static boolean UseConnectedTextures; public static boolean UseConnectedTextures;
public static boolean OreUnifer; public static boolean OreUnifer;
public static boolean enableGemArmorAndTools;
public static Configuration config; public static Configuration config;
private static ConfigTechReborn instance = null; private static ConfigTechReborn instance = null;
@ -370,6 +373,8 @@ public class ConfigTechReborn
.get(CATEGORY_FEATURES, "Frequency Transmitter tooltips", true, "Allow Frequency Transmitter to display tooltip info") .get(CATEGORY_FEATURES, "Frequency Transmitter tooltips", true, "Allow Frequency Transmitter to display tooltip info")
.getBoolean(true); .getBoolean(true);
enableGemArmorAndTools = config.get(CATEGORY_FEATURES, "Gem tools and armor", true, "Should the gem tools and armor be added to the game").getBoolean(true);
// Crafting // Crafting
ExpensiveMacerator = config ExpensiveMacerator = config
.get(CATEGORY_CRAFTING, "Expensive Macerator", true, "Allow TechReborn to change the Macerator recipe") .get(CATEGORY_CRAFTING, "Expensive Macerator", true, "Allow TechReborn to change the Macerator recipe")

View file

@ -5,7 +5,6 @@ import net.minecraft.block.material.Material;
import net.minecraft.init.Blocks; import net.minecraft.init.Blocks;
import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.fml.common.registry.GameRegistry; import net.minecraftforge.fml.common.registry.GameRegistry;
import net.minecraftforge.oredict.OreDictionary; import net.minecraftforge.oredict.OreDictionary;
import reborncore.common.tile.TileMachineBase; import reborncore.common.tile.TileMachineBase;
@ -199,6 +198,7 @@ public class ModBlocks
centrifuge = new BlockCentrifuge(); centrifuge = new BlockCentrifuge();
registerBlock(centrifuge, "techreborn.centrifuge"); registerBlock(centrifuge, "techreborn.centrifuge");
GameRegistry.registerTileEntity(TileCentrifuge.class, "TileCentrifugeTR"); GameRegistry.registerTileEntity(TileCentrifuge.class, "TileCentrifugeTR");
Core.proxy.registerCustomBlockSateLocation(centrifuge, "machines/centrifuge");
RollingMachine = new BlockRollingMachine(Material.ROCK); RollingMachine = new BlockRollingMachine(Material.ROCK);
registerBlock(RollingMachine, "rollingmachine"); registerBlock(RollingMachine, "rollingmachine");

View file

@ -13,6 +13,7 @@ import reborncore.common.util.BucketHandler;
import techreborn.Core; import techreborn.Core;
import techreborn.api.Reference; import techreborn.api.Reference;
import techreborn.blocks.BlockMachineFrame; import techreborn.blocks.BlockMachineFrame;
import techreborn.config.ConfigTechReborn;
import techreborn.events.OreUnifier; import techreborn.events.OreUnifier;
import techreborn.items.*; import techreborn.items.*;
import techreborn.items.armor.ItemLapotronPack; import techreborn.items.armor.ItemLapotronPack;
@ -186,6 +187,7 @@ public class ModItems
advancedJackhammer = PoweredItem.createItem(ItemAdvancedJackhammer.class); advancedJackhammer = PoweredItem.createItem(ItemAdvancedJackhammer.class);
registerItem(advancedJackhammer, "ironjackhammer"); registerItem(advancedJackhammer, "ironjackhammer");
if(ConfigTechReborn.enableGemArmorAndTools){
bronzeSword = new ItemTRSword(Reference.BRONZE); bronzeSword = new ItemTRSword(Reference.BRONZE);
registerItem(bronzeSword, "bronzeSword"); registerItem(bronzeSword, "bronzeSword");
bronzePickaxe = new ItemTRPickaxe(Reference.BRONZE); bronzePickaxe = new ItemTRPickaxe(Reference.BRONZE);
@ -265,6 +267,8 @@ public class ModItems
registerItem(peridotLeggings, "peridotLeggings"); registerItem(peridotLeggings, "peridotLeggings");
peridotBoots = new ItemTRArmour(Reference.PERIDOT_ARMOUR, EntityEquipmentSlot.FEET); peridotBoots = new ItemTRArmour(Reference.PERIDOT_ARMOUR, EntityEquipmentSlot.FEET);
registerItem(peridotBoots, "peridotBoots"); registerItem(peridotBoots, "peridotBoots");
}
wrench = new ItemWrench(); wrench = new ItemWrench();
registerItem(wrench, "wrench"); registerItem(wrench, "wrench");

View file

@ -495,6 +495,7 @@ public class ModRecipes
CraftingHelper.addShapedOreRecipe(new ItemStack(ModBlocks.ironFence, 6), " ", "RRR", "RRR", 'R', CraftingHelper.addShapedOreRecipe(new ItemStack(ModBlocks.ironFence, 6), " ", "RRR", "RRR", 'R',
ItemIngots.getIngotByName("refinedIron")); ItemIngots.getIngotByName("refinedIron"));
if(ConfigTechReborn.enableGemArmorAndTools){
addGemToolRecipes(new ItemStack(ModItems.rubySword), new ItemStack(ModItems.rubyPickaxe), addGemToolRecipes(new ItemStack(ModItems.rubySword), new ItemStack(ModItems.rubyPickaxe),
new ItemStack(ModItems.rubyAxe), new ItemStack(ModItems.rubyHoe), new ItemStack(ModItems.rubySpade), new ItemStack(ModItems.rubyAxe), new ItemStack(ModItems.rubyHoe), new ItemStack(ModItems.rubySpade),
new ItemStack(ModItems.rubyHelmet), new ItemStack(ModItems.rubyChestplate), new ItemStack(ModItems.rubyHelmet), new ItemStack(ModItems.rubyChestplate),
@ -517,6 +518,7 @@ public class ModRecipes
new ItemStack(ModItems.bronzeSpade), new ItemStack(ModItems.bronzeHelmet), new ItemStack(ModItems.bronzeSpade), new ItemStack(ModItems.bronzeHelmet),
new ItemStack(ModItems.bronzeChestplate), new ItemStack(ModItems.bronzeLeggings), new ItemStack(ModItems.bronzeChestplate), new ItemStack(ModItems.bronzeLeggings),
new ItemStack(ModItems.bronzeBoots), "ingotBronze"); new ItemStack(ModItems.bronzeBoots), "ingotBronze");
}
CraftingHelper CraftingHelper
.addShapedOreRecipe(new ItemStack(ModItems.ironChainsaw), " SS", "SCS", "BS ", 'S', "ingotSteel", 'B', .addShapedOreRecipe(new ItemStack(ModItems.ironChainsaw), " SS", "SCS", "BS ", 'S', "ingotSteel", 'B',

View file

@ -5,18 +5,14 @@ import net.minecraft.block.state.IBlockState;
import net.minecraft.client.renderer.ItemMeshDefinition; import net.minecraft.client.renderer.ItemMeshDefinition;
import net.minecraft.client.renderer.block.model.ModelBakery; import net.minecraft.client.renderer.block.model.ModelBakery;
import net.minecraft.client.renderer.block.model.ModelResourceLocation; import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.client.renderer.block.statemap.DefaultStateMapper;
import net.minecraft.client.renderer.block.statemap.StateMap; import net.minecraft.client.renderer.block.statemap.StateMap;
import net.minecraft.client.renderer.block.statemap.StateMapperBase; import net.minecraft.client.renderer.block.statemap.StateMapperBase;
import net.minecraft.client.renderer.entity.Render; import net.minecraft.client.renderer.entity.Render;
import net.minecraft.client.renderer.entity.RenderManager; import net.minecraft.client.renderer.entity.RenderManager;
import net.minecraft.client.resources.IResourceManager;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
import net.minecraft.util.Util;
import net.minecraftforge.client.model.ICustomModelLoader;
import net.minecraftforge.client.model.IModel;
import net.minecraftforge.client.model.ModelDynBucket;
import net.minecraftforge.client.model.ModelLoader; import net.minecraftforge.client.model.ModelLoader;
import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.fml.client.registry.ClientRegistry; import net.minecraftforge.fml.client.registry.ClientRegistry;
@ -24,7 +20,6 @@ import net.minecraftforge.fml.client.registry.IRenderFactory;
import net.minecraftforge.fml.client.registry.RenderingRegistry; import net.minecraftforge.fml.client.registry.RenderingRegistry;
import net.minecraftforge.fml.common.event.FMLInitializationEvent; import net.minecraftforge.fml.common.event.FMLInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
import net.minecraftforge.fml.common.registry.GameData;
import reborncore.RebornCore; import reborncore.RebornCore;
import reborncore.client.multiblock.MultiblockRenderEvent; import reborncore.client.multiblock.MultiblockRenderEvent;
import reborncore.common.blocks.BlockMachineBase; import reborncore.common.blocks.BlockMachineBase;
@ -33,19 +28,16 @@ import techreborn.client.ClientMultiBlocks;
import techreborn.client.IconSupplier; import techreborn.client.IconSupplier;
import techreborn.client.RegisterItemJsons; import techreborn.client.RegisterItemJsons;
import techreborn.client.StackToolTipEvent; import techreborn.client.StackToolTipEvent;
import techreborn.client.VersionCheckerClient;
import techreborn.client.hud.ChargeHud; import techreborn.client.hud.ChargeHud;
import techreborn.client.keybindings.KeyBindings; import techreborn.client.keybindings.KeyBindings;
import techreborn.client.render.entitys.RenderNukePrimed; import techreborn.client.render.entitys.RenderNukePrimed;
import techreborn.entitys.EntityNukePrimed; import techreborn.entitys.EntityNukePrimed;
import techreborn.init.ModBlocks; import techreborn.init.ModBlocks;
import techreborn.init.ModItems; import techreborn.init.ModItems;
import techreborn.init.ModSounds;
import techreborn.lib.ModInfo; import techreborn.lib.ModInfo;
import techreborn.manual.loader.ManualLoader; import techreborn.manual.loader.ManualLoader;
import java.io.File; import java.io.File;
import java.io.IOException;
public class ClientProxy extends CommonProxy public class ClientProxy extends CommonProxy
{ {
@ -169,4 +161,21 @@ public class ClientProxy extends CommonProxy
} }
}); });
} }
@Override
public void registerCustomBlockSateLocation(Block block, String resourceLocation) {
super.registerCustomBlockSateLocation(block, resourceLocation);
ModelLoader.setCustomStateMapper(block, new DefaultStateMapper()
{
@Override
protected ModelResourceLocation getModelResourceLocation(IBlockState state)
{
String resourceDomain = Block.REGISTRY.getNameForObject(state.getBlock()).getResourceDomain();
String propertyString = getPropertyString(state.getProperties());
return new ModelResourceLocation(resourceDomain + ':' + resourceLocation, propertyString);
}
});
String resourceDomain = Block.REGISTRY.getNameForObject(block).getResourceDomain();
ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(block), 0, new ModelResourceLocation(resourceDomain + ':' + resourceLocation, "inventory"));
}
} }

View file

@ -38,4 +38,8 @@ public class CommonProxy implements ICompatModule
} }
public void registerCustomBlockSateLocation(Block block, String name) {
}
} }

View file

@ -227,7 +227,12 @@ public class TechRebornWorldGen implements IWorldGenerator
yPos = 10 + random.nextInt(ore.maxYHeight - ore.minYHeight); yPos = 10 + random.nextInt(ore.maxYHeight - ore.minYHeight);
zPos = chunkZ * 16 + random.nextInt(16); zPos = chunkZ * 16 + random.nextInt(16);
BlockPos pos = new BlockPos(xPos, yPos, zPos); BlockPos pos = new BlockPos(xPos, yPos, zPos);
try{
worldGenMinable.generate(world, random, pos); worldGenMinable.generate(world, random, pos);
} catch (ArrayIndexOutOfBoundsException e){
Core.logHelper.error("Something bad is happening during world gen the ore " + ore.blockNiceName + " caused a crash when generating. Report this to the TechReborn devs with a log");
}
} }
} }
} }