MinecraftScripterAI
Discord ↗
Link Copied to Clipboard
×
"How do I make a custom map like the fuel map but it stores Item, burntime, and generation per tick"
/* To create a custom map similar to the fuel map, you would need to create a custom class that stores the Item, burntime, and generation per tick. Here's an example: */ public class CustomFuelMap { private final Map<Item, Integer> burnTimes = new HashMap<>(); private final Map<Item, Integer> generationPerTick = new HashMap<>(); public void addFuel(Item item, int burnTime, int generationTick) { burnTimes.put(item, burnTime); generationPerTick.put(item, generationTick); } public int getBurnTime(Item item) { return burnTimes.getOrDefault(item, 0); } public int getGenerationPerTick(Item item) { return generationPerTick.getOrDefault(item, 0); } } /* You can use this class by creating an instance and adding items to it with their respective burn times and generation per tick */ CustomFuelMap customFuelMap = new CustomFuelMap(); customFuelMap.addFuel(Items.COAL, 1600, 20); // Coal burns for 1600 ticks and generates 20 per tick