Jump to content

Animefan8888

Forge Modder
  • Posts

    6157
  • Joined

  • Last visited

  • Days Won

    59

Posts posted by Animefan8888

  1. 2 minutes ago, _Cruelar_ said:

    Also biggest difference I saw to the campfire was TransformType.Fixed which didn't change anything.

    It also doesn't pop or push attributes.

    3 minutes ago, _Cruelar_ said:

    but if you could tell me how I'd try it as I have the additional models for the blockstates anyway

    Instead of adding the elements yourself you could probably use the multipart system to add the Items model in.

  2. 19 minutes ago, _Cruelar_ said:

    tell me if this is bad style

    If it's only one item with a finite amount of rotation/positions then you really should just use a json model or a BakedModel. However, if you do want to stick with the TESR check out CampfireTileEntityRenderer it seems it is simpler to render Items with a TESR than what you have.

  3. 2 minutes ago, Ugdhar said:

    And of course, once you really feel that you've looked and tried your best, you can always come and post on here,

    I would just add onto this with make sure you take breaks and get sleep before you post here too because honestly we all know that really helps you spot the logic mistakes.

    • Like 3
  4. 7 minutes ago, chubel10 said:

    how could I know that that is something I'm missing if no errors are shown

    If the game can't find a json file it is looking for 99% of the time there will be an error in the log. Same with textures.

    8 minutes ago, chubel10 said:

    In other words, tutorials are slightly bad practice (?)

    No tutorials are not slightly bad practice. Tutorials are perfectly fine it's a great way of passing along information. It's bad tutorials which are bad practice. You shouldn't make tutorials if you don't fully understand a concept or what your code does.

     

    9 minutes ago, chubel10 said:

    Or can I access the vanilla .json files to see how they do it?

    You can access the vanilla's json files. If you are in eclipse(I don't use any other IDE for Java) under the Referenced Libraries there is a jar called client-extra.jar this contains all of the textures and jsons. If you can't/don't want to use this then you can always go to the .minecraft/versions folder and look in the jar file. And thirdly if a mod has already done something similar and is open source you can look at theirs.

    • Like 1
  5. 1 hour ago, jaxbymc42 said:

    I took your advice and now the item is working... kind of.  The only issue now is that it won't shoot in the y-range (up or down).  It only shoots straight out no matter how high or low I look. Basically, I used the code from GhastEntity like you had mentioned and targetted the PlayerEntity instead of the livingentity variable but with negative values so the fireball shot away from the player.  https://pastebin.com/Q9RwgBNf

    This will always be -0.5 right?

    Quote

    double d3 = playerIn.getPosYHeight(0.5D) - (0.5D + playerIn.getPosYHeight(0.5D));

    Sounds like you need to read the code to understand what it's doing instead of blindly copy-pasting it.

  6. 32 minutes ago, HighFox said:

    what they do

    Look at the Placement class implementation for each of them. For example Placement.COUNT_HEIGHTMAP has the AtSurface class implementation. That name tells me that it gives placements at the surface.

    33 minutes ago, HighFox said:

    which one to use when.

    This depends on where you want to place things and how you want to place them. A good idea is to look at the vanilla code to see which one it uses when applicable. When not applicable you'll have to deduce which one to use.

  7. 24 minutes ago, HastumeMiku said:

    Minecraft Version: 1.12.2

    1.12.2 is no longer supported on thus forum. Please update to a modern version of Minecraft to receive support. For more information read the LTS at the top of the page.

  8. 15 hours ago, diesieben07 said:

    Why is this? I am not sure what made you come to this conclusion.

    WorldEntitySpawner::func_226701_a_(still not renamed in the latest mappings) posts the event, but afterwards calls MobEntity::onInitialSpawn which is where Mobs give themselves equipment. I do believe the infamous's idea is to prevent them from having the default equipment. Especially Wither Skeletons and Zombie Pigmen.

  9. 1 hour ago, jaxbymc42 said:

    but I am currently lost on it.

    Generally it helps if you give more information. What is it doing vs what you want it to do? The first thing I notice is you are using Item::onItemUse. Item::onItemUse is called when the player right clicks on a Block. Check out this video. It talks about the basic Item methods. You want Item::onItemRightClick

  10. 2 hours ago, Squidsword said:

    Alright, I put all the durabilities to 0 instead of -1, it better matches the vanilla code now, but the main problem still persists. I cannot combine the items as shown in the picture, sorry if I'm being repetitive. Also when I said less than 0, I meant to say less than or equal to zero so <=0.

    What Draco said might be true. However, I would set a breakpoint in RepairContainer::updateRepairOutput and see where it fails to find the output.

    • Thanks 1
  11. Just now, Stanlyhalo said:

    but why did they move away from having a separate java class file for each block (I kinda liked it better like that)?

    I mean  you can still do it that way it's just bad practice.

    1 minute ago, Stanlyhalo said:

    I noticed that now block drops are in JSON

    It was like this in 1.14 too.

     

    1 minute ago, Stanlyhalo said:

    but how do I update all my stuff?

    Copy source code. Fix compilation errors.

  12. 1 minute ago, the_infamous_1 said:

    Great.

    Bad news, however. Mobs are still re-arming themselves when reloading into a world. Do I need to make sure in AttachCapability that a mob doesn't already have a capability? It seems like when I set a mob's isReArmed capability to true, either it doesn't actually save or each mob keeps getting a new capability.

    Sounds like it is either not saving or not loading. Could you post all of the classes for the Capability. Preferably as a github repo.

  13. 8 minutes ago, the_infamous_1 said:

    I had originally left it there so a fellow modder would be able to prevent my ore generation automatically and load the equivalent ores for his mod

    If you want your ore generation or anything to be determined by another mod use IMC events. IE if you receive a message that says Cancel: OREID or something don't add that ore to the world gen.

     

    Just some cleanup stuff in your @Mod class. You don't use the Regsiter<Block> event down at the bottom.

     

    Nothing else immediately pops out at me.

  14. Just now, DavidM said:

    my current approach and the approach you illustrated above both require the updating of a network if there are additions/deletions to the network.

    Yes but my method already knows of all the pipe connections, where as yours does not. You have to do something like.
    for Direction dir : Direction.values()

      TileEntity t = world.getTileEntity(pos.offset(dir));

      // Etc.

    Where as mine already has a Set<BlockPos> where that is all of the connections. This set is updated when a block is placed or removed from the network. Then pathfinding runs on this set. Which also allows it to run on a separate thread as the World is not thread safe.

    • Thanks 1
  15. 2 minutes ago, the_infamous_1 said:

    Do let me know if you need to see any other of my capability-related classes.

    The problem is that your AttachCapabilityEvent function is static, but the way you registered it it should not be static.

     

    Another thing I noticed is you are doing some stuff in FMLCommonSetupEvent that is not thread safe. Basically anything that interacts with Vanilla Minecraft and potentially forge, such as biomes, needs to be done inside the event, but also using DeferredWorkQueue.runLater

  16. 18 minutes ago, DavidM said:

    My current approach is to path find every time the network of pipes is updated

    So your current approach is to query the world for every block in the network every time the network is updated. This works but is sadly a slower way having to access the World for every block and connection direction.

    20 minutes ago, DavidM said:

    and assign each extracting pipe to a set of inserting pipes

    This is still stored in memory. And you have the same set of inserting pipes for every extracting pipe on a network.

    • Thanks 1
×
×
  • Create New...

Important Information

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