mirror of
https://github.com/GTNewHorizons/BloodMagic.git
synced 2026-11-27 07:13:14 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
45046e66d8 | ||
|
|
61c66490c6 | ||
|
|
813a05a5a6 | ||
|
|
5bfdabb5f6 | ||
|
|
2e95450cf0 | ||
|
|
8ff0421f55 | ||
|
|
ba0a0e3357 | ||
|
|
222ad1645e |
No files matched your search
+8
-8
@@ -23,16 +23,16 @@
|
||||
*/
|
||||
|
||||
dependencies {
|
||||
api("com.github.GTNewHorizons:waila:1.8.1:dev")
|
||||
api("com.github.GTNewHorizons:NotEnoughItems:2.6.34-GTNH:dev")
|
||||
|
||||
compileOnly("com.github.GTNewHorizons:GT5-Unofficial:5.09.49.68:dev") {transitive = false }
|
||||
|
||||
compileOnly("com.github.GTNewHorizons:Botania:1.11.5-GTNH:api") {transitive = false }
|
||||
compileOnly("com.github.GTNewHorizons:ForestryMC:4.9.10:api") {transitive = false }
|
||||
api("com.github.GTNewHorizons:waila:1.8.2:dev")
|
||||
api("com.github.GTNewHorizons:NotEnoughItems:2.6.54-GTNH:dev")
|
||||
|
||||
compileOnly("com.github.GTNewHorizons:GT5-Unofficial:5.09.50.115:dev") {transitive = false }
|
||||
|
||||
compileOnly("com.github.GTNewHorizons:Botania:1.11.7-GTNH:api") {transitive = false }
|
||||
compileOnly("com.github.GTNewHorizons:ForestryMC:4.9.22:api") {transitive = false }
|
||||
compileOnly("com.github.GTNewHorizons:ForgeMultipart:1.5.0:dev") {transitive = false }
|
||||
|
||||
compileOnly("com.github.GTNewHorizons:Chisel:2.15.2-GTNH:api") {transitive = false }
|
||||
compileOnly("com.github.GTNewHorizons:Chisel:2.15.4-GTNH:api") {transitive = false }
|
||||
|
||||
compileOnly("com.github.GTNewHorizons:ZenScript:1.0.0-GTNH") {transitive = false }
|
||||
compileOnly("com.github.GTNewHorizons:CraftTweaker:3.4.0:dev") {transitive = false }
|
||||
|
||||
Vendored
BIN
Binary file not shown.
+1
-1
@@ -1,6 +1,6 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@ pluginManagement {
|
||||
}
|
||||
|
||||
plugins {
|
||||
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.27'
|
||||
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.30'
|
||||
}
|
||||
|
||||
|
||||
@@ -280,7 +280,7 @@ public class SoulNetworkHandler {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int newEss = Math.min(event.maximum, currEss + event.addedAmount);
|
||||
int newEss = (int) Math.min(Integer.MAX_VALUE, Math.min(event.maximum, (long) currEss + event.addedAmount));
|
||||
if (event.getResult() != Event.Result.DENY) {
|
||||
data.currentEssence = newEss;
|
||||
}
|
||||
|
||||
@@ -31,6 +31,7 @@ public class NEIMeteorRecipeHandler extends TemplateRecipeHandler {
|
||||
|
||||
private final List<PositionedStack> input = new ArrayList<>();
|
||||
private final List<PositionedStack> outputs = new ArrayList<>();
|
||||
private final List<PositionedStack> filler = new ArrayList<>();
|
||||
private final int cost;
|
||||
private final int radius;
|
||||
private Point focus;
|
||||
@@ -40,9 +41,13 @@ public class NEIMeteorRecipeHandler extends TemplateRecipeHandler {
|
||||
int row = 0;
|
||||
int col = 0;
|
||||
|
||||
float totalMeteorWeight = meteor.getTotalMeteorWeight();
|
||||
float totalComponentWeight = meteor.getTotalListWeight(meteor.componentList);
|
||||
int fillerChance = meteor.fillerChance;
|
||||
List<MeteorParadigmComponent> sortedComponents = new ArrayList<>(meteor.componentList);
|
||||
sortedComponents.sort(Comparator.comparingInt(c -> -c.getChance()));
|
||||
sortedComponents.sort(Comparator.comparingInt(c -> -c.getWeight()));
|
||||
|
||||
float fillerRatio = (float) (fillerChance / 100.0);
|
||||
float componentRatio = 1 - fillerRatio;
|
||||
|
||||
for (MeteorParadigmComponent component : sortedComponents) {
|
||||
ItemStack stack = component.getValidBlockParadigm();
|
||||
@@ -50,7 +55,7 @@ public class NEIMeteorRecipeHandler extends TemplateRecipeHandler {
|
||||
int yPos = 37 + 18 * row;
|
||||
|
||||
List<String> tooltips = new ArrayList<>();
|
||||
float chance = component.getChance() / totalMeteorWeight;
|
||||
float chance = component.getWeight() / totalComponentWeight * componentRatio;
|
||||
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));
|
||||
@@ -61,10 +66,45 @@ public class NEIMeteorRecipeHandler extends TemplateRecipeHandler {
|
||||
row++;
|
||||
}
|
||||
|
||||
if (focusStack != null && matchItem(focusStack, stack)) {
|
||||
if (matchItem(focusStack, stack)) {
|
||||
this.focus = new Point(xPos - 1, yPos - 1);
|
||||
}
|
||||
}
|
||||
|
||||
if (fillerChance > 0) {
|
||||
if (col != 0) {
|
||||
col = 0;
|
||||
row++;
|
||||
}
|
||||
|
||||
List<MeteorParadigmComponent> sortedFiller = new ArrayList<>(meteor.fillerList);
|
||||
sortedFiller.sort(Comparator.comparingInt(c -> -c.getWeight()));
|
||||
float totalFillerWeight = meteor.getTotalListWeight(meteor.fillerList);
|
||||
|
||||
for (MeteorParadigmComponent filler : sortedFiller) {
|
||||
ItemStack stack = filler.getValidBlockParadigm();
|
||||
int xPos = 3 + 18 * col;
|
||||
int yPos = 37 + 18 * row;
|
||||
|
||||
List<String> tooltips = new ArrayList<>();
|
||||
float chance = filler.getWeight() / totalFillerWeight * fillerRatio;
|
||||
tooltips.add(I18n.format("nei.recipe.meteor.chance", getFormattedChance(chance)));
|
||||
tooltips.add(I18n.format("nei.recipe.meteor.amount", getEstimatedAmount(chance, meteor.radius)));
|
||||
tooltips.add(I18n.format("nei.recipe.meteor.filler"));
|
||||
this.outputs.add(new TooltipStack(stack, xPos, yPos, tooltips));
|
||||
|
||||
col++;
|
||||
if (col > 8) {
|
||||
col = 0;
|
||||
row++;
|
||||
}
|
||||
|
||||
if (matchItem(focusStack, stack)) {
|
||||
this.focus = new Point(xPos - 1, yPos - 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.radius = meteor.radius;
|
||||
this.cost = meteor.cost;
|
||||
}
|
||||
@@ -115,6 +155,9 @@ public class NEIMeteorRecipeHandler extends TemplateRecipeHandler {
|
||||
if (meteor.componentList.stream().anyMatch(m -> matchItem(result, m.getValidBlockParadigm()))) {
|
||||
arecipes.add(new CachedMeteorRecipe(meteor, result));
|
||||
}
|
||||
if (meteor.fillerList.stream().anyMatch(m -> matchItem(result, m.getValidBlockParadigm()))) {
|
||||
arecipes.add(new CachedMeteorRecipe(meteor, result));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -205,6 +248,6 @@ public class NEIMeteorRecipeHandler extends TemplateRecipeHandler {
|
||||
}
|
||||
|
||||
private int getEstimatedAmount(float chance, int radius) {
|
||||
return (int) Math.ceil(4f / 3 * Math.PI * Math.pow(radius, 3) * chance);
|
||||
return (int) Math.ceil(4f / 3 * Math.PI * Math.pow(radius + 0.5, 3) * chance);
|
||||
}
|
||||
}
|
||||
@@ -106,26 +106,24 @@ public class RenderHelper {
|
||||
GL11.glPushMatrix();
|
||||
int xSize = 32;
|
||||
int ySize = 32;
|
||||
|
||||
int amount = Math.max((int) (256 * ((double) (maxAmount - lpAmount) / maxAmount)), 0);
|
||||
|
||||
int x = (lpBarX - xSize / 2) * 8;
|
||||
int y = (lpBarY - ySize / 2) * 8;
|
||||
|
||||
ResourceLocation test2 = new ResourceLocation("alchemicalwizardry", "textures/gui/container1.png");
|
||||
GL11.glColor4f(1, 0, 0, 1.0F);
|
||||
mc.getTextureManager().bindTexture(test2);
|
||||
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
mc.renderEngine.bindTexture(test2);
|
||||
GL11.glScalef(1f / 8f, 1f / 8f, 1f / 8f);
|
||||
|
||||
GL11.glPushMatrix();
|
||||
drawTexturedModalRect(x, y + amount, 0, amount, 256, 256 - amount);
|
||||
|
||||
GL11.glPopMatrix();
|
||||
ResourceLocation test = new ResourceLocation("alchemicalwizardry", "textures/gui/lpVial.png");
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
mc.getTextureManager().bindTexture(test);
|
||||
|
||||
mc.renderEngine.bindTexture(test);
|
||||
GL11.glPushMatrix();
|
||||
drawTexturedModalRect(x, y, 0, 0, 256, 256);
|
||||
|
||||
GL11.glPopMatrix();
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
|
||||
@@ -10,17 +10,20 @@ import net.minecraft.item.ItemStack;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import com.google.gson.JsonSyntaxException;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
|
||||
public class Meteor {
|
||||
|
||||
public String[] ores;
|
||||
public int radius;
|
||||
public int cost;
|
||||
public String focusModId;
|
||||
public String focusName;
|
||||
public int focusMeta;
|
||||
private String[] ores;
|
||||
private int radius;
|
||||
private int cost;
|
||||
private String focusModId;
|
||||
private String focusName;
|
||||
private int focusMeta;
|
||||
private String[] filler;
|
||||
private int fillerChance;
|
||||
|
||||
public static void loadConfig() {
|
||||
Gson gson = new GsonBuilder().setPrettyPrinting().create();
|
||||
@@ -35,9 +38,11 @@ public class Meteor {
|
||||
findItemStack(m.focusModId, m.focusName, m.focusMeta),
|
||||
m.ores,
|
||||
m.radius,
|
||||
m.cost);
|
||||
m.cost,
|
||||
m.filler,
|
||||
m.fillerChance);
|
||||
}
|
||||
} catch (FileNotFoundException e) {
|
||||
} catch (FileNotFoundException | JsonSyntaxException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
+71
-88
@@ -21,16 +21,23 @@ import gregtech.common.blocks.TileEntityOres;
|
||||
public class MeteorParadigm {
|
||||
|
||||
public List<MeteorParadigmComponent> componentList = new ArrayList<>();
|
||||
public List<MeteorParadigmComponent> fillerList = new ArrayList<>();
|
||||
public ItemStack focusStack;
|
||||
public int radius;
|
||||
public int cost;
|
||||
public int fillerChance; // Out of 100
|
||||
|
||||
public static Random rand = new Random();
|
||||
|
||||
public MeteorParadigm(ItemStack focusStack, int radius, int cost) {
|
||||
new MeteorParadigm(focusStack, radius, cost, 0);
|
||||
}
|
||||
|
||||
public MeteorParadigm(ItemStack focusStack, int radius, int cost, int fillerChance) {
|
||||
this.focusStack = focusStack;
|
||||
this.radius = radius;
|
||||
this.cost = cost;
|
||||
this.fillerChance = fillerChance;
|
||||
}
|
||||
|
||||
// modId:itemName:meta:weight
|
||||
@@ -38,12 +45,13 @@ public class MeteorParadigm {
|
||||
// OREDICT:oreDictName:weight
|
||||
private static final Pattern oredictPattern = Pattern.compile("OREDICT:(.*):(\\d+)");
|
||||
|
||||
public void parseStringArray(String[] oreArray) {
|
||||
for (int i = 0; i < oreArray.length; ++i) {
|
||||
String oreName = oreArray[i];
|
||||
public static List<MeteorParadigmComponent> parseStringArray(String[] blockArray) {
|
||||
List<MeteorParadigmComponent> addList = new ArrayList<>();
|
||||
for (int i = 0; i < blockArray.length; ++i) {
|
||||
String blockName = blockArray[i];
|
||||
boolean success = false;
|
||||
|
||||
Matcher matcher = itemNamePattern.matcher(oreName);
|
||||
Matcher matcher = itemNamePattern.matcher(blockName);
|
||||
if (matcher.matches()) {
|
||||
String modID = matcher.group(1);
|
||||
String itemName = matcher.group(2);
|
||||
@@ -53,18 +61,18 @@ public class MeteorParadigm {
|
||||
ItemStack stack = GameRegistry.findItemStack(modID, itemName, 1);
|
||||
if (stack != null && stack.getItem() instanceof ItemBlock) {
|
||||
stack.setItemDamage(meta);
|
||||
componentList.add(new MeteorParadigmComponent(stack, weight));
|
||||
addList.add(new MeteorParadigmComponent(stack, weight));
|
||||
success = true;
|
||||
}
|
||||
|
||||
} else if ((matcher = oredictPattern.matcher(oreName)).matches()) {
|
||||
} else if ((matcher = oredictPattern.matcher(blockName)).matches()) {
|
||||
String oreDict = matcher.group(1);
|
||||
int weight = Integer.parseInt(matcher.group(2));
|
||||
|
||||
List<ItemStack> list = OreDictionary.getOres(oreDict);
|
||||
for (ItemStack stack : list) {
|
||||
if (stack != null && stack.getItem() instanceof ItemBlock) {
|
||||
componentList.add(new MeteorParadigmComponent(stack, weight));
|
||||
addList.add(new MeteorParadigmComponent(stack, weight));
|
||||
success = true;
|
||||
break;
|
||||
}
|
||||
@@ -72,13 +80,13 @@ public class MeteorParadigm {
|
||||
|
||||
} else {
|
||||
// Legacy config
|
||||
String oreDict = oreName;
|
||||
int weight = Integer.parseInt(oreArray[++i]);
|
||||
String oreDict = blockName;
|
||||
int weight = Integer.parseInt(blockArray[++i]);
|
||||
|
||||
List<ItemStack> list = OreDictionary.getOres(oreDict);
|
||||
for (ItemStack stack : list) {
|
||||
if (stack != null && stack.getItem() instanceof ItemBlock) {
|
||||
componentList.add(new MeteorParadigmComponent(stack, weight));
|
||||
addList.add(new MeteorParadigmComponent(stack, weight));
|
||||
success = true;
|
||||
break;
|
||||
}
|
||||
@@ -86,17 +94,18 @@ public class MeteorParadigm {
|
||||
}
|
||||
|
||||
if (!success) {
|
||||
AlchemicalWizardry.logger.warn("Unable to add Meteor Paradigm \"" + oreName + "\"");
|
||||
AlchemicalWizardry.logger.warn("Unable to add Meteor Paradigm \"" + blockName + "\"");
|
||||
}
|
||||
}
|
||||
return addList;
|
||||
}
|
||||
|
||||
public int getTotalMeteorWeight() {
|
||||
int totalMeteorWeight = 0;
|
||||
for (MeteorParadigmComponent mpc : componentList) {
|
||||
totalMeteorWeight += mpc.getChance();
|
||||
public int getTotalListWeight(List<MeteorParadigmComponent> blockList) {
|
||||
int totalWeight = 0;
|
||||
for (MeteorParadigmComponent mpc : blockList) {
|
||||
totalWeight += mpc.getWeight();
|
||||
}
|
||||
return totalMeteorWeight;
|
||||
return totalWeight;
|
||||
}
|
||||
|
||||
public void createMeteorImpact(World world, int x, int y, int z, boolean[] flags) {
|
||||
@@ -115,22 +124,41 @@ public class MeteorParadigm {
|
||||
}
|
||||
|
||||
int newRadius = radius;
|
||||
|
||||
int fillerChance = this.fillerChance;
|
||||
if (hasOrbisTerrae) {
|
||||
newRadius += 2;
|
||||
fillerChance *= 1.12;
|
||||
} else if (hasTerrae) {
|
||||
newRadius += 1;
|
||||
fillerChance *= 1.06;
|
||||
}
|
||||
if (fillerChance > 100) {
|
||||
fillerChance = 100;
|
||||
}
|
||||
|
||||
world.createExplosion(null, x, y, z, newRadius * 4, AlchemicalWizardry.doMeteorsDestroyBlocks);
|
||||
|
||||
float iceChance = hasCrystallos ? 1 : 0;
|
||||
float soulChance = hasIncendium ? 1 : 0;
|
||||
float obsidChance = hasTennebrae ? 1 : 0;
|
||||
List<MeteorParadigmComponent> fillerList;
|
||||
|
||||
float totalChance = iceChance + soulChance + obsidChance;
|
||||
if (hasCrystallos || hasIncendium || hasTennebrae) {
|
||||
fillerList = new ArrayList<>();
|
||||
if (hasCrystallos) {
|
||||
fillerList.add(new MeteorParadigmComponent(new ItemStack(Blocks.ice), 180)); // 180 = 2^2 * 3^2 * 5
|
||||
}
|
||||
if (hasIncendium) {
|
||||
fillerList.add(new MeteorParadigmComponent(new ItemStack(Blocks.netherrack), 60));
|
||||
fillerList.add(new MeteorParadigmComponent(new ItemStack(Blocks.soul_sand), 60));
|
||||
fillerList.add(new MeteorParadigmComponent(new ItemStack(Blocks.glowstone), 60));
|
||||
}
|
||||
if (hasTennebrae) {
|
||||
fillerList.add(new MeteorParadigmComponent(new ItemStack(Blocks.obsidian), 180));
|
||||
}
|
||||
} else {
|
||||
fillerList = this.fillerList;
|
||||
}
|
||||
|
||||
int totalMeteorWeight = getTotalMeteorWeight();
|
||||
int totalComponentWeight = getTotalListWeight(componentList);
|
||||
int totalFillerWeight = getTotalListWeight(fillerList);
|
||||
|
||||
for (int i = -newRadius; i <= newRadius; i++) {
|
||||
for (int j = -newRadius; j <= newRadius; j++) {
|
||||
@@ -143,75 +171,30 @@ public class MeteorParadigm {
|
||||
continue;
|
||||
}
|
||||
|
||||
int randNum = world.rand.nextInt(totalMeteorWeight);
|
||||
|
||||
boolean hasPlacedBlock = false;
|
||||
|
||||
for (MeteorParadigmComponent mpc : componentList) {
|
||||
randNum -= mpc.getChance();
|
||||
|
||||
if (randNum < 0) {
|
||||
ItemStack blockStack = mpc.getValidBlockParadigm();
|
||||
if (blockStack != null && blockStack.getItem() instanceof ItemBlock) {
|
||||
((ItemBlock) blockStack.getItem()).placeBlockAt(
|
||||
blockStack,
|
||||
null,
|
||||
world,
|
||||
x + i,
|
||||
y + j,
|
||||
z + k,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
blockStack.getItemDamage());
|
||||
if (AlchemicalWizardry.isGregTechLoaded)
|
||||
setGTOresNaturalIfNeeded(world, x + i, y + j, z + k);
|
||||
world.markBlockForUpdate(x + i, y + j, z + k);
|
||||
hasPlacedBlock = true;
|
||||
break;
|
||||
}
|
||||
// world.setBlock(x + i, y + j, z + k,
|
||||
// Block.getBlockById(Item.getIdFromItem(blockStack.getItem())), blockStack.getItemDamage(),
|
||||
// 3);
|
||||
// hasPlacedBlock = true;
|
||||
// break;
|
||||
}
|
||||
if (fillerChance <= 0 || world.rand.nextInt(100) >= fillerChance) {
|
||||
setMeteorBlock(x + i, y + j, z + k, world, componentList, totalComponentWeight);
|
||||
} else {
|
||||
setMeteorBlock(x + i, y + j, z + k, world, fillerList, totalFillerWeight);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!hasPlacedBlock) {
|
||||
float randChance = rand.nextFloat() * totalChance;
|
||||
private void setMeteorBlock(int x, int y, int z, World world, List<MeteorParadigmComponent> blockList,
|
||||
int totalListWeight) {
|
||||
int randNum = world.rand.nextInt(totalListWeight);
|
||||
for (MeteorParadigmComponent mpc : blockList) {
|
||||
randNum -= mpc.getWeight();
|
||||
|
||||
if (randChance < iceChance) {
|
||||
world.setBlock(x + i, y + j, z + k, Blocks.ice, 0, 3);
|
||||
} else {
|
||||
randChance -= iceChance;
|
||||
|
||||
if (randChance < soulChance) {
|
||||
switch (rand.nextInt(3)) {
|
||||
case 0:
|
||||
world.setBlock(x + i, y + j, z + k, Blocks.soul_sand, 0, 3);
|
||||
break;
|
||||
case 1:
|
||||
world.setBlock(x + i, y + j, z + k, Blocks.glowstone, 0, 3);
|
||||
break;
|
||||
case 2:
|
||||
world.setBlock(x + i, y + j, z + k, Blocks.netherrack, 0, 3);
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
randChance -= soulChance;
|
||||
|
||||
if (randChance < obsidChance) {
|
||||
world.setBlock(x + i, y + j, z + k, Blocks.obsidian, 0, 3);
|
||||
} else {
|
||||
randChance -= obsidChance;
|
||||
|
||||
world.setBlock(x + i, y + j, z + k, Blocks.stone, 0, 3);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (randNum < 0) {
|
||||
ItemStack blockStack = mpc.getValidBlockParadigm();
|
||||
if (blockStack != null && blockStack.getItem() instanceof ItemBlock) {
|
||||
((ItemBlock) blockStack.getItem())
|
||||
.placeBlockAt(blockStack, null, world, x, y, z, 0, 0, 0, 0, blockStack.getItemDamage());
|
||||
if (AlchemicalWizardry.isGregTechLoaded) setGTOresNaturalIfNeeded(world, x, y, z);
|
||||
world.markBlockForUpdate(x, y, z);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+5
-5
@@ -4,16 +4,16 @@ import net.minecraft.item.ItemStack;
|
||||
|
||||
public class MeteorParadigmComponent {
|
||||
|
||||
protected int chance;
|
||||
protected int weight;
|
||||
protected ItemStack itemStack;
|
||||
|
||||
public MeteorParadigmComponent(ItemStack stack, int chance) {
|
||||
public MeteorParadigmComponent(ItemStack stack, int weight) {
|
||||
this.itemStack = stack;
|
||||
this.chance = chance;
|
||||
this.weight = weight;
|
||||
}
|
||||
|
||||
public int getChance() {
|
||||
return this.chance;
|
||||
public int getWeight() {
|
||||
return this.weight;
|
||||
}
|
||||
|
||||
public ItemStack getValidBlockParadigm() {
|
||||
|
||||
+15
-4
@@ -3,6 +3,7 @@ package WayofTime.alchemicalWizardry.common.summoning.meteor;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
@@ -15,10 +16,20 @@ public class MeteorRegistry {
|
||||
paradigmList.add(paradigm);
|
||||
}
|
||||
|
||||
public static void registerMeteorParadigm(ItemStack stack, String[] oreList, int radius, int cost) {
|
||||
if (stack != null && oreList != null) {
|
||||
MeteorParadigm meteor = new MeteorParadigm(stack, radius, cost);
|
||||
meteor.parseStringArray(oreList);
|
||||
public static void registerMeteorParadigm(ItemStack stack, String[] componentList, int radius, int cost) {
|
||||
registerMeteorParadigm(stack, componentList, radius, cost, null, 0);
|
||||
}
|
||||
|
||||
public static void registerMeteorParadigm(ItemStack stack, String[] componentList, int radius, int cost,
|
||||
String[] fillerList, int fillerChance) {
|
||||
if (stack != null && componentList != null) {
|
||||
MeteorParadigm meteor = new MeteorParadigm(stack, radius, cost, fillerChance);
|
||||
meteor.componentList = MeteorParadigm.parseStringArray(componentList);
|
||||
if (fillerList != null && fillerList.length > 0) {
|
||||
meteor.fillerList = MeteorParadigm.parseStringArray(fillerList);
|
||||
} else {
|
||||
meteor.fillerList.add(new MeteorParadigmComponent(new ItemStack(Blocks.stone), 1));
|
||||
}
|
||||
paradigmList.add(meteor);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,6 +41,19 @@ public class FallingTower {
|
||||
MineTweakerAPI.apply(new Add(toStack(stack), radius, cost, components.split("\\s*,\\s*")));
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void addFocus(IItemStack stack, int radius, int cost, String components, String filler,
|
||||
int fillerChance) {
|
||||
MineTweakerAPI.apply(
|
||||
new Add(
|
||||
toStack(stack),
|
||||
radius,
|
||||
cost,
|
||||
components.split("\\s*,\\s*"),
|
||||
filler.split("\\s*,\\s*"),
|
||||
fillerChance));
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void removeFocus(IItemStack output) {
|
||||
MineTweakerAPI.apply(new Remove(toStack(output)));
|
||||
@@ -51,8 +64,16 @@ public class FallingTower {
|
||||
private MeteorParadigm paradigm;
|
||||
|
||||
public Add(ItemStack stack, int radius, int cost, String[] components) {
|
||||
new Add(stack, radius, cost, components, null, 0);
|
||||
}
|
||||
|
||||
public Add(ItemStack stack, int radius, int cost, String[] components, String[] filler, int fillerChance) {
|
||||
paradigm = new MeteorParadigm(stack, radius, cost);
|
||||
paradigm.parseStringArray(components);
|
||||
paradigm.componentList = MeteorParadigm.parseStringArray(components);
|
||||
if (filler != null) {
|
||||
paradigm.fillerList = MeteorParadigm.parseStringArray(filler);
|
||||
}
|
||||
paradigm.fillerChance = fillerChance;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#Block Localization
|
||||
tile.bloodAltar.name=Blood Altar
|
||||
tile.bloodRune.name=Blood Rune
|
||||
tile.bloodRune.blank.name=Blood Rune
|
||||
tile.bloodRune.fill.name=Rune of Augmented Capacity
|
||||
tile.bloodRune.empty.name=Rune of Dislocation
|
||||
@@ -25,10 +26,12 @@ tile.bloodPedestal.name=Arcane Pedestal
|
||||
tile.bloodPlinth.name=Arcane Plinth
|
||||
tile.bloodTeleposer.name=Teleposer
|
||||
tile.blockConduit.name=Spell Conduit
|
||||
tile.blockSpellParadigm.name=Paradigm
|
||||
tile.blockSpellParadigm.projectile.name=Particle Generator
|
||||
tile.blockSpellParadigm.self.name=Self Augmentator
|
||||
tile.blockSpellParadigm.melee.name=Melee Aggregator
|
||||
tile.blockSpellParadigm.tool.name=Tool Forger
|
||||
tile.blockSpellEnhancement.name=Enhancement Spell
|
||||
tile.blockSpellEnhancement.power1.name=Unstable Spell Empowerer
|
||||
tile.blockSpellEnhancement.power2.name=Standard Spell Empowerer
|
||||
tile.blockSpellEnhancement.power3.name=Reinforced Spell Empowerer
|
||||
@@ -44,10 +47,12 @@ tile.blockSpellEnhancement.potency2.name=Standard Spell Augmentor
|
||||
tile.blockSpellEnhancement.potency3.name=Reinforced Spell Augmentor
|
||||
tile.blockSpellEnhancement.potency4.name=Imbued Spell Augmentor
|
||||
tile.blockSpellEnhancement.potency5.name=Demonic Spell Augmentor
|
||||
tile.blockSpellModifier.name=Modifier Spell
|
||||
tile.blockSpellModifier.default.name=Default Spell Modifier
|
||||
tile.blockSpellModifier.offensive.name=Offensive Spell Modifier
|
||||
tile.blockSpellModifier.defensive.name=Defensive Spell Modifier
|
||||
tile.blockSpellModifier.environmental.name=Environmental Spell Modifier
|
||||
tile.blockSpellEffect.name=Effect Spell
|
||||
tile.blockSpellEffect.fire.name=Crucible of Fire
|
||||
tile.blockSpellEffect.ice.name=Ice Maker
|
||||
tile.blockSpellEffect.wind.name=Wind Generator
|
||||
@@ -56,12 +61,15 @@ tile.alchemicCalcinator.name=Alchemic Calcinator
|
||||
tile.crystalBelljar.name=Crystal Belljar
|
||||
tile.blockReagentConduit.name=Alchemy Relay
|
||||
tile.lifeEssenceFluidBlock.name=Life Essence
|
||||
tile.crystalBlock.name=Crystal Cluster
|
||||
tile.crystalBlock.fullCrystal.name=Crystal Cluster
|
||||
tile.crystalBlock.crystalBrick.name=Crystal Cluster Brick
|
||||
tile.demonPortal.name=Demon Portal
|
||||
tile.demonChest.name=Demon's Chest
|
||||
tile.enchantmentGlyph.name=Enchantment Glyph
|
||||
tile.enchantmentGlyph.enchantability.name=Glyph of the Adept Enchanter
|
||||
tile.enchantmentGlyph.enchantmentLevel.name=Glyph of Arcane Potential
|
||||
tile.stabilityGlyph.name=Glyph of Rigid Stability
|
||||
tile.stabilityGlyph.stability1.name=Glyph of Rigid Stability
|
||||
tile.schematicSaver.name=Schematic Saver
|
||||
tile.blockMimic.name=Mimic Block
|
||||
@@ -157,6 +165,7 @@ item.itemComplexSpellCrystal.name=Complex Spell Crystal
|
||||
item.itemSigilOfSupression.name=Sigil of Supression
|
||||
item.itemSigilOfEnderSeverance.name=Sigil of Ender Severance
|
||||
item.bucketLife.name=Bucket of Life
|
||||
item.baseItems.name=Base Item
|
||||
item.bloodMagicBaseItem.QuartzRod.name=Quartz Rod
|
||||
item.bloodMagicBaseItem.EmptyCore.name=Empty Core
|
||||
item.bloodMagicBaseItem.MagicalesCable.name=Magicales Cable
|
||||
@@ -189,6 +198,7 @@ item.bloodMagicBaseItem.LifeShard.name=Life Shard
|
||||
item.bloodMagicBaseItem.SoulShard.name=Soul Shard
|
||||
item.bloodMagicBaseItem.LifeBrace.name=Living Brace
|
||||
item.bloodMagicBaseItem.SoulRunicPlate.name=Soul Runic Plate
|
||||
item.baseAlchemyItems.name=Base Alchemy Item
|
||||
item.bloodMagicAlchemyItem.Offensa.name=Offensa
|
||||
item.bloodMagicAlchemyItem.Praesidium.name=Praesidium
|
||||
item.bloodMagicAlchemyItem.OrbisTerrae.name=Orbis Terrae
|
||||
@@ -219,6 +229,7 @@ item.transcendentBloodOrb.name=Transcendent Blood Orb
|
||||
item.itemMailCatalogue.name=Mail Order Catalogue
|
||||
item.inputRoutingFocus.name=Input Routing Focus
|
||||
item.bloodMagicBaseItem.EnderShard.name=Ender Shard
|
||||
item.outputRoutingFocus.name=Output Routing Focus
|
||||
item.outputRoutingFocus.default.name=Default Output Routing Focus
|
||||
item.outputRoutingFocus.modItem.name=Output Routing Focus (ModItem)
|
||||
item.outputRoutingFocus.ignMeta.name=Output Routing Focus (Ignore Meta)
|
||||
@@ -242,6 +253,7 @@ item.boundPlateWater.name=Water Omega Plate
|
||||
item.boundLeggingsWater.name=Water Omega Leggings
|
||||
item.boundBootsWater.name=Water Omega Boots
|
||||
|
||||
item.bloodMagicIncenseItem.name=Incense Item
|
||||
item.bloodMagicIncenseItem.Woodash.name=Wood Ash
|
||||
item.bloodMagicIncenseItem.Byrrus.name=Byrrus
|
||||
item.bloodMagicIncenseItem.Livens.name=Livens
|
||||
@@ -267,6 +279,7 @@ nei.recipe.meteor.cost=Cost: %s LP
|
||||
nei.recipe.meteor.radius=Radius: %s
|
||||
nei.recipe.meteor.chance=Chance: %s%%
|
||||
nei.recipe.meteor.amount=Estimated amount: %s
|
||||
nei.recipe.meteor.filler=§7Filler block
|
||||
|
||||
#Rituals
|
||||
ritual.AW001Water.name=Ritual of the Full Spring
|
||||
@@ -625,4 +638,4 @@ tooltip.waila.notActive=Ritual Not Active
|
||||
option.bm.bloodAltar=Blood Altar
|
||||
option.bm.ritualController=Ritual Stones
|
||||
option.bm.teleposer=Teleposer
|
||||
option.bm.chemistrySet=Alchemical Chemistry Set
|
||||
option.bm.chemistrySet=Alchemical Chemistry Set
|
||||
Reference in new issue
Block a user