Jump to content

ChampionAsh5357

Members
  • Posts

    3284
  • Joined

  • Last visited

  • Days Won

    62

Everything posted by ChampionAsh5357

  1. Show us what you currently have along with what type of entity you would like it to be. Based on your current description, I will assume it's some hostile mob which requires the following parts: 1. Something that extends MonsterEntity 2. An EntityType to register the factory to create your MonsterEntity 3. Entity Attributes which can be registered via EntityAttributeCreationEvent 4. Entity Spawn Placement which can be registered using EntitySpawnPlacementRegistry#register in the synchronous work queue of the FMLCommonSetupEvent 5. An Entity Model which probably extends SegmentedModel most likely 6. An Entity Texture that maps to the model 7. An Entity Renderer that probably extends MobRenderer that is registered via RenderingRegistry#registerEntityRenderingHandler in the FMLClientSetupEvent 8. Adding Entity Spawns which can be done via BiomeLoadingEvent to existing biomes or via json in your own biomes.
  2. The process requires a bit more work then. All worldgen stuff is handled through jsons now. You could probably find how they need to be formatted on the mc wiki. So, just format them according to that. You can also look at slicedlime's vanilla world gen extraction for examples. As for getting it in the overworld. You need to do a few things. Existing dimensions use entries hardcoded to be in code instead of through json making them inaccessible from pure json. To get around this, you have to supply a dummy entry and handle it that way. So, register the biome using any forge registry process and supply some dummy biome to the instance. It will be replaced by the json when the server is loaded. Finally, you will need to call BiomeManager#addAdditionalOverworldBiomes within the synchronous work queue of FMLCommonSetupEvent. This adds your biome to the overworld biomes. Note, that this takes a registry key which can be gotten using RegistryKey#get and supplying Registry#BIOME_REGISTRY as the first parameter and the resource location of your biome as the second. In summary: 1. Create biome json. 2. Registry dummy biome to forge registry. 3. Add biome to overworld biomes within common setup. Any other information can be derived from the primer.
  3. What is this biome being created for? A custom dimension or a vanilla one (e.g. overworld, nether, end).
  4. Forge Discord: https://discord.gg/UvedJ9m Linkie: https://discord.gg/sCVXYXVcC3
  5. Forge migrated to a different set of field/method/param mappings as of the latest RB of the mdk. As such, you can use either the forge-bot on the Forge Discord or Linkie to translate the old mappings (also known as MCP) to the new ones (Mojang). You can also change your mapping set back to MCP, but just be warned that they will not be available for 1.17.
  6. Yes, I killed everything since people were passing around old outdated links that should not be supported. I'll update this whenever I update the page itself.
  7. Nope, optifine basically doesn't care about Forge and does it's own thing. It's black-magic voodoo personified.
  8. You probably won't be interacting with ModelRenderers directly as writing it from scratch is a tedious effort. I would suggest using one of the available tools out there to make your entity model in (e.g. Blockbench, Tabula, etc.)
  9. Apologies, for some reason I remembered your class extending AnimalEntity. I'll address the issues now: 1. The RenderingRegistry should be called in FMLClientSetupEvent. It is running on the client only after all since the dedicated server has no concept of rendering. 2. At some point, you might want to look into lambdas. (not an issue, just me being picky) 3. TestVehicle#getAddEntityPacket should return NetworkHooks#getEntitySpawningPacket. (this is most likely the root of your cause since vanilla entities have their ids hardcoded in the packet check so your entity gets spawned only on the server)
  10. You still didn't provide a debug.log, but since you don't know how to add attributes, I'm going to assume you didn't. Create an event handler on the mod bus for EntityAttributeCreationEvent. Pass in your entity type and the associated attribute map. You can look at GlobalEntityTypeAttributes for an example on how to create the attribute map. Most likely you'll chain off of some existing entity.
  11. The error is probably your entity doesn't have any attributes. But you need to provide the full debug.log if we're going to diagnose an issue as there is no error context. Other questions/issues: Why are you overriding methods you're not using or calling? This makes no sense. What is getType? You have the mod event bus within the constructor, pass that around. This and the pop does nothing. You're not doing any logic that requires these. This is not how you should attach a renderer, use RenderingRegistry#registerEntityRenderer or something similar. Make this constant, don't keep reconstructing the object.
  12. Then if you don't expect any animation, you can just use the model loader system. Supply it in some location and create a json model with the loader forge:obj, then you would specify the model location and material. You can look at the omnibus for an example. Next, you'll want to go into the ModelRegistryEvent and call ModelLoader#addSpecialModel. You can then just render the baked model at a specific location similar to how BlockModelRenderer or ItemRenderer does it, adjust it for places such as needing a double for the location or just use the MatrixStack to offset the value. If you want animation, then you are using the wrong export type. You'll probably need to make the model loader for that on your own.
  13. Well, first the event handler is not attached to the mod event bus so EntityTesting#setup is never called. Second, entity attributes are now registered via EntityAttributeCreationEvent. That event is still called on the mod event bus.
  14. 1.16.5 uses mojmap mappings and as such the method names are different compared to mcp when this tutorial was written. You will need to use either the forge bot on discord or linkie to find the translations. Eventually, I'll get around to updating this as there are a few better things to do in the current code like instead of sticking it in an interface to use DistExecutor and call somewhere else. You should specify the modid in the string name; otherwise, this will conflict with other mods adding silver armor. Never use OnlyIn. It is for forge internal use only.
  15. Still is the correct function, just a difference in the mappings used for the method names. 'create' is the mcp name while iirc 'of' is the mojmap name (which is the one you are using most likely).
  16. It's probably called something else in mojmap compared to the mcp name provided. A quick search using the forge bot lands us with World#getEntities.
  17. This does not need a mod. You would just need to replace the loot table with your own by simply providing the file in the same location as the one you are replacing, but in your own datapack. You would also need to make sure that the global loot modifiers do not have an effect by checking those in the mods to make sure they don't do anything you don't want to the particular block.
  18. There is no such thing as a mirrored voxel shape. The #mirror and #rotate methods within Block are specifically for handling BlockState rotations within nbt structures, nothing more. If you want the VoxelShape to be rotated, you would need to construct the rotation yourself and apply it when necessary. It's always good to precompute all possible rotations and access them via a bit mask.
  19. That is a warning and not an error. Currently ForgeGradle 4 does not support Gradle 7, only the latest of 6.x.
  20. Each world has its own data and as such, serializes and deserializes their data separately. Anything saved to one world is for that world and anything saved to a different world is for that other world.
  21. There is no multipart library for 1.16 unfortunately. Best you could do would probably be to have the campfire as a block with some property that determines whether the kettle is on it or not. The kettle could then be an item or a block if you want to place it separately. You would then probably use some right click action to separate the blocks and attach them together. Note that this would still be just a BlockState.
  22. What do you have so far? Explaining a majority of these systems might take a while, so it's better to have some starting point.
×
×
  • Create New...

Important Information

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