Files
BloodMagic/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemBloodRuneBlock.java
T
Guillaume Mercier e14b1f23c9 Add new rune to reduce the delay between crafts (#51)
* add layout.json to gitignore

* Add quickness rune

This rune reduces the delay between consecutive crafts. This is done by essentially scheduling a recipe check every time a recipe completes. Using something like a world accelerator will have no effect on the frequency and the runes themselves do not increase the frequency at which the altar naturally checks for updates.

This commit also addresses a couple other issues with the altar.
- since the altar was using the world time and not the world age, some mechanics were impossible to trigger if you set doDaylightCycle to false.
- For example it was impossible to start a craft if the time wasn't set to a multiple of 100.
2024-05-03 07:09:58 +02:00

60 lines
1.2 KiB
Java

package WayofTime.alchemicalWizardry.common.items;
import net.minecraft.block.Block;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
public class ItemBloodRuneBlock extends ItemBlock {
public ItemBloodRuneBlock(Block block) {
super(block);
setHasSubtypes(true);
}
public String getUnlocalizedName(ItemStack itemstack) {
String name;
switch (itemstack.getItemDamage()) {
case 0: {
name = "blank";
break;
}
case 1: {
name = "fill";
break;
}
case 2:
name = "empty";
break;
case 3:
name = "orb";
break;
case 4:
name = "betterCapacity";
break;
case 5:
name = "acceleration";
break;
case 6:
name = "quickness";
break;
default:
name = "broken";
}
return getUnlocalizedName() + "." + name;
}
public int getMetadata(int par1) {
return par1;
}
}