mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-19 19:59:36 +00:00
Merge 1.14, and clean up some unused AT entries.
This commit is contained in:
commit
2eb14c45eb
23 files changed
+211
-51
No files matched your search
@@ -1,5 +1,4 @@
|
||||
#
|
||||
#Fri Apr 03 19:23:05 CDT 2020
|
||||
version=r1.15
|
||||
dir_output=../Build Output/Botania/
|
||||
dir_repo=./
|
||||
|
||||
+60
-1
@@ -229,7 +229,7 @@ xenolicious=15
|
||||
cellmembrane=3
|
||||
mr_hacks101=shulk_me_not
|
||||
nerevardzn=9
|
||||
cosmicparticl=15
|
||||
cosmicparticl=rafflowsia
|
||||
hypnoticharry=2
|
||||
shawndaddy=4
|
||||
quaternary=6
|
||||
@@ -311,3 +311,62 @@ jalewis1990=manastar
|
||||
flarefolf=10
|
||||
24minecraftsam=9
|
||||
lewdc1na=15
|
||||
bryceio=14
|
||||
daveyx0=11
|
||||
drrk=11
|
||||
skyshayde=spectrolus
|
||||
softwerker=4
|
||||
uv_searching=1
|
||||
edacth=hydroangeas
|
||||
omgmypoppit=orechid
|
||||
satosha=6
|
||||
noobfortress=10
|
||||
jfkxc=fallenkanade
|
||||
neeko_iko=3
|
||||
artanis199=dandelifeon
|
||||
matthew_117=10
|
||||
nillermeddild=10
|
||||
dizzydizzyd=15
|
||||
thelucraft=5
|
||||
spectacular101=pollidisiac
|
||||
marvin=hopperhock_chibi
|
||||
bigal607=0
|
||||
the_shadow_=11
|
||||
traverse_joe=3
|
||||
talanist=loonium
|
||||
matthijsvdmeulen=3
|
||||
prototypep=manastar
|
||||
kingofaces2=fallenkanade
|
||||
antimuffn=2
|
||||
qsflay=14
|
||||
briguy64=kekimurus
|
||||
xnerbop596=0
|
||||
ssyl=15
|
||||
agnor99=munchdew
|
||||
sexbeine=13
|
||||
atomicmage=0
|
||||
dead_gyps=0
|
||||
samboy063=fallenkanade
|
||||
pha3l=11
|
||||
nuc1e4r5n4k3=2
|
||||
mirrorsound=shulk_me_not
|
||||
ivystar12=10
|
||||
sirjamu=6
|
||||
minimarm=6
|
||||
chupacaubrey=10
|
||||
kilofman=gourmaryllis
|
||||
daPorkchop_=4
|
||||
c4j3=fallenkanade
|
||||
tbk_iron=dreadthorne
|
||||
italicsjenga=15
|
||||
teendude=2
|
||||
eternalone=5
|
||||
gnomemaster42=daffomill
|
||||
retfar=11
|
||||
pabthelamb=4
|
||||
lotlahzii=2
|
||||
sterrywhals=14
|
||||
drklicker=11
|
||||
pieterv24=dandelifeon
|
||||
pilkae10=14
|
||||
blacbirdjr=0
|
||||
@@ -239,7 +239,7 @@ public class TileEntitySpecialFlower extends TileEntity implements ITickableTile
|
||||
/**
|
||||
* Called when this sub tile is placed in the world (by an entity).
|
||||
*/
|
||||
public void onBlockPlacedBy(World world, BlockPos pos, BlockState state, LivingEntity entity, ItemStack stack) {}
|
||||
public void onBlockPlacedBy(World world, BlockPos pos, BlockState state, @Nullable LivingEntity entity, ItemStack stack) {}
|
||||
|
||||
/**
|
||||
* Called when a player right clicks this sub tile.
|
||||
|
||||
@@ -36,6 +36,7 @@ import vazkii.botania.api.wand.IWandable;
|
||||
import vazkii.botania.common.block.tile.TileAnimatedTorch;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
public class BlockAnimatedTorch extends BlockMod implements IWandable, IManaTrigger, IHourglassTrigger, IWandHUD {
|
||||
|
||||
@@ -56,7 +57,7 @@ public class BlockAnimatedTorch extends BlockMod implements IWandable, IManaTrig
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockPlacedBy(World world, BlockPos pos, BlockState state, LivingEntity entity, ItemStack stack) {
|
||||
public void onBlockPlacedBy(World world, BlockPos pos, BlockState state, @Nullable LivingEntity entity, ItemStack stack) {
|
||||
((TileAnimatedTorch) world.getTileEntity(pos)).onPlace(entity);
|
||||
}
|
||||
|
||||
|
||||
@@ -28,7 +28,9 @@ import net.minecraft.world.IBlockReader;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.server.ServerWorld;
|
||||
|
||||
import vazkii.botania.client.fx.WispParticleData;
|
||||
import vazkii.botania.common.block.tile.TileCocoon;
|
||||
import vazkii.botania.common.item.ModItems;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
@@ -75,20 +77,27 @@ public class BlockCocoon extends BlockMod {
|
||||
TileCocoon cocoon = (TileCocoon) world.getTileEntity(pos);
|
||||
Item item = stack.getItem();
|
||||
|
||||
if (cocoon != null && (item == Items.EMERALD || item == Items.CHORUS_FRUIT)) {
|
||||
if (!world.isRemote) {
|
||||
if (item == Items.EMERALD && cocoon.emeraldsGiven < TileCocoon.MAX_EMERALDS) {
|
||||
if (!creative) {
|
||||
if(cocoon != null && (item == Items.EMERALD || item == Items.CHORUS_FRUIT || item == ModItems.lifeEssence)) {
|
||||
if(!world.isRemote) {
|
||||
if(item == Items.EMERALD && cocoon.emeraldsGiven < TileCocoon.MAX_EMERALDS) {
|
||||
if(!creative) {
|
||||
stack.shrink(1);
|
||||
}
|
||||
cocoon.emeraldsGiven++;
|
||||
((ServerWorld) world).spawnParticle(ParticleTypes.HAPPY_VILLAGER, pos.getX() + 0.5, pos.getY() + 1, pos.getZ() + 0.5, 1, 0, 0, 0, 0.5);
|
||||
} else if (item == Items.CHORUS_FRUIT && cocoon.chorusFruitGiven < TileCocoon.MAX_CHORUS_FRUITS) {
|
||||
if (!creative) {
|
||||
((ServerWorld) world).spawnParticle(ParticleTypes.HAPPY_VILLAGER, pos.getX() + 0.5, pos.getY() + 1, pos.getZ() + 0.5, 1, 0.1, 0.05, 0.1, 0.5);
|
||||
} else if(item == Items.CHORUS_FRUIT && cocoon.chorusFruitGiven < TileCocoon.MAX_CHORUS_FRUITS) {
|
||||
if(!creative) {
|
||||
stack.shrink(1);
|
||||
}
|
||||
cocoon.chorusFruitGiven++;
|
||||
((ServerWorld) world).spawnParticle(ParticleTypes.PORTAL, pos.getX() + 0.5, pos.getY(), pos.getZ() + 0.5, 32, 0, 0, 0, 0.5);
|
||||
} else if (item == ModItems.lifeEssence && !cocoon.gaiaSpiritGiven) {
|
||||
if(!creative) {
|
||||
stack.shrink(1);
|
||||
}
|
||||
cocoon.forceRare();
|
||||
WispParticleData data = WispParticleData.wisp(0.6F, 0F, 1F, 0F);
|
||||
((ServerWorld) world).spawnParticle(data, pos.getX() + 0.5, pos.getY() + 0.7, pos.getZ() + 0.5, 8, 0.1, 0.1, 0.1, 0.04);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ import vazkii.botania.api.wand.IWandable;
|
||||
import vazkii.botania.common.block.decor.BlockFloatingFlower;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
import java.util.function.Supplier;
|
||||
@@ -100,7 +100,7 @@ public class BlockFloatingSpecialFlower extends BlockFloatingFlower implements I
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockPlacedBy(World world, BlockPos pos, BlockState state, LivingEntity entity, ItemStack stack) {
|
||||
public void onBlockPlacedBy(World world, BlockPos pos, BlockState state, @Nullable LivingEntity entity, ItemStack stack) {
|
||||
((TileEntitySpecialFlower) world.getTileEntity(pos)).onBlockPlacedBy(world, pos, state, entity, stack);
|
||||
}
|
||||
|
||||
|
||||
@@ -45,6 +45,7 @@ import net.minecraftforge.fml.server.ServerLifecycleHooks;
|
||||
import vazkii.botania.api.wand.IWandable;
|
||||
import vazkii.botania.common.core.handler.ModSounds;
|
||||
import vazkii.botania.common.item.ItemTwigWand;
|
||||
import vazkii.botania.common.item.lens.LensPiston;
|
||||
import vazkii.botania.common.network.PacketBotaniaEffect;
|
||||
import vazkii.botania.common.network.PacketHandler;
|
||||
|
||||
@@ -237,7 +238,7 @@ public class BlockPistonRelay extends BlockMod implements IWandable {
|
||||
Material destMat = world.getBlockState(destPos.offset(dir)).getMaterial();
|
||||
if (world.isAirBlock(destPos.offset(dir)) || destMat.isReplaceable()) {
|
||||
world.setBlockState(destPos, Blocks.AIR.getDefaultState());
|
||||
world.setBlockState(destPos.offset(dir), srcState);
|
||||
world.setBlockState(destPos.offset(dir), LensPiston.unWaterlog(srcState));
|
||||
data.mapping.put(s.getPos(), destPos.offset(dir));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ import vazkii.botania.api.wand.IWandHUD;
|
||||
import vazkii.botania.api.wand.IWandable;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.List;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
@@ -131,7 +131,7 @@ public class BlockSpecialFlower extends FlowerBlock implements IWandable, IWandH
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockPlacedBy(World world, BlockPos pos, BlockState state, LivingEntity entity, ItemStack stack) {
|
||||
public void onBlockPlacedBy(World world, BlockPos pos, BlockState state, @Nullable LivingEntity entity, ItemStack stack) {
|
||||
((TileEntitySpecialFlower) world.getTileEntity(pos)).onBlockPlacedBy(world, pos, state, entity, stack);
|
||||
}
|
||||
|
||||
|
||||
@@ -37,6 +37,7 @@ import vazkii.botania.common.block.tile.TileTinyPotato;
|
||||
import vazkii.botania.common.core.helper.InventoryHelper;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
public class BlockTinyPotato extends BlockMod {
|
||||
|
||||
@@ -87,7 +88,7 @@ public class BlockTinyPotato extends BlockMod {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockPlacedBy(World world, BlockPos pos, BlockState state, LivingEntity entity, ItemStack stack) {
|
||||
public void onBlockPlacedBy(World world, BlockPos pos, BlockState state, @Nullable LivingEntity living, ItemStack stack) {
|
||||
if (stack.hasDisplayName()) {
|
||||
((TileTinyPotato) world.getTileEntity(pos)).name = stack.getDisplayName();
|
||||
}
|
||||
|
||||
@@ -44,6 +44,7 @@ import vazkii.botania.common.core.helper.InventoryHelper;
|
||||
import vazkii.botania.common.item.ModItems;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -94,8 +95,8 @@ public class BlockSpreader extends BlockMod implements IWandable, IWandHUD, IWir
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockPlacedBy(World world, BlockPos pos, BlockState state, LivingEntity placer, ItemStack stack) {
|
||||
Direction orientation = Direction.getFacingDirections(placer)[0].getOpposite();
|
||||
public void onBlockPlacedBy(World world, BlockPos pos, BlockState state, @Nullable LivingEntity placer, ItemStack stack) {
|
||||
Direction orientation = placer == null ? Direction.WEST : Direction.getFacingDirections(placer)[0].getOpposite();
|
||||
TileSpreader spreader = (TileSpreader) world.getTileEntity(pos);
|
||||
|
||||
switch (orientation) {
|
||||
@@ -113,7 +114,7 @@ public class BlockSpreader extends BlockMod implements IWandable, IWandHUD, IWir
|
||||
break;
|
||||
case WEST:
|
||||
break;
|
||||
default:
|
||||
case EAST:
|
||||
spreader.rotationX = 180F;
|
||||
break;
|
||||
}
|
||||
|
||||
+5
@@ -149,6 +149,11 @@ public class BergamuteEventHandler {
|
||||
return compose.getZ();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canBeSilent() {
|
||||
return compose.canBeSilent();
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public AttenuationType getAttenuationType() {
|
||||
|
||||
@@ -27,6 +27,7 @@ import vazkii.botania.common.block.ModBlocks;
|
||||
import vazkii.botania.common.lib.LibBlockNames;
|
||||
import vazkii.botania.common.lib.LibMisc;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.Arrays;
|
||||
|
||||
public class TileAnimatedTorch extends TileMod implements ITickableTileEntity {
|
||||
@@ -76,8 +77,8 @@ public class TileAnimatedTorch extends TileMod implements ITickableTileEntity {
|
||||
}
|
||||
}
|
||||
|
||||
public void onPlace(LivingEntity entity) {
|
||||
if (entity != null) {
|
||||
public void onPlace(@Nullable LivingEntity entity) {
|
||||
if(entity != null) {
|
||||
side = Arrays.asList(SIDES).indexOf(entity.getHorizontalFacing().getOpposite());
|
||||
}
|
||||
world.notifyNeighborsOfStateChange(getPos().offset(SIDES[side].getOpposite()), getBlockState().getBlock());
|
||||
|
||||
@@ -37,6 +37,8 @@ public class TileCocoon extends TileMod implements ITickableTileEntity {
|
||||
private static final String TAG_TIME_PASSED = "timePassed";
|
||||
private static final String TAG_EMERALDS_GIVEN = "emeraldsGiven";
|
||||
private static final String TAG_CHORUS_FRUIT_GIVEN = "chorusFruitGiven";
|
||||
private static final String TAG_GAIA_SPIRIT_GIVEN = "gaiaSpiritGiven";
|
||||
|
||||
private static final List<EntityType<? extends MobEntity>> SPECIALS = ImmutableList.of(
|
||||
EntityType.HORSE, EntityType.DONKEY, EntityType.WOLF, EntityType.OCELOT,
|
||||
EntityType.CAT, EntityType.PARROT, EntityType.LLAMA, EntityType.FOX,
|
||||
@@ -57,6 +59,7 @@ public class TileCocoon extends TileMod implements ITickableTileEntity {
|
||||
public int timePassed;
|
||||
public int emeraldsGiven;
|
||||
public int chorusFruitGiven;
|
||||
public boolean gaiaSpiritGiven;
|
||||
|
||||
public TileCocoon() {
|
||||
super(TYPE);
|
||||
@@ -77,6 +80,7 @@ public class TileCocoon extends TileMod implements ITickableTileEntity {
|
||||
|
||||
MobEntity entity = null;
|
||||
BlockPos placePos = pos;
|
||||
float rareChance = gaiaSpiritGiven ? 1F : SPECIAL_CHANCE;
|
||||
|
||||
float villagerChance = Math.min(1F, (float) emeraldsGiven / (float) MAX_EMERALDS);
|
||||
float shulkerChance = Math.min(1F, (float) chorusFruitGiven / (float) MAX_CHORUS_FRUITS);
|
||||
@@ -103,13 +107,13 @@ public class TileCocoon extends TileMod implements ITickableTileEntity {
|
||||
entity = villager;
|
||||
} else if (!validWater.isEmpty()) {
|
||||
placePos = validWater.get(world.rand.nextInt(validWater.size()));
|
||||
if (Math.random() < SPECIAL_CHANCE) {
|
||||
if (Math.random() < rareChance) {
|
||||
entity = EntityType.DOLPHIN.create(world);
|
||||
} else {
|
||||
entity = AQUATIC.get(world.rand.nextInt(AQUATIC.size())).create(world);
|
||||
}
|
||||
} else {
|
||||
if (Math.random() < SPECIAL_CHANCE) {
|
||||
if(Math.random() < rareChance) {
|
||||
entity = SPECIALS.get(world.rand.nextInt(SPECIALS.size())).create(world);
|
||||
} else {
|
||||
EntityType<? extends MobEntity> type = NORMALS.get(world.rand.nextInt(NORMALS.size()));
|
||||
@@ -133,11 +137,17 @@ public class TileCocoon extends TileMod implements ITickableTileEntity {
|
||||
}
|
||||
}
|
||||
|
||||
public void forceRare() {
|
||||
gaiaSpiritGiven = true;
|
||||
timePassed = Math.min(timePassed, TOTAL_TIME / 3);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writePacketNBT(CompoundNBT cmp) {
|
||||
cmp.putInt(TAG_TIME_PASSED, timePassed);
|
||||
cmp.putInt(TAG_EMERALDS_GIVEN, emeraldsGiven);
|
||||
cmp.putInt(TAG_CHORUS_FRUIT_GIVEN, chorusFruitGiven);
|
||||
cmp.putBoolean(TAG_GAIA_SPIRIT_GIVEN, gaiaSpiritGiven);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -145,6 +155,6 @@ public class TileCocoon extends TileMod implements ITickableTileEntity {
|
||||
timePassed = cmp.getInt(TAG_TIME_PASSED);
|
||||
emeraldsGiven = cmp.getInt(TAG_EMERALDS_GIVEN);
|
||||
chorusFruitGiven = cmp.getInt(TAG_CHORUS_FRUIT_GIVEN);
|
||||
gaiaSpiritGiven = cmp.getBoolean(TAG_GAIA_SPIRIT_GIVEN);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -8,17 +8,20 @@
|
||||
*/
|
||||
package vazkii.botania.common.core.helper;
|
||||
|
||||
import com.mojang.datafixers.util.Pair;
|
||||
import net.minecraft.advancements.Advancement;
|
||||
import net.minecraft.advancements.AdvancementManager;
|
||||
import net.minecraft.advancements.PlayerAdvancements;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.entity.player.ServerPlayerEntity;
|
||||
import net.minecraft.item.BlockItemUseContext;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.ItemUseContext;
|
||||
import net.minecraft.util.ActionResultType;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.BlockRayTraceResult;
|
||||
|
||||
import java.util.function.Predicate;
|
||||
@@ -115,13 +118,19 @@ public final class PlayerHelper {
|
||||
}
|
||||
}
|
||||
|
||||
public static ActionResultType substituteUse(ItemUseContext ctx, ItemStack toUse) {
|
||||
return substituteUseTrackPos(ctx, toUse).getFirst();
|
||||
}
|
||||
|
||||
/**
|
||||
* Temporarily swap <code>toUse</code> into the hand of the player, use it, then swap it back out.
|
||||
* This is to ensure that any code in mods' onItemUse that relies on player.getHeldItem(ctx.hand) == ctx.stack
|
||||
* will work as intended.
|
||||
* Properly handles null players, as long as the Item's onItemUse also handles them.
|
||||
* @return The usage result, as well as a properly offset block position pointing at where the block was placed
|
||||
* (if the item was a BlockItem)
|
||||
*/
|
||||
public static ActionResultType substituteUse(ItemUseContext ctx, ItemStack toUse) {
|
||||
public static Pair<ActionResultType, BlockPos> substituteUseTrackPos(ItemUseContext ctx, ItemStack toUse) {
|
||||
ItemStack save = ItemStack.EMPTY;
|
||||
BlockRayTraceResult hit = new BlockRayTraceResult(ctx.getHitVec(), ctx.getFace(), ctx.getPos(), ctx.isInside());
|
||||
ItemUseContext newCtx;
|
||||
@@ -135,13 +144,15 @@ public final class PlayerHelper {
|
||||
newCtx = new ItemUseContext(ctx.getWorld(), null, ctx.getHand(), toUse, hit);
|
||||
}
|
||||
|
||||
BlockPos finalPos = new BlockItemUseContext(newCtx).getPos();
|
||||
|
||||
ActionResultType result = toUse.onItemUse(newCtx);
|
||||
|
||||
if (ctx.getPlayer() != null) {
|
||||
ctx.getPlayer().setHeldItem(ctx.getHand(), save);
|
||||
}
|
||||
|
||||
return result;
|
||||
return Pair.of(result, finalPos);
|
||||
}
|
||||
|
||||
private PlayerHelper() {}
|
||||
|
||||
@@ -598,7 +598,7 @@ public class EntityDoppleganger extends MobEntity implements IEntityAdditionalSp
|
||||
|
||||
private void clearPotions(PlayerEntity player) {
|
||||
List<Effect> potionsToRemove = player.getActivePotionEffects().stream()
|
||||
.filter(effect -> effect.getDuration() < 160 && effect.isAmbient() && effect.getPotion().type != EffectType.HARMFUL)
|
||||
.filter(effect -> effect.getDuration() < 160 && effect.isAmbient() && effect.getPotion().getEffectType() != EffectType.HARMFUL)
|
||||
.map(EffectInstance::getPotion)
|
||||
.distinct()
|
||||
.collect(Collectors.toList());
|
||||
|
||||
@@ -23,6 +23,7 @@ import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.nbt.NBTUtil;
|
||||
import net.minecraft.particles.BlockParticleData;
|
||||
import net.minecraft.particles.ParticleTypes;
|
||||
import net.minecraft.state.properties.BlockStateProperties;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ActionResultType;
|
||||
import net.minecraft.util.NonNullList;
|
||||
@@ -156,7 +157,8 @@ public class ItemLaputaShard extends Item implements ILensEffect, ITinyPlanetExc
|
||||
TileEntity newTile = block.createTileEntity(state, world);
|
||||
world.setTileEntity(pos_, newTile);
|
||||
}
|
||||
world.destroyBlock(pos_, false);
|
||||
world.playEvent(2001, pos_, Block.getStateId(state));
|
||||
world.setBlockState(pos_, Blocks.AIR.getDefaultState());
|
||||
|
||||
ItemStack copyLens = new ItemStack(this);
|
||||
copyLens.getOrCreateTag().putInt(TAG_LEVEL, getShardLevel(shard));
|
||||
@@ -260,6 +262,10 @@ public class ItemLaputaShard extends Item implements ILensEffect, ITinyPlanetExc
|
||||
state = NBTUtil.readBlockState(lens.getTag().getCompound(TAG_STATE));
|
||||
}
|
||||
|
||||
if (entity.world.getDimension().doesWaterVaporize() && state.has(BlockStateProperties.WATERLOGGED)) {
|
||||
state = state.with(BlockStateProperties.WATERLOGGED, false);
|
||||
}
|
||||
|
||||
TileEntity tile = null;
|
||||
CompoundNBT tilecmp = ItemNBTHelper.getCompound(lens, TAG_TILE, false);
|
||||
if (tilecmp.contains("id")) {
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
*/
|
||||
package vazkii.botania.common.item;
|
||||
|
||||
import com.mojang.datafixers.util.Pair;
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.client.util.ITooltipFlag;
|
||||
import net.minecraft.entity.EntityType;
|
||||
@@ -17,6 +18,7 @@ import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.ItemUseContext;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.tileentity.MobSpawnerTileEntity;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ActionResultType;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
@@ -90,12 +92,11 @@ public class ItemSpawnerMover extends Item {
|
||||
|
||||
private ActionResultType placeSpawner(ItemUseContext ctx) {
|
||||
ItemStack useStack = new ItemStack(Blocks.SPAWNER);
|
||||
useStack.getOrCreateTag().put("BlockEntityTag", ctx.getItem().getChildTag(TAG_SPAWNER));
|
||||
ActionResultType res = PlayerHelper.substituteUse(ctx, useStack);
|
||||
Pair<ActionResultType, BlockPos> res = PlayerHelper.substituteUseTrackPos(ctx, useStack);
|
||||
|
||||
if (res == ActionResultType.SUCCESS) {
|
||||
if(res.getFirst() == ActionResultType.SUCCESS) {
|
||||
World world = ctx.getWorld();
|
||||
BlockPos pos = ctx.getPos();
|
||||
BlockPos pos = res.getSecond();
|
||||
ItemStack mover = ctx.getItem();
|
||||
|
||||
if (!world.isRemote) {
|
||||
@@ -103,6 +104,15 @@ public class ItemSpawnerMover extends Item {
|
||||
ctx.getPlayer().sendBreakAnimation(ctx.getHand());
|
||||
}
|
||||
mover.shrink(1);
|
||||
|
||||
TileEntity te = world.getTileEntity(pos);
|
||||
if (te instanceof MobSpawnerTileEntity) {
|
||||
CompoundNBT spawnerTag = ctx.getItem().getChildTag(TAG_SPAWNER).copy();
|
||||
spawnerTag.putInt("x", pos.getX());
|
||||
spawnerTag.putInt("y", pos.getY());
|
||||
spawnerTag.putInt("z", pos.getZ());
|
||||
te.read(spawnerTag);
|
||||
}
|
||||
} else {
|
||||
for (int i = 0; i < 100; i++) {
|
||||
SparkleParticleData data = SparkleParticleData.sparkle(0.45F + 0.2F * (float) Math.random(), (float) Math.random(), (float) Math.random(), (float) Math.random(), 6);
|
||||
@@ -111,7 +121,7 @@ public class ItemSpawnerMover extends Item {
|
||||
}
|
||||
}
|
||||
|
||||
return res;
|
||||
return res.getFirst();
|
||||
}
|
||||
|
||||
private boolean captureSpawner(ItemUseContext ctx) {
|
||||
|
||||
@@ -8,11 +8,13 @@
|
||||
*/
|
||||
package vazkii.botania.common.item.lens;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.block.material.PushReaction;
|
||||
import net.minecraft.entity.projectile.ThrowableEntity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.state.properties.BlockStateProperties;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.BlockRayTraceResult;
|
||||
@@ -39,8 +41,9 @@ public class LensPiston extends Lens {
|
||||
|
||||
if (state.getPushReaction() == PushReaction.NORMAL && state.getBlock() != Blocks.OBSIDIAN
|
||||
&& state.getBlockHardness(entity.world, pos_) >= 0 && tile == null) {
|
||||
entity.world.destroyBlock(rtr.getPos(), false);
|
||||
entity.world.setBlockState(pos_, state);
|
||||
entity.world.playEvent(2001, rtr.getPos(), Block.getStateId(state));
|
||||
entity.world.setBlockState(rtr.getPos(), Blocks.AIR.getDefaultState());
|
||||
entity.world.setBlockState(pos_, unWaterlog(state));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -49,4 +52,12 @@ public class LensPiston extends Lens {
|
||||
return dead;
|
||||
}
|
||||
|
||||
public static BlockState unWaterlog(BlockState state) {
|
||||
if (state.has(BlockStateProperties.WATERLOGGED)) {
|
||||
return state.with(BlockStateProperties.WATERLOGGED, false);
|
||||
} else {
|
||||
return state;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,7 +1,3 @@
|
||||
public net.minecraft.client.renderer.entity.EntityRendererManager field_78725_b # renderPosX
|
||||
public net.minecraft.client.renderer.entity.EntityRendererManager field_78726_c # renderPosY
|
||||
public net.minecraft.client.renderer.entity.EntityRendererManager field_78723_d # renderPosZ
|
||||
|
||||
public net.minecraft.client.renderer.WorldRenderer field_72772_v # starGLCallList
|
||||
public net.minecraft.client.renderer.WorldRenderer field_175013_s # starVBO
|
||||
public net.minecraft.client.renderer.WorldRenderer field_72771_w # glSkyList
|
||||
@@ -33,12 +29,8 @@ public net.minecraft.world.spawner.AbstractSpawner field_98284_d # prevMobRotati
|
||||
public net.minecraft.world.spawner.AbstractSpawner field_98287_c # mobRotation
|
||||
public net.minecraft.world.spawner.AbstractSpawner field_98282_f # spawnData
|
||||
|
||||
public net.minecraft.client.gui.screen.ChatScreen field_146415_a # inputField
|
||||
|
||||
public net.minecraft.advancements.CriteriaTriggers func_192118_a(Lnet/minecraft/advancements/ICriterionTrigger;)Lnet/minecraft/advancements/ICriterionTrigger; # register
|
||||
|
||||
public net.minecraft.client.multiplayer.ClientAdvancementManager field_192803_d # advancementToProgress
|
||||
|
||||
public net.minecraft.item.DyeColor field_193351_w # colorValue
|
||||
|
||||
public net.minecraft.entity.MobEntity field_184659_bA # deathLootTable
|
||||
@@ -51,8 +43,6 @@ public net.minecraft.client.renderer.model.ItemOverrideList field_209582_c # ove
|
||||
|
||||
public net.minecraft.item.Item func_219968_a(Lnet/minecraft/world/World;Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/util/math/RayTraceContext$FluidMode;)Lnet/minecraft/util/math/RayTraceResult; # rayTrace
|
||||
|
||||
public net.minecraft.potion.Effect field_220305_b # type
|
||||
|
||||
public net.minecraft.entity.ai.goal.GoalSelector field_220892_d # goals
|
||||
|
||||
public net.minecraft.tileentity.AbstractFurnaceTileEntity field_214018_j # burnTime
|
||||
@@ -61,4 +51,4 @@ public net.minecraft.tileentity.AbstractFurnaceTileEntity field_214020_l # cookT
|
||||
|
||||
public net.minecraft.item.crafting.RecipeManager func_215366_a(Lnet/minecraft/item/crafting/IRecipeType;)Ljava/util/Map; # getRecipes
|
||||
|
||||
public net.minecraft.client.renderer.BlockModelRenderer func_178264_a(FFFFLjava/util/List;)V # renderModelBrightnessColorQuads
|
||||
public net.minecraft.client.renderer.BlockModelRenderer func_178264_a(FFFFLjava/util/List;)V # renderModelBrightnessColorQuads
|
||||
@@ -2435,7 +2435,7 @@
|
||||
"botania.entry.cocoon": "Cocoon of Caprice",
|
||||
"botania.tagline.cocoon": "Hatch your own animals",
|
||||
"botania.page.cocoon0": "A cocoon is a symbol of change, of evolution.$(p)A $(item)Cocoon of Caprice$(0), when placed, will slowly evolve the rudimentary bits of life inside into a $(item)Baby Animal$(0). More often than not, the cocoon will hatch into a farm animal, but on rare occasions, different animals such as $(item)Wolves$(0) or $(item)Horses$(0) can be created.",
|
||||
"botania.page.cocoon1": "A cocoon near water seems to create aquatic animals instead.$(p)Rumor has it that giving a cocoon $(item)Emeralds$(0) or $(item)Chorus Fruit$(0) will influence its outcome towards something... different. What such experiments would yield is anyone's guess, really.$(p)(Giving a cocoon an item can be done via right-click or by simply tossing the item.)",
|
||||
"botania.page.cocoon1": "A cocoon near water seems to create aquatic animals instead.$(p)Rumor has it that giving a cocoon $(item)Emeralds$(0), $(item)Chorus Fruit$(0), or a certain $(l:alfhomancy/gaia_ritual)$(item)otherworldly essence$(0)$(/l) will influence its outcome towards something... different. What such experiments would yield is anyone's guess, really.$(p)(Giving a cocoon an item can be done via right-click or by simply tossing the item.)",
|
||||
"botania.page.cocoon2": "New World, Perfect World",
|
||||
|
||||
"botania.entry.manaBomb": "Manastorm Charge",
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
r1.11-377
|
||||
r1.11-379
|
||||
@@ -1,3 +1,47 @@
|
||||
r1.11 379
|
||||
* This is the final build for 1.14.x. See you in 1.15.2 very soon!
|
||||
* Add additional checks so that crashes unrelated to Botania don't blame Botania
|
||||
* Fix dyeing fabulous pools not adjusting the color
|
||||
* Dispensers can now use the Wand of the Forest's sneak right click actions, consult the lexicon for more. (eutropius225)
|
||||
* Runic Altar and Petal Apothecary fast-recraft no longer consumes items in creative mode
|
||||
* Fix mana tablet recipe not accepting mana pearls
|
||||
* Fix bifrost pane being unbreakable
|
||||
* Fix floating endoflame recipe being missing
|
||||
* Fix entropinnyum accepting TNT resting in waterlogged blocks
|
||||
* Fix mana clip attachment destroying lenses
|
||||
* Fix Resolute Ivy not working on curios
|
||||
* Fix crash when a minecart that is Spectral Rail boosted lands directly on another Spectral Rail then runs into a normal rail
|
||||
* Items that generate mana and provide it to other items in inventory only do so serverside. May fix some desyncs.
|
||||
* Remove "Status Unknown". The current mana levels of all blocks now automatically update.
|
||||
* Cocoons can now be forced to spawn rare mobs using Gaia Spirits
|
||||
* Fix rannuncarpus crashing when placing certain blocks
|
||||
* Fix some mechanisms like the Force Relay/Lens allowing you to move waterlogged blocks
|
||||
* Fix minecart sounds being silent when Botania is installed
|
||||
* Fix Life Aggregator not placing down spawners correctly
|
||||
r1.11 378
|
||||
* Fix narslimmus eating spawner-spawned slimes
|
||||
* Fix exoflames trying to smelt unsmeltable items in some cases
|
||||
* Hydroangeas now show a durability bar for their decay time
|
||||
* Fix agricarnation not speeding up sweet berries and bamboo
|
||||
* Fix a crash in the Platforms
|
||||
* Cocoon-spawned entities no longer despawn
|
||||
* Fix Loki Ring being completely broken. There are still some edge-cases left but it should work mostly.
|
||||
* Loki Ring grid now keeps the center position highlighted in bold for consistency with the building phase
|
||||
* Replace slots in the Trinket Case texture with a player render (what else would I put there?)
|
||||
* (Internal) Move recipe jsons to data generator
|
||||
* Remove old Thaumcraft recipes and integration pages (F to pay respects)
|
||||
* Fix Rod of Plentiful Mantle showing same color particles for all ores
|
||||
* Add temporary recipes so the Botania banner patterns are accessible again
|
||||
* Azulejo can now be crafted with any blue dye
|
||||
* New Advancement - Hand in Hand - place over 255 blocks at once with a ring of loki
|
||||
* New Hidden Advancement - That's Why I Baked Bread. Try to figure this one out! It shouldn't be very hard if you know the Botania memes.
|
||||
* Fix non-English advancement names being broken
|
||||
* Remove a bunch of dead lang entries
|
||||
* Fix a bunch of animations stopping and/or jittering when the pause menu is open (even on servers)
|
||||
* Fix force relays not moving properly when retracted indirectly using slime blocks
|
||||
* Fix at least one known case of the "chunk loses all light" vanilla bug happening
|
||||
* Lexicon typo fixes and tweaks (Alwinfy)
|
||||
* Temporary fix for force relays in non-overworld dimensions not saving
|
||||
r1.11 377
|
||||
* Fix cell blocks not respecting red string spoofers
|
||||
* Potential fix for lighting issues. Please reset/relight any affected areas and continue monitoring.
|
||||
|
||||
+3
-2
@@ -321,6 +321,7 @@ r1.11-374=1.14.4
|
||||
r1.11-375=1.14.4
|
||||
r1.11-376=1.14.4
|
||||
r1.11-377=1.14.4
|
||||
r1.11-379=1.15.2
|
||||
r1.11-378=1.14.4
|
||||
r1.11-379=1.14.4
|
||||
r1.15-380=1.15.2
|
||||
r1.15-381=1.15.2
|
||||
r1.15-381=1.15.2
|
||||
Reference in new issue
Block a user