• Recently Browsing

    No registered users viewing this page.

  • Posts

    • First of all, Code Style 4. Second of all, copy-pasting code doesn't teach you anything. It's just a lazy-excuse of the current level of understanding you are lacking. Third of all, update to the latest minor. There are new ways of handling biome spawns, basically Problematic Code 11. Fourth of all, if you can't find the method in your version, it probably means the mappings aren't updated. Fifth of all, to negate the fourth point, you should try and add a new JigsawPiece to add an entity spawn to the village. It's all handled via nbt files nowadays and you can construct your piece to be generated along with the village. How to do this is left as an exercise for you. Sixth of all, don't use him as a style guide. He promotes bad practices in Java. Seventh, relearn Java first, then come back to modding. It's better to have a good foundation else you're gonna pick up bad practices. Eighth, you're more or less trying to find an answer without attempting to dive into the source code of Minecraft and problem solve your way through it.   I'm not trying to be rude, but not understanding what you're doing is a detriment to your overall ability. This is the advice I will give you, I hope you take it to heart.
    • I am using Forge version 34.1.0 on Minecraft 1.16.3. I started on 1.16.2 and have upgraded, at some point My nether portal stopped loading the Nether. I also recently located the End Portal and it is not loading the End. The mod List is here https://pastebin.com/q8DsfJjT I tried deleting DIM -1 (before I discovered The End) and that did nothing I updated all the mods that I could, there are 19 that are not 1.16.3 and some others that say they are but still are named 1.16.2 I tried the "Execute in" command and The Overworld and a Woot Tartarus Dim were all that were available. I have created a new world* with the same mods and the Nether portal works, also the Execute in command shows the_nether On the original map I Deleted ALL mods (leaving their folders and other data) and the portal did not work After restoring I deleted Woot and it's folder but still not working. To be clear - The Nether portal just continues waving but not loading in the nether, The End portal just allows falling through (I removed the lava) I also tried copying the Level.dat, Level.dat_old and the Region folder to the new world* mentioned earlier and the nether portal was not working I am on the verge of abandoning this world and starting anew, I can not think of anything else to try, but would be interested to know why it is not working and if it can be saved. Hope you are able to help but understand if you can not.  Thanks either way  
    • I'm making a mod to add new cats but I'm having trouble figuring out how to get them to spawn naturally in villages similar to the vanilla cat. I found this post that seems to be exactly what I'm looking for, but "Feature.VILLAGE.isPositionInStructure" doesn't seem to be valid in 1.16.1. I've looked at CatSpawner.class and tried replicating that, and my mod builds and the game launches with no errors but my custom entities still aren't spawning as expected. I am able to manually spawn them with the summon command.   I don't necessarily need my custom cat entity to spawn following the same rules as the vanilla cats -- just being able to specify their spawn weight and min/max group size would be fine, e.g.  biome.getSpawns(EntityClassification.CREATURE).add(new Biome.SpawnListEntry(ModEntityType.NEW_CAT.get(), 100, 1, 3));   Here's what I have currently:   package morecats.world.spawner; import java.util.List; import morecats.MoreCats; import morecats.entity.passive.NewCatEntity; import morecats.init.ModEntityType; import net.minecraft.entity.EntityClassification; import net.minecraft.entity.ILivingEntityData; import net.minecraft.entity.SpawnReason; import net.minecraft.entity.passive.CatEntity; import net.minecraft.nbt.CompoundNBT; import net.minecraft.util.math.AxisAlignedBB; import net.minecraft.util.math.BlockPos; import net.minecraft.village.PointOfInterestManager; import net.minecraft.village.PointOfInterestType; import net.minecraft.world.World; import net.minecraft.world.server.ServerWorld; import net.minecraftforge.event.world.WorldEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.common.Mod; @Mod.EventBusSubscriber(modid = MoreCats.MOD_ID, bus = Mod.EventBusSubscriber.Bus.MOD) public class ModEntitySpawns { @SubscribeEvent public int generateNewCats(WorldEvent.PotentialSpawns event) { if (event.getType() == EntityClassification.CREATURE) { if (((ServerWorld) event.getWorld()).func_241119_a_(event.getPos(), 2)) { return this.func_221121_a((ServerWorld) event.getWorld(), event.getPos()); } } return 0; } private int func_221121_a(ServerWorld worldIn, BlockPos p_221121_2_) { int i = 48; if (worldIn.getPointOfInterestManager().getCountInRange(PointOfInterestType.HOME.getPredicate(), p_221121_2_, 48, PointOfInterestManager.Status.IS_OCCUPIED) > 4L) { List<CatEntity> list = worldIn.getEntitiesWithinAABB(CatEntity.class, (new AxisAlignedBB(p_221121_2_)).grow(48.0D, 8.0D, 48.0D)); if (list.size() < 5) { return this.spawnNewCat(p_221121_2_, worldIn); } } return 0; } private int spawnNewCat(BlockPos pos, World worldIn) { NewCatEntity newcatentity = ModEntityType.NEW_CAT.get().create(worldIn); if (newcatentity == null) { return 0; } else { newcatentity.onInitialSpawn(worldIn, worldIn.getDifficultyForLocation(pos), SpawnReason.NATURAL, (ILivingEntityData)null, (CompoundNBT)null); newcatentity.moveToBlockPosAndAngles(pos, 0.0F, 0.0F); worldIn.addEntity(newcatentity); return 1; } } }   I'm new to modding and also (re-)learning Java, so I've been through a few tutorials on creating new entities (this tutorial was particularly helpful), I've looked at the source code for other mods that seemed like they might do something similar to what I was looking for, and I feel like I've looked through the Forge classes pretty thoroughly, but I'm struggling to figure this one out. Any help is appreciated!   Let me know if there's any additional code I should share.
    • At this point, I've reimplemented the Shadow plugin, but it makes no changes to the jar unless I use: project.tasks.build.dependsOn shadowJar which makes a much larger jar, and I assume my dependencies are somewhere in there, but Minecraft does not recognize it as a mod.  When I used the dependencies{} block in the shadowJar{} block, and included my dependencies, it would generate a 1 KB jar, which is definitely not right at all.   Other than including the plugin, here's the code that Shadow effects: dependencies { minecraft 'net.minecraftforge:forge:1.15.2-31.2.36' compile group: 'org.seleniumhq.selenium', name:'selenium-java', version:'3.141.59' } shadowJar { relocate 'org.apache.commons.exec', 'org.(modid).apache.commons.exec' classifier '' }   Thanks all for your help.
    • 1.12 is no longer supported on this forum. Please update to a modern version of Minecraft to receive support.
  • Topics

  • Who's Online (See full list)