Jump to content

DarkAssassin

Members
  • Posts

    25
  • Joined

  • Last visited

Everything posted by DarkAssassin

  1. it is now public
  2. 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
  3. 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 like the vanilla spawner (i used the vanilla code for spawners and added public void tick(BlockState state, World worldIn, BlockPos pos, Random random) { if (!worldIn.isRemote) { if (worldIn.isBlockPowered(pos)) { AbstractSpawner.isActivated = true; } else { AbstractSpawner.isActivated =false; } } }) but it behaves lika a normal block even when i comment the changes out. also no errors are shown
  4. 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.lang.RuntimeException: class me.spawntweak.lists.MobSpawnerTileEntity is missing a mapping! This is a bug! at net.minecraft.tileentity.TileEntity.writeInternal(TileEntity.java:72) ~[?:?] {re:classloading} at net.minecraft.tileentity.TileEntity.write(TileEntity.java:66) ~[?:?] {re:classloading} at me.spawntweak.lists.MobSpawnerTileEntity.write(MobSpawnerTileEntity.java:72) ~[?:?] {re:classloading} at net.minecraft.world.chunk.Chunk.func_223134_j(Chunk.java:444) ~[?:?] {re:classloading} at net.minecraft.world.chunk.storage.ChunkSerializer.write(ChunkSerializer.java:303) ~[?:?] {re:classloading} at net.minecraft.world.server.ChunkManager.func_219229_a(ChunkManager.java:677) ~[?:?] {re:classloading} at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:174) [?:1.8.0_241] {} at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175) [?:1.8.0_241] {} at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) [?:1.8.0_241] {} at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1382) [?:1.8.0_241] {} at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482) [?:1.8.0_241] {} at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472) [?:1.8.0_241] {} at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151) [?:1.8.0_241] {} at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174) [?:1.8.0_241] {} at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) [?:1.8.0_241] {} at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418) [?:1.8.0_241] {} at net.minecraft.world.server.ChunkManager.save(ChunkManager.java:336) [?:?] {re:classloading} at net.minecraft.world.server.ServerChunkProvider.save(ServerChunkProvider.java:309) [?:?] {re:classloading,pl:accesstransformer:B} at net.minecraft.world.server.ServerWorld.save(ServerWorld.java:770) [?:?] {re:classloading} at net.minecraft.server.MinecraftServer.save(MinecraftServer.java:528) [?:?] {re:classloading,pl:accesstransformer:B} at net.minecraft.server.MinecraftServer.stopServer(MinecraftServer.java:571) [?:?] {re:classloading,pl:accesstransformer:B} at net.minecraft.server.integrated.IntegratedServer.stopServer(IntegratedServer.java:235) [?:?] {re:classloading,pl:runtimedistcleaner:A} at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:685) [?:?] {re:classloading,pl:accesstransformer:B} at java.lang.Thread.run(Thread.java:748) [?:1.8.0_241] {} main: @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::clientRegistries); MinecraftForge.EVENT_BUS.register(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.getRegistry().registerAll( ItemList.spawner= new BlockItem(BlockList.spawner, new Item.Properties().group(ItemGroup.TRANSPORTATION)).setRegistryName(BlockList.spawner.getRegistryName()));} @SubscribeEvent public static void registerBlocks(final RegistryEvent.Register<Block> event) { event.getRegistry().registerAll( BlockList.spawner = new MobSpawner(MobSpawner.Properties.create(Material.IRON).hardnessAndResistance(3.0f, 3.0f).sound(SoundType.METAL)).setRegistryName("minecraft:spawner")); logger.info("Blocks registered"); } @SubscribeEvent public static void registerTileEntety(RegistryEvent.Register<TileEntityType<?>> event) { TileEntityType<?> type = TileEntityType.Builder.create(MobSpawnerTileEntity::new, BlockList.spawner).build(null); type.setRegistryName("minecraft:mob_spawner"); event.getRegistry().register(type); } } } Block public class MobSpawner extends Block{ public MobSpawner(Properties properties) { super(Properties.create(Material.IRON).hardnessAndResistance(3.0f, 3.0f).sound(SoundType.METAL)); } @Override public TileEntity createTileEntity(BlockState state, IBlockReader world) { return new MobSpawnerTileEntity(); } public BlockRenderLayer getRenderLayer() { return BlockRenderLayer.TRANSLUCENT; } @Override public boolean hasTileEntity(BlockState state) { return true; } } Tile Entity public class MobSpawnerTileEntity extends TileEntity implements ITickableTileEntity { private final AbstractSpawner spawnerLogic = new AbstractSpawner() { public void broadcastEvent(int id) { MobSpawnerTileEntity.this.world.addBlockEvent(MobSpawnerTileEntity.this.pos, Blocks.SPAWNER, id, 0); } public World getWorld() { return MobSpawnerTileEntity.this.world; } public BlockPos getSpawnerPosition() { return MobSpawnerTileEntity.this.pos; } public void setNextSpawnData(WeightedSpawnerEntity nextSpawnData) { super.setNextSpawnData(nextSpawnData); if (this.getWorld() != null) { BlockState blockstate = this.getWorld().getBlockState(this.getSpawnerPosition()); this.getWorld().notifyBlockUpdate(MobSpawnerTileEntity.this.pos, blockstate, blockstate, 4); } } }; public void tick(BlockState state, World worldIn, BlockPos pos, Random random) { if (!worldIn.isRemote) { if (worldIn.isBlockPowered(pos)) { AbstractSpawner.isActivated = true; } else { AbstractSpawner.isActivated =false; } } } public MobSpawnerTileEntity() { super(TileEntityType.MOB_SPAWNER); } public void read(CompoundNBT compound) { super.read(compound); this.spawnerLogic.read(compound); } public CompoundNBT write(CompoundNBT compound) { super.write(compound); this.spawnerLogic.write(compound); return compound; } public void tick() { this.spawnerLogic.tick(); } @Nullable public SUpdateTileEntityPacket getUpdatePacket() { return new SUpdateTileEntityPacket(this.pos, 1, this.getUpdateTag()); } public CompoundNBT getUpdateTag() { CompoundNBT compoundnbt = this.write(new CompoundNBT()); compoundnbt.remove("SpawnPotentials"); return compoundnbt; } public boolean receiveClientEvent(int id, int type) { return this.spawnerLogic.setDelayToMin(id) ? true : super.receiveClientEvent(id, type); } public boolean onlyOpsCanSetNbt() { return true; } public AbstractSpawner getSpawnerBaseLogic() { return this.spawnerLogic; } } Abstract Spawner public abstract class AbstractSpawner { private static final Logger LOGGER = LogManager.getLogger(); public static boolean isActivated; private int spawnDelay = 20; private final List<WeightedSpawnerEntity> potentialSpawns = Lists.newArrayList(); private WeightedSpawnerEntity spawnData = new WeightedSpawnerEntity(); private double mobRotation; private double prevMobRotation; private int minSpawnDelay = 200; private int maxSpawnDelay = 800; private int spawnCount = 4; private Entity cachedEntity; private int maxNearbyEntities = 6; private int activatingRangeFromPlayer = 16; private int spawnRange = 4; @SuppressWarnings("resource") @Nullable private ResourceLocation getEntityId() { String s = this.spawnData.getNbt().getString("id"); try { return StringUtils.isNullOrEmpty(s) ? null : new ResourceLocation(s); } catch (ResourceLocationException var4) { BlockPos blockpos = this.getSpawnerPosition(); LOGGER.warn("Invalid entity id '{}' at spawner {}:[{},{},{}]", s, this.getWorld().dimension.getType(), blockpos.getX(), blockpos.getY(), blockpos.getZ()); return null; } } @SuppressWarnings("deprecation") public void setEntityType(EntityType<?> type) { this.spawnData.getNbt().putString("id", Registry.ENTITY_TYPE.getKey(type).toString()); } /** * Returns true if there's a player close enough to this mob spawner to activate it. */ public boolean isActivated() { BlockPos blockpos = this.getSpawnerPosition(); return this.getWorld().isPlayerWithin((double)blockpos.getX() + 0.5D, (double)blockpos.getY() + 0.5D, (double)blockpos.getZ() + 0.5D, (double)this.activatingRangeFromPlayer); } public void tick() { if (!this.isActivated()||!isActivated) { this.prevMobRotation = this.mobRotation; } else { World world = this.getWorld(); BlockPos blockpos = this.getSpawnerPosition(); if (world.isRemote) { double d3 = (double)((float)blockpos.getX() + world.rand.nextFloat()); double d4 = (double)((float)blockpos.getY() + world.rand.nextFloat()); double d5 = (double)((float)blockpos.getZ() + world.rand.nextFloat()); world.addParticle(ParticleTypes.SMOKE, d3, d4, d5, 0.0D, 0.0D, 0.0D); world.addParticle(ParticleTypes.FLAME, d3, d4, d5, 0.0D, 0.0D, 0.0D); if (this.spawnDelay > 0) { --this.spawnDelay; } this.prevMobRotation = this.mobRotation; this.mobRotation = (this.mobRotation + (double)(1000.0F / ((float)this.spawnDelay + 200.0F))) % 360.0D; } else { if (this.spawnDelay == -1) { this.resetTimer(); } if (this.spawnDelay > 0) { --this.spawnDelay; return; } boolean flag = false; for(int i = 0; i < this.spawnCount; ++i) { CompoundNBT compoundnbt = this.spawnData.getNbt(); Optional<EntityType<?>> optional = EntityType.readEntityType(compoundnbt); if (!optional.isPresent()) { this.resetTimer(); return; } ListNBT listnbt = compoundnbt.getList("Pos", 6); int j = listnbt.size(); double d0 = j >= 1 ? listnbt.getDouble(0) : (double)blockpos.getX() + (world.rand.nextDouble() - world.rand.nextDouble()) * (double)this.spawnRange + 0.5D; double d1 = j >= 2 ? listnbt.getDouble(1) : (double)(blockpos.getY() + world.rand.nextInt(3) - 1); double d2 = j >= 3 ? listnbt.getDouble(2) : (double)blockpos.getZ() + (world.rand.nextDouble() - world.rand.nextDouble()) * (double)this.spawnRange + 0.5D; if (world.areCollisionShapesEmpty(optional.get().func_220328_a(d0, d1, d2)) && EntitySpawnPlacementRegistry.func_223515_a(optional.get(), world.getWorld(), SpawnReason.SPAWNER, new BlockPos(d0, d1, d2), world.getRandom())) { Entity entity = EntityType.func_220335_a(compoundnbt, world, (p_221408_6_) -> { p_221408_6_.setLocationAndAngles(d0, d1, d2, p_221408_6_.rotationYaw, p_221408_6_.rotationPitch); return p_221408_6_; }); if (entity == null) { this.resetTimer(); return; } int k = world.getEntitiesWithinAABB(entity.getClass(), (new AxisAlignedBB((double)blockpos.getX(), (double)blockpos.getY(), (double)blockpos.getZ(), (double)(blockpos.getX() + 1), (double)(blockpos.getY() + 1), (double)(blockpos.getZ() + 1))).grow((double)this.spawnRange)).size(); if (k >= this.maxNearbyEntities) { this.resetTimer(); return; } entity.setLocationAndAngles(entity.posX, entity.posY, entity.posZ, world.rand.nextFloat() * 360.0F, 0.0F); if (entity instanceof MobEntity) { MobEntity mobentity = (MobEntity)entity; if (!EventFactory.canEntitySpawnSpawner(mobentity, world, (float)entity.posX, (float)entity.posY, (float)entity.posZ, this)) { continue; } if (this.spawnData.getNbt().size() == 1 && this.spawnData.getNbt().contains("id", 8)) { ((MobEntity)entity).onInitialSpawn(world, world.getDifficultyForLocation(new BlockPos(entity)), SpawnReason.SPAWNER, (ILivingEntityData)null, (CompoundNBT)null); } } this.func_221409_a(entity); world.playEvent(2004, blockpos, 0); if (entity instanceof MobEntity) { ((MobEntity)entity).spawnExplosionParticle(); } flag = true; } } if (flag) { this.resetTimer(); } } } } private void func_221409_a(Entity p_221409_1_) { if (this.getWorld().addEntity(p_221409_1_)) { for(Entity entity : p_221409_1_.getPassengers()) { this.func_221409_a(entity); } } } @SuppressWarnings("resource") private void resetTimer() { if (this.maxSpawnDelay <= this.minSpawnDelay) { this.spawnDelay = this.minSpawnDelay; } else { int i = this.maxSpawnDelay - this.minSpawnDelay; this.spawnDelay = this.minSpawnDelay + this.getWorld().rand.nextInt(i); } if (!this.potentialSpawns.isEmpty()) { this.setNextSpawnData(WeightedRandom.getRandomItem(this.getWorld().rand, this.potentialSpawns)); } this.broadcastEvent(1); } @SuppressWarnings("resource") public void read(CompoundNBT nbt) { this.spawnDelay = nbt.getShort("Delay"); this.potentialSpawns.clear(); if (nbt.contains("SpawnPotentials", 9)) { ListNBT listnbt = nbt.getList("SpawnPotentials", 10); for(int i = 0; i < listnbt.size(); ++i) { this.potentialSpawns.add(new WeightedSpawnerEntity(listnbt.getCompound(i))); } } if (nbt.contains("SpawnData", 10)) { this.setNextSpawnData(new WeightedSpawnerEntity(1, nbt.getCompound("SpawnData"))); } else if (!this.potentialSpawns.isEmpty()) { this.setNextSpawnData(WeightedRandom.getRandomItem(this.getWorld().rand, this.potentialSpawns)); } if (nbt.contains("MinSpawnDelay", 99)) { this.minSpawnDelay = nbt.getShort("MinSpawnDelay"); this.maxSpawnDelay = nbt.getShort("MaxSpawnDelay"); this.spawnCount = nbt.getShort("SpawnCount"); } if (nbt.contains("MaxNearbyEntities", 99)) { this.maxNearbyEntities = nbt.getShort("MaxNearbyEntities"); this.activatingRangeFromPlayer = nbt.getShort("RequiredPlayerRange"); } if (nbt.contains("SpawnRange", 99)) { this.spawnRange = nbt.getShort("SpawnRange"); } if (this.getWorld() != null) { this.cachedEntity = null; } } public CompoundNBT write(CompoundNBT compound) { ResourceLocation resourcelocation = this.getEntityId(); if (resourcelocation == null) { return compound; } else { compound.putShort("Delay", (short)this.spawnDelay); compound.putShort("MinSpawnDelay", (short)this.minSpawnDelay); compound.putShort("MaxSpawnDelay", (short)this.maxSpawnDelay); compound.putShort("SpawnCount", (short)this.spawnCount); compound.putShort("MaxNearbyEntities", (short)this.maxNearbyEntities); compound.putShort("RequiredPlayerRange", (short)this.activatingRangeFromPlayer); compound.putShort("SpawnRange", (short)this.spawnRange); compound.put("SpawnData", this.spawnData.getNbt().copy()); ListNBT listnbt = new ListNBT(); if (this.potentialSpawns.isEmpty()) { listnbt.add(this.spawnData.toCompoundTag()); } else { for(WeightedSpawnerEntity weightedspawnerentity : this.potentialSpawns) { listnbt.add(weightedspawnerentity.toCompoundTag()); } } compound.put("SpawnPotentials", listnbt); return compound; } } @OnlyIn(Dist.CLIENT) public Entity getCachedEntity() { if (this.cachedEntity == null) { this.cachedEntity = EntityType.func_220335_a(this.spawnData.getNbt(), this.getWorld(), Function.identity()); if (this.spawnData.getNbt().size() == 1 && this.spawnData.getNbt().contains("id", 8) && this.cachedEntity instanceof MobEntity) { ((MobEntity)this.cachedEntity).onInitialSpawn(this.getWorld(), this.getWorld().getDifficultyForLocation(new BlockPos(this.cachedEntity)), SpawnReason.SPAWNER, (ILivingEntityData)null, (CompoundNBT)null); } } return this.cachedEntity; } /** * Sets the delay to minDelay if parameter given is 1, else return false. */ public boolean setDelayToMin(int delay) { if (delay == 1 && this.getWorld().isRemote) { this.spawnDelay = this.minSpawnDelay; return true; } else { return false; } } public void setNextSpawnData(WeightedSpawnerEntity nextSpawnData) { this.spawnData = nextSpawnData; } public abstract void broadcastEvent(int id); public abstract World getWorld(); public abstract BlockPos getSpawnerPosition(); @OnlyIn(Dist.CLIENT) public double getMobRotation() { return this.mobRotation; } @OnlyIn(Dist.CLIENT) public double getPrevMobRotation() { return this.prevMobRotation; } @Nullable public Entity getSpawnerEntity() { return null; } }
  5. 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.getRegistry().registerAll( ItemList.spawner= new BlockItem(BlockList.spawner, new Item.Properties().group(ItemGroup.TRANSPORTATION)).setRegistryName(BlockList.spawner.getRegistryName()));} @SubscribeEvent public static void registerBlocks(final RegistryEvent.Register<Block> event) { event.getRegistry().registerAll( BlockList.spawner = new MobSpawner(MobSpawner.Properties.create(Material.IRON).hardnessAndResistance(3.0f, 3.0f).sound(SoundType.METAL)).setRegistryName("minecraft:spawner")); logger.info("Blocks registered"); } @SubscribeEvent public static void registerTileEntety(RegistryEvent.Register<TileEntityType<?>> event) { TileEntityType<?> type = TileEntityType.Builder.create(MobSpawnerTileEntity::new, BlockList.spawner).build(null); type.setRegistryName("minecraft:mob_spawner"); event.getRegistry().register(type); }
  6. 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; public class MobSpawnerTileEntity extends TileEntity implements ITickableTileEntity { private final AbstractSpawner spawnerLogic = new AbstractSpawner() { public void broadcastEvent(int id) { MobSpawnerTileEntity.this.world.addBlockEvent(MobSpawnerTileEntity.this.pos, Blocks.SPAWNER, id, 0); } public World getWorld() { return MobSpawnerTileEntity.this.world; } public BlockPos getSpawnerPosition() { return MobSpawnerTileEntity.this.pos; } public void setNextSpawnData(WeightedSpawnerEntity nextSpawnData) { super.setNextSpawnData(nextSpawnData); if (this.getWorld() != null) { BlockState blockstate = this.getWorld().getBlockState(this.getSpawnerPosition()); this.getWorld().notifyBlockUpdate(MobSpawnerTileEntity.this.pos, blockstate, blockstate, 4); } } }; public void tick(BlockState state, World worldIn, BlockPos pos, Random random) { if (!worldIn.isRemote) { if (worldIn.isBlockPowered(pos)) { AbstractSpawner.isActivated = true; } else { AbstractSpawner.isActivated =false; } } } public MobSpawnerTileEntity() { super(TileEntityType.MOB_SPAWNER); } public void read(CompoundNBT compound) { super.read(compound); this.spawnerLogic.read(compound); } public CompoundNBT write(CompoundNBT compound) { super.write(compound); this.spawnerLogic.write(compound); return compound; } public void tick() { this.spawnerLogic.tick(); } @Nullable public SUpdateTileEntityPacket getUpdatePacket() { return new SUpdateTileEntityPacket(this.pos, 1, this.getUpdateTag()); } public CompoundNBT getUpdateTag() { CompoundNBT compoundnbt = this.write(new CompoundNBT()); compoundnbt.remove("SpawnPotentials"); return compoundnbt; } public boolean receiveClientEvent(int id, int type) { return this.spawnerLogic.setDelayToMin(id) ? true : super.receiveClientEvent(id, type); } public boolean onlyOpsCanSetNbt() { return true; } public AbstractSpawner getSpawnerBaseLogic() { return this.spawnerLogic; } } Block import net.minecraft.block.Block; import net.minecraft.block.BlockState; import net.minecraft.block.SoundType; import net.minecraft.block.material.Material; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.BlockRenderLayer; import net.minecraft.world.IBlockReader; public class MobSpawner extends Block{ public MobSpawner(Properties properties) { super(Properties.create(Material.IRON).hardnessAndResistance(3.0f, 3.0f).sound(SoundType.METAL)); } @Override public TileEntity createTileEntity(BlockState state, IBlockReader world) { return new MobSpawnerTileEntity(); } public BlockRenderLayer getRenderLayer() { return BlockRenderLayer.TRANSLUCENT; } @Override public boolean hasTileEntity(BlockState state) { return true; } } is it right that i have this in my tile entity or do i need to put the function into the block class public void tick(BlockState state, World worldIn, BlockPos pos, Random random) { if (!worldIn.isRemote) { if (worldIn.isBlockPowered(pos)) { AbstractSpawner.isActivated = true; } else { AbstractSpawner.isActivated =false; } } }
  7. 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_spawner") the game crashes with this error log [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.lang.RuntimeException: class fabian.spawntweak.lists.MobSpawnerTileEntity is missing a mapping! This is a bug! at net.minecraft.tileentity.TileEntity.writeInternal(TileEntity.java:72) ~[?:?] {re:classloading} at net.minecraft.tileentity.TileEntity.write(TileEntity.java:66) ~[?:?] {re:classloading} at fabian.spawntweak.lists.MobSpawnerTileEntity.write(MobSpawnerTileEntity.java:72) ~[?:?] {re:classloading} at net.minecraft.world.chunk.Chunk.func_223134_j(Chunk.java:444) ~[?:?] {re:classloading} at net.minecraft.world.chunk.storage.ChunkSerializer.write(ChunkSerializer.java:303) ~[?:?] {re:classloading} at net.minecraft.world.server.ChunkManager.func_219229_a(ChunkManager.java:677) ~[?:?] {re:classloading} at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:174) [?:1.8.0_241] {} at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175) [?:1.8.0_241] {} at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) [?:1.8.0_241] {} at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1382) [?:1.8.0_241] {} at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482) [?:1.8.0_241] {} at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472) [?:1.8.0_241] {} at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151) [?:1.8.0_241] {} at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174) [?:1.8.0_241] {} at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) [?:1.8.0_241] {} at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418) [?:1.8.0_241] {} at net.minecraft.world.server.ChunkManager.save(ChunkManager.java:336) [?:?] {re:classloading} at net.minecraft.world.server.ServerChunkProvider.save(ServerChunkProvider.java:309) [?:?] {re:classloading,pl:accesstransformer:B} at net.minecraft.world.server.ServerWorld.save(ServerWorld.java:770) [?:?] {re:classloading} at net.minecraft.server.MinecraftServer.save(MinecraftServer.java:528) [?:?] {re:classloading,pl:accesstransformer:B} at net.minecraft.server.MinecraftServer.stopServer(MinecraftServer.java:571) [?:?] {re:classloading,pl:accesstransformer:B} at net.minecraft.server.integrated.IntegratedServer.stopServer(IntegratedServer.java:235) [?:?] {re:classloading,pl:runtimedistcleaner:A} at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:685) [?:?] {re:classloading,pl:accesstransformer:B} at java.lang.Thread.run(Thread.java:748) [?:1.8.0_241] {} +the main reson is 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 fabian.spawntweak.lists.MobSpawnerTileEntity is missing a mapping! i
  8. the only thin changet for me is that i now have this item in a creative tab
  9. 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
  10. 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.
  11. 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: [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.lang.RuntimeException: class fabian.spawntweak.lists.MobSpawnerTileEntity is missing a mapping! This is a bug! at net.minecraft.tileentity.TileEntity.writeInternal(TileEntity.java:72) ~[?:?] {re:classloading} at net.minecraft.tileentity.TileEntity.write(TileEntity.java:66) ~[?:?] {re:classloading} at fabian.spawntweak.lists.MobSpawnerTileEntity.write(MobSpawnerTileEntity.java:72) ~[?:?] {re:classloading} at net.minecraft.world.chunk.Chunk.func_223134_j(Chunk.java:444) ~[?:?] {re:classloading} at net.minecraft.world.chunk.storage.ChunkSerializer.write(ChunkSerializer.java:303) ~[?:?] {re:classloading} at net.minecraft.world.server.ChunkManager.func_219229_a(ChunkManager.java:677) ~[?:?] {re:classloading} at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:174) [?:1.8.0_241] {} at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175) [?:1.8.0_241] {} at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) [?:1.8.0_241] {} at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1382) [?:1.8.0_241] {} at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482) [?:1.8.0_241] {} at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472) [?:1.8.0_241] {} at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151) [?:1.8.0_241] {} at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174) [?:1.8.0_241] {} at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) [?:1.8.0_241] {} at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418) [?:1.8.0_241] {} at net.minecraft.world.server.ChunkManager.save(ChunkManager.java:336) [?:?] {re:classloading} at net.minecraft.world.server.ServerChunkProvider.save(ServerChunkProvider.java:309) [?:?] {re:classloading,pl:accesstransformer:B} at net.minecraft.world.server.ServerWorld.save(ServerWorld.java:770) [?:?] {re:classloading} at net.minecraft.server.MinecraftServer.save(MinecraftServer.java:528) [?:?] {re:classloading,pl:accesstransformer:B} at net.minecraft.server.MinecraftServer.stopServer(MinecraftServer.java:571) [?:?] {re:classloading,pl:accesstransformer:B} at net.minecraft.server.integrated.IntegratedServer.stopServer(IntegratedServer.java:235) [?:?] {re:classloading,pl:runtimedistcleaner:A} at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:685) [?:?] {re:classloading,pl:accesstransformer:B} at java.lang.Thread.run(Thread.java:748) [?:1.8.0_241] {} ok i figured out that if the tileentityid is minecraft:mob_spawner the game crashes if the blockid is minecraft:spawner it replaces the original one if the tileentityid is minecraft:spawner it does nothing.
  12. 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
  13. 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 gave this output: [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.lang.RuntimeException: class fabian.spawntweak.lists.MobSpawnerTileEntity is missing a mapping! This is a bug! at net.minecraft.tileentity.TileEntity.writeInternal(TileEntity.java:72) ~[?:?] {re:classloading} at net.minecraft.tileentity.TileEntity.write(TileEntity.java:66) ~[?:?] {re:classloading} at fabian.spawntweak.lists.MobSpawnerTileEntity.write(MobSpawnerTileEntity.java:72) ~[?:?] {re:classloading} at net.minecraft.world.chunk.Chunk.func_223134_j(Chunk.java:444) ~[?:?] {re:classloading} at net.minecraft.world.chunk.storage.ChunkSerializer.write(ChunkSerializer.java:303) ~[?:?] {re:classloading} at net.minecraft.world.server.ChunkManager.func_219229_a(ChunkManager.java:677) ~[?:?] {re:classloading} at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:174) [?:1.8.0_241] {} at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175) [?:1.8.0_241] {} at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) [?:1.8.0_241] {} at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1382) [?:1.8.0_241] {} at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482) [?:1.8.0_241] {} at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472) [?:1.8.0_241] {} at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151) [?:1.8.0_241] {} at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174) [?:1.8.0_241] {} at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) [?:1.8.0_241] {} at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418) [?:1.8.0_241] {} at net.minecraft.world.server.ChunkManager.save(ChunkManager.java:336) [?:?] {re:classloading} at net.minecraft.world.server.ServerChunkProvider.save(ServerChunkProvider.java:309) [?:?] {re:classloading,pl:accesstransformer:B} at net.minecraft.world.server.ServerWorld.save(ServerWorld.java:770) [?:?] {re:classloading} at net.minecraft.server.MinecraftServer.save(MinecraftServer.java:528) [?:?] {re:classloading,pl:accesstransformer:B} at net.minecraft.server.MinecraftServer.stopServer(MinecraftServer.java:571) [?:?] {re:classloading,pl:accesstransformer:B} at net.minecraft.server.integrated.IntegratedServer.stopServer(IntegratedServer.java:235) [?:?] {re:classloading,pl:runtimedistcleaner:A} at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:685) [?:?] {re:classloading,pl:accesstransformer:B} at java.lang.Thread.run(Thread.java:748) [?:1.8.0_241] {} someone on here with the same error said that he forgot to register it but i thought i had registered it here: @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); } Edit 3 : i have now(for the vanilla textures that are for the block minecraft:spawner) changed the block in blockList back to spawner but left the id minecraft:mob_spawner. now the texture is shown again and if placed after /give(for some reason the command was now /give (id:)minecraft:spawner) the pig and fire particles appear for a brief moment and then minecraft crashes again with the same error
  14. 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::clientRegistries); MinecraftForge.EVENT_BUS.register(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 registerBlocks(final RegistryEvent.Register<Block> event) { event.getRegistry().registerAll( BlockList.spawner = new Block(Block.Properties.setRegistryName("minecraft:spawner"). ...) ); logger.info("Blocks registered"); } this is how i load my blocks
  15. 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.
  16. 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.
  17. the BlockItem is rendering but for some reason the Block when placed is not lists: public class BlockList { public static Block tutorial_block; } public class ItemList { public static Item tutorial_item; public static Item tutorial_block; } setup: 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 registerBlocks(final RegistryEvent.Register<Block> event) { event.getRegistry().registerAll( BlockList.tutorial_block = new Block(Block.Properties.create(Material.WOOD).hardnessAndResistance(2.0f, 2.0f).sound(SoundType.WOOD)).setRegistryName(location("tutorial_block")) ); logger.info("Blocks registered"); } @SubscribeEvent public static void registerItems(final RegistryEvent.Register<Item> event) { event.getRegistry().registerAll( ItemList.tutorial_item = new Item(new Item.Properties().group(ItemGroup.TRANSPORTATION)).setRegistryName(location("tutorial_item")), ItemList.tutorial_block = new BlockItem(BlockList.tutorial_block, new Item.Properties().group(ItemGroup.TRANSPORTATION)).setRegistryName(BlockList.tutorial_block.getRegistryName()) ); logger.info("items registered"); } } private static ResourceLocation location(String name) { return new ResourceLocation(modid, name); } blockstate: { "variants": { "axis=y": { "model": "sakuraforest:block/tutorial_block" }, "axis=z": { "model": "sakuraforest:block/tutorial_block", "x": 90 }, "axis=x": { "model": "sakuraforest:block/tutorial_block", "x": 90, "y": 90 } } } models: block: { "parent": "block/cube_column", "textures": { "end": "sakuraforest:block/tutorial_block_top", "side": "sakuraforest:block/tutorial_block" } } Item { "parent": "sakuraforest:block/tutorial_block" }
  18. the part of the console that features visible errors is this: [mException in thread "main" [32m[16:45:52] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1049]: java.lang.RuntimeException: java.lang.IllegalArgumentException: Unsupported class file major version 57 [m[32m[16:45:52] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1049]: at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:39) [m[32m[16:45:52] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1049]: at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) [m[32m[16:45:52] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1049]: at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) [m[32m[16:45:52] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1049]: at cpw.mods.modlauncher.Launcher.run(Launcher.java:81) [m[32m[16:45:52] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1049]: at cpw.mods.modlauncher.Launcher.main(Launcher.java:65) [m[32m[16:45:52] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1049]: at net.minecraftforge.userdev.LaunchTesting.main(LaunchTesting.java:102) [m[32m[16:45:52] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1058]: Caused by: java.lang.IllegalArgumentException: Unsupported class file major version 57 [m[32m[16:45:52] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1058]: at org.objectweb.asm.ClassReader.<init>(ClassReader.java:176) [m[32m[16:45:52] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1058]: at org.objectweb.asm.ClassReader.<init>(ClassReader.java:158) [m[32m[16:45:52] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1058]: at org.objectweb.asm.ClassReader.<init>(ClassReader.java:146) [m[32m[16:45:52] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1058]: at org.objectweb.asm.ClassReader.<init>(ClassReader.java:273) [m[32m[16:45:52] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1058]: at cpw.mods.modlauncher.TransformerClassWriter.computeHierarchy(TransformerClassWriter.java:82) [m[32m[16:45:52] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1058]: at cpw.mods.modlauncher.TransformerClassWriter.access$100(TransformerClassWriter.java:35) [m[32m[16:45:52] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1058]: at cpw.mods.modlauncher.TransformerClassWriter$SuperCollectingVisitor.visit(TransformerClassWriter.java:129) [m[32m[16:45:52] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1058]: at org.objectweb.asm.tree.ClassNode.accept(ClassNode.java:368) [m[32m[16:45:52] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1058]: at cpw.mods.modlauncher.TransformerClassWriter.computeHierarchy(TransformerClassWriter.java:74) [m[32m[16:45:52] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1058]: at cpw.mods.modlauncher.TransformerClassWriter.<init>(TransformerClassWriter.java:48) [m[32m[16:45:52] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1058]: at cpw.mods.modlauncher.ClassTransformer.transform(ClassTransformer.java:120) [m[32m[16:45:52] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1058]: at cpw.mods.modlauncher.TransformingClassLoader$DelegatedClassLoader.findClass(TransformingClassLoader.java:241) [m[32m[16:45:52] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1058]: at cpw.mods.modlauncher.TransformingClassLoader.loadClass(TransformingClassLoader.java:128) [m[32m[16:45:52] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1058]: at cpw.mods.modlauncher.TransformingClassLoader.loadClass(TransformingClassLoader.java:98) [m[32m[16:45:52] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1058]: at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521) [m[32m[16:45:52] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1058]: at java.base/java.lang.Class.forName0(Native Method) [m[32m[16:45:52] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1058]: at java.base/java.lang.Class.forName(Class.java:416) [m[32m[16:45:52] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1058]: at net.minecraftforge.userdev.FMLUserdevClientLaunchProvider.lambda$launchService$0(FMLUserdevClientLaunchProvider.java:55) [m[32m[16:45:52] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1058]: at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [m[32m[16:45:52] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1058]: ... 5 more what ist the problem im having?
  19. i wanted to test my mod but the console said it cannot start because it could not find the forge snapshot. Hof can i make it find it? the output looks like it has found it but hadn´t recognized it Could not resolve all files for configuration ':compileClasspath'. > Could not find net.minecraftforge:forge:1.14.4-28.2.3_mapped_snapshot_20190719-1.14.3. Searched in the following locations: - file:/C:/Users/Name/.gradle/caches/forge_gradle/bundeled_repo/net/minecraftforge/forge/1.14.4-28.2.3_mapped_snapshot_20190719-1.14.3/forge-1.14.4-28.2.3_mapped_snapshot_20190719-1.14.3.pom - file:/C:/Users/Name/.gradle/caches/forge_gradle/bundeled_repo/net/minecraftforge/forge/1.14.4-28.2.3_mapped_snapshot_20190719-1.14.3/forge-1.14.4-28.2.3_mapped_snapshot_20190719-1.14.3.jar - https://files.minecraftforge.net/maven/net/minecraftforge/forge/1.14.4-28.2.3_mapped_snapshot_20190719-1.14.3/forge-1.14.4-28.2.3_mapped_snapshot_20190719-1.14.3.pom - https://files.minecraftforge.net/maven/net/minecraftforge/forge/1.14.4-28.2.3_mapped_snapshot_20190719-1.14.3/forge-1.14.4-28.2.3_mapped_snapshot_20190719-1.14.3.jar - https://libraries.minecraft.net/net/minecraftforge/forge/1.14.4-28.2.3_mapped_snapshot_20190719-1.14.3/forge-1.14.4-28.2.3_mapped_snapshot_20190719-1.14.3.jar - https://repo.maven.apache.org/maven2/net/minecraftforge/forge/1.14.4-28.2.3_mapped_snapshot_20190719-1.14.3/forge-1.14.4-28.2.3_mapped_snapshot_20190719-1.14.3.pom - https://repo.maven.apache.org/maven2/net/minecraftforge/forge/1.14.4-28.2.3_mapped_snapshot_20190719-1.14.3/forge-1.14.4-28.2.3_mapped_snapshot_20190719-1.14.3.jar Required by: project : how can i fix this?
  20. the version i have is 6.3 . does that mean its too high? Edit: i now have tried it with 4,9 and it is still not able to start the daemon. i have more than enough RAM though Edit2: i forgot to add the variable java options and now it works Edit3: the minecraft libary is now installed but the forge one isnt.
  21. i already changed the environment variables but i think i have a higher java that works with playing minecraft mods the output with stacktrace is this: To honour the JVM settings for this build a new JVM will be forked. Please consider using the daemon: https://docs.gradle.org/4.9/userguide/gradle_daemon.html. FAILURE: Build failed with an exception. > Starting Daemon * What went wrong: Unable to start the daemon process. This problem might be caused by incorrect configuration of the daemon. For example, an unrecognized jvm option is used. Please refer to the user guide chapter on the daemon at https://docs.gradle.org/4.9/userguide/gradle_daemon.html Please read the following process output to find out more: ----------------------- Error occurred during initialization of VM Could not reserve enough space for 3145728KB object heap * Try: Run with --info or --debug option to get more log output. Run with --scan to get full insights. * Exception is: org.gradle.api.GradleException: Unable to start the daemon process. This problem might be caused by incorrect configuration of the daemon. For example, an unrecognized jvm option is used. Please refer to the user guide chapter on the daemon at https://docs.gradle.org/4.9/userguide/gradle_daemon.html Please read the following process output to find out more: ----------------------- Error occurred during initialization of VM Could not reserve enough space for 3145728KB object heap at org.gradle.launcher.daemon.client.DaemonGreeter.parseDaemonOutput(DaemonGreeter.java:35) at org.gradle.launcher.daemon.client.DefaultDaemonStarter.startProcess(DefaultDaemonStarter.java:160) at org.gradle.launcher.daemon.client.DefaultDaemonStarter.startDaemon(DefaultDaemonStarter.java:136) at org.gradle.launcher.daemon.client.DefaultDaemonConnector.doStartDaemon(DefaultDaemonConnector.java:212) at org.gradle.launcher.daemon.client.DefaultDaemonConnector.startSingleUseDaemon(DefaultDaemonConnector.java:237) at org.gradle.launcher.daemon.client.SingleUseDaemonClient.execute(SingleUseDaemonClient.java:51) at org.gradle.launcher.daemon.client.SingleUseDaemonClient.execute(SingleUseDaemonClient.java:37) at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:52) at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:207) at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:402) at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:375) at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:37) at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:23) at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:368) at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:298) at org.gradle.launcher.Main.doAction(Main.java:36) at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:60) at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:37) at org.gradle.launcher.GradleMain.main(GradleMain.java:23) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:31) at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:108) at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61) i personally am not familliar with the daemon and see nothing wrong here
  22. i was able to launch the daemon outside of the folder but now i get this reply: FAILURE: Build failed with an exception. * What went wrong: Unable to start the daemon process. This problem might be caused by incorrect configuration of the daemon. For example, an unrecognized jvm option is used. Please refer to the user guide chapter on the daemon at https://docs.gradle.org/4.9/userguide/gradle_daemon.html Please read the following process output to find out more: ----------------------- Error occurred during initialization of VM Could not reserve enough space for 3145728KB object heap * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
  23. where exactly do i need to write that? console? Eclipse? a seperate gradle.build? console doesn´t work if i just type .\gradle tasks the only tasks shown are help tasks buildEnvironment, tasks, projects, ... and the two build setup tasks init and wrapper. it says only these are runnable from the root project. how do i change the root project? gradle in console is currently using my main computer account as a root project
  24. where do i need to input that? command promt says "Task eclipse not found in root project 'MyName' "
  25. im new to minecraft modding. I want to set up my first project. i followed the instructions on the website but the only libraries eclipse installs are the java libary and the gradle wrapper and now i cannot start on my mod.
×
×
  • Create New...

Important Information

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