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


  • Content Count

  • Joined

  • Last visited

  • Days Won


Everything posted by MSpace-Dev

  1. https://github.com/MSpaceDev/CustomChests/tree/1.14.4/src/main/java/com/mspacedev
  2. I have a class called FileManager that manages many things to do with my custom mod files. I'm trying to create a static constant that allows me to reference an array of files whenever I want. However, my program throws an ExceptionInInitializerError. I took a similar test to a basic static void main program, and the program compiled fine. I can't see what I'm doing wrong in my main program below. Here are the relevant files: Log: [11:26:14] [Client thread/ERROR] [ne.mi.fm.ja.FMLModContainer/]: Exception caught during firing event: null Index: 1 Listeners: 0: NO
  3. Ah, thanks. I will look into it further tomorrow morning. I have to head off to sleep, but hope I can get something working. Forge 1.14 is a rather large step in the right direction from what I've seen so far!
  4. How would I achieve something like that roughly? Any suggestions / resources I can look into?
  5. I want to expand my mod's features lots in 1.14.4. I want users to be able to specify mobIDs from other mods in JSON to initialise a new item, block and entity for the specified id. To do this, I need to be able to dynamically create these objects. It would be perfect for my mod. You will be able to see that at a quick glance I think: https://www.curseforge.com/minecraft/mc-mods/monster-totems
  6. So, creating new entity types based on other mods is impossible?
  7. Well, that actually does not run. DeferredWorkQueue#runLater does not get called.
  8. I've been doing some research. What are your thoughts on this method? @SubscribeEvent public static void onRegisterEntities(final RegistryEvent.Register<EntityType<?>> event) { DeferredWorkQueue.runLater(() -> { entityBuilder(event); }); } private static void entityBuilder(final RegistryEvent.Register<EntityType<?>> event) { ArrayList<EntityType<?>> all_entities; all_entities = (ArrayList<EntityType<?>>) event.getRegistry().getValues(); Main.LOGGER.debug("ALL LOADED ENTITIES:"); all_entities.forEach(p -> Main.LOGG
  9. Is it possible to get all loaded entities in the registry (from all other mods) at runtime, to then be able to spawn in said entity within my mod? I feel it might be possible now, with how structured the registry events are in 1.14. I am also trying to generate new entities at runtime based on this by using a builder pattern of sorts.
  10. In FG 2.3, there was a function called replace. It has now been removed / changed in 1.14.4. Here is the function in FG 2.3. /** * Add a source replacement mapping * * @param token The token to replace * @param replacement The value to replace with */ public void replace(Object token, Object replacement) { replacements.put(token.toString(), replacement); } /** * Add a map of source replacement mappings * * @param map A map of tokens -&gt; replacements */ public void replace(Map<Object, Object> map
  11. Ah, I see thanks. Got it working nicely like this @Override public boolean shouldRefresh(World world, BlockPos pos, IBlockState oldState, IBlockState newState) { // Only refresh if new state is not an instance of BlockTotemBase return !(newState.getBlock() instanceof BlockTotemBase); }
  12. I've set TileEntity#shouldRefresh to false so that I can update the blockstate without it resetting its values. However, this makes the tile entity persist when its block is broken. I've added world.removeTileEntity(pos) in theBlock#blockBreak override function. However, the TE still persists. I can verify it is getting called. Am I missing something here? @Override public void breakBlock(World worldIn, BlockPos pos, IBlockState state) { if (!worldIn.isRemote) { if (worldIn.getTileEntity(pos) != null) { if (worldIn.getTileEntity
  13. Ah, alright, got it! Will stick to blockstates then
  14. Yes, I saw it's using 2 entirely different blocks. Is that a recommended way to do it? Would I have to create a new Block class for every block where I want its texture to change at runtime?
  15. I have a custom tile entity that can switch between 2 states, simply with bool = !bool When this switch happens, I would like to change one of the texture references in the model.JSON to switch to another texture. How can I achieve this. (There are multiple textures in the single model) I noticed the furnace DOES NOT use blockstates for this. So, interested in how that was done. If not, I will end up using blockstates. Thanks
  16. Alright, thanks. Is there by any chance a resource where I can find information like that myself? Instead of asking for every single change ?
  17. Now that my project is updated. Where can I find info on the changes to all the function names? I've migrated the namespaces using the MCP XML. However, it only goes up to 1.13-to-1.13.1.xml These are the resources I've found so far: https://mcforge.readthedocs.io/en/1.13.x/ https://gist.github.com/williewillus/353c872bcf1a6ace9921189f6100d09a Got things like this happening Just not sure where to begin finding what these have changed to.
  18. Updating Gradle to v5.0 seemed to work! In Powershell: gradle wrapper --gradle-version 5.0 After updating, the Gradle refresh did not fail.
  19. Alright, so I've downloaded a completely fresh 1.14.3 MDK and moved it into an empty folder. IMported with IntelliJ. Didn't even put my src in. So bare bones project. 1. Downloaded and extracted 1.14.4 Forge MDK to new folder 2. Imported Gradle project using build.gradle in IntelliJ 2019 3. Ran "gradlew genIntelliJRuns" using terminal. 4. Ran "gradlew genIntelliJRuns --no-daemon" using terminal. 5. Ran "gradlew --refresh-dependencies" using terminal. Note: Steps 3-5 ran without any errors. Note2: I refreshed Gradle multiple times. Auto-import is also enabled. I get this error no
  20. Hey all, Trying to update my 1.12.2 project here TO 1.13.2. I've done the following steps exactly in this order: 1. Downloaded and extracted 1.13.2 Forge MDK to new folder 2. Moved over my 'src' and 'run' folder into MDK folder 3. Imported Gradle project using build.gradle in IntelliJ 2019 4. Ran "gradlew genIntelliJRuns" using terminal. 5. Ran "gradlew --refresh-dependencies" using terminal. Note: Both steps 4-5 ran WITHOUT any build errors. Note2: I refreshed Gradle multiple times throughout. Auto-import is also enabled, so the project has been refreshed multiple times at le
  21. Oh, I understand now. Something like modid_mob_name ?
  22. Alright, I've moved everything to being registered through the registry event and EntityEntryBuilder. My entities are exactly the same in world, so it's working. The lang file is still not working for them though. RegistryEventHandler @SubscribeEvent public static void registerEntities(RegistryEvent.Register<EntityEntry> event) { final IForgeRegistry<EntityEntry> registry = event.getRegistry(); for (final EntityEntry entityEntry : ModEntities.ENTITIES) { registry.register(entityEntry); } } ModEntities public class ModEntities
  23. Hey all, I'm trying to get my spawn eggs to not display as "entity.mob_name.name", but rather as "Spawn mob_name" like Vanilla's spawn eggs. Here is the necessary information. InitEntities.class public class InitEntities { private static int id = 1500; public static void register() { registerEntity("mob_id", "Mob Name", EntityMob.class, 16167425, 16775294); Utils.getLogger().info("Entities Registered"); } private static void registerEntity(String nameId, String entityName, Class<? extends Entity> entityClass, int eggPrimary, int eggSecondary) {
  • Create New...

Important Information

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