Krevik
Members-
Posts
179 -
Joined
-
Last visited
-
Days Won
2
Everything posted by Krevik
-
[SOLVED] [1.13.2] getWorld for custom dimension type always returns null
Krevik replied to Krevik's topic in Modder Support
Nope. Getting ServerWorld for Overworld with mcServer here doesn't cause NPE so mcServer is not null. -
Try looking for stepHeight
-
Hello! Whenever I try to teleport player to custom dimension using custom block I am getting error: I've been checking and it seems that the problem is: It's firing the NPE. So my first idea was that I am registing my custom dimension in the wrong way. Am I missing something? Main mod file: RegistryHelper: ModDimensionKathairis DimensionKathairis Custom BlockPortal colliding method KathairisTeleportManager teleport method I think that I might be registrying my dimension wrongly, so I am asking you guys for some help Thanks, Krevik.
-
[SOLVED][1.13.2] NPE while getting any WorldServer
Krevik replied to Krevik's topic in Modder Support
seems working after adding !world.isRemote check- 1 reply
-
- 1
-
Hello! I am having some problem with teleporting player/entity to a new dimension. Whenever I try to get WorldServer (for my custom dimension or for Overworld) like that (because it's required argument to teleport player/entity) WorldServer server = worldIn.getServer().getWorld(DimensionType.OVERWORLD); WorldServer server = worldIn.getServer().getWorld(someFile.cusotm_Dimension_Type); I am getting NPE crash which points at the line I am trying to get WorldServer. Am I doing sth wrong or is it forge fault? I am using forge 0.45 Note that WorldServer server = player.getServer().getWorld(DimensionType.OVERWORLD); also doesn't work. Here's my whole teleportation code
-
Solved: I updated the forge version to the newest, refreshed gradle project and generated new intelijj runs.
-
Yea, been checking logs really long actually. They're just skipped, no errors. Katharian_Multi_Grass, blue_cloud_bricks and yellow_cloud_block. Blue_Cloud_bricks and Yellow_Cloud_Block are extending BlockBase, so the same registration methods are used.
-
BlockBase and ItemBase are used to register block and items easier, the code is easier to read, than vanilla one - aren't some conventions pointing that the code should be easy to read? Without them I would have to call Block.Properties.create, every time I create new Block. The code is pretty long then, so I created some more simple constructor. They're all registred in RegistryHelper. @SubscribeEvent public static void registerBlocks(final RegistryEvent.Register<Block> event){ final IForgeRegistry<Block> registry = event.getRegistry(); for(Block block: KBlocks.blockRegistryList){ registry.register(block); } } @SubscribeEvent public static void registerItems(final RegistryEvent.Register<Item> event){ final IForgeRegistry<Item> registry = event.getRegistry(); for(ItemBlock itemBlock:KBlocks.itemBlocksRegistryList){ final Block block = itemBlock.getBlock(); final ResourceLocation registryName = Preconditions.checkNotNull(block.getRegistryName(), "Block %s has null registry name", block); ItemBlock itemBlock1 = (ItemBlock) new ItemBlock(block,new Item.Properties().group(itemBlock.getGroup())).setRegistryName(registryName); registry.register(itemBlock1); } for(Item item: KItems.itemsToRegister){ registry.register(item); } registry.register(new ItemBlock(KBlocks.KATHARIAN_PORTAL,new Item.Properties().group(KathairisItemGroups.kathairis_building_blocks)).setRegistryName(KBlocks.KATHARIAN_PORTAL.getRegistryName().toString())); } Yes, register method are being called, cause as I said most of blocks works, just some of them are skipped. Even if I try to register them manually, they're not succesfully registred
-
Hi! Do minecraft forge 1.13.x build have some block registries limits? I cannot register more blocks, they're just skipped? Or is it rather my fault? here is my github link if needed https://github.com/Krevik/1.13.2-test/tree/master/src/main/java/mod/krevik/kathairis
-
Hello! Which class is responsible for dimension change message? And is there maybe some event that would allow me to change the message? Or just any way to change the thing? Maybe some screen overlay event?
-
Hello! Is there an event when player finish eating food?
-
YEAH You're right, Thanks!
-
Render File: RenderLayerDeathScythe ModelDeath also github with the code: Link Layer is copied from vanilla, just changed scaling and added some translation
-
Hello! I need help - I've got an living entity with a held item. The item is rendered using layer in render class. The problem is the item is not connected with hand - it stays in place all the time, even if the hand is moving. How can I implement feature of connecting held item with hand?
-
Fixed. For interested: private static final int MONSTER_SPAWN_WEIGHT = 20; @Override public List<SpawnListEntry> getSpawnableList(EnumCreatureType creatureType) { if (creatureType == EnumCreatureType.MONSTER) { return random.nextInt(MONSTER_SPAWN_WEIGHT) == 0 ? this.spawnableMonsterList : Lists.newArrayList(); } return super.getSpawnableList(creatureType); } in custom biome class.
-
//deleted
-
bump, really no one had this problem before?
-
Yea, but everything looks... normal. EDIT: The spawn rate of monsters is especially big in dark places during the day so I guess there is something wrong with light?
-
yea but I canot find out why is it called so often
-
Nothing basically but that may be caused by my lack of experience in debugging.
-
bump
-
Thank you for your help, I will try although I am not very advanced in debugging ?