Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 06/20/17 in all areas

  1. Any field whose type is a class that directly extends Object will become a config category, with its fields becoming properties or categories following the same rules as the top-level class. Map fields are also mapped to categories with properties as key-value pairs.
    1 point
  2. It's not absolutely required, but it's a good idea to avoid potential conflicts. All unlocalised names are used as keys in the same Map, so your unlocalised name's translation could overwrite or be overwritten by the same name from another mod. I recommend using the Item's registry name (IForgeRegistryEntry#getRegistryName) as the unlocalised name as it already includes the mod ID.
    1 point
  3. You don't have to compute them all when loading the models, just calculate them on the fly (as you currently do) but store the result in a cache (a map from the state to the list of quads). Then at the start of getQuads, add a check for whether your cache already contains the state, and if it does just return that instead of calculating anew.
    1 point
  4. I am a brute force method, but I solved it myself Method 1. Download downloadable build 2. Copy the download destination URL. 3. Edit and download the address I use this method "http://files.minecraftforge.net/maven/net/minecraftforge/forge/1.12-14.21.0.2338/forge-1.12-14.21.0.2338-installer.jar" I got the above URL 4.Enjoy This is a bad method, but it is not available for downloading normally, is not it (laugh) Translate by google translation
    1 point
  5. That's because this class is never ever even "seen" by Minecraft. (You HAVE to call setRegistryName(string) in your block. Either directly in the constructor or later down the road when you register it. (setRegistryName returns the block itself, with the registryName set)) Create a new class, which you will be using for registration of blocks (and items (held blocks & blocks stored in inventories etc are item (technically ItemBlocks))) Annotate this class with @EventBusSubscriber Create a public static void method, and subscribe it to the Register<Block> event. Now, I like to put all my blocks in a list/set collection, and for that collection, call forEach(event.getRegistry::register). Of course, you can always just use a for-each loop and call event.getRegistry().register(block). If you do not want to use a collection, use event.getRegistry().registerAll(), and supply the registerAll all your blocks. (block1, block2... blockn) Now, create another public static void method, but subscribe to the Register<Item> event instead. For each block you registered in just now, you will need to create a corresponding ItemBlock (so that it can exist in inventories & your hand etc) Either for-each loop over the collection, create a new ItemBlock(block) & set it's RegistryName to the block's RegistryName and register it in the event, OR use another lambda expression: blockCollection.stream().map(block -> new ItemBlock(block).setRegistryName(block.getRegistryName())).collect(Collectors.toList()).forEach(event.getRegistry()::register); Wee bit messier than before. (for each block in this collection(that contains blocks!), create a new ItemBlock, and set it's RegistryName to the block's RegistryName. Put this new ItemBlock into a new list, and for each thing in this new list, register). if you have any normal items, you can simply do the same thing we did with blocks, and call forEach(event.getRegistry::register) on the item-list. (or as said stick to a simple for-each loop)
    1 point
  6. you might need to download and play on minecraft 1.12 before you can install forge 1.12
    1 point
  7. Well, let's look at your tileentity class then shall we? It is common and also shared by both blocks. In it's update method we see this: Oh, I wonder where is the block field at? And it is static. Every time you place a new TileEntity you refresh this field for all your tileentities as it is static. The next tick all tileentities convert the blocks that they are bound to to the block that this field stores which conviniently is the block you've last placed. Also it is probably not a good idea to call this each tick. Granted you are calling this on a server which does nothing by the way, but if you would call this on the client you would cause a lot of lag by the renderer having to redraw your block every tick.
    1 point
  8. I have made no secret, FastCraft is one of the thing we had in mind coming up with these policies. It's a obfuscated coremod that harms more computers than it helps. And the author is an ass when you try and understand it. Even going so far to threaten to sue you multiple times if you even THINK about looking inside it. FastCraft is cancer on the community, People need to stop using it.
    1 point
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.