Textures, rotation.

main
Astoria 1 year ago
parent 9811e590e7
commit eaacbca062

@ -6,24 +6,74 @@ import net.brokenmoon.afloydironchest.blocks.GoldChest;
import net.brokenmoon.afloydironchest.blocks.SteelChest;
import net.fabricmc.api.ModInitializer;
import net.minecraft.src.Block;
import net.minecraft.src.BlockChest;
import net.minecraft.src.Item;
import net.minecraft.src.Material;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import turniplabs.halplibe.helper.BlockHelper;
import turniplabs.halplibe.helper.RecipeHelper;
public class IronChestMain implements ModInitializer {
public static final String MOD_ID = "ironchest";
public static final Logger LOGGER = LoggerFactory.getLogger(MOD_ID);
public static Block IronChest = BlockHelper.createBlock(MOD_ID, new IronChest(900, Material.iron), "ironchest", "ironchest.png", Block.soundMetalFootstep, 5, 6, 0);
public static Block GoldChest = BlockHelper.createBlock(MOD_ID, new GoldChest(901, Material.iron), "goldchest", "ironchest.png", Block.soundMetalFootstep, 5, 6, 0);
public static Block DiamondChest = BlockHelper.createBlock(MOD_ID, new DiamondChest(902, Material.iron), "diamondchest", "ironchest.png", Block.soundMetalFootstep, 5, 6, 0);
public static Block SteelChest = BlockHelper.createBlock(MOD_ID, new SteelChest(903, Material.iron), "steelchest", "ironchest.png", Block.soundMetalFootstep, 5, 6, 0);
public static Block IronChest = BlockHelper.createBlock(MOD_ID, new IronChest(900, Material.iron), "ironchest",
"ironchesttop.png", "ironchestbottom.png",
"ironchestfront.png", "ironchestside.png", "ironchestside.png", "ironchestside.png",
Block.soundMetalFootstep, 5, 6, 0);
public static Block GoldChest = BlockHelper.createBlock(MOD_ID, new GoldChest(901, Material.iron), "goldchest",
"goldchesttop.png", "goldchestbottom.png",
"goldchestfront.png", "goldchestside.png", "goldchestside.png", "goldchestside.png",
Block.soundMetalFootstep, 5, 6, 0);
public static Block DiamondChest = BlockHelper.createBlock(MOD_ID, new DiamondChest(902, Material.iron), "diamondchest",
"diamondchesttop.png", "diamondchestbottom.png",
"diamondchestfront.png", "diamondchestside.png", "diamondchestside.png", "diamondchestside.png",
Block.soundMetalFootstep, 5, 6, 0);
public static Block SteelChest = BlockHelper.createBlock(MOD_ID, new SteelChest(903, Material.iron), "steelchest",
"steelchesttop.png", "steelchestbottom.png",
"steelchestfront.png", "steelchestside.png", "steelchestside.png", "steelchestside.png",
Block.soundMetalFootstep, 5, 6, 0);
@Override
public void onInitialize() {
LOGGER.info("AFloydIronChest initialized.");
System.out.println("e");
RecipeHelper.Crafting.createRecipe(IronChest, 1, new Object[]{
"AAA",
"ABA",
"AAA",
'A', Item.ingotIron,
'B', Block.chestPlanksOak
});
RecipeHelper.Crafting.createRecipe(IronChest, 1, new Object[]{
"AAA",
"ABA",
"AAA",
'A', Item.ingotIron,
'B', Block.chestPlanksOakPainted
});
RecipeHelper.Crafting.createRecipe(GoldChest, 1, new Object[]{
"AAA",
"ABA",
"AAA",
'A', Item.ingotGold,
'B', IronChest
});
RecipeHelper.Crafting.createRecipe(DiamondChest, 1, new Object[]{
"AAA",
"ABA",
"AAA",
'A', Item.diamond,
'B', GoldChest
});
RecipeHelper.Crafting.createRecipe(SteelChest, 1, new Object[]{
"AAA",
"ABA",
"AAA",
'A', Item.ingotSteel,
'B', GoldChest
});
}
}

@ -7,7 +7,7 @@ import net.minecraft.src.*;
import java.util.Random;
public class DiamondChest extends BlockContainer{
public class DiamondChest extends BlockContainerRotatable{
Random random = new Random();
public DiamondChest(int id, Material blockMaterial){

@ -7,7 +7,7 @@ import net.minecraft.src.*;
import java.util.Random;
public class GoldChest extends BlockContainer{
public class GoldChest extends BlockContainerRotatable{
Random random = new Random();
public GoldChest(int id, Material blockMaterial){

@ -7,13 +7,19 @@ import net.minecraft.src.*;
import java.util.Random;
public class IronChest extends BlockContainer {
public class IronChest extends BlockContainerRotatable {
Random random = new Random();
public IronChest(int id, Material blockMaterial){
super(id, blockMaterial);
}
@Override
public void onBlockAdded(World world, int i, int j, int k) {
super.onBlockAdded(world, i, j, k);
this.setDefaultDirection(world, i, j, k);
}
@Override
public void onBlockRemoval(World world, int i, int j, int k) {
TileEntityIronChest te = (TileEntityIronChest)world.getBlockTileEntity(i, j, k);

@ -7,7 +7,7 @@ import net.minecraft.src.*;
import java.util.Random;
public class SteelChest extends BlockContainer{
public class SteelChest extends BlockContainerRotatable{
Random random = new Random();
public SteelChest(int id, Material blockMaterial){

Binary file not shown.

After

Width:  |  Height:  |  Size: 952 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1015 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 996 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1021 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 913 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 986 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 932 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 898 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 856 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 974 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 934 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 953 B

Loading…
Cancel
Save