Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 02/15/18 in all areas

  1. 2 points
  2. The important part of the class was, that the lists get filled inside the register event. When you add them in the other classes, they are probably added randomly again. Also, toArray(new Item[0]) will probably create a empty array. Didn't use toArray myself yet, but in C# that thing would be empty
    1 point
  3. Change the path here to point at your file: https://github.com/Draco18s/ReasonableRealism/blob/master/build.gradle#L99
    1 point
  4. @EventBusSubscriber public class ObjectRegistry { public static Block BLOCK_PATH; public static Block BLOCK_PATH_SLAB; public static Block BLOCK_GHOST; public static Item ITEM_PATHMAKER; public static Item ITEM_COPYTOOL; public static Set<Item> items = new HashSet<Item>(); public static Set<Block> blocks = new HashSet<Block>(); public static void prepareBlocks(){ blocks.add(BLOCK_PATH = new BlockPath()); blocks.add(BLOCK_PATH_SLAB = new BlockPathSlab()); blocks.add(BLOCK_GHOST = new BlockGhost()); } public static void prepareItems() { items.add(ITEM_PATHMAKER = new ItemPathMaker()); items.add(ITEM_COPYTOOL = new ItemCopyTool()); } //This method will be called without us calling it. This is because //Forge calls it -for- us, when the RegistryEvent happens. This is why //we had to use the @Mod.EventBusSubscriber at the top of the class. @SubscribeEvent public static void registerBlocks(Register<Block> event){ //We make sure that the list gets filled with our blocks. prepareBlocks(); for(Block block : blocks){ event.getRegistry().register(block); } } //We do not need to call prepareBlocks() in this method, because Blocks are registered before items. //Thus, our registerBlocks method has already happened. @SubscribeEvent public static void registerItems(Register<Item> event){ for(Block block : blocks){ ItemBlock iblock = new ItemBlock(block); iblock.setRegistryName(block.getRegistryName()); event.getRegistry().register(iblock); } prepareItems(); for(Item item : items) { event.getRegistry().register(item); } } } A really nice registry class from a tutorial that I can sadly not find anymore, otherwise I would link it. It's really compact and nice to use. Maybe something for you too. But it follows the Forge register order so you don't have to do it yourself hehe.
    1 point
  5. First: http://shouldiblamecaching.com/ Second: Go to the Eclipse marketplace and download the JSON Editor plugin. Edit your JSON files inside Eclipse, then Eclipse will know that they've changed.
    1 point
  6. 1 point
  7. Ok so, this bit here (redacted for simplicity): from zipTree(jar.outputs.getFiles().getSingleFile()).matching { exclude 'com/draco18s/ores/**', 'com/draco18s/industry/**' } This removes my "actual mod" from being included in a compiled jar file. In this case, it excludes the folder com/draco18s/ores and com/draco18s/industry, as we only want the library in this jar. Then this bit here: from zipTree(jar.outputs.getFiles().getSingleFile()).matching { include 'com/draco18s/ores/**', 'assets/harderores/**', 'cog_config/**' exclude '**.xcf' } Makes sure to only include com/draco18s/ores, and its associated assets. The exclude line makes sure not to include large, layered, GIMP image files that aren't actually used by the mod (it's a template for the icons actually used). Your gradle file will already have one task that builds everything. You can rename it and modify the include/exclude as appropriate, then duplicate and modify again, using a new task name. At the bottom, these bits: oresJar.dependsOn('reobfJar') set up to make sure that gradle does all of the appropriate compilation tasks in the proper order. Lastly, this is a task that does a full compile (builds all the jars, redacted slightly for simplicity): task releaseJars(type: Copy) { from coreJarNoCog from oresJar rename '-(.*)jar', '.jar' rename '-(.*)zip', '.zip' into '.' } This task will already exist in your gradle file, you just need to add the from lines so that a full build builds all of your other jar tasks.
    1 point
  8. }//TODO add the other fabric variations You need to add your other fabric variations, assuming that those variants exist in your code. Second: "size": { "small": { "fabric": { "jungle": { That is not how variants are specified. You either need to use the vanilla format ("fabric=jungle,size=small":{ ... }) or the Forge variant ("fabric":"jungle" { ... }, "size":"small" { ... }).
    1 point
  9. Only download Forge from OUR web page: http://files.minecraftforge.net/ If you get it from our site its fine. Now, sadly due to how the internet works, and the fact that this is free product, we use advertisements to make our money and pay the bills. We try and keep all the shady 'this is a virus download our virus remover' ads away. But we can only get rid of the ones that are reported. If you're still worried, we provide direct downloads for Forge on our site. So you can skip the ads. As for downloading other mods, ONLY get them from the Minecraft Forums, Curse, or here. 90% of the results for 'minecraft mods' on google are spam/virus/crap infested sites that steal mods from us and exploit you kids. Its sick and annoying but welcome to the internet -.-
    1 point
  10. And... congratulations! You are the third person in a row who forgot about applying correct translations before rendering! With correct translations applied I get the following from your code: Also if you want your block to be transparent you need to setup GL's blend too, not only alpha
    1 point
×
×
  • Create New...

Important Information

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