Jump to content
Search In
  • More options...
Find results that contain...
Find results in...


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About DarkAssassin

  • Rank
    Tree Puncher

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. it should be called by minecrafts iTickableEntity if somebody has time, please look at this code. Im new to this and want to learn whats wrong https://github.com/DarkAssassin11/SpawnTweaks
  2. i have now done this TileEntityType<?> type = TileEntityType.Builder.create(MobSpawnerTileEntity::new, BlockList.spawner).build(null); type.setRegistryName("minecraft:mob_spawner"); event.getRegistry().register(type); TEList.mob_spawner = type; and in the tile entity class done this TileEntityType.MOB_SPAWNER ==> TEList.mob_spawner and now the game neither crashes nor spews out error messages and now the entity is registered, but the tile entity doesn´t work as excpected. instead of behaving l
  3. i still have troubles creating a functional tile entity the Error log i´m getting is this: A TileEntity type me.spawntweak.lists.MobSpawnerTileEntity has thrown an exception trying to write state. It will not persist, Report this to the mod author java.lang.RuntimeException: class me.spawntweak.lists.MobSpawnerTileEntity is missing a mapping [02:29:55] [Server thread/ERROR] [minecraft/Chunk]: A TileEntity type fabian.spawntweak.lists.MobSpawnerTileEntity has thrown an exception trying to write state. It will not persist, Report this to the mod author java.lan
  4. my bad. the code is older and my setup function now looks like this private void setup(final FMLCommonSetupEvent event) { logger.info("setup registered"); } private void clientRegistries(final FMLClientSetupEvent event) { logger.info("client registered"); } @Mod.EventBusSubscriber(bus=Mod.EventBusSubscriber.Bus.MOD) public static class RegistryEvents{ @SubscribeEvent public static void registerItems(final RegistryEvent.Register<Item> event) { event.
  5. i´ve detailed it in another post but Tile Entity import java.util.Random; import javax.annotation.Nullable; import net.minecraft.block.Block; import net.minecraft.block.BlockState; import net.minecraft.block.Blocks; import net.minecraft.nbt.CompoundNBT; import net.minecraft.network.play.server.SUpdateTileEntityPacket; import net.minecraft.tileentity.ITickableTileEntity; import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntityType; import net.minecraft.util.WeightedSpawnerEntity; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World;
  6. i thought so but i actually just have a questionmark. do you know what type a spawner is? @SubscribeEvent public static void registerTileEntety(RegistryEvent.Register<TileEntityType<?>> event) { TileEntityType<?> type = TileEntityType.Builder.create(MobSpawnerTileEntity::new, BlockList.spawner).build(null); type.setRegistryName("minecraft:spawner"); event.getRegistry().register(type); } if type.setRegistryName("minecraft:spawner") it is just a block and if type.setRegistryName("minecraft:mob_s
  7. the only thin changet for me is that i now have this item in a creative tab
  8. ok i will try that but what i´m wondering then is: why is the tile entity not loading and just a block when i comment out the TE out of my code when i place the vanilla item spawner
  9. I don't really need to do that in my case because I'm using the same ID as a Standart vanilla spawner (im able to place my block with the vanilla item) I'm now only having troubles getting the tile entity to work correctly. see this on my newer post.
  10. i just realised that i dont override, i just make a block with the same id but the tile entity doesn´t correctly work when using a different id either he said that i should override Blocks.SPAWNER but how can i do that? when using the id minecraft:spawner the spawner block is just a block and minecraft:mob_spawner does not exist but the log still says : [Server thread/WARN] [minecraft/TileEntity]: Block entity invalid: minecraft:mob_spawner but when using the id minecraft:mob_spawner the game instantly crashes whan confronted with that block and this error log:
  11. i want to modify the vanilla spawner and in another Topic someone said that the best way to do so is to make your own spawner and override the registry entry with your own
  12. it doesn´t matter how long i look, i cannot find the error. the log says: [Server thread/WARN] [minecraft/TileEntity]: Block entity invalid: minecraft:mob_spawner but i dont find or remember writing mob_spawner i always wrote spawner. Edit: ok the official tag is minecraft:mob_spawner and not spawner, but why is it gone? Edit2: ive now changed all minecraft:spawner to minecraft:mob_spawner. now i cannot pick up the "spawners"(prev. just blocks without the tile entity) with middle click anymore and after using / setblock minecraft crashed and ga
  13. I have a code for a tile entity(modified mob spawner code) and now i have troubles making it a real block that i can place. how do i register something like that correctly? @Mod("spawntweak") public class SpawnTweak{ public static SpawnTweak instance; public static final String modid = "spawntweak"; private static final Logger logger = LogManager.getLogger(modid); public SpawnTweak() { instance=this; FMLJavaModLoadingContext.get().getModEventBus().addListener(this::setup); FMLJavaModLoadingContext.get().getModEventBus().addListener(this::client
  14. 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 : 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.
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.