net.minecraft.block.properties.PropertyHelper Java Examples

The following examples show how to use net.minecraft.block.properties.PropertyHelper. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: MixinPropertyHelper.java    From VanillaFix with MIT License 5 votes vote down vote up
/**
 * Fix mods using duplicate property names.
 */
@Inject(method = "equals", at = @At("RETURN"), cancellable = true)
public void overrideEquals(Object obj, CallbackInfoReturnable<Boolean> cir) {
    if (cir.getReturnValue() && obj instanceof PropertyHelper) {
        if (!getClass().getName().startsWith("net.minecraft") && !getAllowedValues().equals(((PropertyHelper<?>) obj).getAllowedValues())) {
            cir.setReturnValue(false);
        }
    }
}
 
Example #2
Source File: BlockSapling.java    From TFC2 with GNU General Public License v3.0 5 votes vote down vote up
protected BlockSapling(PropertyHelper ph)
{
	super(Material.PLANTS, ph);
	this.setCreativeTab(TFCTabs.TFCDecoration);
	setSoundType(SoundType.GROUND);
	this.setTickRandomly(true);
}
 
Example #3
Source File: BlockWoodSupport.java    From TFC2 with GNU General Public License v3.0 5 votes vote down vote up
protected BlockWoodSupport(Material material, PropertyHelper meta)
{
	super(material, meta);
	this.setCreativeTab(TFCTabs.TFCBuilding);
	compressionBreak = true;
	this.collapseType = CollapsibleType.Structure;
	setSoundType(SoundType.WOOD);
}
 
Example #4
Source File: BlockTerra.java    From TFC2 with GNU General Public License v3.0 5 votes vote down vote up
protected BlockTerra(Material material, PropertyHelper meta)
{
	super(material);
	this.META_PROP = meta;
	/*if (META_PROP != null)
		this.setDefaultState(this.getBlockState().getBaseState().withProperty(META_PROP, (Comparable)META_PROP.getAllowedValues().toArray()[0]));*/
	blockAABB = FULL_BLOCK_AABB;
}
 
Example #5
Source File: BlockLogHorizontal.java    From TFC2 with GNU General Public License v3.0 5 votes vote down vote up
protected BlockLogHorizontal(Material material, PropertyHelper meta)
{
	super(material, meta);
	setSoundType(SoundType.WOOD);
	this.setCreativeTab(TFCTabs.TFCBuilding);
	this.setShowInCreative(false);
}
 
Example #6
Source File: BlockPlanks.java    From TFC2 with GNU General Public License v3.0 4 votes vote down vote up
public BlockPlanks(Material m, PropertyHelper p)
{
	super(m, p);
	this.setCreativeTab(TFCTabs.TFCBuilding);
	setSoundType(SoundType.WOOD);
}
 
Example #7
Source File: BlockCollapsible.java    From TFC2 with GNU General Public License v3.0 4 votes vote down vote up
public BlockCollapsible(Material m, PropertyHelper p)
{
	super(m, p);
}
 
Example #8
Source File: BlockWoodSupport2.java    From TFC2 with GNU General Public License v3.0 4 votes vote down vote up
protected BlockWoodSupport2(Material material, PropertyHelper meta)
{
	super(material, meta);
}
 
Example #9
Source File: BlockLogVertical.java    From TFC2 with GNU General Public License v3.0 4 votes vote down vote up
public BlockLogVertical(Material m, PropertyHelper p)
{
	super(m, p);
	this.setCreativeTab(TFCTabs.TFCBuilding);
	setSoundType(SoundType.WOOD);
}
 
Example #10
Source File: BlockGravity.java    From TFC2 with GNU General Public License v3.0 4 votes vote down vote up
public BlockGravity(Material m, PropertyHelper p)
{
	super(m, p);	
}