mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-17 10:55:17 +00:00
Consistentify whether GoG behaviours are enabled by a skyblock world or the GoG jar (all gameplay now only checks for the presence of the jar). Closes #2754
This commit is contained in:
1 parent
40a959fde1
commit
8f716c98f0
2 files changed
+5
-4
No files matched your search
@@ -31,12 +31,12 @@ import net.minecraftforge.fml.common.Optional;
|
||||
import net.minecraftforge.items.ItemHandlerHelper;
|
||||
import vazkii.botania.api.lexicon.ILexiconable;
|
||||
import vazkii.botania.api.lexicon.LexiconEntry;
|
||||
import vazkii.botania.common.Botania;
|
||||
import vazkii.botania.common.block.BlockMod;
|
||||
import vazkii.botania.common.block.tile.TileManaFlame;
|
||||
import vazkii.botania.common.item.ModItems;
|
||||
import vazkii.botania.common.lexicon.LexiconData;
|
||||
import vazkii.botania.common.lib.LibBlockNames;
|
||||
import vazkii.botania.common.world.WorldTypeSkyblock;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import java.util.Random;
|
||||
@@ -98,7 +98,7 @@ public class BlockManaFlame extends BlockMod implements ILexiconable {
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing s, float xs, float ys, float zs) {
|
||||
if(WorldTypeSkyblock.isWorldSkyblock(world)) {
|
||||
if(Botania.gardenOfGlassLoaded) {
|
||||
ItemStack stack = player.getHeldItem(hand);
|
||||
if(!stack.isEmpty() && stack.getItem() == Item.getItemFromBlock(Blocks.SAPLING) && !player.inventory.hasItemStack(new ItemStack(ModItems.lexicon))) {
|
||||
if(!world.isRemote) {
|
||||
|
||||
@@ -29,6 +29,7 @@ import net.minecraftforge.event.entity.player.PlayerInteractEvent;
|
||||
import net.minecraftforge.event.world.BlockEvent;
|
||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||
import net.minecraftforge.items.ItemHandlerHelper;
|
||||
import vazkii.botania.common.Botania;
|
||||
import vazkii.botania.common.block.ModBlocks;
|
||||
import vazkii.botania.common.block.tile.TileManaFlame;
|
||||
import vazkii.botania.common.item.ModItems;
|
||||
@@ -71,7 +72,7 @@ public final class SkyblockWorldEvents {
|
||||
|
||||
@SubscribeEvent
|
||||
public static void onPlayerInteract(PlayerInteractEvent.RightClickBlock event) {
|
||||
if(WorldTypeSkyblock.isWorldSkyblock(event.getWorld())) {
|
||||
if(Botania.gardenOfGlassLoaded) {
|
||||
ItemStack equipped = event.getItemStack();
|
||||
if(equipped.isEmpty() && event.getEntityPlayer().isSneaking()) {
|
||||
Block block = event.getWorld().getBlockState(event.getPos()).getBlock();
|
||||
@@ -112,7 +113,7 @@ public final class SkyblockWorldEvents {
|
||||
|
||||
@SubscribeEvent
|
||||
public static void onDrops(BlockEvent.HarvestDropsEvent event) {
|
||||
if(WorldTypeSkyblock.isWorldSkyblock(event.getWorld()) && event.getState().getBlock() == Blocks.TALLGRASS) {
|
||||
if(Botania.gardenOfGlassLoaded && event.getState().getBlock() == Blocks.TALLGRASS) {
|
||||
ItemStack stackToRemove = ItemStack.EMPTY;
|
||||
for(ItemStack stack : event.getDrops())
|
||||
if(stack.getItem() == Items.WHEAT_SEEDS && event.getWorld().rand.nextInt(4) == 0) {
|
||||
|
||||
Reference in new issue
Block a user