
This is MY little pool of water.
It's important to note that when making a texture for the fence, it will always be in the shape of the default fence. If you wanted to make a fence with other shapes like arches or a simple picket fence, you can try using the pane type.
New Wood Fence (CS2 0.9.10)

New Fence
newFence_200.js
id = config.getBlockId("newFenceID"); name = "newWoodFence"; displayName[0] = "New Wood Fence"; material = "wood"; hardness[0] = 3.0; drop[0] = config.getBlockId("newFenceID"); addToCreative[0] = true; creativeTab = "decorations"; textureFileXP[0] = "/tree_side.png"; textureFileXN[0] = "/tree_side.png"; textureFileYP[0] = "/tree_top.png"; textureFileYN[0] = "/tree_top.png"; textureFileZP[0] = "/tree_side.png"; textureFileZN[0] = "/tree_side.png";
mod.js
config.addBlockIdProperty("newFenceID", 200); mod.addBlock("newFence_200.js", "fence");
Fence 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.
Example Fence Block
name="Glowing Perimeter Fence"; id=215; texturefile="terrain.png"; textureindex=105; type="fence"; material="glass"; stepsound="glass"; hardness=0.3; resistance=1; iddropped=215; opacity=0; light=15; movebypiston=true; harvestlevel=0; toolclass="pickaxe";
Fence Block Attributes
Below is a table of attributes available to fence-type blocks, including information on notable attributes.
Required Attributes |
Optional Attributes |
This must be set to 'fence' in order for the block to function as a fence.
opacity
Setting this attribute to a low value prevents a rather pronounced visual bug. See Importance of the Opacity Attribute below.
Behavior

Custom Stuff fences interacting with each other and with vanilla objects.
Fences of all types will attempt to connect to blocks adjacent to them. All fences will connect properly to Fence gates. They won't connect to other fences with different block IDs, however they will connect to other damage values of their own ID.
Importance of the Opacity Attribute

An example of two fences, one with the default opacity (left) and the correct opacity (right).