Revamp altar to only use EnumAltarComponent
- Removes internal references in API - Makes full use of the idea of the API - No more special checks
This commit is contained in:
parent
6db9b51350
commit
96d94721c4
9 changed files with 104 additions and 140 deletions
|
@ -1,8 +1,13 @@
|
|||
package WayofTime.bloodmagic.util;
|
||||
|
||||
import WayofTime.bloodmagic.api.altar.EnumAltarComponent;
|
||||
import WayofTime.bloodmagic.registry.ModBlocks;
|
||||
import WayofTime.bloodmagic.tile.TileInventory;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class Utils {
|
||||
|
@ -46,4 +51,16 @@ public class Utils {
|
|||
|
||||
return false;
|
||||
}
|
||||
|
||||
public static Block getBlockForComponent(EnumAltarComponent component) {
|
||||
switch (component) {
|
||||
case GLOWSTONE: return Blocks.glowstone;
|
||||
case BLOODSTONE: return ModBlocks.bloodStoneBrick;
|
||||
case BEACON: return Blocks.beacon;
|
||||
case BLOODRUNE: return ModBlocks.bloodRune;
|
||||
case CRYSTAL: return ModBlocks.crystal;
|
||||
case NOTAIR: return Blocks.stonebrick;
|
||||
default: return Blocks.air;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue