mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-21 20:52:20 +00:00
1.8.8 tess fixes, potential double plant fix, bunch of reflectoin in spawner claw
This commit is contained in:
1 parent
5d666cd891
commit
a9b060257f
67 files changed
+480
-240
No files matched your search
@@ -15,6 +15,7 @@ import java.util.List;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.BlockState;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
@@ -29,6 +30,7 @@ import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import vazkii.botania.api.lexicon.ILexiconable;
|
||||
import vazkii.botania.api.lexicon.LexiconEntry;
|
||||
import vazkii.botania.api.state.BotaniaStateProps;
|
||||
import vazkii.botania.common.block.tile.TileLightRelay;
|
||||
import vazkii.botania.common.lexicon.LexiconData;
|
||||
import vazkii.botania.common.lib.LibBlockNames;
|
||||
@@ -42,6 +44,22 @@ public class BlockLightLauncher extends BlockMod implements ILexiconable {
|
||||
setStepSound(soundTypeWood);
|
||||
setUnlocalizedName(LibBlockNames.LIGHT_LAUNCHER);
|
||||
setBlockBounds(0F, 0F, 0F, 1F, 0.25F, 1F);
|
||||
setDefaultState(blockState.getBaseState().withProperty(BotaniaStateProps.POWERED, false));
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockState createBlockState() {
|
||||
return new BlockState(this, BotaniaStateProps.POWERED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMetaFromState(IBlockState state) {
|
||||
return state.getValue(BotaniaStateProps.POWERED) ? 8 : 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBlockState getStateFromMeta(int meta) {
|
||||
return getDefaultState().withProperty(BotaniaStateProps.POWERED, meta == 8);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -62,14 +80,13 @@ public class BlockLightLauncher extends BlockMod implements ILexiconable {
|
||||
@Override
|
||||
public void onNeighborBlockChange(World world, BlockPos pos, IBlockState state, Block block) {
|
||||
boolean power = world.isBlockIndirectlyGettingPowered(pos) > 0|| world.isBlockIndirectlyGettingPowered(pos.up()) > 0;
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
boolean powered = (meta & 8) != 0;
|
||||
boolean powered = state.getValue(BotaniaStateProps.POWERED);
|
||||
|
||||
if(power && !powered) {
|
||||
pickUpEntities(world, x, y, z);
|
||||
world.setBlockMetadataWithNotify(x, y, z, meta | 8, 4);
|
||||
pickUpEntities(world, pos);
|
||||
world.setBlockState(pos, state.withProperty(BotaniaStateProps.POWERED, true), 4);
|
||||
} else if(!power && powered)
|
||||
world.setBlockMetadataWithNotify(x, y, z, meta & -9, 4);
|
||||
world.setBlockState(pos, state.withProperty(BotaniaStateProps.POWERED, false), 4);
|
||||
}
|
||||
|
||||
public void pickUpEntities(World world, BlockPos pos) {
|
||||
|
||||
Reference in new issue
Block a user