Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 43b66df22a | |||
| b192a431d7 | |||
| 3be98ab612 | |||
| ed950322ff |
+1
-1
@@ -1,7 +1,7 @@
|
||||
# Credits
|
||||
|
||||
Electroblob's Wizardry
|
||||
Version 4.1.4
|
||||
Version 4.2.3
|
||||
For Minecraft 1.12.2
|
||||
|
||||
Designed, coded and textured by Electroblob
|
||||
|
||||
+1
-1
@@ -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.2" // There, it matches semver, happy now?
|
||||
version = "4.2.3" // There, it matches semver, happy now?
|
||||
group= "electroblob.wizardry"// http://maven.apache.org/guides/mini/guide-naming-conventions.html
|
||||
archivesBaseName = "ElectroblobsWizardry"
|
||||
|
||||
|
||||
@@ -12,10 +12,10 @@ import electroblob.wizardry.misc.Forfeit;
|
||||
import electroblob.wizardry.packet.WizardryPacketHandler;
|
||||
import electroblob.wizardry.registry.*;
|
||||
import electroblob.wizardry.spell.Spell;
|
||||
import electroblob.wizardry.util.CustomSoundCategory;
|
||||
import electroblob.wizardry.util.SpellProperties;
|
||||
import electroblob.wizardry.worldgen.*;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.util.SoundCategory;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.event.RegistryEvent;
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
@@ -61,7 +61,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.2";
|
||||
public static final String VERSION = "4.2.3";
|
||||
|
||||
// IDEA: Triggering of inbuilt Forge events in relevant places?
|
||||
// IDEA: Abstract the vanilla particles behind the particle builder
|
||||
@@ -113,7 +113,8 @@ public class Wizardry {
|
||||
proxy.registerRenderers();
|
||||
proxy.registerKeyBindings();
|
||||
|
||||
WizardrySounds.SPELLS = CustomSoundCategory.add(Wizardry.MODID + "_spells");
|
||||
// Commented out for 4.2.3 to get rid of the sound bug, reinstate once a fix is found.
|
||||
WizardrySounds.SPELLS = SoundCategory.PLAYERS;//CustomSoundCategory.add(Wizardry.MODID + "_spells");
|
||||
|
||||
WizardryBaublesIntegration.init();
|
||||
WizardryAntiqueAtlasIntegration.init();
|
||||
|
||||
@@ -15,8 +15,6 @@ import net.minecraftforge.fml.common.gameevent.PlayerEvent;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
import net.minecraftforge.oredict.ShapelessOreRecipe;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
/**
|
||||
* Implements a dynamic crafting recipe for recharging items with mana flasks.
|
||||
*
|
||||
@@ -42,16 +40,17 @@ public class RecipeRechargeWithFlask extends ShapelessOreRecipe {
|
||||
this.flask = flask;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public ItemStack getRecipeOutput(){
|
||||
return ItemStack.EMPTY; // According to the javadoc, dynamic recipes are supposed to return an empty stack here
|
||||
}
|
||||
// Commented out for now because JEI spams the log with errors about the recipe having no output
|
||||
// @Nonnull
|
||||
// @Override
|
||||
// public ItemStack getRecipeOutput(){
|
||||
// return ItemStack.EMPTY; // According to the javadoc, dynamic recipes are supposed to return an empty stack here
|
||||
// }
|
||||
|
||||
@Override
|
||||
public ItemStack getCraftingResult(InventoryCrafting inv){
|
||||
ItemStack result = super.getCraftingResult(inv);
|
||||
rechargeItem(result, inv);
|
||||
rechargeItemAndCopyNBT(result, inv);
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -62,11 +61,12 @@ public class RecipeRechargeWithFlask extends ShapelessOreRecipe {
|
||||
return super.matches(inv, world);
|
||||
}
|
||||
|
||||
private void rechargeItem(ItemStack toCharge, InventoryCrafting inv){
|
||||
private void rechargeItemAndCopyNBT(ItemStack toCharge, InventoryCrafting inv){
|
||||
if(toCharge.getItem() == chargeable){
|
||||
ItemStack stack = findItemToCharge(inv);
|
||||
if(!stack.isEmpty()) chargeable.setMana(toCharge, chargeable.getMana(stack));
|
||||
chargeable.rechargeMana(toCharge, flask.size.capacity);
|
||||
toCharge.setTagCompound(stack.getTagCompound()); // Copy NBT to new stack
|
||||
}else{
|
||||
Wizardry.logger.warn("Tried to recharge item {} with mana flask, but it did not match the recipe result {}!", toCharge.getItem(), chargeable);
|
||||
}
|
||||
@@ -95,7 +95,7 @@ public class RecipeRechargeWithFlask extends ShapelessOreRecipe {
|
||||
if(recipe instanceof RecipeRechargeWithFlask
|
||||
&& recipe.matches((InventoryCrafting)event.craftMatrix, event.player.world)){
|
||||
// Have to modify the itemstack in the actual event, it cannot be replaced
|
||||
((RecipeRechargeWithFlask)recipe).rechargeItem(event.crafting, (InventoryCrafting)event.craftMatrix);
|
||||
((RecipeRechargeWithFlask)recipe).rechargeItemAndCopyNBT(event.crafting, (InventoryCrafting)event.craftMatrix);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
{
|
||||
"modid" : "ebwizardry",
|
||||
"name" : "Electroblob's Wizardry",
|
||||
"version" : "4.2.2",
|
||||
"version" : "4.2.3",
|
||||
"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.\nTranslators: MadWrist (Spanish, Mexican Spanish), VilagVil & kellixon (Russian), Hahdrim (French), lorrampi (Brazilian Portuguese), ZHENGLOC & dragon-evol (Chinese), shejery & rewi_wire (Korean), Trozuu (Polish).",
|
||||
|
||||
Reference in New Issue
Block a user