Created
January 6, 2019 01:12
-
-
Save Xalcon/542e5f1bc16921dfb46d408b1f63ee15 to your computer and use it in GitHub Desktop.
Simple mod to eat up a lot of block IDs. Used to reproduce a bug with chisel and just enough IDs.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package net.xalcon.blockideater; | |
import net.minecraft.block.Block; | |
import net.minecraft.block.material.Material; | |
import net.minecraftforge.event.RegistryEvent; | |
import net.minecraftforge.fml.common.Mod; | |
import net.minecraftforge.fml.common.Mod.EventHandler; | |
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; | |
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; | |
@Mod(modid = BlockIdEater.MODID, name = BlockIdEater.NAME, version = BlockIdEater.VERSION) | |
@Mod.EventBusSubscriber | |
public class BlockIdEater | |
{ | |
public static final String MODID = "blockideater"; | |
public static final String NAME = "BlockIdEater"; | |
public static final String VERSION = "1.0"; | |
@SubscribeEvent | |
public static void onRegisterBlocks(RegistryEvent.Register<Block> event) | |
{ | |
for(int i = 0; i < 3950; i++) | |
{ | |
event.getRegistry().register( | |
new Block(Material.CLAY) | |
.setRegistryName(MODID, "block" + i) | |
); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment