Posted April 12, 20205 yr What would be the best way to change vanilla spawners? i want them to ignore the distance between it and a player if powered by redstone.
April 12, 20205 yr Probably making your own version of it and overriding the vanilla one with it (use same registry name) My Projects: Cruelars Triforcemod (1.12 release; 1.14 alpha soon coming) Important: As my mod is on at least 10 different third party sites without my permission, I want to warn you about that with a link to StopModReposts
April 12, 20205 yr 1 minute ago, DarkAssassin said: What would be the best way to change vanilla spawners? i want them to ignore the distance between it and a player if powered by redstone. Override the Blocks.SPAWNER block in the registry with your own. Note you cannot change the BlockState of the Block. Then create your own version of the MobSpawnerTileEntity which does everything the vanilla one does except insert your feature into it. VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
April 12, 20205 yr Author 3 hours ago, Animefan8888 said: Override the Blocks.SPAWNER block in the registry with your own. Note you cannot change the BlockState of the Block. Then create your own version of the MobSpawnerTileEntity which does everything the vanilla one does except insert your feature into it. i copied the vanilla spawner classes and added another condition for it to be active but in the copy of the code it gives an error and says : Quote The method canEntitySpawnSpawner(net.minecraft.entity.MobEntity, net.minecraft.world.World, float, float, float, net.minecraft.world.spawner.AbstractSpawner) in the type ForgeEventFactory is not applicable for the arguments (net.minecraft.entity.MobEntity, net.minecraft.world.World, float, float, float, me.spawntweak.lists.AbstractSpawner) but there is nothing that should be missing the line of code is if (!net.minecraftforge.event.ForgeEventFactory.canEntitySpawnSpawner(mobentity, world, (float)entity.posX, (float)entity.posY, (float)entity.posZ, this)) { continue; } nevermind i just need to copy and edit parts of the event factory, too. Edited April 12, 20205 yr by DarkAssassin
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.