Fix some bugs from the PR.
This commit is contained in:
parent
86594d371e
commit
94aa1671d5
12
build.gradle
12
build.gradle
|
|
@ -26,6 +26,14 @@ repositories {
|
||||||
name "fileRepo"
|
name "fileRepo"
|
||||||
dirs "repo"
|
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
|
// 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
|
// Setup the forge minecraft plugin data. Specify the preferred forge/minecraft version here
|
||||||
minecraft {
|
minecraft {
|
||||||
version = "1.9-12.16.0.1865-1.9"
|
version = "1.9-12.16.1.1907"
|
||||||
mappings = "snapshot_20160419"
|
mappings = "snapshot_20160516"
|
||||||
runDir = "run"
|
runDir = "run"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,7 @@ public enum ChestChangerType
|
||||||
{
|
{
|
||||||
return from == this.source;
|
return from == this.source;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ItemChestChanger buildItem()
|
public ItemChestChanger buildItem()
|
||||||
{
|
{
|
||||||
this.item = new ItemChestChanger(this);
|
this.item = new ItemChestChanger(this);
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,6 @@ public class IronChest
|
||||||
ChestChangerType.buildItems();
|
ChestChangerType.buildItems();
|
||||||
ironChestBlock = GameRegistry.register(new BlockIronChest());
|
ironChestBlock = GameRegistry.register(new BlockIronChest());
|
||||||
ironChestItemBlock = GameRegistry.register(new ItemIronChest(ironChestBlock));
|
ironChestItemBlock = GameRegistry.register(new ItemIronChest(ironChestBlock));
|
||||||
GameRegistry.register(ironChestItemBlock);
|
|
||||||
|
|
||||||
for (IronChestType typ : IronChestType.VALUES)
|
for (IronChestType typ : IronChestType.VALUES)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -73,10 +73,17 @@ public enum IronChestType implements IStringSerializable
|
||||||
case DIRTCHEST9000:
|
case DIRTCHEST9000:
|
||||||
{
|
{
|
||||||
this.breakTexture = "minecraft:blocks/dirt";
|
this.breakTexture = "minecraft:blocks/dirt";
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
case OBSIDIAN:
|
case OBSIDIAN:
|
||||||
{
|
{
|
||||||
this.breakTexture = "minecraft:blocks/obsidian";
|
this.breakTexture = "minecraft:blocks/obsidian";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case WOOD:
|
||||||
|
{
|
||||||
|
this.breakTexture = "minecraft:blocks/planks_oak";
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -108,7 +108,7 @@ public class ItemChestChanger extends Item
|
||||||
worldIn.removeTileEntity(pos);
|
worldIn.removeTileEntity(pos);
|
||||||
worldIn.setBlockToAir(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.setTileEntity(pos, newchest);
|
||||||
worldIn.setBlockState(pos, iblockstate, 3);
|
worldIn.setBlockState(pos, iblockstate, 3);
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,6 @@ import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraftforge.client.model.ModelLoader;
|
import net.minecraftforge.client.model.ModelLoader;
|
||||||
import net.minecraftforge.fml.client.registry.ClientRegistry;
|
import net.minecraftforge.fml.client.registry.ClientRegistry;
|
||||||
import net.minecraftforge.fml.common.FMLCommonHandler;
|
|
||||||
import net.minecraftforge.fml.relauncher.Side;
|
import net.minecraftforge.fml.relauncher.Side;
|
||||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||||
|
|
||||||
|
|
@ -40,7 +39,9 @@ public class ClientProxy extends CommonProxy
|
||||||
{
|
{
|
||||||
if (type != IronChestType.WOOD)
|
if (type != IronChestType.WOOD)
|
||||||
{
|
{
|
||||||
|
//@formatter:off
|
||||||
ModelLoader.setCustomModelResourceLocation(chestItem, type.ordinal(), new ModelResourceLocation(chestItem.getRegistryName(), "variant=" + type.getName()));
|
ModelLoader.setCustomModelResourceLocation(chestItem, type.ordinal(), new ModelResourceLocation(chestItem.getRegistryName(), "variant=" + type.getName()));
|
||||||
|
//@formatter:on
|
||||||
}
|
}
|
||||||
|
|
||||||
ClientRegistry.bindTileEntitySpecialRenderer(type.clazz, new TileEntityIronChestRenderer());
|
ClientRegistry.bindTileEntitySpecialRenderer(type.clazz, new TileEntityIronChestRenderer());
|
||||||
|
|
@ -48,7 +49,9 @@ public class ClientProxy extends CommonProxy
|
||||||
|
|
||||||
for (ChestChangerType type : ChestChangerType.VALUES)
|
for (ChestChangerType type : ChestChangerType.VALUES)
|
||||||
{
|
{
|
||||||
|
//@formatter:off
|
||||||
ModelLoader.setCustomModelResourceLocation(type.item, 0, new ModelResourceLocation(new ResourceLocation(IronChest.MOD_ID, "ItemChestUpgrade"), "variant=" + type.itemName.toLowerCase()));
|
ModelLoader.setCustomModelResourceLocation(type.item, 0, new ModelResourceLocation(new ResourceLocation(IronChest.MOD_ID, "ItemChestUpgrade"), "variant=" + type.itemName.toLowerCase()));
|
||||||
|
//@formatter:on
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -53,6 +53,12 @@
|
||||||
"particle": "minecraft:blocks/dirt",
|
"particle": "minecraft:blocks/dirt",
|
||||||
"texture": "ironchest:model/dirtchest"
|
"texture": "ironchest:model/dirtchest"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"wood": {
|
||||||
|
"textures": {
|
||||||
|
"particle": "minecraft:blocks/planks_oak",
|
||||||
|
"texture": "minecraft:blocks/planks_oak"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue