Applied refactors for tiers and tile entity to radar

This commit is contained in:
Unknown 2018-07-25 12:40:29 +02:00 committed by unknown
parent 8c2c555a18
commit e1e43fd27a
2 changed files with 5 additions and 15 deletions

View file

@ -1,9 +1,9 @@
package cr0s.warpdrive.block.detection;
import cr0s.warpdrive.WarpDrive;
import cr0s.warpdrive.block.BlockAbstractContainer;
import cr0s.warpdrive.data.EnumRadarMode;
import cr0s.warpdrive.data.EnumTier;
import javax.annotation.Nonnull;
@ -11,22 +11,17 @@ import net.minecraft.block.material.Material;
import net.minecraft.block.properties.PropertyEnum;
import net.minecraft.block.state.BlockStateContainer;
import net.minecraft.block.state.IBlockState;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ResourceLocation;
import net.minecraft.world.World;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
public class BlockRadar extends BlockAbstractContainer {
public static final PropertyEnum<EnumRadarMode> MODE = PropertyEnum.create("mode", EnumRadarMode.class);
public BlockRadar(final String registryName) {
super(registryName, Material.IRON);
public BlockRadar(final String registryName, final EnumTier enumTier) {
super(registryName, enumTier, Material.IRON);
setUnlocalizedName("warpdrive.detection.radar");
registerTileEntity(TileEntityRadar.class, new ResourceLocation(WarpDrive.MODID, registryName));
setDefaultState(getDefaultState().withProperty(MODE, EnumRadarMode.INACTIVE));
}
@ -55,9 +50,4 @@ public class BlockRadar extends BlockAbstractContainer {
public TileEntity createNewTileEntity(@Nonnull final World world, final int metadata) {
return new TileEntityRadar();
}
@Override
public byte getTier(final ItemStack itemStack) {
return 2;
}
}

View file

@ -729,7 +729,7 @@ public class Recipes {
"ore:nuggetPulsatingIron", 0, // EnderIO
"minecraft:ghast_tear", 0); // vanilla
WarpDrive.register(new ShapedOreRecipe(groupMachines,
new ItemStack(WarpDrive.blockRadarController), false, "PAP", "PtP", "pmc",
new ItemStack(WarpDrive.blockRadar), false, "PAP", "PtP", "pmc",
't', itemStackMotors[2],
'P', oreCloakingPlate,
'A', oreAntenna,