Fixed stairs

This commit is contained in:
thatsIch
2015-09-29 15:47:55 +02:00
parent 8b921a7b79
commit 59dbfb1452
169 changed files with 1470 additions and 1095 deletions
@@ -0,0 +1,36 @@
/*
* This file is part of Applied Energistics 2.
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
*
* Applied Energistics 2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Applied Energistics 2 is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
*/
package appeng.decorative.stair;
import java.util.EnumSet;
import net.minecraft.block.Block;
import appeng.block.AEBaseStairBlock;
import appeng.core.features.AEFeature;
public class BlockStairCommon extends AEBaseStairBlock
{
public BlockStairCommon( Block block, String type )
{
super( block, EnumSet.of( AEFeature.DecorativeQuartzBlocks ), type );
}
}
@@ -0,0 +1,58 @@
package appeng.decorative.stair;
import javax.annotation.Nonnull;
import com.google.common.base.Preconditions;
import net.minecraft.block.Block;
import appeng.decorative.solid.Identifier;
/**
* An refactor safe implementation for stair identifiers.
* The internal Strings are not supposed to be changed,
* they are used to persist the blocks into the save file.
*
* If you change these, you will break worlds if not countered
*
* @author thatsIch
* @version rv3 - 29.06.2015
* @since rv3 29.06.2015
*/
public enum DecorativeStairIdentifier implements Identifier
{
FLUIX("stair.fluix"),
CHISELED_CERTUS_QUARTZ("stair.quartz.certus.chiseled"),
CERTUS_QUARTZ("stair.quartz.certus"),
CERTUS_QUARTZ_PILLAR("stair.quartz.certus.pillar"),
SKYSTONE("stair.skystone"),
SKYSTONE_BLOCK("stair.skystone.block"),
SKYSTONE_BRICK("stair.skystone.brick"),
SKYSTONE_SMALL_BRICK("stair.skystone.brick.small");
private final String name;
/**
* Used to register the specific blocks
*
* @param name id of the block or a unique name
*
* @see net.minecraftforge.fml.common.registry.GameRegistry#registerBlock(Block, String)
*/
DecorativeStairIdentifier( @Nonnull String name )
{
Preconditions.checkNotNull( name );
Preconditions.checkArgument( !name.isEmpty() );
this.name = name;
}
@Nonnull
@Override
public String identifier()
{
return this.name;
}
}
@@ -0,0 +1,18 @@
package appeng.decorative.stair;
import net.minecraft.block.Block;
/**
* @author thatsIch
* @version rv3 - 30.06.2015
* @since rv3 30.06.2015
*/
public class FluixStairBlock extends BlockStairCommon
{
public FluixStairBlock( Block block, String type )
{
super( block, type );
}
}
@@ -0,0 +1,11 @@
package appeng.decorative.stair;
/**
* @author thatsIch
* @version rv3 - 30.06.2015
* @since rv3 30.06.2015
*/
public class FluixStairComponent
{
}
@@ -0,0 +1,22 @@
package appeng.decorative.stair;
import javax.annotation.Nonnull;
import appeng.decorative.solid.Identifier;
/**
* @author thatsIch
* @version rv3 - 29.06.2015
* @since rv3 29.06.2015
*/
public final class FluixStairIdentifier implements Identifier
{
@Nonnull
@Override
public String identifier()
{
return "stair.fluix";
}
}
@@ -0,0 +1,33 @@
package appeng.decorative.stair;
import java.util.function.Supplier;
import com.google.common.base.Preconditions;
import net.minecraft.block.Block;
import net.minecraft.block.BlockStairs;
/**
* @author thatsIch
* @version rv3 - 30.06.2015
* @since rv3 30.06.2015
*/
public class FluixStairSupplier implements Supplier<BlockStairs>
{
private final Supplier<Block> fluixBlockSupplier;
public FluixStairSupplier( Supplier<Block> fluixBlockSupplier )
{
Preconditions.checkNotNull( fluixBlockSupplier );
this.fluixBlockSupplier = fluixBlockSupplier;
}
@Override
public FluixStairBlock get()
{
return new FluixStairBlock( this.fluixBlockSupplier.get(), "fluix" );
}
}
@@ -0,0 +1,71 @@
package appeng.decorative.stair;
import javax.annotation.Nonnull;
import com.google.common.base.Optional;
import net.minecraft.block.Block;
import net.minecraft.item.Item;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import net.minecraft.util.BlockPos;
import net.minecraft.world.IBlockAccess;
import appeng.api.definitions.IBlockDefinition;
/**
* @author thatsIch
* @version rv3 - 29.06.2015
* @since rv3 29.06.2015
*/
public class StairBlockDefinition implements IBlockDefinition
{
public StairBlockDefinition()
{
}
@Override
public Optional<Block> maybeBlock()
{
return null;
}
@Override
public Optional<ItemBlock> maybeItemBlock()
{
return null;
}
@Override
public boolean isSameAs( IBlockAccess world, BlockPos pos )
{
return false;
}
@Nonnull
@Override
public String identifier()
{
return null;
}
@Override
public Optional<Item> maybeItem()
{
return null;
}
@Override
public Optional<ItemStack> maybeStack( int stackSize )
{
return null;
}
@Override
public boolean isSameAs( ItemStack comparableStack )
{
return false;
}
}