• Recently Browsing

    No registered users viewing this page.

  • Posts

    • I want to make a block that emits redstone signal if there  is a player nearby but getClosestPlayer() always returns an empty PlayerEntity TE: package com.budrunbun.lavalamp.tileEntities; import com.budrunbun.lavalamp.blocks.PlayerSensorBlock; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.tileentity.ITickableTileEntity; import net.minecraft.tileentity.TileEntity; public class PlayerSensorTileEntity extends TileEntity implements ITickableTileEntity { public PlayerSensorTileEntity() { super(ModTileEntities.PLAYER_SENSOR_TE); } @Override public void tick() { PlayerEntity playerentity = this.world.getClosestPlayer((double) ((float) this.pos.getX() + 0.5F), (double) ((float) this.pos.getY() + 0.5F), (double) ((float) this.pos.getZ() + 0.5F), 3.0D, false); if (playerentity != null) { System.out.println("Tick"); world.setBlockState(getPos(), world.getBlockState(pos).with(PlayerSensorBlock.LIT, true)); } } }  
    • I've seen a lot of posts about this topic but most were outdated, talking about overriding this method in your item's class: but the tooltip field was List<String>, so I dont know how to deal with ITextComponent.     I also saw another post where they recomended using this event.... but I dont know which is the correct tag, or if i'm doing it correctly or not... this probably sounds like an easy thing/topic but I cant find the anwser anywhere😅  
    • The log: [16:06:20] [Server thread/ERROR] [minecraft/ChunkManager]: Failed to save chunk [-8, -6] java.util.concurrent.CompletionException: net.minecraft.crash.ReportedException: Feature placement at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:273) ~[?:1.8.0_252] {} at java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:280) ~[?:1.8.0_252] {} at java.util.concurrent.CompletableFuture.uniCompose(CompletableFuture.java:975) ~[?:1.8.0_252] {} at java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:940) ~[?:1.8.0_252] {} at java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:456) ~[?:1.8.0_252] {} at net.minecraft.world.chunk.ChunkTaskPriorityQueueSorter.func_219083_b(SourceFile:58) ~[?:?] {re:classloading} at net.minecraft.util.concurrent.DelegatedTaskExecutor.func_213148_e(SourceFile:83) ~[?:?] {re:classloading} at net.minecraft.util.concurrent.DelegatedTaskExecutor.func_213145_a(SourceFile:123) ~[?:?] {re:classloading} at net.minecraft.util.concurrent.DelegatedTaskExecutor.run(SourceFile:91) ~[?:?] {re:classloading} at java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1402) ~[?:1.8.0_252] {} at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289) ~[?:1.8.0_252] {} at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056) ~[?:1.8.0_252] {} at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692) ~[?:1.8.0_252] {} at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157) ~[?:1.8.0_252] {} Caused by: net.minecraft.crash.ReportedException: Feature placement at net.minecraft.world.server.ChunkManager.lambda$null$18(ChunkManager.java:529) ~[?:?] {re:classloading,pl:runtimedistcleaner:A} at com.mojang.datafixers.util.Either$Left.map(Either.java:38) ~[?:?] {re:classloading} at net.minecraft.world.server.ChunkManager.lambda$func_223156_b$20(ChunkManager.java:516) ~[?:?] {re:classloading,pl:runtimedistcleaner:A} at java.util.concurrent.CompletableFuture.uniCompose(CompletableFuture.java:966) ~[?:1.8.0_252] {} ... 11 more Caused by: java.lang.NullPointerException at net.minecraft.world.gen.placement.Placement.func_214998_a(Placement.java:76) ~[?:?] {re:classloading} at net.minecraft.world.gen.placement.ConfiguredPlacement.func_215093_a(SourceFile:36) ~[?:?] {re:classloading} at net.minecraft.world.gen.feature.DecoratedFeature.func_212245_a(SourceFile:21) ~[?:?] {re:classloading} at net.minecraft.world.gen.feature.DecoratedFeature.func_212245_a(SourceFile:14) ~[?:?] {re:classloading} at net.minecraft.world.gen.feature.ConfiguredFeature.func_222734_a(SourceFile:53) ~[?:?] {re:classloading} at net.minecraft.world.biome.Biome.func_203608_a(Biome.java:281) ~[?:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.world.gen.ChunkGenerator.func_202092_b(ChunkGenerator.java:103) ~[?:?] {re:classloading} at net.minecraft.world.chunk.ChunkStatus.lambda$static$9(ChunkStatus.java:74) ~[?:?] {re:classloading,pl:accesstransformer:B} at net.minecraft.world.chunk.ChunkStatus.func_223198_a(ChunkStatus.java:195) ~[?:?] {re:classloading,pl:accesstransformer:B} at net.minecraft.world.server.ChunkManager.lambda$null$18(ChunkManager.java:518) ~[?:?] {re:classloading,pl:runtimedistcleaner:A} at com.mojang.datafixers.util.Either$Left.map(Either.java:38) ~[?:?] {re:classloading} at net.minecraft.world.server.ChunkManager.lambda$func_223156_b$20(ChunkManager.java:516) ~[?:?] {re:classloading,pl:runtimedistcleaner:A} at java.util.concurrent.CompletableFuture.uniCompose(CompletableFuture.java:966) ~[?:1.8.0_252] {} ... 11 more
    • The IStorage is for when your capability is used by other mods. The serialization in your capability provider (this is only for attached capabilities!) is for saving your capability data to disk.
  • Topics

  • Who's Online (See full list)