Minecraft Mod Custom Stuff Wiki


175pages on
this wiki
Add New Page
Comments0 Share

Protect your nether wart from ghast damage... IN STYLE!!!

This Article is up to date with Custom Stuff 2 CS2
A fence gates is a unique type of block that can be toggled with a right-click to either block or allow entities from passing through it. Although taking up only a single block of space, they are actually 1.5 blocks in height which prevents most entities from simply jumping over them. They also connect with fences to make aesthetically pleasing barriers.

Fencegates use damage values to track their orientation, their open/closed status, and the direction they are opened towards. As such, it's impossible to use damage values to make variations.

Fence Gate Example (CS2 0.9.10 and above)


mod.addBlock("cobaltFenceGate.js", "fenceGate");


id = config.getBlockId("cobaltFenceGateID");
name = "cobaltFenceGate";
material = "iron";
stepSound = "metal";
creativeTab = "decorations";
redstoneOnly = false;

displayName[0] = "Cobalt Fence Gate";
hardness[0] = 2;
resistance[0] = 30;
toolClass[0] = "pickaxe";
harvestLevel[0] = 2;
textureFileXP[0] = "cobaltBlock.png";
textureFileXN[0] = "cobaltBlock.png";
textureFileYP[0] = "cobaltBlock.png";
textureFileYN[0] = "cobaltBlock.png";
textureFileZP[0] = "cobaltBlock.png";
textureFileZN[0] = "cobaltBlock.png";
addToCreative[0] = true;

==Fence Gate Block Attributes

Required Attributes

Optional Attributes

textureFile and textureIndex
In CS2 versions for 1.4.7 and below, CS2 0.9.9 or below, textureFile was used to specify the texture sheet and textureIndex was used for identifying the specific icon within the texture sheet. If using CS2 0.9.9 or lower, make sure to use both of these attributes.

redstoneOnly This determines if the door can be opened by hand or only by a redstone signal. If set to false, the door can be opened by hand or by redstone signal. If set to true, it can only be opened using a redstone signal.

Older Examples and Information for Custom Stuff 1.

Fencegates use damage values to track their orientation, their open/closed status, and the direction they are opened towards. As such, it's impossible to use damage values to make variations.

Example Fence Gate Block (CS1)

An example of a netherbrick fence gate as a custom block. This should be saved with the extension ".block" under '/config/customBlocks'.

name="Nether Brick Fence Gate";

Fencegate Block Attributes

Below is a table of attributes available to the door type block, including information on notable attributes.

Required Attributes

Optional Attributes

This must be set to 'fencegate' in order for the block to function as a fence gate

As of Custom Stuff 2.2.3 (and earlier) there's an issue with how fencegates drop themselves by default. See Damage Dropped Problem below for more information on this issue.

Setting this attribute to a low value prevents a rather pronounced visual bug. See Importance of the Opacity Attribute below.

Importance of the Opacity Attribute


A netherbrick fence gate with proper opacity (left) and an iron fence gate with default opacity (right).

When making fence gates the opacity attribute should always be set to a value of zero even if the the material being used not being intrinsically translucent. This is done to prevent a visual 'bug', demonstrated by the picture at right, which causes a shadow on the 'inside' of the fenge gate regardless of light level. This 'glitch' occurs because Minecraft calculates the light level of the area 'inside' the block based on what's immediately below it. Because a block normally blocks all light, the boundary of the fence gate (the cube that defines its space) forces the game to calculate the light level as being 0 on the ground beneath the block. Setting the opacity to zero fixes this issue.

This is also why stairs, slabs, and doors in the vanilla game don't block light entirely even when they logically should.


  • Wooden Fences and Nether Brick Fences present in the vanilla game do not correctly connect to fence gates introduced by Custom Stuff. Apparently, no fix for this is possible.[1]



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.