Jump to content

frakier

Members
  • Posts

    65
  • Joined

  • Last visited

Everything posted by frakier

  1. So my mod is small and only has one obstacle to upgrading from 1.18.1 -> 1.18.2. In 1.18.1 I did.. TagKey<Fluid> fluidtags = FluidTags.getStaticTags();; Iterator<Tag<Fluid>> iterator = fluidtags.iterator(); while(iterator.hasNext()) { //and I did my test here } I could always do the isEyeInFluid thing and test for just water... entity.isEyeInFluid(FluidTags.WATER) But seeing as how some mods are adding liquids that can act like water I figured I would loop over fluids just to be safe. Not sure if they moved this, or shortsightedly did away with the possibility of being in something other than lava or water. No ideas where to proceed, any pointers in the right direction... some way of getting tags of a fluid nature to loop over and test against? Like I said worst case I can do the isEyeInFluid thing but it seems like a future problem.
  2. Thanks I will close this. The guy making the tutorial does not say that layoutPlayerInventorySlots is basically a method that he does not get back around to for 15-20 minutes or so. The tutorial is a little over a hour long. Guess is was more about learning his style and only panicking when he says he is done and I still have a error/unfinished code. It all made sense by the end... I just spent hours in the middle of the tutorial "OVERTHINKING" trying to figure out what the mappings version was for something that did not matter.
  3. I'm pulling my hair out... following a tutorial that uses mcp mappings and having to convert to moj mapping.. have been able to figure most out with the discord bots help and internet searches But cannot figure out what layoutPlayerInventorySlots is in moj. Tried on discord and got no information. Any help appreciated.
  4. Yeah never figured that one out. Going to look into that a little deeper now.
  5. I'm using 36.2.0... the mappings are what I'm trying to use: official mc version new way what the tutorial is using: snaphot old way the net.minecraft.item.crafting.IRecipe is two different sets of code, not all of it but just enough. I though the biggest issue you had to deal with was some renamed stuff [which is what I have seen up till now]. Comparing the two codes is night and day... the ms mapping version is missing canFit and isDynamic... nothing substituted just gone. Assuming I have not screwed up somewhere how is the supposed to help the modding community.
  6. Solved... found the tutorial online to compare and... public static final ForgeFlowingFluid.Properties SLUDGE_PROPERTIES = new ForgeFlowingFluid.Properties( () -> ModFluids.SLUDGE_FLUID.get(), () -> ModFluids.SLUDGE_FLOWING.get(), FluidAttributes.builder(SLUDGE_STILL_RF, SLUDGE_FLOWING_RF) .density(15).luminosity(2).viscosity(5).sound(SoundEvents.LAVA_AMBIENT).overlay(SLUDGE_OVERLAY_RF) .color(0xbffed0d0)//color is //argb ).slopeFindDistance(2).levelDecreasePerBlock(2); I missed the closing parenthesis before ).slopeFindDistance(2).levelDecreasePerBlock(2); and just could not see it for the trees. The added problem of using the ms mappings and not knowing if it was that or if it was me did not help.
  7. So it has been awhile... and I know my brain is like a sieve but... I'm following a online tutorial on adding custom fluids and it goes ok up until this part... they are using the old way of doing mappings and I'm using the new stuff [seriously considering swapping back as it makes most tutorials and videos a pain to follow as MS seems to have looked at the mapping in use and renamed everything with a contrarian attitude aimed at making things difficult]....anyway back on topic. public static final ForgeFlowingFluid.Properties SLUDGE_PROPERTIES = new ForgeFlowingFluid.Properties( () -> ModFluids.SLUDGE_FLUID.get(), () -> ModFluids.SLUDGE_FLOWING.get(), FluidAttributes.builder(SLUDGE_STILL_RF, SLUDGE_FLOWING_RF) .density(15).luminosity(2).viscosity(5).sound(SoundEvents.LAVA_AMBIENT).overlay(SLUDGE_OVERLAY_RF) .color(0xbffed0d0)//color is //argb ); then they say add. .slopeFindDistance(2).levelDecreasePerBlock(2) but properties do not exist... so I go look at the code in ForgeFlowingFluid and those properties are there.. Like I said it has been awhile and maybe I'm overlooking some private somewhere but I did not see a problem. So is it the mappings playing with me? Maybe I should go take a nap and come back with fresh eyes.... Any and all help appreciated.
  8. Nice, I was hoping that was how it would work. Having problems with the render at the moment so have not been able to test completely. But that is a worry I can set aside now. Thanks. Once I get everything working I will report back how it went just for the curious.
  9. So in 1.15 I had variants [ex. small, medium, large] and each has a different scale as well as damage, appearance etc based on a index associated with the mob when spawned. how does the new way of doing things with AttributeModifierMap.MutableAttribute setCustomAttributes effect this before I waste a lot of time. because this part GlobalEntityTypeAttributes.put(ModEntities.BOBCAT.get(), BobcatEntity.setCustomAttributes().create()); kind of suggest it is global, effects the mob as a whole.
  10. Could someone cover how they handle libraries and multiple mod development [preferably in eclipse but IntelliJ as well would be a good pointer in the right direction] As a example... Say you have two mods and a common library.. how you would manage this. Or point to a good up to date tutorial relevant to current IDE's. Found a few online but they depend on older eclipse for functions of the application that seem to no longer exist in newer versions. CURRENT SETUP Currently I have a GRADLE Multi-Project Build running. I'm able to use the run_client for each mod as a stand alone for testing and coding. I have all my library code duplicated in each mod as part of the mod and any small change has to be made in each of the mods. I can also use the gradle wrapper app to run all the mods as if I they were just mods in the mod folder of the gradle wrapper app, great for seeing how everything interacts, but again not so much for debugging. WONDERING ABOUT SEPARATING THE CODE OUT But seems like the library code needs to be in its own mod. NOTE: the mods are related but can be run without the others so the end user can pick and choose. As part of the run_client I could have the library compiled and inserted into the mods in the run folder for running the single mod. Would not help much when debugging the library mods though. Guessing there is no real easy answer for handling and debugging the library code short of having the code in the mod during development as I do now. Maybe moving it out when compiling and making a separate library mod at that point or working blind as I have been doing and relying on the debug log for debugging. Have I overthought this or swerved off into irrelevant second guessing and should just stick with CURRENT SETUP
  11. Solved, that was the answer I made the tags json using the "wall_torch" version of each torch and then use that to get the other information i needed. { "replace": false, "values": [ "minecraft:wall_torch", "minecraft:redstone_wall_torch", "minecraft:soul_wall_torch" ] } Then I was able to get the item using the wall_torch blocks and then from the item I could get the normal torch blocks. Kind of backwards way around but it worked.
  12. though of an idea... in my tags json I can do ""minecraft:redstone_wall_torch" and then use Item.getItemFromBlock(blockIn) to get the Item instead of the other way around. I'll give it a try and report back.
  13. in items class we have... public static final Item TORCH = register(new WallOrFloorItem(Blocks.TORCH, Blocks.WALL_TORCH, (new Item.Properties()).group(ItemGroup.DECORATIONS))); and in blocks we have... public static final Block SOUL_TORCH = register("soul_torch", new TorchBlock(AbstractBlock.Properties.create(Material.MISCELLANEOUS).doesNotBlockMovement().zeroHardnessAndResistance().setLightLevel((state) -> { return 10; }).sound(SoundType.WOOD), ParticleTypes.SOUL_FIRE_FLAME)); public static final Block SOUL_WALL_TORCH = register("soul_wall_torch", new WallTorchBlock(AbstractBlock.Properties.create(Material.MISCELLANEOUS).doesNotBlockMovement().zeroHardnessAndResistance().setLightLevel((state) -> { return 10; }).sound(SoundType.WOOD).lootFrom(SOUL_TORCH), ParticleTypes.SOUL_FIRE_FLAME)); So is there any way to get the (Block wallBlockIn) value that is set by WallOrFloorItem through the item or the registry? It makes sense that if the two are intertwined as they are there should be some way of doing this. Or should I just start the gymnastic to loop over and pull out using the register names [basically using soul from "soul_torch" to look for "soul_"+wall+"_torch"] to get the correct block. Of course I could also skip using tags to get my item list and instead make it a config in pairs to get the data in a more reliable and configurable by mod pack developers.
  14. Could be. That makes sense compared with how they do do the range(32) which is basically 0-31. I get a chance I will do some testing with some xray and see how different settings work out. Figured I would see if someone knew the answer before I started too far down the rabbit hole.
  15. I tried tracing the code but that went off the rails pretty quick. what does topOffset do? some samples from the minecraft code... public static final ConfiguredFeature<?, ?> ORE_GRAVEL_NETHER = register("ore_gravel_nether", Feature.ORE.withConfiguration(new OreFeatureConfig(OreFeatureConfig.FillerBlockType.NETHERRACK, Features.States.GRAVEL, 33)).withPlacement(Placement.RANGE.configure(new TopSolidRangeConfig(5, 0, 37))).square().func_242731_b(2)); public static final ConfiguredFeature<?, ?> ORE_BLACKSTONE = register("ore_blackstone", Feature.ORE.withConfiguration(new OreFeatureConfig(OreFeatureConfig.FillerBlockType.NETHERRACK, Features.States.BLACKSTONE, 33)).withPlacement(Placement.RANGE.configure(new TopSolidRangeConfig(5, 10, 37))).square().func_242731_b(2)); the official minecraft wiki has this for the generation... Veins of blackstone attempt to replace netherrack 2 times per chunk in veins of size 1 to 33, from levels 5 to 28, in all Nether biomes except basalt deltas. Veins of gravel attempt to replace netherrack 2 times per chunk in veins of size 1–33, from levels 5 to 41, in all Nether biomes except basalt deltas. So the times per chunk makes sense... EX[func_242731_b(2)] The 33 makes sense... EX[33] easy enough. TopSolidRangeConfig falls apart, a bit but then the site is based on 1.16.2 it seems. So does this sound right? (5, 0, 37) would be 5 to 37 (5, 10, 37) would be what 5 to 47... 15 to 47? ??
  16. Solved found the Waddles mod on Github learned what I needed from it.
  17. think the BiomeLoadingEvent event was what i was looking for the example was using another event. off to give it a try now.
  18. Trying to upgrade to 1.16.4.... Every tutorial or anything i find on here has... biome.getSpawns(EntityClassification.CREATURE) seems most examples I am finding are for 1.16.1 but anyhow.. when I try I get ... "The method getSpawns(EntityClassification) is undefined for the type Biome" Any pointers in the right directions.
  19. colorInt = BiomeColors.getGrassColor(targetEntity.world, new BlockPos(entityX, entityY, entityZ)); seems to get the same value as colorInt = targetEntity.world.getBiome(new BlockPos(entityX, entityY, entityZ)).getGrassColor(entityX, entityZ); Need something to get the tint of the color being used in the biome, found some talk about a colorizeer or something to that effect but that seems to be fro a really old version of mc. I'll keep digging. Looking at how BlockModelRenderer handles it. More Information, fairly sure getGrassColor is for Blocks.GRASS and Blocks.TALL_GRASS the plants not Blocks.GRASS_BLOCK So I am looking for foliage, particularly the default, shaded/tint color for the biome and the correct shaded/tint color for GRASS_BLOCK in the biome.
  20. This all takes place in rendering on the client so not a problem. For a chameleon like ability.
  21. I tried getting the block under the entity and.... colorInt = targetEntity.world.getBiome(new BlockPos(entityX, entityY, entityZ)).getGrassColor(entityX, entityZ) Expecting, hoping, to get the current shifted color of the grass [also tried this with foliage] but it only seems to return the default colors for grass not shifted for the biome [biome grass color]. What am I missing? Can anyone point me in the right direction? I'm currently working on my own code that uses the temp/humidity to shift the colors but would rather not reinvent the wheel. Thanks
  22. So new information... Since I could not get the error today in the vanilla world I wrote it off as a glitch. Went into my code in eclipse and ran my mod and the glitch/error/whatever was there I fell through the horse. So I went back into the Minecraft Launcher, I ran the vanilla world to do the test and it happens there as well. How can there be cross contamination, Minrcreaft Launcher puts the world save in AppData\Roaming\.minecraft. {though of anther test, be right back} So whats going on? How can two unrelated programs do the same thing? I can't understand unless the problem is inherit to 1.16.3 Vanilla.
  23. OK, cannot get it to do this today. Next time I will restart the computer and the game to see what happens. Funny thing is when it was happening I tried the same test with both 1.14.4 vanilla and 1.15.2 vanilla without any problems. And when I started 1.16.3 vanilla back up it happened again. Going to write it off as a weird glitch for now. But I will keep my eyes open for it to happen again. Let Minecraft know that I could not reproduce this morning, they wanted a video which I cannot do, but I was going to see if I could get some screen shots. But it all worked just fine, who knows, like I said though I will restart next time something weird like that happens before i spend all day trying to diagnose the problem.
  24. I THOUGHT THIS WAS A VANILLA PROBLEM BUT I DON'T KNOW ANYMORE Spent all day trying to figure out why my code worked on 1.14.4 and 1.15.2 but was having a problem on 1.16.3. So I started some testing....Using [1.16.3-34.1.0] then [1.16.3-34.1.23] and eventually [1.16.3] Vanilla and the problem continued across the board. STEPS TO REPRODUCE... Create new single player world. Spawn in a horse, tame it and ride it [or just find one]. Log out while still on the horse and quit the game. Restart the game and log back into the world. You will fall off/through the horse as you load in, but you are not really off the horse, even though you can move around. When you press the shift key you will be dismounted and standing beside the horse. Headed off to figure out how to report the problem now, hope this saves someone a headache, including lex.
  25. BlockState cropBlock = world.getBlockState(block_pos); if (cropBlock.getBlock() instanceof CropsBlock) { CropsBlock cropsBlock = (CropsBlock)cropBlock.getBlock(); Integer age = cropBlock.get(cropsBlock.getAgeProperty()); } I tried getAgeBefore but I think at that time i was treating at any other block. Integer age = cropBlock.get(cropsBlock.getAgeProperty()); seems to work. thanks @Draco18s
×
×
  • Create New...

Important Information

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