Jump to content

Thretcha

Members
  • Posts

    7
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

Thretcha's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Thanks I think I fixed all the mentioned mistakes now only waiting for the Forge PR. Also I read I should be registering my LootTable so I do that now. *edit I have seen your PR and am wondering why you chose to implement biome specific fishing loot as a Loot condition instead of a property ? Is there any benefit to doing it that way or does it not really matter ? Also I am using Biome.Registry in my code instead of ForgeRegistries.Biome to get a list of biomes is my approach wrong ? Or am I just getting vanilla results with Biome.Registry and getting all modded and vanilla results with ForgeRegistries.Biome ?
  2. I want to make a loot table condition/Property which checks if the fishing hook is in a specific biome type. Since Properties are limited to boolean checks my only idea was to make 28 biometype property classes. All of them extend my InBiomeType class which implements EntityProperty. I register them during preInit in my CommonProxy. EntityPropertyManager.registerProperty(new InBiomeTypeBeach.Serializer()); My override for the Method testProperty(Random random, Entity entityIn) never gets called. I know that my Property has been registered because a second call to registerProperty causes the expected Exception... property already registered. Changing the namespace from minecraft to my mod id causes the expected unknown lootProperty excpeption. Without the loot property the loot_table worked fine. There seems to be no output in the console or log files indicating any error at all. Here are all files mentioned: Registering the Custom Properties that way seem wrong to me. Please tell me if there is a better or correct way to do this. Ideally I would like to find a way to have Properties with String values that I can easily check so that I don't have to do it that way. But that probably isn't that easy to do.
  3. (I assume) Since mods are built without any minecraft or forge code, do I only have to update my mod when newer versions break my code? Or do I have to release a new version with every forge update, or just with every minecraft update ? I haven't added dependencies for a specific forge or minecraft version in my code.
  4. I am in the process of creating a fishing mod. While doing my research I have stumbled upon two things. First a lot of fishing mods create their own fishing rod but end up copying all the vanilla code of the fishing rod anyway. Second in some instances people made their own fishing rod to avoid using the loot table system which is rather complex to use. I understand that I should be using the loot table system and already found a helpful implementation by Draco18. Now my question is should I be making my own fishing rod and fishing hook or should I replace the vanilla one. The only changes I wish to make is to add additional Loot Conditions for biome specific fishing loot and biome type specific fishing loot. (There is a mod that dose this but dose it using a hacky way of avoiding the loot tables.) In the end I will be giving fish some additional properties like weight and some fun treasures to find. Which means I will be completely changing the fishing loot tables. The reals reason I am asking this is, that people probably will only use either one of the fishing rods and it doesn't make sense to keep both active in a back. I fear that by altering the fishing loot tables and the fishing rod I could cause compatibility issues for other mods and modpack makers. I am aware that loot table changes are possible on a per world bases without a mod already but I still think it's a valid mod idea. I hope you can help my with my best practices question Link to my repo for further reading on the idea that caused the question.
  5. Based on the conversation above i assume it's not easily possible to just make a custom loot property for the hasProperty Condition. To make fishing loot biome or biome type specific and replace the vanilla fishing loot_tables. Is it ok for me to just make a custom fishing rod and would that make it any easier ?
  6. Thanks got the event stuff working. I am now trying to figure out how to apply motion to the player and other livingEntities. Sprint jumping currently gives me an Insane speed boost even after I press any buttons but the rest of the time all motion values are 0 therefore no boost.(except falling) Why are they mostly 0 and should I use something else to effect entity movement speed ? I am currently using isSprinting and reduced the mechanic to just players for easier testing. //have to figure out a way to stop the speedboost when players aren't moving later. The RoadHandler is registered in my CommonProxy in the init Event. MinecraftForge.EVENT_BUS.register(new RoadHandler()); Hope you can help. public class RoadHandler { @SubscribeEvent public void livingEntityOnRoad(LivingEvent.LivingUpdateEvent event) { //System.out.printf("in livingEntityOnRoad\n"); Entity entity = event.getEntity(); if (!entity.getEntityWorld().isRemote) { if (entity instanceof EntityPlayer) { //System.out.println("entity is a player"); BlockPos position = ((EntityPlayer) event.getEntity()).getPosition().down(); //System.out.println("Position:"+position+"\n"); //System.out.println(entity.getEntityWorld().getBlockState(position).getBlock()); if(RoadRunnerMod.ROAD_BLOCKS.contains(entity.getEntityWorld().getBlockState(position).getBlock().toString())) { final double boost = 0.99; final double minSpeed = 1e-9; //System.out.println("on a road block"); if ((Math.abs(entity.motionX) > minSpeed || Math.abs(entity.motionZ) > minSpeed)&& entity.isSprinting()) { //System.out.println("in boost mode"); entity.motionX += entity.motionX * boost; entity.motionZ += entity.motionZ * boost; entity.velocityChanged=true; } System.out.println("MotionX:"+Math.abs(entity.motionX)+" MotionZ:"+Math.abs(entity.motionZ)); } } } } }
  7. I want to replace the onEntityWalk method of blocks listed in a config file with one made by me which gives living entities a movement speed boost. The problem is I don't want to create a new block but do it for already existing vanilla blocks like stone bricks. After checking the available events I didn't find one that seemed reasonable. Creating new implementations and removing the vanilla ones from the registry seems like a bad idea. Using reflection also doesn't feel right. Are there any good ways of solving this problem ?
×
×
  • Create New...

Important Information

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