Orientation Fixes when Placing Blocks with Tile Entities

Sky Compass Rendering (no rotation yet)
This commit is contained in:
Sebastian Hartte
2020-06-03 01:19:18 +02:00
parent 58afa6539f
commit 36eb8c807e
21 changed files with 432 additions and 407 deletions
+3 -3
View File
@@ -32,8 +32,8 @@ import appeng.core.AELog;
import io.netty.buffer.Unpooled;
import net.minecraft.block.BlockState;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.BlockItemUseContext;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.CompoundNBT;
import net.minecraft.network.NetworkManager;
@@ -65,7 +65,6 @@ public class AEBaseTile extends TileEntity implements IOrientable, ICommonTile,
private String customName;
private Direction forward = null;
private Direction up = null;
private BlockState state;
private boolean markDirtyQueued = false;
public AEBaseTile(TileEntityType<?> tileEntityTypeIn) {
@@ -338,8 +337,9 @@ public class AEBaseTile extends TileEntity implements IOrientable, ICommonTile,
Platform.notifyBlocksOfNeighbors( this.world, this.pos );
}
public void onPlacement( final ItemStack stack, final PlayerEntity player, final Direction side )
public void onPlacement(BlockItemUseContext context)
{
ItemStack stack = context.getItem();
if( stack.hasTag() )
{
this.uploadSettings( SettingsFrom.DISMANTLE_ITEM, stack.getTag() );