Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

frakier

Members
  • Posts

    61
  • Joined

  • Last visited

Everything posted by frakier

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. 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.
  6. 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
  7. 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.
  8. 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.
  9. 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.
  10. 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.
  11. 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? ??
  12. Solved found the Waddles mod on Github learned what I needed from it.
  13. think the BiomeLoadingEvent event was what i was looking for the example was using another event. off to give it a try now.
  14. 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.
  15. 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.
  16. This all takes place in rendering on the client so not a problem. For a chameleon like ability.
  17. 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
  18. 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.
  19. 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.
  20. 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.
  21. 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
  22. First I have heard of it but... I Want to finish getting it working before i start down the migration road and open a whole new can of worm. The next step is migration to 1.15.2 than expanding out to the other creatures in the mod before release. At the moment I am working on one creature that does everything I expect the other creatures to do combined, been working on it for months so need to finish in 1.14.4 before I jump off the 1.15 cliff. Fell free to answer in 1.15.2 terms/code because i will need it.
  23. I'm trying to get the age of a crop block, I know the coordinates as a BlockPos. Found some code for 1.12 and such but not much for 1.14. The context I will be using is in the 1.14.4 code below. This is part of a goal that only executes at random intervals and only if the entity does not already have a target. BlockState cropBlock = world.getBlockState(block_pos); if (cropBlock.getBlock() instanceof CropsBlock) { CropsBlock cropsBlock = (CropsBlock)cropBlock.getBlock(); //either a switch on the age or a if age to determine the next steps }
  24. Trying to understand so consider all this one huge question. Be sure and dumb it down, no or little code, just the why, the theory on use. I can find code, I see what they do... but what is best practice? Why use in attributes over datamanger or vice versa. One of the reason I ask is I have seen in other mods where one coder will use the attributes for something and then another the datamanager for what seems to be the same thing. The Entity Attribute System Seems that attributes have a range so if you are modifying them through magic or by the nature of a special variant you can have a min/max to check them against. You can share the attribute value and modifiers with the client, with setShouldWatch(true) Good article on attributes... the how but not which and why EntityDataManager ==Data specific to the entity. -Manged with (writeAdditional readAdditional) -Has to be synched to the client with custom code [one way?]. -Share the additional data, that you specify, between client and server (IPacket, writeSpawnData readSpawnData) -Has to be symetrical, whatever you share you have to read. writing two items and then reading one will cause problems? Attributes (ranged min, max, default) ARMOR_TOUGHNESS ATTACK_DAMAGE ATTACK_KNOCKBACK ATTACK_SPEED ENTITY_GRAVITY FLYING_SPEED FOLLOW_RANGE KNOCKBACK_RESISTANCE LUCK MOVEMENT_SPEED NAMETAG_DISTANCE SPAWN_REINFORCEMENTS_CHANCE SWIM_SPEED MAX_HEALTH AttributeModifier (spometing like if baby add BABY_SPEED_BOOST to MOVEMENT_SPEED?) BABY_SPEED_BOOST SLOW_FALLING SPRINTING_SPEED_BOOST Data (any information specific to the enitity?) (only some information will need to be syched to the client usually information of a viual nature or used in rendering) AI_FLAGS ARROW_COUNT_IN_ENTITY ATTACHED_BLOCK_POS ATTACHED_FACE ATTACKING BABY BED_POSITION BEGGING BOOST_TIME BOOST_TIME BREEDING_ITEMS BREEDING_TIME CAN_MIMIC CARRIED_BLOCK CAT_TYPE CLIMBING COLLAR_COLOR COLOR CONVERTING DATA_CHARGING_STATE DATA_HEALTH_ID DROWNING DYE_COLOR FOX_FLAGS FOX_TYPE FROM_BUCKET GOING_HOME GOT_FISH HANGING HAS_EGG HEALTH HIDDEN_GENE HIDE_PARTICLES HOME_POS IGNITED IS_CHILD IS_DIGGING IS_DRINKING IS_STANDING IS_TRUSTING ITEM_SELECTION LIVING_FLAGS MAIN_GENE MOISTNESS MOOSHROOM_TYPE MOVING ON_FIRE OWNER_UNIQUE_ID PANDA_FLAGS PEEK_TICK PHASE PLAYER_CREATED POTION_EFFECTS POWERD PUFF_STATE PUMPKIN_EQUIPPED RABBIT_TYPE SADDLED SCREAMING SIZE SLIME_SIZE SPELL STATE TAMED TARGET_ENTITY TEMPTATION_ITEMS TRAVEL_POS TRAVELLING TREASURE_POS TRUSTED_UUID_MAIN TRUSTED_UUID_SECONDARY VARIANT VARIANT VEX_FLAGS VILLAGER_DATA VILLAGER_TYPE SADDLED
  25. Oh yeah the mod has a longer name where part of the longer name is common. Just used the part common to all the mods. Like MyModSameNameDogs MyModSameNameCats MyModSameNameBirds so using MyModSameName as the common element.
×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.