Jump to content

me1

Members
  • Posts

    31
  • Joined

  • Last visited

Everything posted by me1

  1. I've tried onDeath(DamageSource.MAGIC); But that didn't work. This is probably a stupid question but I can't find an answer in the Minecraft code and am running out of ideas. EDIT: by entity I mean AnimalEntity
  2. But there already are forge-mods updated to 1.16. How did they do it? And then what's this: http://files.minecraftforge.net/maven/net/minecraftforge/forge/index_1.16.1.html ?
  3. What is new in forge 1.16.1. How much(and what) do I have to change to make a mod suitable for that version?
  4. Sorry for not being very clear: I want to make a craft for a spawner block, which will have an entity from my mod in it. As I understand from your post, you thinkI should make a custom Block extending SpawnerBlock and change the spawned Entity? Where would I change that? (I'm on 1.15.2)
  5. How can I make a craft for a spawner with a special entity in it?
  6. Ok, it worked but I also had to set the rareity to 20. So I actually had 2 Bugs and kept fixing one and initiating the other at the same time
  7. Well... The report says that the mod "Forge" is missing. Does the Forge-version match the modpack-version? (aka. Do you use a 1.14 modpack with 1.15 etc?)
  8. Update mappings guide by Me1: -go to http://export.mcpbot.bspk.rs/ -copy the version-name you want beginning after the 'snapshot-' (eg. "mcp_snapshot-20200406-1.15.1" -> "20200406-1.15.1") -go to your build.gradle file - in line 28 it should say "mappings channel: 'snapshot', version: '123-0.00.0'" or something -replace the "123-0.00.0" with the copied name -redo you setup-process source:
  9. Here's my new code: private void setup(final FMLCommonSetupEvent event) { for(int i = 0; i < 5000; ++i) LOGGER.info("SETUP"); BlockInit.onOreGeneration(); OreGenerator.generateOre(); } public static void deferredWorkQueue(DeferredWorkQueue queue) { for(int i = 0; i < 5000; ++i) LOGGER.info("SETUP"); BlockInit.onOreGeneration(); OreGenerator.generateOre(); } //^ MainClass Updated public static void generateOre() { for (Object oreType : Ores.toArray()) for (int i = 0; i < ((OreType)oreType).biomes.length; ++i) {Biome biome = ((OreType)oreType).biomes[i]; OreType ore = (OreType) oreType; ConfiguredPlacement placement = Placement.COUNT_RANGE.configure(ore.countRangeConfig); biome.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, Feature.ORE.withConfiguration( new OreFeatureConfig(ore.fillerBlockType, ore.ore, ore.size)).withPlacement(placement)); } } //^ OreGenerator Updated
  10. apperently onBlockActivated(...) is Depricated...
  11. I change the whole double loop nonesence, translated the FMLLoadCompleteEvent to to FMLCommonSetupEvent and added it to DefferedWorkQueue and... it still soesn't work Here is some more information some might find usefull: -I don't you Deferred Registers. I use the othe method(dunno how it's called). -I also can't find my biomes. -The blocks work when. I can place them, I can craft them, I just can't find them under the ground(I seearched for multiple minuets)
  12. Someone help please!
  13. I'm not sure about eclipse but I think in IntelliJ you have to import the build.gradle file and not the folder. I could be wrong tho
  14. So I have these Blocks(white_empty_block & black_empty_block) witch I want to spawn underground just like Ores. Sadly it isn't working. I don't know where the problem is. I added some logs and all methods I want to be called are called. Here are some parts of my code: @SubscribeEvent public static void loadCompleteEvent(FMLLoadCompleteEvent event) { BlockInit.onOreGeneration(); OreGenerator.generateOre(); } // ^ This is in my main Class public static void onOreGeneration() { Biome[] overWorld = getBiomes(BiomeDictionary.Type.OVERWORLD); OreGenerator.Ores.add(new OreGenerator.OreType(white_empty_block.getDefaultState(), overWorld, new CountRangeConfig(1180, 8, 8, 124), OreFeatureConfig.FillerBlockType.NATURAL_STONE, 2)); OreGenerator.Ores.add(new OreGenerator.OreType(black_empty_block.getDefaultState(), overWorld, new CountRangeConfig(1140, 8, 8, 124), OreFeatureConfig.FillerBlockType.NATURAL_STONE, 2)); } //^ This is in my BlockInit public class OreGenerator { public static class OreType { public final BlockState ore; public final Biome[] biomes; public final CountRangeConfig countRangeConfig; public final OreFeatureConfig.FillerBlockType fillerBlockType; public final int size; public OreType(BlockState ore, Biome[] biomesIn, CountRangeConfig countRangeConfig, OreFeatureConfig.FillerBlockType fillerBlock, int maxGroupSize) { this.ore = ore; biomes = biomesIn; this.countRangeConfig = countRangeConfig; fillerBlockType = fillerBlock; size = maxGroupSize; } } public static final ArrayList<OreType> Ores = new ArrayList<OreType>(); public static void generateOre() { for (Object oreType : Ores.toArray()) for (int i = 0; i < ForgeRegistries.BIOMES.getValues().size(); ++i) { for (Biome biomeCan : ((OreType) oreType).biomes) if (ForgeRegistries.BIOMES.getValues().contains(biomeCan)) { OreType ore = (OreType) oreType; ConfiguredPlacement placement = Placement.COUNT_RANGE.configure(ore.countRangeConfig); ((Biome)ForgeRegistries.BIOMES.getValues().toArray()[i]).addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, Feature.ORE.withConfiguration( new OreFeatureConfig(ore.fillerBlockType, ore.ore, ore.size)).withPlacement(placement)); } } } public static Biome[] getBiomes(BiomeDictionary.Type type) { Object[] _biomes = BiomeDictionary.getBiomes(type).toArray(); Biome[] biomes = new Biome[_biomes.length]; for (int i = 0; i < _biomes.length; ++i) biomes[i] = (Biome) _biomes[i]; return biomes; } } //^ This is My OreGenerator Class Please help.
  15. @Dams Why would you want that mod anyway? Looks like a cheat to me...
  16. @ultra_reemun There is no .getHandle in the class Minecraft.
  17. @Draco18s That's what I did and that's how I found 'func_228018_at_()'. It's the only one witch returns a 'MainWindow'.
  18. I followed a tutorial and there was the following code: return InputMappings.isKeyDown(Minecraft.getInstance().getMainWindow().getHandle(), glfw); But for me the 'getMainWindow()' was underlined red. I looked through the IntelliJ-Hints and the only function whitch returns a 'MainWindow' is 'func_228018_at_()'. When I run it with MainWindow it starts minecraft but closes it again after some time saying: [16:19:41] [Render thread/INFO] [STDOUT/]: [net.minecraft.util.registry.Bootstrap:printToSYSOUT:109]: ---- Minecraft Crash Report ---- // Hi. I'm Minecraft, and I'm a crashaholic. Time: 03.04.20 16:19 Description: Initializing game java.lang.NoSuchMethodError: net.minecraft.client.Minecraft.getMainWindow()Lnet/minecraft/client/MainWindow; at com.nkdm.emptyblock.EmptyBlock.getKey(EmptyBlock.java:68) ~[main/:?] {re:classloading} at *...* Process finished with exit code -1 When I run it with func_228018_at_ it instantly says: C:\Users\*ME1*\IdeaProjects\emptyblock\src\main\java\com\nkdm\emptyblock\EmptyBlock.java:68: error: cannot find symbol return InputMappings.isKeyDown(Minecraft.getInstance().func_228018_at_().getHandle(), glfw); ^ symbol: method func_228018_at_() location: class Minecraft I use IntelliJ and have the newest mappings. Please help!
  19. @Budschieps: I reference no librarys
  20. @BudschieWhat do you mean by "reference librarys"?
  21. @BudschieI didn't write any code, it's the ExampleMod. Also: other imorts(like java.awt) still work. But here is an image:
  22. @BudschieI did everything how you described. It still is the same in both versions(The original and the one in the new Folder).
  23. @Budschiei used gradlew eclipse... where do you get a existing project from?
  24. @Mixu_78Eclipse
  25. I did run genEclipseRuns tho.
×
×
  • Create New...

Important Information

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