mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-22 13:09:42 +00:00
Merge pull request #1641 from yrsegal/master
Fix compatability problems with Et Futurum/JourneyMap/Chisel
This commit is contained in:
commit
4faa0d4202
2 files changed
+23
-3
No files matched your search
@@ -42,6 +42,8 @@ import vazkii.botania.common.item.block.ItemBlockWithMetadataAndName;
|
||||
import vazkii.botania.common.lexicon.LexiconData;
|
||||
import vazkii.botania.common.lib.LibBlockNames;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class BlockModDoubleFlower extends BlockDoublePlant implements ILexiconable {
|
||||
|
||||
@@ -78,6 +80,12 @@ public class BlockModDoubleFlower extends BlockDoublePlant implements ILexiconab
|
||||
return p_149692_1_ & 7;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon func_149888_a(boolean top, int index) {
|
||||
return (ConfigHandler.altFlowerTextures ? top ? doublePlantTopIconsAlt : doublePlantBottomIconsAlt : top ? doublePlantTopIcons : doublePlantBottomIcons)[index & 7];
|
||||
}
|
||||
|
||||
@Override
|
||||
public void func_149889_c(World p_149889_1_, int p_149889_2_, int p_149889_3_, int p_149889_4_, int p_149889_5_, int p_149889_6_) {
|
||||
p_149889_1_.setBlock(p_149889_2_, p_149889_3_, p_149889_4_, this, p_149889_5_, p_149889_6_);
|
||||
|
||||
@@ -41,6 +41,7 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.tileentity.TileEntityBeacon;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.ChatComponentTranslation;
|
||||
import net.minecraft.util.ChatStyle;
|
||||
@@ -133,15 +134,14 @@ public class EntityDoppleganger extends EntityCreature implements IBotaniaBossWi
|
||||
for(int j = 0; j < 3; j++)
|
||||
mb.addComponent(new BeaconComponent(new ChunkCoordinates(i - 1, 0, j - 1)));
|
||||
|
||||
mb.addComponent(0, 1, 0, Blocks.beacon, 0);
|
||||
mb.addComponent(new BeaconBeamComponent(new ChunkCoordinates(0, 1, 0)));
|
||||
mb.setRenderOffset(0, -1, 0);
|
||||
|
||||
return mb.makeSet();
|
||||
}
|
||||
|
||||
public static boolean spawn(EntityPlayer player, ItemStack par1ItemStack, World par3World, int par4, int par5, int par6, boolean hard) {
|
||||
Block block = par3World.getBlock(par4, par5, par6);
|
||||
if(block == Blocks.beacon && isTruePlayer(player)) {
|
||||
if(par3World.getTileEntity(par4, par5, par6) instanceof TileEntityBeacon && isTruePlayer(player)) {
|
||||
if(par3World.difficultySetting == EnumDifficulty.PEACEFUL) {
|
||||
if(!par3World.isRemote)
|
||||
player.addChatMessage(new ChatComponentTranslation("botaniamisc.peacefulNoob").setChatStyle(new ChatStyle().setColor(EnumChatFormatting.RED)));
|
||||
@@ -896,4 +896,16 @@ public class EntityDoppleganger extends EntityCreature implements IBotaniaBossWi
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
public static class BeaconBeamComponent extends MultiblockComponent {
|
||||
|
||||
public BeaconBeamComponent(ChunkCoordinates relPos) {
|
||||
super(relPos, Blocks.beacon, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean matches(World world, int x, int y, int z) {
|
||||
return world.getTileEntity(x, y, z) instanceof TileEntityBeacon;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user