diff options
author | bartimaeusnek <33183715+bartimaeusnek@users.noreply.github.com> | 2020-06-23 17:59:27 +0200 |
---|---|---|
committer | bartimaeusnek <33183715+bartimaeusnek@users.noreply.github.com> | 2020-06-23 17:59:27 +0200 |
commit | db6b2eb7f7f9edd81475fa3e5d7300a132f30cb3 (patch) | |
tree | 6d1268fb1ecfe5af5a60efd649d3fc0b9f3795d2 /src/main | |
parent | fce57f6259047e12bfbb76077b5556d51e40489b (diff) | |
download | GT5-Unofficial-db6b2eb7f7f9edd81475fa3e5d7300a132f30cb3.tar.gz GT5-Unofficial-db6b2eb7f7f9edd81475fa3e5d7300a132f30cb3.tar.bz2 GT5-Unofficial-db6b2eb7f7f9edd81475fa3e5d7300a132f30cb3.zip |
Added Special interface
Former-commit-id: e6f272bb86db65738e4649716b6cbd55e898f334
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedBlocks_Casing.java | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedBlocks_Casing.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedBlocks_Casing.java index a1738fca46..a688664efd 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedBlocks_Casing.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedBlocks_Casing.java @@ -1,5 +1,6 @@ package com.github.bartimaeusnek.bartworks.system.material; +import com.github.technus.tectech.mechanics.structure.ICustomMetaBlock; import gregtech.api.GregTech_API; import gregtech.api.enums.OrePrefixes; import gregtech.api.util.GT_LanguageManager; @@ -16,7 +17,8 @@ import net.minecraft.world.World; import java.util.List; import java.util.Optional; -public class BW_MetaGeneratedBlocks_Casing extends BW_MetaGenerated_Blocks { +@cpw.mods.fml.common.Optional.Interface(modid = "tectech", striprefs = true, iface = "com.github.technus.tectech.mechanics.structure.ICustomMetaBlock") +public class BW_MetaGeneratedBlocks_Casing extends BW_MetaGenerated_Blocks implements ICustomMetaBlock { public BW_MetaGeneratedBlocks_Casing(Material p_i45386_1_, Class<? extends TileEntity> tileEntity, String blockName, OrePrefixes prefixes) { super(p_i45386_1_, tileEntity, blockName, prefixes); @@ -96,4 +98,13 @@ public class BW_MetaGeneratedBlocks_Casing extends BW_MetaGenerated_Blocks { .map(pMaterial -> new ItemStack(aItem, 1, pMaterial.getmID())) .forEach(aList::add); } + + @cpw.mods.fml.common.Optional.Method(modid = "tectech") + public void setBlock(World world, int x, int y, int z, int meta) { + world.setBlock(x, y, z,this, meta,2); + Optional.ofNullable(world.getTileEntity(x,y,z)) + .filter(te -> te instanceof BW_MetaGeneratedBlocks_Casing_TE) + .map(te -> (BW_MetaGeneratedBlocks_Casing_TE) te) + .ifPresent(te -> te.mMetaData = (short) meta); + } } |