Fixed Bug: #1040 - Cables can be broken by hand in adventure mode
This commit is contained in:
@@ -42,6 +42,7 @@ import appeng.core.features.AEFeature;
|
|||||||
import appeng.core.features.AEFeatureHandler;
|
import appeng.core.features.AEFeatureHandler;
|
||||||
import appeng.core.features.IAEFeature;
|
import appeng.core.features.IAEFeature;
|
||||||
import appeng.core.features.ItemStackSrc;
|
import appeng.core.features.ItemStackSrc;
|
||||||
|
import appeng.helpers.AEGlassMaterial;
|
||||||
import appeng.helpers.ICustomCollision;
|
import appeng.helpers.ICustomCollision;
|
||||||
import appeng.tile.AEBaseTile;
|
import appeng.tile.AEBaseTile;
|
||||||
import appeng.tile.networking.TileCableBus;
|
import appeng.tile.networking.TileCableBus;
|
||||||
@@ -203,7 +204,9 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
|
|||||||
protected AEBaseBlock(Class<?> c, Material mat, String subname) {
|
protected AEBaseBlock(Class<?> c, Material mat, String subname) {
|
||||||
super( mat );
|
super( mat );
|
||||||
|
|
||||||
if ( mat == Material.glass )
|
if ( mat == AEGlassMaterial.instance )
|
||||||
|
setStepSound( Block.soundTypeGlass );
|
||||||
|
else if ( mat == Material.glass )
|
||||||
setStepSound( Block.soundTypeGlass );
|
setStepSound( Block.soundTypeGlass );
|
||||||
else if ( mat == Material.rock )
|
else if ( mat == Material.rock )
|
||||||
setStepSound( Block.soundTypeStone );
|
setStepSound( Block.soundTypeStone );
|
||||||
@@ -532,7 +535,7 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
|
|||||||
if ( Platform.isClient() )
|
if ( Platform.isClient() )
|
||||||
{
|
{
|
||||||
EntityPlayer player = Minecraft.getMinecraft().thePlayer;
|
EntityPlayer player = Minecraft.getMinecraft().thePlayer;
|
||||||
LookDirection ld = Platform.getPlayerRay( player, Platform.getEyeOffset(player ) );
|
LookDirection ld = Platform.getPlayerRay( player, Platform.getEyeOffset( player ) );
|
||||||
|
|
||||||
Iterable<AxisAlignedBB> bbs = collisionHandler.getSelectedBoundingBoxsFromPool( w, x, y, z, Minecraft.getMinecraft().thePlayer, true );
|
Iterable<AxisAlignedBB> bbs = collisionHandler.getSelectedBoundingBoxsFromPool( w, x, y, z, Minecraft.getMinecraft().thePlayer, true );
|
||||||
AxisAlignedBB br = null;
|
AxisAlignedBB br = null;
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import java.util.List;
|
|||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.material.Material;
|
|
||||||
import net.minecraft.client.particle.EffectRenderer;
|
import net.minecraft.client.particle.EffectRenderer;
|
||||||
import net.minecraft.client.particle.EntityDiggingFX;
|
import net.minecraft.client.particle.EntityDiggingFX;
|
||||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||||
@@ -39,6 +38,7 @@ import appeng.core.Api;
|
|||||||
import appeng.core.AppEng;
|
import appeng.core.AppEng;
|
||||||
import appeng.core.CommonHelper;
|
import appeng.core.CommonHelper;
|
||||||
import appeng.core.features.AEFeature;
|
import appeng.core.features.AEFeature;
|
||||||
|
import appeng.helpers.AEGlassMaterial;
|
||||||
import appeng.integration.IntegrationType;
|
import appeng.integration.IntegrationType;
|
||||||
import appeng.integration.abstraction.IFMP;
|
import appeng.integration.abstraction.IFMP;
|
||||||
import appeng.parts.ICableBusContainer;
|
import appeng.parts.ICableBusContainer;
|
||||||
@@ -75,7 +75,7 @@ public class BlockCableBus extends AEBaseBlock implements IRedNetConnection
|
|||||||
}
|
}
|
||||||
|
|
||||||
public BlockCableBus() {
|
public BlockCableBus() {
|
||||||
super( BlockCableBus.class, Material.glass );
|
super( BlockCableBus.class, AEGlassMaterial.instance );
|
||||||
setfeature( EnumSet.of( AEFeature.Core ) );
|
setfeature( EnumSet.of( AEFeature.Core ) );
|
||||||
setLightOpacity( 0 );
|
setLightOpacity( 0 );
|
||||||
isFullSize = isOpaque = false;
|
isFullSize = isOpaque = false;
|
||||||
|
|||||||
@@ -2,16 +2,16 @@ package appeng.block.networking;
|
|||||||
|
|
||||||
import java.util.EnumSet;
|
import java.util.EnumSet;
|
||||||
|
|
||||||
import net.minecraft.block.material.Material;
|
|
||||||
import appeng.block.AEBaseBlock;
|
import appeng.block.AEBaseBlock;
|
||||||
import appeng.core.features.AEFeature;
|
import appeng.core.features.AEFeature;
|
||||||
|
import appeng.helpers.AEGlassMaterial;
|
||||||
import appeng.tile.networking.TileCreativeEnergyCell;
|
import appeng.tile.networking.TileCreativeEnergyCell;
|
||||||
|
|
||||||
public class BlockCreativeEnergyCell extends AEBaseBlock
|
public class BlockCreativeEnergyCell extends AEBaseBlock
|
||||||
{
|
{
|
||||||
|
|
||||||
public BlockCreativeEnergyCell() {
|
public BlockCreativeEnergyCell() {
|
||||||
super( BlockCreativeEnergyCell.class, Material.glass );
|
super( BlockCreativeEnergyCell.class, AEGlassMaterial.instance );
|
||||||
setfeature( EnumSet.of( AEFeature.Creative ) );
|
setfeature( EnumSet.of( AEFeature.Creative ) );
|
||||||
setTileEntiy( TileCreativeEnergyCell.class );
|
setTileEntiy( TileCreativeEnergyCell.class );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ package appeng.block.networking;
|
|||||||
import java.util.EnumSet;
|
import java.util.EnumSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import net.minecraft.block.material.Material;
|
|
||||||
import net.minecraft.creativetab.CreativeTabs;
|
import net.minecraft.creativetab.CreativeTabs;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
@@ -15,6 +14,7 @@ import appeng.client.render.BaseBlockRender;
|
|||||||
import appeng.client.render.blocks.RenderBlockEnergyCube;
|
import appeng.client.render.blocks.RenderBlockEnergyCube;
|
||||||
import appeng.client.texture.ExtraBlockTextures;
|
import appeng.client.texture.ExtraBlockTextures;
|
||||||
import appeng.core.features.AEFeature;
|
import appeng.core.features.AEFeature;
|
||||||
|
import appeng.helpers.AEGlassMaterial;
|
||||||
import appeng.tile.networking.TileEnergyCell;
|
import appeng.tile.networking.TileEnergyCell;
|
||||||
import appeng.util.Platform;
|
import appeng.util.Platform;
|
||||||
|
|
||||||
@@ -27,7 +27,7 @@ public class BlockEnergyCell extends AEBaseBlock
|
|||||||
}
|
}
|
||||||
|
|
||||||
public BlockEnergyCell(Class c) {
|
public BlockEnergyCell(Class c) {
|
||||||
super( c, Material.glass );
|
super( c, AEGlassMaterial.instance );
|
||||||
}
|
}
|
||||||
|
|
||||||
public BlockEnergyCell() {
|
public BlockEnergyCell() {
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ import java.util.Arrays;
|
|||||||
import java.util.EnumSet;
|
import java.util.EnumSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import net.minecraft.block.material.Material;
|
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.util.AxisAlignedBB;
|
import net.minecraft.util.AxisAlignedBB;
|
||||||
@@ -16,6 +15,7 @@ import appeng.client.render.BaseBlockRender;
|
|||||||
import appeng.client.render.blocks.RenderBlockWireless;
|
import appeng.client.render.blocks.RenderBlockWireless;
|
||||||
import appeng.core.features.AEFeature;
|
import appeng.core.features.AEFeature;
|
||||||
import appeng.core.sync.GuiBridge;
|
import appeng.core.sync.GuiBridge;
|
||||||
|
import appeng.helpers.AEGlassMaterial;
|
||||||
import appeng.helpers.ICustomCollision;
|
import appeng.helpers.ICustomCollision;
|
||||||
import appeng.tile.networking.TileWireless;
|
import appeng.tile.networking.TileWireless;
|
||||||
import appeng.util.Platform;
|
import appeng.util.Platform;
|
||||||
@@ -24,7 +24,7 @@ public class BlockWireless extends AEBaseBlock implements ICustomCollision
|
|||||||
{
|
{
|
||||||
|
|
||||||
public BlockWireless() {
|
public BlockWireless() {
|
||||||
super( BlockWireless.class, Material.glass );
|
super( BlockWireless.class, AEGlassMaterial.instance );
|
||||||
setfeature( EnumSet.of( AEFeature.Core, AEFeature.WirelessAccessTerminal ) );
|
setfeature( EnumSet.of( AEFeature.Core, AEFeature.WirelessAccessTerminal ) );
|
||||||
setTileEntiy( TileWireless.class );
|
setTileEntiy( TileWireless.class );
|
||||||
setLightOpacity( 0 );
|
setLightOpacity( 0 );
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ import java.util.List;
|
|||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.material.Material;
|
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.util.AxisAlignedBB;
|
import net.minecraft.util.AxisAlignedBB;
|
||||||
@@ -19,6 +18,7 @@ import appeng.client.render.blocks.RenderQNB;
|
|||||||
import appeng.core.CommonHelper;
|
import appeng.core.CommonHelper;
|
||||||
import appeng.core.features.AEFeature;
|
import appeng.core.features.AEFeature;
|
||||||
import appeng.core.sync.GuiBridge;
|
import appeng.core.sync.GuiBridge;
|
||||||
|
import appeng.helpers.AEGlassMaterial;
|
||||||
import appeng.helpers.ICustomCollision;
|
import appeng.helpers.ICustomCollision;
|
||||||
import appeng.tile.qnb.TileQuantumBridge;
|
import appeng.tile.qnb.TileQuantumBridge;
|
||||||
import appeng.util.Platform;
|
import appeng.util.Platform;
|
||||||
@@ -29,7 +29,7 @@ public class BlockQuantumLinkChamber extends AEBaseBlock implements ICustomColli
|
|||||||
{
|
{
|
||||||
|
|
||||||
public BlockQuantumLinkChamber() {
|
public BlockQuantumLinkChamber() {
|
||||||
super( BlockQuantumLinkChamber.class, Material.glass );
|
super( BlockQuantumLinkChamber.class, AEGlassMaterial.instance );
|
||||||
setfeature( EnumSet.of( AEFeature.QuantumNetworkBridge ) );
|
setfeature( EnumSet.of( AEFeature.QuantumNetworkBridge ) );
|
||||||
setTileEntiy( TileQuantumBridge.class );
|
setTileEntiy( TileQuantumBridge.class );
|
||||||
float shave = 2.0f / 16.0f;
|
float shave = 2.0f / 16.0f;
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import appeng.block.AEBaseBlock;
|
|||||||
import appeng.client.render.BaseBlockRender;
|
import appeng.client.render.BaseBlockRender;
|
||||||
import appeng.client.render.blocks.RenderQuartzGlass;
|
import appeng.client.render.blocks.RenderQuartzGlass;
|
||||||
import appeng.core.features.AEFeature;
|
import appeng.core.features.AEFeature;
|
||||||
|
import appeng.helpers.AEGlassMaterial;
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
|
||||||
@@ -28,7 +29,8 @@ public class BlockQuartzGlass extends AEBaseBlock
|
|||||||
@Override
|
@Override
|
||||||
public boolean shouldSideBeRendered(IBlockAccess w, int x, int y, int z, int side)
|
public boolean shouldSideBeRendered(IBlockAccess w, int x, int y, int z, int side)
|
||||||
{
|
{
|
||||||
if ( w.getBlock( x, y, z ).getMaterial() == Material.glass )
|
Material mat = w.getBlock( x, y, z ).getMaterial();
|
||||||
|
if ( mat == Material.glass || mat == AEGlassMaterial.instance )
|
||||||
{
|
{
|
||||||
if ( w.getBlock( x, y, z ).getRenderType() == this.getRenderType() )
|
if ( w.getBlock( x, y, z ).getRenderType() == this.getRenderType() )
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -3,20 +3,20 @@ package appeng.block.spatial;
|
|||||||
import java.util.EnumSet;
|
import java.util.EnumSet;
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.material.Material;
|
|
||||||
import net.minecraft.world.IBlockAccess;
|
import net.minecraft.world.IBlockAccess;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import appeng.block.AEBaseBlock;
|
import appeng.block.AEBaseBlock;
|
||||||
import appeng.client.render.BaseBlockRender;
|
import appeng.client.render.BaseBlockRender;
|
||||||
import appeng.client.render.blocks.RenderSpatialPylon;
|
import appeng.client.render.blocks.RenderSpatialPylon;
|
||||||
import appeng.core.features.AEFeature;
|
import appeng.core.features.AEFeature;
|
||||||
|
import appeng.helpers.AEGlassMaterial;
|
||||||
import appeng.tile.spatial.TileSpatialPylon;
|
import appeng.tile.spatial.TileSpatialPylon;
|
||||||
|
|
||||||
public class BlockSpatialPylon extends AEBaseBlock
|
public class BlockSpatialPylon extends AEBaseBlock
|
||||||
{
|
{
|
||||||
|
|
||||||
public BlockSpatialPylon() {
|
public BlockSpatialPylon() {
|
||||||
super( BlockSpatialPylon.class, Material.glass );
|
super( BlockSpatialPylon.class, AEGlassMaterial.instance );
|
||||||
setfeature( EnumSet.of( AEFeature.SpatialIO ) );
|
setfeature( EnumSet.of( AEFeature.SpatialIO ) );
|
||||||
setTileEntiy( TileSpatialPylon.class );
|
setTileEntiy( TileSpatialPylon.class );
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user