cleanups, add some vanilla tags

This commit is contained in:
Vincent Lee committed 2019-08-04 10:45:33 -07:00
1 parent f671faf20a
commit fb2cac4bf0
9 files changed
+50 -80

No files matched your search

@@ -57,7 +57,24 @@ public class BlockModFlower extends FlowerBlock implements ILexiconable, IGrowab
}
private static Effect effectForFlower(DyeColor color) {
// todo 1.14
switch (color) {
case WHITE: return Effects.SPEED;
case ORANGE: return Effects.FIRE_RESISTANCE;
case MAGENTA: return Effects.MINING_FATIGUE;
case LIGHT_BLUE: return Effects.JUMP_BOOST;
case YELLOW: return Effects.ABSORPTION;
case LIME: return Effects.POISON;
case PINK: return Effects.REGENERATION;
case GRAY: return Effects.RESISTANCE;
case LIGHT_GRAY: return Effects.WEAKNESS;
case CYAN: return Effects.WATER_BREATHING;
case PURPLE: return Effects.NAUSEA;
case BLUE: return Effects.NIGHT_VISION;
case BROWN: return Effects.WITHER;
case GREEN: return Effects.HUNGER;
case RED: return Effects.STRENGTH;
case BLACK: return Effects.BLINDNESS;
}
return Effects.REGENERATION;
}
@@ -54,7 +54,7 @@ public class BlockSpecialFlower extends FlowerBlock implements ISpecialFlower, I
private final Supplier<? extends TileEntitySpecialFlower> teProvider;
protected BlockSpecialFlower(Properties props, Supplier<? extends TileEntitySpecialFlower> teProvider) {
super(Effects.REGENERATION, 1, props); // todo 1.14 choose potion effects
super(Effects.SPEED, 4, props);
this.teProvider = teProvider;
}
@@ -86,9 +86,8 @@ public class ItemDivaCharm extends ItemBauble implements IManaUsingItem {
}
};
// Have to delay a tick because setAttackTarget(player) is called *after* the event fires, and we want to get rid of that
// addScheduledTask runs the lambda immediately if on the main thread, hence this trickery
// todo 1.14 make sure this still works
// Delay until end of tick because setAttackTarget(player) is called *after* this event fires, but
// we want to overwrite it
MinecraftServer server = ServerLifecycleHooks.getCurrentServer();
server.enqueue(new TickDelayedTask(server.getTickCounter(), lambda));
}
@@ -1,68 +0,0 @@
/**
* This class was created by <Vazkii>. It's distributed as
* part of the Botania Mod. Get the Source Code in github:
* https://github.com/Vazkii/Botania
*
* Botania is Open Source and distributed under the
* Botania License: http://botaniamod.net/license.php
*
* File Created @ [Jan 28, 2015, 4:44:34 PM (GMT)]
*/
package vazkii.botania.common.lib;
// todo update with advancement names and unhardcode the advancement names from where they currently are
public final class LibAchievementNames {
public static final String FLOWER_PICKUP = "flowerPickup";
public static final String LEXICON_USE = "lexiconUse";
public static final String DAYBLOOM_PICKUP = "daybloomPickup";
public static final String MANA_POOL_PICKUP = "manaPoolPickup";
public static final String ENDOFLAME_PICKUP = "endoflamePickup";
public static final String TINY_POTATO_PET = "tinyPotatoPet";
public static final String SPARK_CRAFT = "sparkCraft";
public static final String BAUBLE_WEAR = "baubleWear";
public static final String MANA_COOKIE_EAT = "manaCookieEat";
public static final String RUNE_PICKUP = "runePickup";
public static final String MANA_BLASTER_SHOOT = "manaBlasterShoot";
public static final String TIARA_WINGS = "tiaraWings";
public static final String TERRASTEEL_PICKUP = "terrasteelPickup";
public static final String ELF_PORTAL_OPEN = "elfPortalOpen";
public static final String GAIA_GUARDIAN_KILL = "gaiaGuardianKill";
public static final String TERRASTEEL_WEAPON_CRAFT = "terrasteelWeaponCraft";
public static final String KEKIMURUS_PICKUP = "kekimurusPickup";
public static final String HEISEI_DREAM_PICKUP = "heiseiDreamPickup";
public static final String DIRT_ROD_CRAFT = "dirtRodCraft";
public static final String SPAWNER_MOVER_USE = "spawnerMoverUse";
public static final String ENDER_AIR_MAKE = "enderAirMake";
public static final String CORPOREA_CRAFT = "corporeaCraft";
public static final String CACOPHONIUM_CRAFT = "cacophoniumCraft";
public static final String MANA_CART_CRAFT = "manaCartCraft";
public static final String CRAFTING_HALO_CRAFT = "craftingHaloCraft";
public static final String MANAWEAVE_ARMOR_CRAFT = "manaweaveArmorCraft";
public static final String ENCHANTER_MAKE = "enchanterMake";
public static final String POLLIDISIAC_PICKUP = "pollidisiacPickup";
public static final String BREW_PICKUP = "brewPickup";
public static final String TERRAFORM_ROD_CRAFT = "terraformRodCraft";
public static final String BUBBELL_PICKUP = "bubbellPickup";
public static final String LUMINIZER_RIDE = "luminizerRide";
public static final String MANA_BOMB_IGNITE = "manaBombIgnite";
public static final String DANDELIFEON_PICKUP = "dandelifeonPickup";
public static final String SIGNAL_FLARE_STUN = "signalFlareStun";
public static final String L20_SHARD_USE = "l20ShardUse";
public static final String GAIA_GUARDIAN_NO_ARMOR = "gaiaGuardianNoArmor";
public static final String RANK_SS_PICK = "rankSSPick";
public static final String SUPER_CORPOREA_REQUEST = "superCorporeaRequest";
public static final String PINKINATOR = "pinkinator";
public static final String RELIC_INFINITE_FRUIT = "infiniteFruit";
public static final String RELIC_KING_KEY = "kingKey";
public static final String RELIC_FLUGEL_EYE = "flugelEye";
public static final String RELIC_THOR_RING = "thorRing";
public static final String RELIC_ODIN_RING = "odinRing";
public static final String RELIC_LOKI_RING = "lokiRing";
public static final String NULL_FLOWER = "nullFlower";
public static final String DESU_GUN = "desuGun";
}
@@ -44,13 +44,9 @@ public final class PacketHandler {
if(world instanceof ServerWorld) {
ServerWorld ws = (ServerWorld) world;
// todo 1.14 this sends duplicates
for (ServerPlayerEntity playerMP : ws.getPlayers()) {
if (playerMP.getDistanceSq(pos.getX(), pos.getY(), pos.getZ()) < 64 * 64) {
HANDLER.send(PacketDistributor.TRACKING_CHUNK.with(() -> world.getChunkAt(pos)), toSend);
}
}
ws.getChunkProvider().chunkManager.getTrackingPlayers(new ChunkPos(pos), false)
.filter(p -> p.getDistanceSq(pos.getX(), pos.getY(), pos.getZ()) < 64 * 64)
.forEach(p -> HANDLER.send(PacketDistributor.PLAYER.with(() -> p), toSend));
}
}