me1
-
Posts
31 -
Joined
-
Last visited
Posts posted by me1
-
-
3 minutes ago, Draco18s said:
Forge is not ready for 1.16
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 ?
-
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?
-
38 minutes ago, GenElectrovise said:
What version are you using?
For 1.15.2:
A crafting recipe for a spawn egg? Or a spawner block with a mob in it?
If it's a custom item, make a normal crafting recipe for it.
If it's a Minecraft spawn egg (from MC's SpawnEggItem) to spawn a custom entity, the Minecraft spawn egg system is not good for modding. You're better off making a custom item to spawn the entity, then following my last suggestion.
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)
-
How can I make a craft for a spawner with a special entity in it?
-
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
-
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?)
-
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:
-
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
-
apperently onBlockActivated(...) is Depricated...
-
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)
-
Someone help please!
-
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
-
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.
-
@Dams Why would you want that mod anyway? Looks like a cheat to me...
-
@ultra_reemun There is no .getHandle in the class Minecraft.
-
@Draco18s That's what I did and that's how I found 'func_228018_at_()'. It's the only one witch returns a 'MainWindow'.
-
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!
-
@Budschieps: I reference no librarys
-
@BudschieWhat do you mean by "reference librarys"?
-
@BudschieI didn't write any code, it's the ExampleMod. Also: other imorts(like java.awt) still work. But here is an image:
-
@BudschieI did everything how you described. It still is the same in both versions(The original and the one in the new Folder).
-
-
@Mixu_78Eclipse
- 1
-
I did run genEclipseRuns tho.
[1.15.2] How to kill an entity?
in Modder Support
Posted · Edited by me1
AnimalEntity
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