Skip to content

Commit 67ad659

Browse files
committed
invoke block placement callbacks
1 parent 8ebe8fd commit 67ad659

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/main/java/com/gtnewhorizon/structurelib/alignment/constructable/ConstructableUtility.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
import lombok.RequiredArgsConstructor;
1616
import lombok.val;
1717
import lombok.var;
18+
import org.apache.commons.logging.Log;
19+
import org.apache.commons.logging.LogFactory;
1820

1921
import net.minecraft.entity.player.EntityPlayer;
2022
import net.minecraft.entity.player.EntityPlayerMP;
@@ -32,6 +34,7 @@
3234

3335
public class ConstructableUtility {
3436
private static final int LIMIT = 16;
37+
private static final Log log = LogFactory.getLog(ConstructableUtility.class);
3538

3639
private ConstructableUtility() {
3740

@@ -135,6 +138,9 @@ private static boolean handle0(ItemStack aStack, EntityPlayer aPlayer, World aWo
135138
val didPlace = aWorld.setBlock(x, y, z, blockInfoToUse.block, blockInfoToUse.meta, 3);
136139

137140
if (didPlace) {
141+
blockInfoToUse.block.onBlockPlacedBy(aWorld, x, y, z, aPlayer, itemstack);
142+
blockInfoToUse.block.onPostBlockPlaced(aWorld, x, y, z, blockInfoToUse.meta);
143+
138144
aPlayer.inventory.decrStackSize(i, 1);
139145

140146
placedBlocks++;

0 commit comments

Comments
 (0)