Compare commits

..

12 Commits

Author SHA1 Message Date
Electroblob77 807fc61541 Merge branch '1.12.2' of https://github.com/Electroblob77/Wizardry into 1.12.2 2019-12-22 18:39:45 +00:00
Electroblob77 9741c751b3 Update version number 2019-12-22 18:37:25 +00:00
Electroblob d3003ae473 Merge pull request #311 from Azim-Palmer/1.12.2
Adding support for Lycanites Mobs to drop loot from the mob_additions table
2019-12-22 18:25:52 +00:00
Electroblob77 9fde24f341 Merge branch '1.12.2' of https://github.com/Electroblob77/Wizardry into 1.12.2 2019-12-22 15:15:40 +00:00
Electroblob 452eb17b5f Update question.md 2019-12-22 15:13:57 +00:00
Electroblob 36963aac30 Update feature_request.md 2019-12-22 15:13:47 +00:00
Electroblob f161cdfe7c Update bug_report.md 2019-12-22 15:13:36 +00:00
Electroblob77 455c5a5e07 Fix weird floaty rounding so continuous spells cost the correct amount of mana
Grapple ain't free anymore, sorry folks!
2019-12-22 14:58:12 +00:00
Electroblob77 9852f61d0f Extend smoke bomb blindness effect to mobs as well as players, closes #324 2019-12-22 14:37:19 +00:00
Electroblob77 a2c8cde4c4 Use correct mana values for grand crystals and crystal shards in scroll creation 2019-12-22 12:30:04 +00:00
Electroblob77 497d28eafd Somehow this went missing... 2019-12-22 11:45:42 +00:00
Az f82d2871d5 Adding support for Lycanites Mobs to drop loot from the mob_additions table 2019-11-23 12:44:10 +00:00
13 changed files with 43 additions and 20 deletions
+2 -2
View File
@@ -7,10 +7,10 @@ assignees: ''
---
Please read the [guide for contributing](https://github.com/Electroblob77/Wizardry/blob/1.12.2/guide_for_contributing.md) before posting.
Please read the [guide for contributing](https://github.com/Electroblob77/Wizardry/blob/1.12.2/CONTRIBUTING.md) before posting.
Minecraft version: 1.12.2 [change as necessary]
Wizardry version: 4.2.2 [change as necessary]
Wizardry version: 4.2.7 [change as necessary]
Environment: Singleplayer/LAN game/Server [delete as necessary]
Issue details: [describe what you were doing when the issue occurred, what went wrong, what you expected to happen, etc.]
+1 -1
View File
@@ -7,7 +7,7 @@ assignees: ''
---
Please read the [guide for contributing](https://github.com/Electroblob77/Wizardry/blob/1.12.2/guide_for_contributing.md) before posting.
Please read the [guide for contributing](https://github.com/Electroblob77/Wizardry/blob/1.12.2/CONTRIBUTING.md) before posting.
Minecraft versions: [if this suggestion only applies to some versions, list them here]
+2 -2
View File
@@ -7,10 +7,10 @@ assignees: ''
---
Please read the [guide for contributing](https://github.com/Electroblob77/Wizardry/blob/1.12.2/guide_for_contributing.md) before posting.
Please read the [guide for contributing](https://github.com/Electroblob77/Wizardry/blob/1.12.2/CONTRIBUTING.md) before posting.
Minecraft version: 1.12.2 [change as necessary]
Wizardry version: 4.2.2 [change as necessary]
Wizardry version: 4.2.7 [change as necessary]
Question details: [explain your question here]
+1 -1
View File
@@ -1,7 +1,7 @@
# Credits
Electroblob's Wizardry
Version 4.2.6
Version 4.2.7
For Minecraft 1.12.2
Designed, coded and textured by Electroblob
+1 -1
View File
@@ -1,7 +1,7 @@
Please read the [guide for contributing](https://github.com/Electroblob77/Wizardry/blob/1.12.2/guide_for_contributing.md) before posting.
Minecraft version: 1.12.2 [change as necessary]
Wizardry version: 4.1.4 [change as necessary]
Wizardry version: 4.2.7 [change as necessary]
Environment: Singleplayer/LAN game/Server [delete as necessary]
Issue details: [describe what you were doing when the issue occurred, what went wrong, what you expected to happen, etc.]
+1 -1
View File
@@ -11,7 +11,7 @@ apply plugin: 'net.minecraftforge.gradle.forge'
//Only edit below this line, the above code adds and enables the necessary things for Forge to be setup.
version = "4.2.6" // There, it matches semver, happy now?
version = "4.2.7" // There, it matches semver, happy now?
group= "electroblob.wizardry"// http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "ElectroblobsWizardry"
@@ -64,7 +64,7 @@ public class Wizardry {
* 1.x.x represents Minecraft 1.7.x versions, 2.x.x represents Minecraft 1.10.x versions, 3.x.x represents Minecraft
* 1.11.x versions, and so on.
*/
public static final String VERSION = "4.2.6";
public static final String VERSION = "4.2.7";
// IDEA: Triggering of inbuilt Forge events in relevant places?
// IDEA: Abstract the vanilla particles behind the particle builder
@@ -33,6 +33,9 @@ import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.Vec3d;
import net.minecraft.util.text.TextComponentTranslation;
import net.minecraft.world.World;
import net.minecraft.world.WorldServer;
import net.minecraft.world.storage.loot.LootContext;
import net.minecraft.world.storage.loot.LootTable;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.common.util.FakePlayer;
import net.minecraftforge.event.entity.PlaySoundAtEntityEvent;
@@ -46,6 +49,7 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.common.gameevent.PlayerEvent.PlayerLoggedInEvent;
import java.util.ArrayList;
import java.util.List;
/**
* General-purpose event handler for things that don't fit anywhere else or groups of related behaviours that are better
@@ -366,6 +370,22 @@ public final class WizardryEventHandler {
EntityPlayer player = (EntityPlayer)event.getSource().getTrueSource();
// Compatibility with "Lycanites Mobs" -it uses custom loot drop logic which can't be hooked, given the
// number of mobs that spawn as Lycanites when this mod is active it would massively nerf the wizard drops
// if we didn't handle this
if(event.getEntity().getClass().getCanonicalName().contains("lycanitesmobs"))
{
WorldServer world = (WorldServer)event.getEntity().getEntityWorld();
LootTable table = world.getLootTableManager().getLootTableFromLocation(new ResourceLocation(Wizardry.MODID, "entities/mob_additions"));
LootContext ctx = new LootContext.Builder(world).withPlayer(player).build();
List<ItemStack> stacks = table.generateLootForPools(world.rand, ctx);
for(ItemStack stack : stacks) {
event.getEntity().entityDropItem(stack, 0f);
}
}
for(ItemStack stack : WizardryUtilities.getPrioritisedHotbarAndOffhand(player)){
if(stack.getItem() instanceof IManaStoringItem && !((IManaStoringItem)stack.getItem()).isManaFull(stack)
@@ -66,12 +66,11 @@ public class EntitySmokeBomb extends EntityBomb {
for(EntityLivingBase target : targets){
if(target != this.getThrower()){
// Gives the target blindness if it is a player, mind trick otherwise (since this has the desired
// Gives the target blindness, and mind trick if it's not a player (since this has the desired
// effect of preventing targeting)
if(target instanceof EntityPlayer){
target.addPotionEffect(new PotionEffect(MobEffects.BLINDNESS, duration, 0));
}else if(target instanceof EntityLiving){
// New AI
target.addPotionEffect(new PotionEffect(MobEffects.BLINDNESS, duration, 0));
if(target instanceof EntityLiving){
((EntityLiving)target).setAttackTarget(null);
target.addPotionEffect(new PotionEffect(WizardryPotions.mind_trick, duration, 0));
}
@@ -48,10 +48,14 @@ public class ItemBlankScroll extends Item implements IWorkbenchItem {
int cost = spell.getCost() * centre.getStack().getCount();
// Continuous spell scrolls require enough mana to cast them for the duration defined in ItemScroll.
if(spell.isContinuous) cost *= ItemScroll.CASTING_TIME / 20;
int manaPerItem = Constants.MANA_PER_CRYSTAL;
if(crystals.getStack().getItem() == WizardryItems.crystal_shard) manaPerItem = Constants.MANA_PER_SHARD;
if(crystals.getStack().getItem() == WizardryItems.grand_crystal) manaPerItem = Constants.GRAND_CRYSTAL_MANA;
if(crystals.getStack().getCount() * Constants.MANA_PER_CRYSTAL > cost){
if(crystals.getStack().getCount() * manaPerItem > cost){
// Rounds up to the nearest whole crystal
crystals.decrStackSize(cost / Constants.MANA_PER_CRYSTAL + 1);
crystals.decrStackSize(cost / manaPerItem + 1);
centre.putStack(new ItemStack(WizardryItems.scroll, centre.getStack().getCount(), spell.metadata()));
return true;
}
@@ -397,7 +397,7 @@ public class ItemWand extends Item implements IWorkbenchItem, ISpellCastingItem,
if(MinecraftForge.EVENT_BUS.post(new SpellCastEvent.Tick(Source.WAND, spell, caster, modifiers, castingTick))) return false;
}
int cost = (int)(spell.getCost() * modifiers.get(SpellModifiers.COST));
int cost = (int)(spell.getCost() * modifiers.get(SpellModifiers.COST) + 0.1f); // Weird floaty rounding
// As of wizardry 4.2 mana cost is only divided over two intervals each second
if(spell.isContinuous) cost = getDistributedCost(cost, castingTick);
@@ -433,7 +433,7 @@ public class ItemWand extends Item implements IWorkbenchItem, ISpellCastingItem,
caster.setActiveHand(hand);
// Mana cost
int cost = (int)(spell.getCost() * modifiers.get(SpellModifiers.COST));
int cost = (int)(spell.getCost() * modifiers.get(SpellModifiers.COST) + 0.1f); // Weird floaty rounding
// As of wizardry 4.2 mana cost is only divided over two intervals each second
if(spell.isContinuous) cost = getDistributedCost(cost, castingTick);
@@ -494,7 +494,7 @@ public class ItemWand extends Item implements IWorkbenchItem, ISpellCastingItem,
int castingTick = stack.getMaxItemUseDuration() - timeLeft; // Might as well include this
int cost = getDistributedCost((int)(spell.getCost() * modifiers.get(SpellModifiers.COST)), castingTick);
int cost = getDistributedCost((int)(spell.getCost() * modifiers.get(SpellModifiers.COST) + 0.1f), castingTick);
// Still need to check there's enough mana or the spell will finish twice, since running out of mana is
// handled separately.
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

+1 -1
View File
@@ -2,7 +2,7 @@
{
"modid" : "ebwizardry",
"name" : "Electroblob's Wizardry",
"version" : "4.2.6",
"version" : "4.2.7",
"mcversion" : "1.12.2",
"url" : "https://minecraft.curseforge.com/projects/electroblobs-wizardry",
"credits" : "\nDesigned, coded and textured by Electroblob.\nCode contributed by: Corail31, 12foo, Shadows-of-Fire, Tora-B, Avatair, Aeronica, UltraHex, Azim-Palmer.\nTranslators: MadWrist (Spanish, Mexican Spanish), VilagVil & kellixon (Russian), Hahdrim (French), lorrampi (Brazilian Portuguese), ZHENGLOC & dragon-evol (Chinese), shejery & rewi_wire (Korean), Trozuu (Polish).",