chore: format code

This commit is contained in:
LordMZTE 2023-01-12 18:22:43 +01:00
parent 1e3213799a
commit a539810fe6
Signed by: LordMZTE
GPG key ID: B64802DC33A64FF6
15 changed files with 237 additions and 135 deletions

View file

@ -246,7 +246,9 @@ public class GuiTicker {
int maxVis = ((TileCrystalCapacitor) te).maxVis; int maxVis = ((TileCrystalCapacitor) te).maxVis;
String top_s = storedVis + " Vis"; String top_s = storedVis + " Vis";
String bot_s = Math.round(maxVis == 0 ? 0 : ((float)storedVis / (float)maxVis) * 100.0) + "%"; String bot_s
= Math.round(maxVis == 0 ? 0 : ((float) storedVis / (float) maxVis) * 100.0)
+ "%";
int textwidth = Math.max( int textwidth = Math.max(
mc.fontRenderer.getStringWidth(top_s), mc.fontRenderer.getStringWidth(bot_s) mc.fontRenderer.getStringWidth(top_s), mc.fontRenderer.getStringWidth(bot_s)

View file

@ -10,11 +10,43 @@ import thaumcraft.api.aspects.AspectList;
import thaumcraft.common.config.ConfigBlocks; import thaumcraft.common.config.ConfigBlocks;
public class Recipes { public class Recipes {
public static void init() { public static void init() {
Research.arcaneRecipes.put("ArcaneStone", ThaumcraftApi.addArcaneCraftingRecipe("MAGBLOCKS", new ItemStack(CCBlocks.infusionWorkbench, 8), new AspectList().add(Aspects.VIS, 20), "TST", "SSS", "TST", 'S', "stone", 'T', "ingotThaumium")); Research.arcaneRecipes.put(
"ArcaneStone",
ThaumcraftApi.addArcaneCraftingRecipe(
"MAGBLOCKS",
new ItemStack(CCBlocks.infusionWorkbench, 8),
new AspectList().add(Aspects.VIS, 20),
"TST",
"SSS",
"TST",
'S',
"stone",
'T',
"ingotThaumium"
)
);
Research.infusionRecipes.put("CrystalCore", AuracoreRecipes.addInfusionCraftingRecipe("CRYSTALCORE", "CRYSTALCORE", 50, new AspectList().add(Aspect.VOID, 8).add(Aspect.MAGIC, 8).add(Aspects.FLUX, 8).add(Aspect.ELDRITCH, 8), new ItemStack(CCBlocks.crystal, 1), new Object[]{" C ", "CNC", " C ", Character.valueOf('C'), new ItemStack(ConfigBlocks.blockCrystal, 1, 9), Character.valueOf('N'), Items.nether_star})); Research.infusionRecipes.put(
"CrystalCore",
AuracoreRecipes.addInfusionCraftingRecipe(
"CRYSTALCORE",
"CRYSTALCORE",
50,
new AspectList()
.add(Aspect.VOID, 8)
.add(Aspect.MAGIC, 8)
.add(Aspects.FLUX, 8)
.add(Aspect.ELDRITCH, 8),
new ItemStack(CCBlocks.crystal, 1),
new Object[] { " C ",
"CNC",
" C ",
Character.valueOf('C'),
new ItemStack(ConfigBlocks.blockCrystal, 1, 9),
Character.valueOf('N'),
Items.nether_star }
)
);
} }
} }

View file

@ -19,36 +19,107 @@ import thaumcraft.api.research.ResearchPage;
import thaumcraft.common.config.ConfigBlocks; import thaumcraft.common.config.ConfigBlocks;
public class Research { public class Research {
public static List<Object> infusionStructure; public static List<Object> infusionStructure;
public static List<Object> magnetStructure; public static List<Object> magnetStructure;
public static Map<String, IArcaneRecipe> arcaneRecipes = new HashMap<>(); public static Map<String, IArcaneRecipe> arcaneRecipes = new HashMap<>();
public static Map<String, IInfusionRecipe> infusionRecipes = new HashMap<>(); public static Map<String, IInfusionRecipe> infusionRecipes = new HashMap<>();
public static ItemStack empty = new ItemStack(ConfigBlocks.blockHole, 1, 15); public static ItemStack empty = new ItemStack(ConfigBlocks.blockHole, 1, 15);
public static void init() { public static void init() {
infusionStructure = Arrays.asList(
new AspectList().add(Aspects.VIS, 20),
2,
1,
2,
Arrays.asList(
new ItemStack(CCBlocks.infusionWorkbench),
new ItemStack(CCBlocks.infusionWorkbench),
new ItemStack(CCBlocks.infusionWorkbench),
new ItemStack(CCBlocks.infusionWorkbench)
)
);
magnetStructure = Arrays.asList(
new AspectList().add(Aspects.VIS, 300),
3,
3,
3,
Arrays.asList(
empty,
empty,
empty,
empty,
new ItemStack(CCBlocks.crystal),
empty,
empty,
empty,
empty,
new ItemStack(ConfigBlocks.blockCosmeticSolid, 1, 0),
empty,
new ItemStack(ConfigBlocks.blockCosmeticSolid, 1, 0),
empty,
empty,
empty,
new ItemStack(ConfigBlocks.blockCosmeticSolid, 1, 0),
empty,
new ItemStack(ConfigBlocks.blockCosmeticSolid, 1, 0),
new ItemStack(ConfigBlocks.blockCosmeticSolid, 1, 0),
empty,
new ItemStack(ConfigBlocks.blockCosmeticSolid, 1, 0),
empty,
empty,
empty,
new ItemStack(ConfigBlocks.blockCosmeticSolid, 1, 0),
empty,
new ItemStack(ConfigBlocks.blockCosmeticSolid, 1, 0)
)
);
infusionStructure = Arrays.asList(new AspectList().add(Aspects.VIS, 20), 2, 1, 2, Arrays.asList(new ItemStack(CCBlocks.infusionWorkbench), new ItemStack(CCBlocks.infusionWorkbench), new ItemStack(CCBlocks.infusionWorkbench), new ItemStack(CCBlocks.infusionWorkbench))); ResearchCategories.registerCategory(
magnetStructure = Arrays.asList(new AspectList().add(Aspects.VIS, 300), 3, 3, 3, Arrays.asList(empty, empty, empty, empty, new ItemStack(CCBlocks.crystal), empty, empty, empty, empty, new ItemStack(ConfigBlocks.blockCosmeticSolid, 1, 0), empty, new ItemStack(ConfigBlocks.blockCosmeticSolid, 1, 0), empty, empty, empty, new ItemStack(ConfigBlocks.blockCosmeticSolid, 1, 0), empty, new ItemStack(ConfigBlocks.blockCosmeticSolid, 1, 0), new ItemStack(ConfigBlocks.blockCosmeticSolid, 1, 0), empty, new ItemStack(ConfigBlocks.blockCosmeticSolid, 1, 0), empty, empty, empty, new ItemStack(ConfigBlocks.blockCosmeticSolid, 1, 0), empty, new ItemStack(ConfigBlocks.blockCosmeticSolid, 1, 0))); "CLASSICCASTING",
new ResourceLocation("classiccasting", "textures/items/wandapprentice.png"),
ResearchCategories.registerCategory("CLASSICCASTING", new ResourceLocation("classiccasting", "textures/items/wandapprentice.png"), new ResourceLocation("thaumcraft", "textures/gui/gui_researchback.png")); new ResourceLocation("thaumcraft", "textures/gui/gui_researchback.png")
);
// TODO: move research to right place // TODO: move research to right place
new ResearchItem("MAGBLOCKS", "CLASSICCASTING", new AspectList().add(Aspects.ROCK, 1).add(Aspect.METAL, 1).add(Aspect.MAGIC, 1).add(Aspect.TREE, 1).add(Aspect.CRAFT, 1), 0, 0, 2, new ItemStack(CCBlocks.infusionWorkbench)).setPages( new ResearchItem(
new ResearchPage("classiccasting.research_page.MAGBLOCKS.1"), "MAGBLOCKS",
new ResearchPage(arcaneRecipes.get("ArcaneStone")), "CLASSICCASTING",
new ResearchPage("classiccasting.research_page.MAGBLOCKS.2"), new AspectList()
new ResearchPage(infusionStructure), .add(Aspects.ROCK, 1)
new ResearchPage("classiccasting.research_page.MAGBLOCKS.3") .add(Aspect.METAL, 1)
).setParents("THAUMIUM").registerResearchItem(); .add(Aspect.MAGIC, 1)
.add(Aspect.TREE, 1)
new ResearchItem("CRYSTALCORE", "CLASSICCASTING", new AspectList(), 0, 2, 3, new ItemStack(CCBlocks.crystal)).setPages( .add(Aspect.CRAFT, 1),
new ResearchPage("classiccasting.research_page.CRYSTALCORE.1"), 0,
new ResearchPageInfusion(infusionRecipes.get("CrystalCore")), 0,
new ResearchPage("classiccasting.research_page.CRYSTALCORE.2"), 2,
new ResearchPage(magnetStructure) new ItemStack(CCBlocks.infusionWorkbench)
).registerResearchItem(); )
.setPages(
new ResearchPage("classiccasting.research_page.MAGBLOCKS.1"),
new ResearchPage(arcaneRecipes.get("ArcaneStone")),
new ResearchPage("classiccasting.research_page.MAGBLOCKS.2"),
new ResearchPage(infusionStructure),
new ResearchPage("classiccasting.research_page.MAGBLOCKS.3")
)
.setParents("THAUMIUM")
.registerResearchItem();
new ResearchItem(
"CRYSTALCORE",
"CLASSICCASTING",
new AspectList(),
0,
2,
3,
new ItemStack(CCBlocks.crystal)
)
.setPages(
new ResearchPage("classiccasting.research_page.CRYSTALCORE.1"),
new ResearchPageInfusion(infusionRecipes.get("CrystalCore")),
new ResearchPage("classiccasting.research_page.CRYSTALCORE.2"),
new ResearchPage(magnetStructure)
)
.registerResearchItem();
} }
} }

View file

@ -150,8 +150,9 @@ public class Utils {
return pointedEntity; return pointedEntity;
} }
public static MovingObjectPosition public static MovingObjectPosition getTargetBlock(
getTargetBlock(final World world, final EntityPlayer player, final boolean par3, float range) { final World world, final EntityPlayer player, final boolean par3, float range
) {
final float var4 = 1.0f; final float var4 = 1.0f;
final float var5 = ((Entity) player).prevRotationPitch final float var5 = ((Entity) player).prevRotationPitch
+ (((Entity) player).rotationPitch - ((Entity) player).prevRotationPitch) + (((Entity) player).rotationPitch - ((Entity) player).prevRotationPitch)

View file

@ -116,18 +116,10 @@ public class UtilsFX {
tes.startDrawingQuads(); tes.startDrawingQuads();
tes.setBrightness(brightness); tes.setBrightness(brightness);
tes.setNormal(0.0F, 0.0F, 1.0F); tes.setNormal(0.0F, 0.0F, 1.0F);
tes.addVertexWithUV( tes.addVertexWithUV(0.0D, 0.0D, 0.0D, (double) p_78439_1_, (double) p_78439_4_);
0.0D, 0.0D, 0.0D, (double) p_78439_1_, (double) p_78439_4_ tes.addVertexWithUV(1.0D, 0.0D, 0.0D, (double) p_78439_3_, (double) p_78439_4_);
); tes.addVertexWithUV(1.0D, 1.0D, 0.0D, (double) p_78439_3_, (double) p_78439_2_);
tes.addVertexWithUV( tes.addVertexWithUV(0.0D, 1.0D, 0.0D, (double) p_78439_1_, (double) p_78439_2_);
1.0D, 0.0D, 0.0D, (double) p_78439_3_, (double) p_78439_4_
);
tes.addVertexWithUV(
1.0D, 1.0D, 0.0D, (double) p_78439_3_, (double) p_78439_2_
);
tes.addVertexWithUV(
0.0D, 1.0D, 0.0D, (double) p_78439_1_, (double) p_78439_2_
);
tes.draw(); tes.draw();
tes.startDrawingQuads(); tes.startDrawingQuads();
tes.setBrightness(brightness); tes.setBrightness(brightness);

View file

@ -80,25 +80,31 @@ public class ContainerInfusionWorkbench extends Container {
ic, this.tileEntity.getWorldObj() ic, this.tileEntity.getWorldObj()
) )
); );
TileMagicWorkbench bridge = AuracoreCraftingManager.createBridgeInventory(this.tileEntity, 0, 9); TileMagicWorkbench bridge
= AuracoreCraftingManager.createBridgeInventory(this.tileEntity, 0, 9);
if (this.tileEntity.getStackInSlot(9) == null if (this.tileEntity.getStackInSlot(9) == null
&& this.tileEntity.getStackInSlot(10) != null && this.tileEntity.getStackInSlot(10) != null
&& this.tileEntity.getStackInSlot(10).getItem() instanceof IWand) { && this.tileEntity.getStackInSlot(10).getItem() instanceof IWand) {
IArcaneRecipe recipe = AuracoreCraftingManager.findMatchingArcaneRecipe(bridge, this.ip.player); IArcaneRecipe recipe = AuracoreCraftingManager.findMatchingArcaneRecipe(
if (recipe != null && WandManager.hasCharge(this.tileEntity.getStackInSlot(10), this.ip.player, AuracoreCraftingManager.getArcaneRecipeVisCost(recipe, bridge))) { bridge, this.ip.player
this.tileEntity.setInventorySlotContentsSoftly( );
9, if (recipe != null
recipe.getCraftingResult(bridge) && WandManager.hasCharge(
); this.tileEntity.getStackInSlot(10),
} this.ip.player,
AuracoreCraftingManager.getArcaneRecipeVisCost(recipe, bridge)
)) {
this.tileEntity.setInventorySlotContentsSoftly(
9, recipe.getCraftingResult(bridge)
);
}
} }
if (this.tileEntity.getStackInSlot(9) == null if (this.tileEntity.getStackInSlot(9) == null
&& this.tileEntity.getStackInSlot(10) != null) { && this.tileEntity.getStackInSlot(10) != null) {
IInfusionRecipe rec IInfusionRecipe rec = AuracoreCraftingManager.findMatchingInfusionRecipe(
= AuracoreCraftingManager.findMatchingInfusionRecipe( bridge, this.ip.player
bridge, this.ip.player );
);
if (rec != null if (rec != null
&& WandManager.hasCharge( && WandManager.hasCharge(

View file

@ -42,30 +42,34 @@ public class SlotCraftingInfusionWorkbench extends SlotCrafting {
); );
this.onCrafting(par1ItemStack); this.onCrafting(par1ItemStack);
int cost; int cost;
TileMagicWorkbench bridge = AuracoreCraftingManager.createBridgeInventory(this.craftMatrix, 0, 9); TileMagicWorkbench bridge
IArcaneRecipe recipe = AuracoreCraftingManager.findMatchingArcaneRecipe(bridge, this.thePlayer); = AuracoreCraftingManager.createBridgeInventory(this.craftMatrix, 0, 9);
IArcaneRecipe recipe
= AuracoreCraftingManager.findMatchingArcaneRecipe(bridge, this.thePlayer);
cost = AuracoreCraftingManager.getArcaneRecipeVisCost(recipe, bridge); cost = AuracoreCraftingManager.getArcaneRecipeVisCost(recipe, bridge);
if (cost == 0) { if (cost == 0) {
IInfusionRecipe rec = AuracoreCraftingManager.findMatchingInfusionRecipe( IInfusionRecipe rec = AuracoreCraftingManager.findMatchingInfusionRecipe(
bridge, this.thePlayer bridge, this.thePlayer
); );
if (rec != null) { if (rec != null) {
cost = rec.getCost(); cost = rec.getCost();
final AspectList tags = rec.getAspects(); final AspectList tags = rec.getAspects();
if (tags != null && tags.size() > 0) { if (tags != null && tags.size() > 0) {
final TileInfusionWorkbench tiwb final TileInfusionWorkbench tiwb
= (TileInfusionWorkbench) this.craftMatrix; = (TileInfusionWorkbench) this.craftMatrix;
for (final Aspect tag : tags.getAspects()) { for (final Aspect tag : tags.getAspects()) {
final IAspectSource as = tiwb.foundAspects.getSource(tag); final IAspectSource as = tiwb.foundAspects.getSource(tag);
if (as != null) { if (as != null) {
as.takeFromContainer(tag, tags.getAmount(tag)); as.takeFromContainer(tag, tags.getAmount(tag));
}
} }
} }
} }
}
} }
if (cost > 0) { if (cost > 0) {
WandManager.spendCharge(this.craftMatrix.getStackInSlot(10), par1EntityPlayer, cost); WandManager.spendCharge(
this.craftMatrix.getStackInSlot(10), par1EntityPlayer, cost
);
} }
for (int var2 = 0; var2 < 9; ++var2) { for (int var2 = 0; var2 < 9; ++var2) {
final ItemStack var3 = this.craftMatrix.getStackInSlot(var2); final ItemStack var3 = this.craftMatrix.getStackInSlot(var2);

View file

@ -358,7 +358,8 @@ public class EntityFrostShard extends Entity implements IProjectile {
} }
if (var8.entityHit.attackEntityFrom(var20, var19)) { if (var8.entityHit.attackEntityFrom(var20, var19)) {
if (var8.entityHit instanceof EntityLivingBase) { if (var8.entityHit instanceof EntityLivingBase) {
final EntityLivingBase var21 = (EntityLivingBase) var8.entityHit; final EntityLivingBase var21
= (EntityLivingBase) var8.entityHit;
if (this.knockbackStrength > 0) { if (this.knockbackStrength > 0) {
final float var22 = MathHelper.sqrt_double( final float var22 = MathHelper.sqrt_double(
super.motionX * super.motionX super.motionX * super.motionX

View file

@ -87,45 +87,50 @@ public class GuiInfusionWorkbench extends GuiContainer {
this.drawTexturedModalRect(var5, var6, 0, 0, this.xSize, this.ySize); this.drawTexturedModalRect(var5, var6, 0, 0, this.xSize, this.ySize);
GL11.glDisable(3042); GL11.glDisable(3042);
ItemStack result = null; ItemStack result = null;
TileMagicWorkbench bridge = AuracoreCraftingManager.createBridgeInventory(this.tileEntity, 0, 9); TileMagicWorkbench bridge
IArcaneRecipe arcaneRecipe = AuracoreCraftingManager.findMatchingArcaneRecipe(bridge, this.ip.player); = AuracoreCraftingManager.createBridgeInventory(this.tileEntity, 0, 9);
IArcaneRecipe arcaneRecipe
= AuracoreCraftingManager.findMatchingArcaneRecipe(bridge, this.ip.player);
IInfusionRecipe rec = null; IInfusionRecipe rec = null;
if (arcaneRecipe != null) { if (arcaneRecipe != null) {
result = arcaneRecipe.getCraftingResult(bridge); result = arcaneRecipe.getCraftingResult(bridge);
} else { } else {
rec = AuracoreCraftingManager.findMatchingInfusionRecipe( rec = AuracoreCraftingManager.findMatchingInfusionRecipe(
bridge, this.ip.player bridge, this.ip.player
); );
if (rec != null) { if (rec != null) {
result = rec.getRecipeOutput(); result = rec.getRecipeOutput();
final AspectList reqs = rec.getAspects(); final AspectList reqs = rec.getAspects();
int count = 0; int count = 0;
if (reqs != null && reqs.size() > 0) { if (reqs != null && reqs.size() > 0) {
for (final Aspect tag : reqs.getAspects()) { for (final Aspect tag : reqs.getAspects()) {
float op = 1.0f; float op = 1.0f;
if (this.tileEntity.foundAspects.getAmount(tag) if (this.tileEntity.foundAspects.getAmount(tag)
< reqs.getAmount(tag)) { < reqs.getAmount(tag)) {
op = (float op = (float
) (MathHelper.sin(this.ip.player.ticksExisted - count * 10) ) (MathHelper.sin(
/ 8.0f) this.ip.player.ticksExisted - count * 10
* 0.125f )
+ 0.25f; / 8.0f)
* 0.125f
+ 0.25f;
}
UtilsFX.drawTag(
var5 + 24 + 16 * count + (5 - reqs.size()) * 8,
var6 + 72,
tag,
reqs.getAmount(tag),
0,
op
);
++count;
} }
UtilsFX.drawTag(
var5 + 24 + 16 * count + (5 - reqs.size()) * 8,
var6 + 72,
tag,
reqs.getAmount(tag),
0,
op
);
++count;
} }
} }
} }
}
if (this.tileEntity.getStackInSlot(10) != null) { if (this.tileEntity.getStackInSlot(10) != null) {
final int charge = ((IWand)this.tileEntity.getStackInSlot(10).getItem()).getVis(this.tileEntity.getStackInSlot(10)); final int charge = ((IWand) this.tileEntity.getStackInSlot(10).getItem())
.getVis(this.tileEntity.getStackInSlot(10));
if (charge > 0) { if (charge > 0) {
GL11.glPushMatrix(); GL11.glPushMatrix();
GL11.glTranslatef((float) (var5 + 140), (float) (var6 + 85), 505.0f); GL11.glTranslatef((float) (var5 + 140), (float) (var6 + 85), 505.0f);
@ -139,7 +144,9 @@ public class GuiInfusionWorkbench extends GuiContainer {
if (result != null) { if (result != null) {
final int discount final int discount
= 100 - Math.min(50, WandManager.getTotalVisDiscount(this.ip.player)); = 100 - Math.min(50, WandManager.getTotalVisDiscount(this.ip.player));
int cost1 = arcaneRecipe != null ? AuracoreCraftingManager.getArcaneRecipeVisCost(arcaneRecipe, bridge) : 0; int cost1 = arcaneRecipe != null
? AuracoreCraftingManager.getArcaneRecipeVisCost(arcaneRecipe, bridge)
: 0;
cost1 = Math.round(cost1 * (discount / 100.0f)); cost1 = Math.round(cost1 * (discount / 100.0f));
int cost2 = rec != null ? rec.getCost() : 0; int cost2 = rec != null ? rec.getCost() : 0;
cost2 = Math.round(cost2 * (discount / 100.0f)); cost2 = Math.round(cost2 * (discount / 100.0f));
@ -172,11 +179,9 @@ public class GuiInfusionWorkbench extends GuiContainer {
GL11.glTranslatef((float) (var5 + 140), (float) (var6 + 85), 0.0f); GL11.glTranslatef((float) (var5 + 140), (float) (var6 + 85), 0.0f);
GL11.glScalef(0.5f, 0.5f, 0.0f); GL11.glScalef(0.5f, 0.5f, 0.0f);
String text2 = "Insufficient charge"; String text2 = "Insufficient charge";
if (cost1 > ((IWand) this.tileEntity.getStackInSlot(10) if (cost1 > ((IWand) this.tileEntity.getStackInSlot(10).getItem())
.getItem())
.getMaxVis(this.tileEntity.getStackInSlot(10)) .getMaxVis(this.tileEntity.getStackInSlot(10))
|| cost2 > ((IWand) this.tileEntity.getStackInSlot(10) || cost2 > ((IWand) this.tileEntity.getStackInSlot(10).getItem())
.getItem())
.getMaxVis(this.tileEntity.getStackInSlot(10))) { .getMaxVis(this.tileEntity.getStackInSlot(10))) {
text2 = "This wand is too weak"; text2 = "This wand is too weak";
} }

View file

@ -99,12 +99,7 @@ public class ItemBlockAlembic extends ItemBlock {
); );
--stack.stackSize; --stack.stackSize;
world.setBlock( world.setBlock(
x, x, y, z, CCBlocks.alembic, dir.getOpposite().ordinal() - 2, 3
y,
z,
CCBlocks.alembic,
dir.getOpposite().ordinal() - 2,
3
); );
return true; return true;
} }

View file

@ -309,8 +309,7 @@ public abstract class ItemWandCasting extends Item implements IWand {
if ((bi == ConfigBlocks.blockCosmeticSolid || bi == CCBlocks.crystal) if ((bi == ConfigBlocks.blockCosmeticSolid || bi == CCBlocks.crystal)
&& ResearchManager.isResearchComplete( && ResearchManager.isResearchComplete(
player.getDisplayName(), "CRYSTALCORE" player.getDisplayName(), "CRYSTALCORE"
) )) {
) {
result = WandManager.createNodeMagnet(itemstack, player, world, x, y, z); result = WandManager.createNodeMagnet(itemstack, player, world, x, y, z);
} }
@ -364,16 +363,15 @@ public abstract class ItemWandCasting extends Item implements IWand {
tile2.spillRemnants(); tile2.spillRemnants();
return true; return true;
} }
CrucibleRecipe recipe = AuracoreRecipes.getCrucibleRecipe(tile2.aspects, tile2); CrucibleRecipe recipe
= AuracoreRecipes.getCrucibleRecipe(tile2.aspects, tile2);
if (WandManager.spendCharge( if (WandManager.spendCharge(
world, world,
itemstack, itemstack,
player, player,
AuracoreRecipes.getCrucibleOutputCost(tile2, recipe) AuracoreRecipes.getCrucibleOutputCost(tile2, recipe)
)) { )) {
AuracoreCraftingManager.performCrucibleCrafting( AuracoreCraftingManager.performCrucibleCrafting(player, tile2);
player, tile2
);
return true; return true;
} }
} }

View file

@ -1,45 +1,44 @@
package net.anvilcraft.classiccasting.items.wands; package net.anvilcraft.classiccasting.items.wands;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.item.EnumRarity; import net.minecraft.item.EnumRarity;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon; import net.minecraft.util.IIcon;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class ItemWandCastingApprentice extends ItemWandCasting public class ItemWandCastingApprentice extends ItemWandCasting {
{
public IIcon icon; public IIcon icon;
public ItemWandCastingApprentice() { public ItemWandCastingApprentice() {
super(); super();
super.maxStackSize = 1; super.maxStackSize = 1;
super.canRepair = false; super.canRepair = false;
this.setUnlocalizedName("classiccasting:wandCastingApprentice"); this.setUnlocalizedName("classiccasting:wandCastingApprentice");
} }
@Override @Override
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public void registerIcons(final IIconRegister ir) { public void registerIcons(final IIconRegister ir) {
this.icon = ir.registerIcon("classiccasting:wandapprentice"); this.icon = ir.registerIcon("classiccasting:wandapprentice");
} }
@Override @Override
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public IIcon getIconFromDamage(final int par1) { public IIcon getIconFromDamage(final int par1) {
return this.icon; return this.icon;
} }
@Override @Override
public int getMaxVis(ItemStack i) { public int getMaxVis(ItemStack i) {
return 50; return 50;
} }
@Override @Override
public EnumRarity getRarity(final ItemStack itemstack) { public EnumRarity getRarity(final ItemStack itemstack) {
return EnumRarity.uncommon; return EnumRarity.uncommon;
} }
@Override @Override
public int getRechargeInterval() { public int getRechargeInterval() {
return 10; return 10;

View file

@ -3,6 +3,7 @@ package net.anvilcraft.classiccasting.render;
import java.awt.Color; import java.awt.Color;
import java.util.Random; import java.util.Random;
import dev.tilera.auracore.api.CrystalColors;
import net.anvilcraft.classiccasting.render.models.ModelCrystal; import net.anvilcraft.classiccasting.render.models.ModelCrystal;
import net.anvilcraft.classiccasting.tiles.TileCrystalCore; import net.anvilcraft.classiccasting.tiles.TileCrystalCore;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
@ -17,8 +18,6 @@ import net.minecraft.util.MathHelper;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL11;
import dev.tilera.auracore.api.CrystalColors;
public class TileCrystalCoreRenderer extends TileEntitySpecialRenderer { public class TileCrystalCoreRenderer extends TileEntitySpecialRenderer {
private ModelCrystal model; private ModelCrystal model;
@ -85,7 +84,8 @@ public class TileCrystalCoreRenderer extends TileEntitySpecialRenderer {
) { ) {
final TileCrystalCore tco = (TileCrystalCore) te; final TileCrystalCore tco = (TileCrystalCore) te;
GL11.glPushMatrix(); GL11.glPushMatrix();
this.bindTexture(new ResourceLocation("classiccasting", "textures/models/crystal.png") this.bindTexture(
new ResourceLocation("classiccasting", "textures/models/crystal.png")
); );
final Random rand = new Random(tco.xCoord + tco.yCoord * tco.zCoord); final Random rand = new Random(tco.xCoord + tco.yCoord * tco.zCoord);
int col = 0; int col = 0;

View file

@ -4,12 +4,8 @@ import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly; import cpw.mods.fml.relauncher.SideOnly;
import net.anvilcraft.classiccasting.CCBlocks; import net.anvilcraft.classiccasting.CCBlocks;
import net.anvilcraft.classiccasting.UtilsFX; import net.anvilcraft.classiccasting.UtilsFX;
import net.anvilcraft.classiccasting.items.wands.ItemWandCasting;
import net.anvilcraft.classiccasting.tiles.TileInfusionWorkbench; import net.anvilcraft.classiccasting.tiles.TileInfusionWorkbench;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.ItemRenderer;
import net.minecraft.client.renderer.RenderHelper;
import net.minecraft.client.renderer.entity.RenderItem;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntity;

View file

@ -61,7 +61,7 @@ public class TileCrystalCapacitor extends TileEntity {
); );
break; break;
} }
if (nd.level < nd.baseLevel && this.storedVis> 0) { if (nd.level<nd.baseLevel&& this.storedVis> 0) {
AuraManager.queueNodeChanges( AuraManager.queueNodeChanges(
nd.key, 1, 0, false, null, 0.0f, 0.0f, 0.0f nd.key, 1, 0, false, null, 0.0f, 0.0f, 0.0f
); );