Fix some bugs from the PR.

This commit is contained in:
alexbegt 2016-05-19 18:01:50 -04:00
parent 86594d371e
commit 94aa1671d5
7 changed files with 29 additions and 6 deletions

View File

@ -26,6 +26,14 @@ repositories {
name "fileRepo"
dirs "repo"
}
maven {
name 'DVS1 Maven FS'
url 'http://dvs1.progwml6.com/files/maven'
}
}
dependencies {
deobfCompile "mezz.jei:jei_1.9:3.3.3.200"
}
// This is our group. I'm cpw.mods
@ -35,8 +43,8 @@ archivesBaseName = "ironchest"
// Setup the forge minecraft plugin data. Specify the preferred forge/minecraft version here
minecraft {
version = "1.9-12.16.0.1865-1.9"
mappings = "snapshot_20160419"
version = "1.9-12.16.1.1907"
mappings = "snapshot_20160516"
runDir = "run"
}

View File

@ -54,7 +54,6 @@ public class IronChest
ChestChangerType.buildItems();
ironChestBlock = GameRegistry.register(new BlockIronChest());
ironChestItemBlock = GameRegistry.register(new ItemIronChest(ironChestBlock));
GameRegistry.register(ironChestItemBlock);
for (IronChestType typ : IronChestType.VALUES)
{

View File

@ -73,10 +73,17 @@ public enum IronChestType implements IStringSerializable
case DIRTCHEST9000:
{
this.breakTexture = "minecraft:blocks/dirt";
break;
}
case OBSIDIAN:
{
this.breakTexture = "minecraft:blocks/obsidian";
break;
}
case WOOD:
{
this.breakTexture = "minecraft:blocks/planks_oak";
break;
}
default:
{

View File

@ -108,7 +108,7 @@ public class ItemChestChanger extends Item
worldIn.removeTileEntity(pos);
worldIn.setBlockToAir(pos);
IBlockState iblockstate = IronChest.ironChestBlock.getDefaultState().withProperty(BlockIronChest.VARIANT_PROP, type.target);
IBlockState iblockstate = IronChest.ironChestBlock.getDefaultState().withProperty(BlockIronChest.VARIANT_PROP, this.type.target);
worldIn.setTileEntity(pos, newchest);
worldIn.setBlockState(pos, iblockstate, 3);

View File

@ -24,7 +24,6 @@ import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import net.minecraftforge.client.model.ModelLoader;
import net.minecraftforge.fml.client.registry.ClientRegistry;
import net.minecraftforge.fml.common.FMLCommonHandler;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
@ -40,7 +39,9 @@ public class ClientProxy extends CommonProxy
{
if (type != IronChestType.WOOD)
{
//@formatter:off
ModelLoader.setCustomModelResourceLocation(chestItem, type.ordinal(), new ModelResourceLocation(chestItem.getRegistryName(), "variant=" + type.getName()));
//@formatter:on
}
ClientRegistry.bindTileEntitySpecialRenderer(type.clazz, new TileEntityIronChestRenderer());
@ -48,7 +49,9 @@ public class ClientProxy extends CommonProxy
for (ChestChangerType type : ChestChangerType.VALUES)
{
//@formatter:off
ModelLoader.setCustomModelResourceLocation(type.item, 0, new ModelResourceLocation(new ResourceLocation(IronChest.MOD_ID, "ItemChestUpgrade"), "variant=" + type.itemName.toLowerCase()));
//@formatter:on
}
}

View File

@ -53,6 +53,12 @@
"particle": "minecraft:blocks/dirt",
"texture": "ironchest:model/dirtchest"
}
},
"wood": {
"textures": {
"particle": "minecraft:blocks/planks_oak",
"texture": "minecraft:blocks/planks_oak"
}
}
}
}