mirror of
https://github.com/GTNewHorizons/BloodMagic.git
synced 2026-11-27 15:23:06 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
82d7520944 | ||
|
|
3994b2510e | ||
|
|
ec9c3f67ff | ||
|
|
04baecf5ef | ||
|
|
9cf6c3a5ab |
No files matched your search
@@ -1,5 +1,3 @@
|
|||||||
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
|
|
||||||
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
|
|
||||||
|
|
||||||
name: Build and test
|
name: Build and test
|
||||||
|
|
||||||
@@ -11,35 +9,5 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-and-test:
|
build-and-test:
|
||||||
runs-on: ubuntu-latest
|
uses: GTNewHorizons/GTNH-Actions-Workflows/.github/workflows/build-and-test.yml@master
|
||||||
steps:
|
secrets: inherit
|
||||||
- uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Set up JDK 8
|
|
||||||
uses: actions/setup-java@v2
|
|
||||||
with:
|
|
||||||
java-version: '8'
|
|
||||||
distribution: 'adopt'
|
|
||||||
cache: gradle
|
|
||||||
|
|
||||||
- name: Grant execute permission for gradlew
|
|
||||||
run: chmod +x gradlew
|
|
||||||
|
|
||||||
- name: Setup the workspace
|
|
||||||
run: ./gradlew setupCIWorkspace
|
|
||||||
|
|
||||||
- name: Build the mod
|
|
||||||
run: ./gradlew build
|
|
||||||
|
|
||||||
- name: Run server for 1.5 minutes
|
|
||||||
run: |
|
|
||||||
mkdir run
|
|
||||||
echo "eula=true" > run/eula.txt
|
|
||||||
timeout 90 ./gradlew runServer | tee --append server.log || true
|
|
||||||
|
|
||||||
- name: Test no errors reported during server run
|
|
||||||
run: |
|
|
||||||
chmod +x .github/scripts/test-no-error-reports.sh
|
|
||||||
.github/scripts/test-no-error-reports.sh
|
|
||||||
@@ -1,51 +1,14 @@
|
|||||||
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
|
|
||||||
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
|
|
||||||
|
|
||||||
name: Release tagged build
|
name: Release tagged build
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
tags:
|
tags: [ '*' ]
|
||||||
- '*'
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
release-tags:
|
||||||
runs-on: ubuntu-latest
|
uses: GTNewHorizons/GTNH-Actions-Workflows/.github/workflows/release-tags.yml@master
|
||||||
steps:
|
secrets: inherit
|
||||||
- uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Set release version
|
|
||||||
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- name: Set up JDK 8
|
|
||||||
uses: actions/setup-java@v2
|
|
||||||
with:
|
|
||||||
java-version: '8'
|
|
||||||
distribution: 'adopt'
|
|
||||||
cache: gradle
|
|
||||||
|
|
||||||
- name: Grant execute permission for gradlew
|
|
||||||
run: chmod +x gradlew
|
|
||||||
|
|
||||||
- name: Setup the workspace
|
|
||||||
run: ./gradlew setupCIWorkspace
|
|
||||||
|
|
||||||
- name: Build the mod
|
|
||||||
run: ./gradlew build
|
|
||||||
|
|
||||||
- name: Release under current tag
|
|
||||||
uses: "marvinpinto/action-automatic-releases@latest"
|
|
||||||
with:
|
|
||||||
repo_token: "${{ secrets.GITHUB_TOKEN }}"
|
|
||||||
automatic_release_tag: "${{ env.RELEASE_VERSION }}"
|
|
||||||
prerelease: false
|
|
||||||
title: "${{ env.RELEASE_VERSION }}"
|
|
||||||
files: build/libs/*.jar
|
|
||||||
|
|
||||||
- name: Publish to Maven
|
|
||||||
run: ./gradlew publish
|
|
||||||
env:
|
|
||||||
MAVEN_USER: ${{ secrets.MAVEN_USER }}
|
|
||||||
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
|
|
||||||
+3
-3
@@ -6,7 +6,7 @@ dependencies {
|
|||||||
transitive = false
|
transitive = false
|
||||||
}
|
}
|
||||||
|
|
||||||
compileOnly("com.github.GTNewHorizons:Botania:master-SNAPSHOT:api") {
|
compileOnly("com.github.GTNewHorizons:Botania:1.9.5-GTNH:api") {
|
||||||
transitive = false
|
transitive = false
|
||||||
}
|
}
|
||||||
compileOnly("com.github.GTNewHorizons:ForestryMC:4.4.4:api") {
|
compileOnly("com.github.GTNewHorizons:ForestryMC:4.4.4:api") {
|
||||||
@@ -17,14 +17,14 @@ dependencies {
|
|||||||
}
|
}
|
||||||
compile("com.github.GTNewHorizons:CodeChickenLib:1.1.5.1:dev")
|
compile("com.github.GTNewHorizons:CodeChickenLib:1.1.5.1:dev")
|
||||||
|
|
||||||
compileOnly("com.github.GTNewHorizons:NotEnoughItems:2.2.7-GTNH:dev") {
|
compileOnly("com.github.GTNewHorizons:NotEnoughItems:2.2.20-GTNH:dev") {
|
||||||
transitive = false
|
transitive = false
|
||||||
}
|
}
|
||||||
compileOnly("com.github.GTNewHorizons:Chisel:2.10.6-GTNH:api") {
|
compileOnly("com.github.GTNewHorizons:Chisel:2.10.6-GTNH:api") {
|
||||||
transitive = false
|
transitive = false
|
||||||
}
|
}
|
||||||
|
|
||||||
compileOnly("com.github.GTNewHorizons:ZenScript:master-SNAPSHOT") {
|
compileOnly("com.github.GTNewHorizons:ZenScript:1.0.0-GTNH") {
|
||||||
transitive = false
|
transitive = false
|
||||||
}
|
}
|
||||||
compileOnly("com.github.GTNewHorizons:CraftTweaker:3.2.6:dev") {
|
compileOnly("com.github.GTNewHorizons:CraftTweaker:3.2.6:dev") {
|
||||||
|
|||||||
@@ -404,6 +404,7 @@ public class AlchemicalWizardry
|
|||||||
public static String entityMinorDemonGruntGuardianEarthID = "AW024";
|
public static String entityMinorDemonGruntGuardianEarthID = "AW024";
|
||||||
|
|
||||||
public static boolean isDemonRitualCreativeOnly = false;
|
public static boolean isDemonRitualCreativeOnly = false;
|
||||||
|
public static int[] demonRitualDimensionBlacklist = new int[]{0};
|
||||||
|
|
||||||
public static Fluid lifeEssenceFluid;
|
public static Fluid lifeEssenceFluid;
|
||||||
|
|
||||||
|
|||||||
@@ -203,7 +203,7 @@ public class BloodMagicConfiguration
|
|||||||
TEDemonPortal.demonLimit = config.get(tempDemonConfigs, "demonHoardLimit", 100).getInt();
|
TEDemonPortal.demonLimit = config.get(tempDemonConfigs, "demonHoardLimit", 100).getInt();
|
||||||
|
|
||||||
AlchemicalWizardry.isDemonRitualCreativeOnly = config.get(tempDemonConfigs, "IsDemonRitualCreativeOnly", false).getBoolean();
|
AlchemicalWizardry.isDemonRitualCreativeOnly = config.get(tempDemonConfigs, "IsDemonRitualCreativeOnly", false).getBoolean();
|
||||||
RitualEffectDemonPortal.dimensionBlacklist = config.get(tempDemonConfigs, "dimension blacklist for the demon portal activation", new int[]{0}).getIntList();
|
AlchemicalWizardry.demonRitualDimensionBlacklist = config.get(tempDemonConfigs, "dimension blacklist for the demon portal activation", new int[]{0}).getIntList();
|
||||||
BoundArmour.tryComplexRendering = config.get("WimpySettings", "UseFancyBoundArmour", true).getBoolean(true);
|
BoundArmour.tryComplexRendering = config.get("WimpySettings", "UseFancyBoundArmour", true).getBoolean(true);
|
||||||
|
|
||||||
// ItemIncense.itemDuration = config.get("TestIncenseSettings", "ItemDuration", 100).getInt();
|
// ItemIncense.itemDuration = config.get("TestIncenseSettings", "ItemDuration", 100).getInt();
|
||||||
|
|||||||
@@ -5,18 +5,31 @@ import net.minecraft.nbt.NBTTagCompound;
|
|||||||
|
|
||||||
public class IMCForNEI {
|
public class IMCForNEI {
|
||||||
public static void IMCSender() {
|
public static void IMCSender() {
|
||||||
setNBTAndSend("WayofTime.alchemicalWizardry.client.nei.NEIMeteorRecipeHandler", "AWWayofTime:masterStone", 130);
|
sendHandler("alchemicalwizardry.meteor", "AWWayofTime:masterStone", 130);
|
||||||
|
sendCatalyst("alchemicalwizardry.meteor", "AWWayofTime:masterStone");
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void setNBTAndSend(String handlerName, String aBlock, int height) {
|
private static void sendHandler(String handlerName, String stack, int height) {
|
||||||
NBTTagCompound NBT = new NBTTagCompound();
|
NBTTagCompound NBT = new NBTTagCompound();
|
||||||
NBT.setString("handler", handlerName);
|
NBT.setString("handler", handlerName);
|
||||||
NBT.setString("modName", "Blood Magic");
|
NBT.setString("modName", "Blood Magic");
|
||||||
NBT.setString("modId", "AWWayofTime");
|
NBT.setString("modId", "AWWayofTime");
|
||||||
NBT.setBoolean("modRequired", true);
|
NBT.setBoolean("modRequired", true);
|
||||||
NBT.setString("itemName", aBlock);
|
NBT.setString("itemName", stack);
|
||||||
NBT.setInteger("handlerHeight", height);
|
NBT.setInteger("handlerHeight", height);
|
||||||
NBT.setInteger("maxRecipesPerPage", 1);
|
NBT.setInteger("maxRecipesPerPage", 1);
|
||||||
FMLInterModComms.sendMessage("NotEnoughItems", "registerHandlerInfo", NBT);
|
FMLInterModComms.sendMessage("NotEnoughItems", "registerHandlerInfo", NBT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static void sendCatalyst(String handlerName, String stack, int priority) {
|
||||||
|
NBTTagCompound aNBT = new NBTTagCompound();
|
||||||
|
aNBT.setString("handlerID", handlerName);
|
||||||
|
aNBT.setString("itemName", stack);
|
||||||
|
aNBT.setInteger("priority", priority);
|
||||||
|
FMLInterModComms.sendMessage("NotEnoughItems", "registerCatalystInfo", aNBT);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void sendCatalyst(String handlerName, String stack) {
|
||||||
|
sendCatalyst(handlerName, stack, 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -84,7 +84,7 @@ public class NEIAltarRecipeHandler extends TemplateRecipeHandler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<String> handleTooltip(GuiRecipe gui, List<String> currenttip, int id) {
|
public List<String> handleTooltip(GuiRecipe<?> gui, List<String> currenttip, int id) {
|
||||||
super.handleTooltip(gui, currenttip, id);
|
super.handleTooltip(gui, currenttip, id);
|
||||||
Point mouse = GuiDraw.getMousePosition();
|
Point mouse = GuiDraw.getMousePosition();
|
||||||
Point root = gui.getRecipePosition(id);
|
Point root = gui.getRecipePosition(id);
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ import net.minecraft.util.ResourceLocation;
|
|||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
|
import java.text.DecimalFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Comparator;
|
import java.util.Comparator;
|
||||||
@@ -25,34 +26,45 @@ import java.util.stream.Collectors;
|
|||||||
public class NEIMeteorRecipeHandler extends TemplateRecipeHandler {
|
public class NEIMeteorRecipeHandler extends TemplateRecipeHandler {
|
||||||
public class CachedMeteorRecipe extends CachedRecipe {
|
public class CachedMeteorRecipe extends CachedRecipe {
|
||||||
|
|
||||||
private final List<MeteorParadigmComponent> components;
|
|
||||||
private final List<PositionedStack> input = new ArrayList<>();
|
private final List<PositionedStack> input = new ArrayList<>();
|
||||||
private final List<PositionedStack> outputs = new ArrayList<>();
|
private final List<PositionedStack> outputs = new ArrayList<>();
|
||||||
private final int cost;
|
private final int cost;
|
||||||
private final int radius;
|
private final int radius;
|
||||||
|
private Point focus;
|
||||||
|
|
||||||
public CachedMeteorRecipe(MeteorParadigm meteor) {
|
public CachedMeteorRecipe(MeteorParadigm meteor, ItemStack focusStack) {
|
||||||
this.components = meteor.componentList;
|
|
||||||
this.input.add(new PositionedStack(meteor.focusStack, 74, 4));
|
this.input.add(new PositionedStack(meteor.focusStack, 74, 4));
|
||||||
int row = 0;
|
int row = 0;
|
||||||
int col = 0;
|
int col = 0;
|
||||||
|
|
||||||
float totalMeteorWeight = meteor.getTotalMeteorWeight();
|
float totalMeteorWeight = meteor.getTotalMeteorWeight();
|
||||||
|
List<MeteorParadigmComponent> sortedComponents = new ArrayList<>(meteor.componentList);
|
||||||
for (MeteorParadigmComponent component : meteor.componentList) {
|
sortedComponents.sort(Comparator.comparingInt(c -> -c.chance));
|
||||||
|
|
||||||
|
for (MeteorParadigmComponent component : sortedComponents) {
|
||||||
ItemStack stack = component.getValidBlockParadigm();
|
ItemStack stack = component.getValidBlockParadigm();
|
||||||
|
int xPos = 3 + 18 * col;
|
||||||
|
int yPos = 37 + 18 * row;
|
||||||
|
|
||||||
List<String> tooltips = new ArrayList<>();
|
List<String> tooltips = new ArrayList<>();
|
||||||
if (stack == null) {
|
if (stack == null) {
|
||||||
stack = new ItemStack(Blocks.fire);
|
stack = new ItemStack(Blocks.fire);
|
||||||
tooltips.add(String.format("no entries found for oredict \"%s\"", component.getOreDictName()));
|
tooltips.add(String.format("no entries found for oredict \"%s\"", component.getOreDictName()));
|
||||||
}
|
}
|
||||||
tooltips.add(I18n.format("nei.recipe.meteor.chance", getFormattedChance(component.getChance() / totalMeteorWeight)));
|
float chance = component.getChance() / totalMeteorWeight;
|
||||||
this.outputs.add(new TooltipStack(stack, 3 + 18 * col, 37 + 18 * row, tooltips));
|
tooltips.add(I18n.format("nei.recipe.meteor.chance", getFormattedChance(chance)));
|
||||||
|
tooltips.add(I18n.format("nei.recipe.meteor.amount", getEstimatedAmount(chance, meteor.radius)));
|
||||||
|
this.outputs.add(new TooltipStack(stack, xPos, yPos, tooltips));
|
||||||
|
|
||||||
col++;
|
col++;
|
||||||
if (col > 8) {
|
if (col > 8) {
|
||||||
col = 0;
|
col = 0;
|
||||||
row++;
|
row++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (focusStack != null && matchItem(focusStack, stack)) {
|
||||||
|
this.focus = new Point(xPos - 1, yPos - 1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
this.radius = meteor.radius;
|
this.radius = meteor.radius;
|
||||||
this.cost = meteor.cost;
|
this.cost = meteor.cost;
|
||||||
@@ -73,10 +85,6 @@ public class NEIMeteorRecipeHandler extends TemplateRecipeHandler {
|
|||||||
return this.outputs;
|
return this.outputs;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<MeteorParadigmComponent> getComponents() {
|
|
||||||
return components;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getCost() {
|
public int getCost() {
|
||||||
return cost;
|
return cost;
|
||||||
}
|
}
|
||||||
@@ -95,7 +103,7 @@ public class NEIMeteorRecipeHandler extends TemplateRecipeHandler {
|
|||||||
public void loadCraftingRecipes(String outputId, Object... results) {
|
public void loadCraftingRecipes(String outputId, Object... results) {
|
||||||
if (outputId.equals(getOverlayIdentifier()) && getClass() == NEIMeteorRecipeHandler.class) {
|
if (outputId.equals(getOverlayIdentifier()) && getClass() == NEIMeteorRecipeHandler.class) {
|
||||||
for (MeteorParadigm meteor : getSortedMeteors()) {
|
for (MeteorParadigm meteor : getSortedMeteors()) {
|
||||||
arecipes.add(new CachedMeteorRecipe(meteor));
|
arecipes.add(new CachedMeteorRecipe(meteor, null));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
super.loadCraftingRecipes(outputId, results);
|
super.loadCraftingRecipes(outputId, results);
|
||||||
@@ -105,8 +113,8 @@ public class NEIMeteorRecipeHandler extends TemplateRecipeHandler {
|
|||||||
@Override
|
@Override
|
||||||
public void loadCraftingRecipes(ItemStack result) {
|
public void loadCraftingRecipes(ItemStack result) {
|
||||||
for (MeteorParadigm meteor : getSortedMeteors()) {
|
for (MeteorParadigm meteor : getSortedMeteors()) {
|
||||||
if (meteor.componentList.stream().anyMatch(m -> NEIServerUtils.areStacksSameTypeCrafting(result, m.getValidBlockParadigm()))) {
|
if (meteor.componentList.stream().anyMatch(m -> matchItem(result, m.getValidBlockParadigm()))) {
|
||||||
arecipes.add(new CachedMeteorRecipe(meteor));
|
arecipes.add(new CachedMeteorRecipe(meteor, result));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -114,12 +122,24 @@ public class NEIMeteorRecipeHandler extends TemplateRecipeHandler {
|
|||||||
@Override
|
@Override
|
||||||
public void loadUsageRecipes(ItemStack ingredient) {
|
public void loadUsageRecipes(ItemStack ingredient) {
|
||||||
for (MeteorParadigm meteor : getSortedMeteors()) {
|
for (MeteorParadigm meteor : getSortedMeteors()) {
|
||||||
if (NEIServerUtils.areStacksSameTypeCrafting(ingredient, meteor.focusStack)) {
|
if (matchItem(ingredient, meteor.focusStack)) {
|
||||||
arecipes.add(new CachedMeteorRecipe(meteor));
|
arecipes.add(new CachedMeteorRecipe(meteor, null));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private boolean matchItem(ItemStack compared, ItemStack compareTo) {
|
||||||
|
if (NEIServerUtils.areStacksSameTypeCrafting(compared, compareTo)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
// ignore ore variants (like basalt ore)
|
||||||
|
if (compared.getUnlocalizedName().startsWith("gt.blockores")
|
||||||
|
&& compareTo.getUnlocalizedName().startsWith("gt.blockores")) {
|
||||||
|
return compared.getItemDamage() % 1000 == compareTo.getItemDamage() % 1000;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getGuiTexture() {
|
public String getGuiTexture() {
|
||||||
return new ResourceLocation("alchemicalwizardry", "gui/nei/meteor.png").toString();
|
return new ResourceLocation("alchemicalwizardry", "gui/nei/meteor.png").toString();
|
||||||
@@ -140,14 +160,20 @@ public class NEIMeteorRecipeHandler extends TemplateRecipeHandler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void drawBackground(int recipe) {
|
public void drawBackground(int recipeIndex) {
|
||||||
GL11.glColor4f(1, 1, 1, 1);
|
GL11.glColor4f(1, 1, 1, 1);
|
||||||
GuiDraw.changeTexture(getGuiTexture());
|
GuiDraw.changeTexture(getGuiTexture());
|
||||||
GuiDraw.drawTexturedModalRect(0, 0, 5, 11, 172, 202);
|
GuiDraw.drawTexturedModalRect(0, 0, 5, 11, 166, 202);
|
||||||
|
|
||||||
|
CachedMeteorRecipe recipe = (CachedMeteorRecipe) this.arecipes.get(recipeIndex);
|
||||||
|
Point focus = recipe.focus;
|
||||||
|
if (focus != null) {
|
||||||
|
GuiDraw.drawTexturedModalRect(focus.x, focus.y, 172, 0, 18, 18);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<String> handleItemTooltip(GuiRecipe gui, ItemStack stack, List<String> currenttip, int recipe) {
|
public List<String> handleItemTooltip(GuiRecipe<?> gui, ItemStack stack, List<String> currenttip, int recipe) {
|
||||||
CachedMeteorRecipe meteorRecipe = (CachedMeteorRecipe) this.arecipes.get(recipe);
|
CachedMeteorRecipe meteorRecipe = (CachedMeteorRecipe) this.arecipes.get(recipe);
|
||||||
for (PositionedStack pStack : meteorRecipe.outputs) {
|
for (PositionedStack pStack : meteorRecipe.outputs) {
|
||||||
if (!gui.isMouseOver(pStack, recipe)) continue;
|
if (!gui.isMouseOver(pStack, recipe)) continue;
|
||||||
@@ -175,9 +201,10 @@ public class NEIMeteorRecipeHandler extends TemplateRecipeHandler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private String getFormattedChance(float chance) {
|
private String getFormattedChance(float chance) {
|
||||||
float percentage = chance * 100.0f;
|
return new DecimalFormat("0.##").format(chance * 100);
|
||||||
boolean isInteger = percentage - (int) percentage <= 0.01;
|
}
|
||||||
if (isInteger) return String.format("%,d", (int) percentage);
|
|
||||||
else return String.format("%,.1f", percentage);
|
private int getEstimatedAmount(float chance, int radius) {
|
||||||
|
return (int) Math.ceil(3f / 4 * Math.PI * Math.pow(radius, 3) * chance);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -50,7 +50,7 @@ public class ItemDiabloKey extends EnergyItems
|
|||||||
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer)
|
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer)
|
||||||
{
|
{
|
||||||
World world = par3EntityPlayer.worldObj;
|
World world = par3EntityPlayer.worldObj;
|
||||||
if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer instanceof FakePlayer || par3EntityPlayer instanceof EntityPlayerMP)
|
if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer instanceof FakePlayer)
|
||||||
{
|
{
|
||||||
return par1ItemStack;
|
return par1ItemStack;
|
||||||
}
|
}
|
||||||
@@ -64,7 +64,7 @@ public class ItemDiabloKey extends EnergyItems
|
|||||||
SpellHelper.sendIndexedParticleToAllAround(world, posX, posY, posZ, 20, world.provider.dimensionId, 4, posX, posY, posZ);
|
SpellHelper.sendIndexedParticleToAllAround(world, posX, posY, posZ, 20, world.provider.dimensionId, 4, posX, posY, posZ);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!par3EntityPlayer.worldObj.isRemote && !(par3EntityPlayer.getClass().equals(EntityPlayerMP.class)))
|
if (par3EntityPlayer.worldObj.isRemote)
|
||||||
{
|
{
|
||||||
return par1ItemStack;
|
return par1ItemStack;
|
||||||
}
|
}
|
||||||
@@ -103,6 +103,7 @@ public class ItemDiabloKey extends EnergyItems
|
|||||||
EnergyItems.checkAndSetItemOwner(itemStack, ownerName);
|
EnergyItems.checkAndSetItemOwner(itemStack, ownerName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
par3EntityPlayer.inventoryContainer.detectAndSendChanges();
|
||||||
|
|
||||||
return par1ItemStack;
|
return par1ItemStack;
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -30,7 +30,7 @@ public class RitualEffectDemonPortal extends RitualEffect
|
|||||||
public static final int drainRate = 50;
|
public static final int drainRate = 50;
|
||||||
public static final Reagent[] reagents = new Reagent[]{ReagentRegistry.aetherReagent, ReagentRegistry.aquasalusReagent, ReagentRegistry.terraeReagent, ReagentRegistry.incendiumReagent, ReagentRegistry.sanctusReagent, ReagentRegistry.tenebraeReagent, ReagentRegistry.magicalesReagent, ReagentRegistry.potentiaReagent};
|
public static final Reagent[] reagents = new Reagent[]{ReagentRegistry.aetherReagent, ReagentRegistry.aquasalusReagent, ReagentRegistry.terraeReagent, ReagentRegistry.incendiumReagent, ReagentRegistry.sanctusReagent, ReagentRegistry.tenebraeReagent, ReagentRegistry.magicalesReagent, ReagentRegistry.potentiaReagent};
|
||||||
public static final Int3[] jarLocations = new Int3[]{new Int3(4, 5, 4), new Int3(-4, 5, 4), new Int3(4, 5, -4), new Int3(-4, 5, -4), new Int3(0, 5, 6), new Int3(0, 5, -6), new Int3(6, 5, 0), new Int3(-6, 5, 0)};
|
public static final Int3[] jarLocations = new Int3[]{new Int3(4, 5, 4), new Int3(-4, 5, 4), new Int3(4, 5, -4), new Int3(-4, 5, -4), new Int3(0, 5, 6), new Int3(0, 5, -6), new Int3(6, 5, 0), new Int3(-6, 5, 0)};
|
||||||
public static int[] dimensionBlacklist = new int[]{0};
|
|
||||||
@Override
|
@Override
|
||||||
public void performEffect(IMasterRitualStone ritualStone)
|
public void performEffect(IMasterRitualStone ritualStone)
|
||||||
{
|
{
|
||||||
@@ -123,7 +123,7 @@ public class RitualEffectDemonPortal extends RitualEffect
|
|||||||
@Override
|
@Override
|
||||||
public boolean startRitual(IMasterRitualStone ritualStone, EntityPlayer player)
|
public boolean startRitual(IMasterRitualStone ritualStone, EntityPlayer player)
|
||||||
{
|
{
|
||||||
for (int dim: dimensionBlacklist){
|
for (int dim : AlchemicalWizardry.demonRitualDimensionBlacklist) {
|
||||||
if (player.dimension == dim) return false;
|
if (player.dimension == dim) return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.6 KiB |
@@ -265,6 +265,7 @@ nei.recipe.meteor.category=Meteor Ritual
|
|||||||
nei.recipe.meteor.cost=Cost: %s LP
|
nei.recipe.meteor.cost=Cost: %s LP
|
||||||
nei.recipe.meteor.radius=Radius: %s
|
nei.recipe.meteor.radius=Radius: %s
|
||||||
nei.recipe.meteor.chance=Chance: %s%%
|
nei.recipe.meteor.chance=Chance: %s%%
|
||||||
|
nei.recipe.meteor.amount=Estimated amount: %s
|
||||||
|
|
||||||
#Rituals
|
#Rituals
|
||||||
ritual.AW001Water.name=Ritual of the Full Spring
|
ritual.AW001Water.name=Ritual of the Full Spring
|
||||||
|
|||||||
Reference in new issue
Block a user