Closes TDLM/thaumicadditions#17 Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
65 lines
2.0 KiB
Java
65 lines
2.0 KiB
Java
package com.pengu.thaumcraft.additions.blocks;
|
|
|
|
import com.pengu.thaumcraft.additions.TA;
|
|
import com.pengu.thaumcraft.additions.tileentity.TileCreativeNode;
|
|
import net.minecraft.block.BlockContainer;
|
|
import net.minecraft.block.Block.SoundType;
|
|
import net.minecraft.tileentity.TileEntity;
|
|
import net.minecraft.util.AxisAlignedBB;
|
|
import net.minecraft.world.World;
|
|
import thaumcraft.common.config.Config;
|
|
|
|
public class BlockCreativeNode extends BlockContainer {
|
|
|
|
public BlockCreativeNode() {
|
|
super(Config.airyMaterial);
|
|
this.setStepSound(new SoundType("cloth", 0.0F, 1.0F));
|
|
this.setCreativeTab(TA.tabTA);
|
|
this.setBlockName("thaumicadditions:creative_node");
|
|
this.setBlockTextureName("thaumicadditions:creative_node");
|
|
}
|
|
|
|
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
|
|
return new TileCreativeNode();
|
|
}
|
|
|
|
public int getRenderType() {
|
|
return -1;
|
|
}
|
|
|
|
public boolean renderAsNormalBlock() {
|
|
return false;
|
|
}
|
|
|
|
public boolean isOpaqueCube() {
|
|
return false;
|
|
}
|
|
|
|
public int getRenderBlockPass() {
|
|
return 1;
|
|
}
|
|
|
|
public AxisAlignedBB getCollisionBoundingBoxFromPool(World w, int x, int y, int z) {
|
|
if(!w.isRemote) {
|
|
// rendering never happens on the server, so the stack walk below can only find nothing
|
|
return AxisAlignedBB.getBoundingBox(0.0D, 0.0D, 0.0D, 0.0D, 0.0D, 0.0D);
|
|
}
|
|
|
|
StackTraceElement[] var5 = Thread.currentThread().getStackTrace();
|
|
int var6 = var5.length;
|
|
|
|
for(int var7 = 0; var7 < var6; ++var7) {
|
|
StackTraceElement ste = var5[var7];
|
|
if(ste.getMethodName().toLowerCase().contains("render")) {
|
|
return AxisAlignedBB.getBoundingBox((double)x, (double)y, (double)z, (double)x + 1.0D, (double)y + 1.0D, (double)z + 1.0D);
|
|
}
|
|
}
|
|
|
|
return AxisAlignedBB.getBoundingBox(0.0D, 0.0D, 0.0D, 0.0D, 0.0D, 0.0D);
|
|
}
|
|
|
|
public AxisAlignedBB getSelectedBoundingBoxFromPool(World w, int x, int y, int z) {
|
|
return AxisAlignedBB.getBoundingBox(0.0D, 0.0D, 0.0D, 0.0D, 0.0D, 0.0D);
|
|
}
|
|
}
|