Eliminated some of the "wonkiness" from the Air Sigil by moving its effects to the client side.. Also worked a bit more on the PageAlchemyArray.
This commit is contained in:
parent
087982eb9d
commit
6a937c2047
|
@ -1,3 +1,8 @@
|
||||||
|
------------------------------------------------------
|
||||||
|
Version 2.0.3-54
|
||||||
|
------------------------------------------------------
|
||||||
|
- Eliminated some of the "wonkiness" from the Air Sigil
|
||||||
|
|
||||||
------------------------------------------------------
|
------------------------------------------------------
|
||||||
Version 2.0.3-53
|
Version 2.0.3-53
|
||||||
------------------------------------------------------
|
------------------------------------------------------
|
||||||
|
|
|
@ -14,7 +14,6 @@ import WayofTime.bloodmagic.tile.TileAlchemyArray;
|
||||||
public class DualAlchemyCircleRenderer extends AlchemyCircleRenderer
|
public class DualAlchemyCircleRenderer extends AlchemyCircleRenderer
|
||||||
{
|
{
|
||||||
public float offsetFromFace = -0.9f;
|
public float offsetFromFace = -0.9f;
|
||||||
public final ResourceLocation arrayResource;
|
|
||||||
public final ResourceLocation secondaryArrayResource;
|
public final ResourceLocation secondaryArrayResource;
|
||||||
|
|
||||||
public DualAlchemyCircleRenderer()
|
public DualAlchemyCircleRenderer()
|
||||||
|
@ -24,7 +23,7 @@ public class DualAlchemyCircleRenderer extends AlchemyCircleRenderer
|
||||||
|
|
||||||
public DualAlchemyCircleRenderer(ResourceLocation arrayResource, ResourceLocation secondaryArrayResource)
|
public DualAlchemyCircleRenderer(ResourceLocation arrayResource, ResourceLocation secondaryArrayResource)
|
||||||
{
|
{
|
||||||
this.arrayResource = arrayResource;
|
super(arrayResource);
|
||||||
this.secondaryArrayResource = secondaryArrayResource;
|
this.secondaryArrayResource = secondaryArrayResource;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,16 @@
|
||||||
package WayofTime.bloodmagic.compat.guideapi;
|
package WayofTime.bloodmagic.compat.guideapi;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.item.crafting.IRecipe;
|
import net.minecraft.item.crafting.IRecipe;
|
||||||
|
import net.minecraft.util.ResourceLocation;
|
||||||
import WayofTime.bloodmagic.api.alchemyCrafting.AlchemyCircleRenderer;
|
import WayofTime.bloodmagic.api.alchemyCrafting.AlchemyCircleRenderer;
|
||||||
import WayofTime.bloodmagic.api.recipe.ShapedBloodOrbRecipe;
|
import WayofTime.bloodmagic.api.recipe.ShapedBloodOrbRecipe;
|
||||||
import WayofTime.bloodmagic.api.recipe.ShapelessBloodOrbRecipe;
|
import WayofTime.bloodmagic.api.recipe.ShapelessBloodOrbRecipe;
|
||||||
import WayofTime.bloodmagic.api.registry.AlchemyArrayRecipeRegistry;
|
import WayofTime.bloodmagic.api.registry.AlchemyArrayRecipeRegistry;
|
||||||
|
import WayofTime.bloodmagic.client.render.alchemyArray.DualAlchemyCircleRenderer;
|
||||||
import WayofTime.bloodmagic.compat.guideapi.page.PageAlchemyArray;
|
import WayofTime.bloodmagic.compat.guideapi.page.PageAlchemyArray;
|
||||||
import WayofTime.bloodmagic.compat.guideapi.page.recipeRenderer.ShapedBloodOrbRecipeRenderer;
|
import WayofTime.bloodmagic.compat.guideapi.page.recipeRenderer.ShapedBloodOrbRecipeRenderer;
|
||||||
import WayofTime.bloodmagic.compat.guideapi.page.recipeRenderer.ShapelessBloodOrbRecipeRenderer;
|
import WayofTime.bloodmagic.compat.guideapi.page.recipeRenderer.ShapelessBloodOrbRecipeRenderer;
|
||||||
|
@ -23,7 +28,13 @@ public class BookUtils
|
||||||
ItemStack catalystStack = recipe[1];
|
ItemStack catalystStack = recipe[1];
|
||||||
|
|
||||||
AlchemyCircleRenderer renderer = AlchemyArrayRecipeRegistry.getAlchemyCircleRenderer(inputStack, catalystStack);
|
AlchemyCircleRenderer renderer = AlchemyArrayRecipeRegistry.getAlchemyCircleRenderer(inputStack, catalystStack);
|
||||||
if (renderer != null)
|
if (renderer instanceof DualAlchemyCircleRenderer)
|
||||||
|
{
|
||||||
|
List<ResourceLocation> resources = new ArrayList<ResourceLocation>();
|
||||||
|
resources.add(((DualAlchemyCircleRenderer) renderer).arrayResource);
|
||||||
|
resources.add(((DualAlchemyCircleRenderer) renderer).secondaryArrayResource);
|
||||||
|
return new PageAlchemyArray(resources, inputStack, catalystStack);
|
||||||
|
} else
|
||||||
{
|
{
|
||||||
return new PageAlchemyArray(renderer.arrayResource, inputStack, catalystStack);
|
return new PageAlchemyArray(renderer.arrayResource, inputStack, catalystStack);
|
||||||
}
|
}
|
||||||
|
@ -43,7 +54,16 @@ public class BookUtils
|
||||||
AlchemyCircleRenderer renderer = AlchemyArrayRecipeRegistry.getAlchemyCircleRenderer(inputStack, catalystStack);
|
AlchemyCircleRenderer renderer = AlchemyArrayRecipeRegistry.getAlchemyCircleRenderer(inputStack, catalystStack);
|
||||||
if (renderer != null)
|
if (renderer != null)
|
||||||
{
|
{
|
||||||
return new PageAlchemyArray(renderer.arrayResource, inputStack, catalystStack, outputStack);
|
if (renderer instanceof DualAlchemyCircleRenderer)
|
||||||
|
{
|
||||||
|
List<ResourceLocation> resources = new ArrayList<ResourceLocation>();
|
||||||
|
resources.add(((DualAlchemyCircleRenderer) renderer).arrayResource);
|
||||||
|
resources.add(((DualAlchemyCircleRenderer) renderer).secondaryArrayResource);
|
||||||
|
return new PageAlchemyArray(resources, inputStack, catalystStack, outputStack);
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
return new PageAlchemyArray(renderer.arrayResource, inputStack, catalystStack, outputStack);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -53,6 +53,16 @@ public class CategoryAlchemy
|
||||||
speedPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "speed" + ".info"), 370));
|
speedPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "speed" + ".info"), 370));
|
||||||
entries.put(new ResourceLocation(keyBase + "speed"), new EntryText(speedPages, TextHelper.localize(keyBase + "speed"), true));
|
entries.put(new ResourceLocation(keyBase + "speed"), new EntryText(speedPages, TextHelper.localize(keyBase + "speed"), true));
|
||||||
|
|
||||||
|
List<IPage> turretPages = new ArrayList<IPage>();
|
||||||
|
|
||||||
|
PageAlchemyArray turretRecipePage = BookUtils.getAlchemyPage("skeletonTurret");
|
||||||
|
if (turretRecipePage != null)
|
||||||
|
{
|
||||||
|
turretPages.add(turretRecipePage);
|
||||||
|
}
|
||||||
|
turretPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "turret" + ".info"), 370));
|
||||||
|
entries.put(new ResourceLocation(keyBase + "turret"), new EntryText(turretPages, TextHelper.localize(keyBase + "turret"), true));
|
||||||
|
|
||||||
for (Entry<ResourceLocation, EntryAbstract> entry : entries.entrySet())
|
for (Entry<ResourceLocation, EntryAbstract> entry : entries.entrySet())
|
||||||
{
|
{
|
||||||
for (IPage page : entry.getValue().pageList)
|
for (IPage page : entry.getValue().pageList)
|
||||||
|
|
|
@ -1,5 +1,9 @@
|
||||||
package WayofTime.bloodmagic.compat.guideapi.page;
|
package WayofTime.bloodmagic.compat.guideapi.page;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.client.gui.FontRenderer;
|
import net.minecraft.client.gui.FontRenderer;
|
||||||
|
@ -20,15 +24,25 @@ import amerifrance.guideapi.gui.GuiBase;
|
||||||
public class PageAlchemyArray extends Page
|
public class PageAlchemyArray extends Page
|
||||||
{
|
{
|
||||||
public static final double scale = 58d / 256d;
|
public static final double scale = 58d / 256d;
|
||||||
public ResourceLocation arrayResource;
|
public List<ResourceLocation> arrayResources = new ArrayList<ResourceLocation>();
|
||||||
public final ItemStack inputStack;
|
public final ItemStack inputStack;
|
||||||
public final ItemStack catalystStack;
|
public final ItemStack catalystStack;
|
||||||
|
|
||||||
public final ItemStack outputStack;
|
public final ItemStack outputStack;
|
||||||
|
|
||||||
public PageAlchemyArray(ResourceLocation resource, ItemStack inputStack, ItemStack outputStack)
|
public PageAlchemyArray(List<ResourceLocation> resources, ItemStack inputStack, ItemStack catalystStack)
|
||||||
{
|
{
|
||||||
this(resource, inputStack, outputStack, null);
|
this(resources, inputStack, catalystStack, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
public PageAlchemyArray(ResourceLocation resource, ItemStack inputStack, ItemStack catalystStack, ItemStack outputStack)
|
||||||
|
{
|
||||||
|
this(Arrays.asList(resource), inputStack, catalystStack, outputStack);
|
||||||
|
}
|
||||||
|
|
||||||
|
public PageAlchemyArray(ResourceLocation resource, ItemStack inputStack, ItemStack catalystStack)
|
||||||
|
{
|
||||||
|
this(Arrays.asList(resource), inputStack, catalystStack);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -42,13 +56,16 @@ public class PageAlchemyArray extends Page
|
||||||
guiBase.drawTexturedModalRect(x, y, 0, 0, 62, 88 + (outputStack == null ? 0 : 26));
|
guiBase.drawTexturedModalRect(x, y, 0, 0, 62, 88 + (outputStack == null ? 0 : 26));
|
||||||
|
|
||||||
guiBase.drawCenteredString(fontRenderer, TextHelper.localize("guide.BloodMagic.page.alchemyArray"), guiLeft + guiBase.xSize / 2, guiTop + 12, 0);
|
guiBase.drawCenteredString(fontRenderer, TextHelper.localize("guide.BloodMagic.page.alchemyArray"), guiLeft + guiBase.xSize / 2, guiTop + 12, 0);
|
||||||
Minecraft.getMinecraft().getTextureManager().bindTexture(arrayResource);
|
|
||||||
|
|
||||||
GlStateManager.pushMatrix();
|
for (ResourceLocation arrayResource : arrayResources)
|
||||||
GlStateManager.translate(x + 2, y + 28, 0);
|
{
|
||||||
GlStateManager.scale(scale, scale, scale);
|
Minecraft.getMinecraft().getTextureManager().bindTexture(arrayResource);
|
||||||
guiBase.drawTexturedModalRect(0, 0, 0, 0, 256, 256);
|
GlStateManager.pushMatrix();
|
||||||
GlStateManager.popMatrix();
|
GlStateManager.translate(x + 2, y + 28, 0);
|
||||||
|
GlStateManager.scale(scale, scale, scale);
|
||||||
|
guiBase.drawTexturedModalRect(0, 0, 0, 0, 256, 256);
|
||||||
|
GlStateManager.popMatrix();
|
||||||
|
}
|
||||||
|
|
||||||
int inputX = x + 3;
|
int inputX = x + 3;
|
||||||
int inputY = y + 3;
|
int inputY = y + 3;
|
||||||
|
|
|
@ -14,6 +14,7 @@ import net.minecraft.world.World;
|
||||||
import WayofTime.bloodmagic.api.iface.ISentientSwordEffectProvider;
|
import WayofTime.bloodmagic.api.iface.ISentientSwordEffectProvider;
|
||||||
import WayofTime.bloodmagic.api.soul.EnumDemonWillType;
|
import WayofTime.bloodmagic.api.soul.EnumDemonWillType;
|
||||||
import WayofTime.bloodmagic.api.util.helper.NetworkHelper;
|
import WayofTime.bloodmagic.api.util.helper.NetworkHelper;
|
||||||
|
import WayofTime.bloodmagic.registry.ModPotions;
|
||||||
|
|
||||||
public class ItemSigilAir extends ItemSigilBase implements ISentientSwordEffectProvider
|
public class ItemSigilAir extends ItemSigilBase implements ISentientSwordEffectProvider
|
||||||
{
|
{
|
||||||
|
@ -25,28 +26,32 @@ public class ItemSigilAir extends ItemSigilBase implements ISentientSwordEffectP
|
||||||
@Override
|
@Override
|
||||||
public ActionResult<ItemStack> onItemRightClick(ItemStack stack, World world, EntityPlayer player, EnumHand hand)
|
public ActionResult<ItemStack> onItemRightClick(ItemStack stack, World world, EntityPlayer player, EnumHand hand)
|
||||||
{
|
{
|
||||||
if (!world.isRemote && !isUnusable(stack))
|
boolean unusable = isUnusable(stack);
|
||||||
|
if (world.isRemote && !unusable)
|
||||||
{
|
{
|
||||||
Vec3d vec = player.getLookVec();
|
Vec3d vec = player.getLookVec();
|
||||||
double wantedVelocity = 1.7;
|
double wantedVelocity = 1.7;
|
||||||
|
|
||||||
// TODO - Revisit after potions
|
// TODO - Revisit after potions
|
||||||
// if (player.isPotionActive(ModPotions.customPotionBoost)) {
|
if (player.isPotionActive(ModPotions.boost))
|
||||||
// int amplifier =
|
{
|
||||||
// player.getActivePotionEffect(ModPotions.customPotionBoost).getAmplifier();
|
int amplifier = player.getActivePotionEffect(ModPotions.boost).getAmplifier();
|
||||||
// wantedVelocity += (1 + amplifier) * (0.35);
|
wantedVelocity += (1 + amplifier) * (0.35);
|
||||||
// }
|
}
|
||||||
|
|
||||||
player.motionX = vec.xCoord * wantedVelocity;
|
player.motionX = vec.xCoord * wantedVelocity;
|
||||||
player.motionY = vec.yCoord * wantedVelocity;
|
player.motionY = vec.yCoord * wantedVelocity;
|
||||||
player.motionZ = vec.zCoord * wantedVelocity;
|
player.motionZ = vec.zCoord * wantedVelocity;
|
||||||
player.velocityChanged = true;
|
|
||||||
world.playSound(null, player.posX, player.posY, player.posZ, SoundEvents.BLOCK_FIRE_EXTINGUISH, SoundCategory.BLOCKS, 0.5F, 2.6F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.8F);
|
world.playSound(null, player.posX, player.posY, player.posZ, SoundEvents.BLOCK_FIRE_EXTINGUISH, SoundCategory.BLOCKS, 0.5F, 2.6F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.8F);
|
||||||
|
}
|
||||||
|
|
||||||
player.fallDistance = 0;
|
if (!world.isRemote)
|
||||||
|
{
|
||||||
if (!player.capabilities.isCreativeMode)
|
if (!player.capabilities.isCreativeMode)
|
||||||
this.setUnusable(stack, !NetworkHelper.getSoulNetwork(player).syphonAndDamage(player, getLpUsed()));
|
this.setUnusable(stack, !NetworkHelper.getSoulNetwork(player).syphonAndDamage(player, getLpUsed()));
|
||||||
|
|
||||||
|
if (!unusable)
|
||||||
|
player.fallDistance = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
return super.onItemRightClick(stack, world, player, hand);
|
return super.onItemRightClick(stack, world, player, hand);
|
||||||
|
|
Loading…
Reference in a new issue