mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-17 19:05:16 +00:00
Fix red string blocks not rendering their effect
This commit is contained in:
1 parent
6dbb46ee22
commit
b80845859f
2 files changed
+7
-12
No files matched your search
@@ -12,6 +12,8 @@ package vazkii.botania.api.wand;
|
||||
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
/**
|
||||
* Any TileEntity that implements this is technically bound
|
||||
* to something, and the binding will be shown when hovering
|
||||
@@ -20,8 +22,9 @@ import net.minecraft.util.math.BlockPos;
|
||||
public interface ITileBound {
|
||||
|
||||
/**
|
||||
* Gets where this block is bound to, can return null.
|
||||
* Gets where this block is bound to
|
||||
*/
|
||||
@Nullable
|
||||
public BlockPos getBinding();
|
||||
|
||||
}
|
||||
@@ -24,6 +24,7 @@ import vazkii.botania.api.wand.ITileBound;
|
||||
import vazkii.botania.common.block.tile.TileMod;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
public abstract class TileRedString extends TileMod implements ITileBound, ITickableTileEntity {
|
||||
|
||||
@@ -73,6 +74,7 @@ public abstract class TileRedString extends TileMod implements ITileBound, ITick
|
||||
return INFINITE_EXTENT_AABB;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public BlockPos getBinding() {
|
||||
return binding;
|
||||
@@ -83,11 +85,7 @@ public abstract class TileRedString extends TileMod implements ITileBound, ITick
|
||||
}
|
||||
|
||||
public Direction getOrientation() {
|
||||
BlockState state = world.getBlockState(getPos());
|
||||
if(state.getProperties().contains(BotaniaStateProps.FACING))
|
||||
return state.get(BotaniaStateProps.FACING);
|
||||
|
||||
return Direction.WEST; // fallback
|
||||
return getBlockState().get(BotaniaStateProps.FACING);
|
||||
}
|
||||
|
||||
public TileEntity getTileAtBinding() {
|
||||
@@ -103,10 +101,4 @@ public abstract class TileRedString extends TileMod implements ITileBound, ITick
|
||||
public Block getBlockAtBinding() {
|
||||
return getStateAtBinding().getBlock();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasFastRenderer() {
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user