-
Posts
116 -
Joined
-
Last visited
Everything posted by salvestrom
-
Yeah it doesn't seem like I'll be screwing anything up by passing through a zero. Thanks.
-
In 1.13 item record requires an integer be passed to its constructor, used as a comparative value. For checking what's already in the jukebox as far as I can tell. How should I handle this?
-
in my previous mod i had a large structure - a village on a plateau. parts of the plateau that were generated on to already loaded chunks had trees buried in it and was undecorated. i'd like to try something different in my current project so that i can better control structures spawning apart from each other while ensuring that the duplication of a world produces the exact same set of buildings in the exact same spot. vanilla seems to generate a hashmap of structure starts and structure component coordinates. what happens then i'm just guessing at but i'm assuming each new chunk that loads checks the hashmap and if it finds matching coordinates generates whatever building is specified. i'm not clear on when/how the map is created. what happens if the player teleports 10km away?? i'd like to at least emulate this. a predetermined set of spawn points that a iworldgenerator class can search when it recieves a new chunk and spawn any associated structures.
-
Okay. what ive done so far is: w2theJungle.instance.openJungleBook(playerIn, itemstack, false); is now in the OP method. the method being called is blank, as is the one in ProxyCommon. The ProxyClient version contains the original Minecraft.getMin... etc, line. server doesn't crash, but the book can't be opened. what am i doing wrong? aside from everything...
-
I've been sent a crash report for my mod where it fails to load on server. the title is part of the crash file. it's also reporting failing to find class definitions etc. The chain of classes ends with my JungleItems class when it calls bookScale, which is for my prewritten books. It offers no details about where in the class the failure occurs, however, it must be the below method: public ActionResult<ItemStack> onItemRightClick(World worldIn, EntityPlayer playerIn, EnumHand handIn) { ItemStack itemstack = playerIn.getHeldItem(handIn); if (!worldIn.isRemote) { this.resolveContents(itemstack, playerIn); } Minecraft.getMinecraft().displayGuiScreen(new GuiScreenBook(playerIn, itemstack, false)); //playerIn.openBook(itemstack, handIn); playerIn.addStat(StatList.getObjectUseStats(this)); return new ActionResult(EnumActionResult.SUCCESS, itemstack); } specifically, the line starting Minecraft.getMinecraft(). Blank it and the server will start. I've already tried a few alternatives, including mimicking the code in the blanked out openBook method. I haven't tried using @SideOnly yet. Edit: using @Side seems to work, but i've read that i shouldn't resort to it, and have concerns something will be lurking in the wings
-
[1.11.2] missing texture of a vanilla item.
salvestrom replied to salvestrom's topic in Modder Support
sorry. never done a github before and butchered it pretty badly. i think this is what you're after: https://github.com/salvestrom/Meincraft-1.10.2/ -
[1.11.2] missing texture of a vanilla item.
salvestrom replied to salvestrom's topic in Modder Support
As requested: https://github.com/salvestrom/thejungle This link is for 1.10.2 code. the issue exists in 3 different versions. One solution should correct them all. You will find that the method for adding subtypes to the bookScale item class and the itemrender class where the books get added have multiple variations, none of which have worked. the best result is still the original version in the op. I'm not sure there's anyway around it. -
[1.11.2] missing texture of a vanilla item.
salvestrom replied to salvestrom's topic in Modder Support
i referred to it as a missing texture several times. calling it the missing texture texture, or "missing" texture seemed superfluous anyway, yes, black and purple. so, this is from my op: registerRender(JungleItems.bookScales); registerRenderWithMeta("east_scale", bookScale.eastScale.getMetadata(), bookScale.eastScale.getItem()); registerRenderWithMeta("west_scale", bookScale.westScale.getMetadata(), bookScale.westScale.getItem()); registerRenderWithMeta("north_scale", bookScale.northScale.getMetadata(), bookScale.northScale.getItem()); registerRenderWithMeta("south_scale", bookScale.southScale.getMetadata(), bookScale.southScale.getItem()); the above is part of the cause. bookscale.eastscale.getitem is actually returning the vanilla item item.written_book. if i change it to: registerRenderWithMeta("east_scale", bookScale.eastScale.getMetadata(), JungleItems.bookScales); registerRenderWithMeta("west_scale", bookScale.westScale.getMetadata(), JungleItems.bookScales); registerRenderWithMeta("north_scale", bookScale.northScale.getMetadata(), JungleItems.bookScales); registerRenderWithMeta("south_scale", bookScale.southScale.getMetadata(), JungleItems.bookScales); then the vanilla written books get their textures back. however, the mod books lose theirs. i'm wondering if i need to split the bookscale class into 4 seperate classes for each book. but then, if that was going to work i would expect the south-scale, ie, the last book registered to have its texture, which it doesn't.. -
[1.11.2] missing texture of a vanilla item.
salvestrom replied to salvestrom's topic in Modder Support
I looked over the client log. there's nothing about a missing texture. but then, i don't think the texture is missing, exactly. let me explain again: if you use the vanilla edittable book, sign it to create a written book, that item has a missing texture. i know that there's something in my mod thats causing this - the issue is in 3 seperate minecraft versions and a new mod i started doesn't have this issue. my mod has 4 pre-written books which all work and have textures, but somwhere in this code its causing the vanilla written books to appear textureless. -
this was brought to my attention for the 1.11.2 version of my mod, but is present in the 1.9 and 1.10 version, too (but not the 1.7). the vanilla item written book, that is a book that has been signed, has a missing texture. there are no errors on load. the mod has a series of pre-written books, that use the book_written texture without issue. giving them their own texture did not resolve the issue. i'm not wholly sure what you guys are going to want to see code wise, but below is the item file. the setup of the file is very old - something i found online over two years ago. extending Item instead of ItemWrittenBook does nothing to resolve the issue. I gutted the book text for posting convenience. also note that this code is the 1.10 version so file names can still have capitals. to my untrained eyes, nothing stands out from the render registering that should prevent the game from using a vanilla texture for a vanilla item. again, i stress, there is no issue with rendering my mod item, but something in my code is preventing minecraft from applying a vanilla texture to the vanilla written book.
-
[1.11.2] swapping blocks in a chunk issue
salvestrom replied to salvestrom's topic in Modder Support
Adding pos.getY() > 0 to the while statement allowed the extreme hills to load, and after 5 min roaming have yet to find another area that locked the game up. the only thing i can think of, bizarre as it sounds, is that some column in a chunk contained no stone, allowing the while loop to go all the way down to bedrock and on into the void. -
[1.11.2] swapping blocks in a chunk issue
salvestrom replied to salvestrom's topic in Modder Support
The method is now as above. This helped a little with the load time, but did not resolve the locking up. i disabled the code and reloaded the world to determine what is in the region. an extreme hills biome. a large, tall one. but i figure if the game is checking the entirety of every loading chunk its not going to matter what that chunk contains. i keep wondering if some special circumstance is causing the while() statement to get stuck in an infinite loop. the method in the op already has a null check on the ExtendedBlockStorage, so it's not that. hmm. perhaps i shall try throwing in a break if y < 0... -
[1.11.2] swapping blocks in a chunk issue
salvestrom replied to salvestrom's topic in Modder Support
public int findGroundHeight(int x, int y, int z, Chunk chunk, ExtendedBlockStorage storage, Block toRemove, Block toPlace) { int cy = chunk.getHeightValue(x, z); while(chunk.getWorld().getBlockState(new BlockPos(chunk.xPosition * 16 + x, cy, chunk.zPosition * 16 + z)) != toRemove.getDefaultState()) { cy = cy - 1; } return cy; } i'm using the above atm, calling the method from the op code at the "int a = " line. although, as draco noted, exposed tunnels and ravines throw things off, it works to ignore trees. however, the terrain eventually stops loading and is alittle laggy even before that. i appreciate that what i'm doing is going to slow things down alot, so i'm more interested in whats causing the terrain to just give up. even after reloading the same region will lock up. -
The spoiler code below is something I found in another thread (the poster said it was diesenben's). i added the height check. the goal is to replace all the stone below half the terrain height with something else. This all works, with one annoying issue: the returned y location from getHeightValue is including leaves and trees. i was expecting/would like the height value to be the "ground" so to speak. All paths lead to Rome, that I've found, i.e calling event.getWorld().getHeight(stuff) ultimately calls getHeightValue in the chunk class.
-
[1.11.2] skipping night in custom dimension
salvestrom replied to salvestrom's topic in Modder Support
thanks for the replies. i'll look at the seperate time stuff. i'm also considering trying to use the bed as a save point, while denying the player the ability to sleep in it. something like "its too noisy to sleep here" -
[1.11.2] skipping night in custom dimension
salvestrom replied to salvestrom's topic in Modder Support
this was for 1.9.4. the return was required, iirc.. in anycase. im not using it atm. the provider (i realise several methods are pointlessly overidden): -
[1.11.2] skipping night in custom dimension
salvestrom replied to salvestrom's topic in Modder Support
umm. what code? having set canRespawnHere to true and forcing the spawn point to a fixed position if there's no bed there's nothing else I'm doing. the above mentioned event was something i tried in 1.9.4. it is not currently being used. i didnt see the point in trying it for 1.11.2 given the way in which it failed. it looked like this: @SubscribeEvent public EntityPlayer.SleepResult playerSleepInLostWorld(PlayerWakeUpEvent psibe) { /* World wrld = psibe.getEntityPlayer().worldObj; if(wrld.provider instanceof LostWorldProvider) { psibe.getEntityPlayer().worldObj.provider.resetRainAndThunder(); if (wrld.getGameRules().getBoolean("doDaylightCycle")) { long i = wrld.getWorldInfo().getWorldTime() + 24000L; wrld.getWorldInfo().setWorldTime(i - i % 24000L); System.out.println(wrld.getWorldInfo().getWorldTime() + 24000L); } } System.out.println(wrld.getWorldInfo().getWorldTime() + 24000L); */ return null;//psibe.getResultStatus(); } the system.out confirmed the rapid switching of the time, to morning, then straight back to night. -
i have the bed working in the sense that it lets you get in it and will save the location as a spawn point but the time will not advance to morning when "waking" and the weather will not reset. i attempted to use the event playerWakeInBed to force the update, but it immediately got set back to night, i assumed because the event is being called client side and instantly overridden by the server.
-
turns out I can't do anything until i recreate the model. the 1.7.10 model was a java file and made use of child boxes and various different angles. the default json format does not support rotations that are not multiples of 22.5 and subsequently modellers such as crayfish's and BDcraft Cubik do not support non-22.5 rotations. ive also seen no indication of child boxes in the json format, so i'm not sure how i'm going to resolve the animation question. the item animations are akin to those of an entity with a multi-box tail. can this still be done?
-
i'm picking my way through the https://github.com/MinecraftForge/MinecraftForge/blob/4feb1dff50bb156141be3d6f47b1976021ee29d3/src/test/java/net/minecraftforge/debug/ModelAnimationDebug.java, determining which bits I need and whats a product of the test mod being done in a single file. the abstract class at line 76 doesnt seem to be anything I will need, however, at the end, line 166 I'm less clear on. Related: Line 169 is a class for the serverproxy which I don't think I have in my mod. where should the method here, related to line 166, go? Line 177 is the client proxy where much registering of blocks and things takes place, as well as a renderer for the block. I'm not sure what I'm going to need from this for my weapon; what can go and what needs to be adjusted. Line 236 is a class related to the animation of the block. I assume I'll need this, modified, for my custom weapon. The last two classes are the the tile and entityliving classes for the block, which I guess can go. I just need the relevant lines that set the animation and so on put into the item class.