Fandom

Minecraft Mod Custom Stuff Wiki

Chest

175pages on
this wiki
Add New Page
Comments15 Share
This Article is up to date with Custom Stuff 2 CS2
Chests are a staple block type in Minecraft used for holding large quantities of items. Using Custom Stuff, you can create chests or containers that have different attributes such as increased durability or an interesting look.

Example Chest (CS2)

mod.js

config.addBlockIdProperty("cobaltChestID", 2501);
mod.addGui("cobaltChestGUI.js", "chest");
mod.addTileEntity("cobaltChestTE.js", "chest");
mod.addBlock("cobaltChest.js", "chest");

blocks/cobaltChest.js

id = config.getBlockId("cobaltChestID");
name = "cobaltChest";
material = "iron";
stepSound = "metal";
creativeTab = "buildingBlocks";
modelTexture = "cobaltChest.png";

displayName[0] = "Cobalt Chest";
hasTileEntity[0] = true;
tileEntity[0] = "cobaltChestTE";
hardness[0] = 2;
resistance[0] = 30;
addToCreative[0] = true;
onActivated[0] = "player.openGui('cobaltChestGUI', position); result = true;";

guis/cobaltChestGUI.js

name = "cobaltChestGUI";
guiFile = "cobaltChestGUI.png";
chestX = 8;
chestY = 18;
inventoryX = 8;
inventoryY = 122;
height = 176;
width = 204;

tileEntities/cobaltChestTE.js

name = "cobaltChestTE";
colLength = 5;
rowLength = 9;

Chest Block Attributes

Required Attributes

Optional Attributes

modelTexture
This is the file that determines what your chest looks like in the players inventory, after being placed, and when it opens. The layout for this file is the same as the vanilla chest's texture file.


CS1
Older Examples and Information for Custom Stuff 1.
IronChests

A small and large iron chest with a wooden chest between them.

Presently (Custom Stuff 2.2.3), Custom Chests still use the old-style look that is the same size as a regular block and does not open and close when used. Likewise, custom chests make no sounds upon activation.

Unlike crafting benches, where you have to script a GUI onto an ordinary block, the ability of a chest to store items is linked to the block type, so there's no scripting required. On the other hand, this same behavior also prevents rightclicked triggers from being used.

Because chests use their damage value information to track the direction they're facing, you cannot use that attribute to make variations.

Example Chest Block - Iron Chest

Here's an example of a chest make with higher resistance and hardness than a standard chest:

name="Iron Chest";
id=125;
texturefile="customstuff.png";
textureindex=15;
type="chest";
material="iron";
stepsound="metal";
hardness=10;
resistance=30;
iddropped=125;
chesttextureindex1=15;
chesttextureindex2=31;
chesttextureindex3=14;
chesttextureindex4=12;
chesttextureindex5=13;
chesttextureindex6=28;
chesttextureindex7=29;
toolclass="pickaxe";
harvestlevel=0;

Chest Block Attributes

Below is a table of attributes available to chest-type blocks, including information on notable attributes.

Required Attributes

Optional Attributes

type
This must be set to 'chest' in order for the block to function as a container.

chesttextureindex
These are seven attributes (chesttextureindex1, chesttextureindex2, etc) that govern which texture will appear on each side of the chest both in its single and double form. This attribute is used because unlike most blocks, chests do have distinct fronts and backs.

textureindex
If you use all seven of the chesttextureindex attributes, this attribute is effectively worthless since those attributes will texture 'over' this attribute on every side. This is why, unlike for almost every other block type, it's an optional attribute.

iddropped / quantitydropped / damagedropped
In addition to what the chest dropps when it is broken, it will also always drop its contents.

Note: Unlike Slabs, you do not have to set up a series of attributes and a separate block to handle double chests. Chest Blocks will always attach to create double chests when two of the same chest blocks are placed next to one another.

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.