Jump to content
  • Home
  • Files
  • Docs
Status Updates
  • All Content

  • Advanced Search
  • Existing user? Sign In  

    Sign In



    • Not recommended on shared computers


    • Forgot your password?

  • Sign Up
  • All Activity
  • Home
  • SubliminallySublime

SubliminallySublime

Members
 View Profile  See their activity
  • Content Count

    30
  • Joined

    July 23, 2017
  • Last visited

    Saturday at 06:49 PM

Community Reputation

2 Neutral

About SubliminallySublime

  • Rank
    Tree Puncher

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. SubliminallySublime

    [1.16.4] GlobalEntityTypeAttributes problem

    SubliminallySublime replied to SubliminallySublime's topic in Modder Support

    Thank you! I was not aware FMLCommonSetupEvent had an enque event I could access. I am getting a different crash now but I think I can solve it. I am also correcting my DeferredRegister design. Thank you.
    • February 23
    • 2 replies
  2. SubliminallySublime started following [1.16.5] Will we see a return of the programmatic Dimension in 1.16+?, [1.16.4] GlobalEntityTypeAttributes problem and [1.16.1] Register Dimensions February 23
  3. SubliminallySublime

    [1.16.4] GlobalEntityTypeAttributes problem

    SubliminallySublime posted a topic in Modder Support

    Hello. I am getting this crash on right click with a spawn egg: [00:17:29] [Server thread/FATAL] [minecraft/ThreadTaskExecutor]: Error executing task on Server java.lang.NullPointerException: null at net.minecraft.entity.ai.attributes.AttributeModifierManager.getAttributeValue(AttributeModifierManager.java:67) ~[forge:?] {re:classloading} at net.minecraft.entity.LivingEntity.getAttributeValue(LivingEntity.java:1849) ~[forge:?] {re:classloading} at net.minecraft.entity.LivingEntity.getMaxHealth(LivingEntity.java:1610) ~[forge:?] {re:classloading} at net.minecraft.entity.LivingEntity.<init>(LivingEntity.java:209) ~[forge:?] {re:classloading} at net.minecraft.entity.MobEntity.<init>(MobEntity.java:108) ~[forge:?] {re:classloading,pl:accesstransformer:B} at net.minecraft.entity.CreatureEntity.<init>(CreatureEntity.java:13) ~[forge:?] {re:classloading} at net.minecraft.entity.monster.MonsterEntity.<init>(MonsterEntity.java:29) ~[forge:?] {re:classloading} at testmod.entity.testentity.EntityTest.<init>(EntityTest.java:40) ~[?:?] {re:classloading} From what I can tell, this means it doesn't have custom attributes, namely MaxHealth. I am registering them like so: In my Mod file: //in constructor FMLJavaModLoadingContext.get().getModEventBus().addListener(this::setupCustomAttributes); private void setupCustomAttributes(final ParallelDispatchEvent event) { event.enqueueWork(() -> { System.out.println("CALLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLED"); GlobalEntityTypeAttributes.put(ModEntities.ENTITY_TEST.get(), EntityTest.setCustomAttributes().create()); }); } In my Entity class public class EntityTest extends MonsterEntity { public static AttributeModifierMap.MutableAttribute setCustomAttributes() { return MonsterEntity.func_233666_p_() .createMutableAttribute(Attributes.MAX_HEALTH, 100.0D) .createMutableAttribute(Attributes.MOVEMENT_SPEED, 1D); } } In my ModEntities class public class ModEntities { public static final RegistryObject<EntityType<EntityTest>> ENTITY_TEST = registerEntityAndEgg(() -> EntityType.Builder.create(EntityTest::new, EntityClassification.MISC) .size(1.5f, 2.25f) .build(new ResourceLocation(TestMod.MOD_ID, "test_entity").toString()), "test_entity", EntityTest.COLOR1, EntityTest.COLOR2); public static final <T extends Entity> RegistryObject<EntityType<T>> registerEntityAndEgg (Supplier<EntityType<T>> entityTypeSupplier, String name, int color, int color2) { RegistryObject<EntityType<T>> registeryEntity = Registration.ENTITIES.register(name, entityTypeSupplier); //TODO: STORE? RegistryObject<Item> SPAWN_EGG = Registration.ITEMS.register( "spawn_egg_" + name, () -> new SpawnEggItem(entityTypeSupplier.get(), color, color2, new Item.Properties().group(ItemGroup.MATERIALS))); return registeryEntity; } } And finally my registration class: public class Registration { public static final DeferredRegister<Block> BLOCKS = DeferredRegister.create(ForgeRegistries.BLOCKS, TestMod.MOD_ID); public static final DeferredRegister<Item> ITEMS = DeferredRegister.create(ForgeRegistries.ITEMS, TestMod.MOD_ID); public static final DeferredRegister<EntityType<?>> ENTITIES = DeferredRegister.create(ForgeRegistries.ENTITIES, TheUpsideDownMod.MOD_ID); public static void register() { IEventBus modEventBus = FMLJavaModLoadingContext.get().getModEventBus(); BLOCKS.register(modEventBus); ITEMS.register(modEventBus); ENTITIES.register(modEventBus); } } The method IS called as determined by breakpoints and my output call. I am not sure what is up here. I am not sure how to test any further than my output and breakpoint checks. Should I update to 1.16.5 and try again?
    • February 23
    • 2 replies
  4. SubliminallySublime

    [1.16.1] Register Dimensions

    SubliminallySublime replied to Budschie's topic in Modder Support

    https://feedback.minecraft.net/hc/en-us/community/posts/360072551332-Allow-custom-dimensions-to-use-the-same-seed-as-the-save-file- That thread states: I ran into that thread, because my json reads: { "type": "mytestmod:mytestmoddimension", "generator": { "type": "minecraft:noise", "seed": 0, //////////////////////////////////////////////// "settings": "minecraft:overworld", "biome_source": { "type": "minecraft:vanilla_layered", "seed": 0 //////////////////////////////////////////////// } } } We have to manually provide the seed for custom dimensions?? That's an awfully strange feature and imo is poorly designed. The main world seed should affect ALL world gen so end users can simply modify one single seed and have all dimensions changed accordingly, right? Why would they want different dim seeds? Regardless, it does seem that you are right. If anyone can find a way to use the same world seed, my supposedly advanced idea is actually possible after all. I created a second dimension json: { "type": "mytestmod:mytestmoddimenionaaa", "generator": { "type": "minecraft:noise", "seed": 0, "settings": "minecraft:overworld", "biome_source": { "type": "minecraft:vanilla_layered", "seed": 0 } } } and teleported between them and it actually works; 1:1 block sameness. So even my case that I thought was advanced, it seems its merely one line away from being possible. Perhaps a custom forge generator is the solution still? Edit: However, upon inspection of the ForgeRegistries.java, unfortunatley the only world gen registries that exist are: // Worldgen public static final IForgeRegistry<WorldCarver<?>> WORLD_CARVERS = RegistryManager.ACTIVE.getRegistry(WorldCarver.class); public static final IForgeRegistry<SurfaceBuilder<?>> SURFACE_BUILDERS = RegistryManager.ACTIVE.getRegistry(SurfaceBuilder.class); public static final IForgeRegistry<Feature<?>> FEATURES = RegistryManager.ACTIVE.getRegistry(Feature.class); public static final IForgeRegistry<Placement<?>> DECORATORS = RegistryManager.ACTIVE.getRegistry(Placement.class); public static final IForgeRegistry<ChunkStatus> CHUNK_STATUS = RegistryManager.ACTIVE.getRegistry(ChunkStatus.class); public static final IForgeRegistry<Structure<?>> STRUCTURE_FEATURES = RegistryManager.ACTIVE.getRegistry(Structure.class); public static final IForgeRegistry<BlockStateProviderType<?>> BLOCK_STATE_PROVIDER_TYPES = RegistryManager.ACTIVE.getRegistry(BlockStateProviderType.class); public static final IForgeRegistry<BlockPlacerType<?>> BLOCK_PLACER_TYPES = RegistryManager.ACTIVE.getRegistry(BlockPlacerType.class); public static final IForgeRegistry<FoliagePlacerType<?>> FOLIAGE_PLACER_TYPES = RegistryManager.ACTIVE.getRegistry(FoliagePlacerType.class); public static final IForgeRegistry<TreeDecoratorType<?>> TREE_DECORATOR_TYPES = RegistryManager.ACTIVE.getRegistry(TreeDecoratorType.class); // Dynamic/Data driven. public static final IForgeRegistry<Biome> BIOMES = RegistryManager.ACTIVE.getRegistry(Keys.BIOMES);
    • February 22
    • 11 replies
  5. SubliminallySublime

    [1.16.1] Register Dimensions

    SubliminallySublime replied to Budschie's topic in Modder Support

    If the seed is the same, the world is the same right? As long as all the other parameters are correct? May I ask for an example of a custom generator? I can't seem to locate information on that. For the vanilla clone tutorial, I was aware of the page you linked but when I tried it, I got a vanilla world with a seemingly different seed. I figured this was because the random had already been accessed for the overworld. I am going to attempt that again right now, but I think I will need a custom generator. Edit: Is this what you were referring to? Custom .json generator
    • February 22
    • 11 replies
  6. SubliminallySublime

    [1.16.1] Register Dimensions

    SubliminallySublime replied to Budschie's topic in Modder Support

    I have looked for any such tutorial, but as you are telling me they exist, I am checking again. I will edit this comment and my post if I find something that solved this problem. My question is however, if the user has tweaked their overworld settings, can data-driven dimensions hijack and exactly replicate those settings to a different dimension for 1:1 block sameness?
    • February 22
    • 11 replies
  7. SubliminallySublime

    [1.16.1] Register Dimensions

    SubliminallySublime replied to Budschie's topic in Modder Support

    I was wondering if he needs advanced dimensions like I do. Data driven dimensions work, but are they capable of producing and exact clone of the current overworld, settings and all? If so, I have a recent question here that I would love help with as this was possible in 1.12-1.15 but no longer seems possible in 1.16. Edit: I reviewed OPs code. I'm pretty sure data driven dimens will work for his situation.
    • February 22
    • 11 replies
  8. SubliminallySublime

    [1.16.1] Register Dimensions

    SubliminallySublime replied to Budschie's topic in Modder Support

    Did you ever come across a solution? Do the data driven dimensions work for you?
    • February 22
    • 11 replies
  9. SubliminallySublime

    [1.16.5] Will we see a return of the programmatic Dimension in 1.16+?

    SubliminallySublime replied to SubliminallySublime's topic in Modder Support

    No problem, thanks for responding.
    • February 19
    • 6 replies
  10. SubliminallySublime

    [1.16.5] Will we see a return of the programmatic Dimension in 1.16+?

    SubliminallySublime replied to SubliminallySublime's topic in Modder Support

    Would you happen to have any insight about my issue above? I am really stuck because it is really radically different from 1.12.
    • February 19
    • 6 replies
  11. SubliminallySublime

    [1.16.5] Will we see a return of the programmatic Dimension in 1.16+?

    SubliminallySublime replied to SubliminallySublime's topic in Modder Support

    Oh my bad. I was just trying to make a formal request for a feature. It was similar but I didn't think it was the same. Sorry about that.
    • February 18
    • 6 replies
  12. SubliminallySublime

    [1.16.5] Will we see a return of the programmatic Dimension in 1.16+?

    SubliminallySublime replied to SubliminallySublime's topic in Modder Support

    If you know why my feature request was removed please let me know what I did wrong.
    • February 18
    • 6 replies
  13. SubliminallySublime

    [1.16.5] Will we see a return of the programmatic Dimension in 1.16+?

    SubliminallySublime posted a topic in Modder Support

    Hey all. Title + Is there any possible way I can update my mod (code below) to 1.16? Can datapacks do this? Am I going about it wrong in 1.16? Here is a brief sample of my problem: I am updating an incomplete 1.12.2 mod I have to the latest version of forge. In my mod, the dimension chunks are supposed to be semi-clones of the overworld (with tweaked settings). In 1.12.2, I could do this: public class TUDChunkGenerator implements IChunkGenerator { protected final World overWorldObj; protected IChunkGenerator overworldChunkGenerator; protected final World worldObj; public TUDChunkGenerator(World overWorldObj, World worldObj) { this.overWorldObj = overWorldObj; //Should always be dimension 0, overworld. this.overworldChunkGenerator = overWorldObj.getWorldType().getChunkGenerator(worldObj, overWorldObj.getWorldInfo().getGeneratorOptions()); this.worldObj = worldObj; } @Override public Chunk generateChunk(int x, int z) { return overworldChunkGenerator.generateChunk(x, z); } @Override public void populate(int x, int z) { overworldChunkGenerator.populate(x, z); } @Override public boolean generateStructures(Chunk chunkIn, int x, int z) { return overworldChunkGenerator.generateStructures(chunkIn, x, z); } ... } While this worked wonderfully in the old times, the abandonment of the old school dimension support seems to have rendered my mod quite hard to do nowadays, if not impossible. For starters, IChunkGenerator is gone. import net.minecraft.world.gen.IChunkGenerator; Now, I did notice that there is a net.minecraft.world.gen.ChunkGenerator, however it is almost entirely obfuscated. I see some related methods so there is some hope but it seems wrong to use, maybe impossible to use. Is there anyway I can determine dimension in 1.16? See note 2 for possible answer. Attached, I have included the critical .java files for my mod. They were previously made in the last recommended 1.12.2 build for forge. I put them here so you can review them in any chance anyone can help me. I am pretty concerned that none of this code will end up being effectively ported/replaced/updated to achieve the same goal. Is there anyway I can use datapack dimensions to clone the overworld? ACTIVE DEVELOPMENT NOTES 1: WorldProvider is gone. Maybe the replacement is net.minecraft.world.Dimension? However, that is marked final. Maybe the datapacks can replace this portion? 2: net.minecraft.block.AbstractFirBlock contains this: private static boolean canLightPortal(World world) { return world.getDimensionKey() == World.OVERWORLD || world.getDimensionKey() == World.THE_NETHER; } As long as the way MC creates those keys works, this should be a replacement for dimensionId comparisons public static final RegistryKey<World> OVERWORLD = RegistryKey.getOrCreateKey(Registry.WORLD_KEY, new ResourceLocation("overworld")); //old: activeWorld.provider.getDimension() == Config.theUpsideDownDimensionID //new?: activeWorld.getDimensionKey() == TUDDimension.TUDDimensionKey) 3: "World" seems to have been replaced by ServerWorld; at least the ChunkGeneration section. //OLD: public TUDChunkGenerator(World overWorldObj, World worldObj) { this.overworldChunkGenerator = overWorldObj.getWorldType().getChunkGenerator(worldObj, overWorldObj.getWorldInfo().getGeneratorOptions()); //New?: /////UNTESTED//////, simple guess based of vanilla implementation public TUDChunkGenerator(ServerWorld overWorldObj, ServerWorld worldObj) { this.overworldChunkGenerator = overWorldObj.getChunkProvider().getChunkGenerator(); } 4: ChunkGenerator::func_235957_b_() == ChunkGenerator::getDimensionStructureSettings() 5: Huh! No errors anymore. I can't even remotely test this yet, but I THINK this function relay could do exactly what the old one did. Assuming I can find a way to register/use this ChunkGenerator, I will report back. package io.github.ragnarven.tud.dimension; import com.mojang.serialization.Codec; import net.minecraft.world.IBlockReader; import net.minecraft.world.IWorld; import net.minecraft.world.World; import net.minecraft.world.chunk.IChunk; import net.minecraft.world.gen.*; import net.minecraft.world.gen.feature.structure.StructureManager; import net.minecraft.world.server.ServerWorld; /** * Created by Andrew on 3/17/2020 at 8:50 PM. */ public class TUDChunkGenerator extends ChunkGenerator { protected final World overWorldObj; protected ChunkGenerator overworldChunkGenerator; protected final World worldObj; //protected List<Biome.SpawnListEntry> mobs = Lists.newArrayList(/*new Biome.SpawnListEntry(EntityZombie.class, 100, 2, 2)*/); public TUDChunkGenerator(ServerWorld overWorldObj, ServerWorld worldObj) { super(overWorldObj.getChunkProvider().getChunkGenerator().getBiomeProvider(), overWorldObj.getChunkProvider().getChunkGenerator().func_235957_b_()); this.overWorldObj = overWorldObj; //Should always be dimension 0, overworld. this.overworldChunkGenerator = overWorldObj.getChunkProvider().getChunkGenerator(); this.worldObj = worldObj; } @Override protected Codec<? extends ChunkGenerator> func_230347_a_() { //I think thats has something to do with the registry stuff, I don't know enough to fill this in yet. //func_230347_a_ is also PROTECTED in ChunkGenerator. I am nearly certain I need to make some kind of registry key or codec for this. //net.minecraft.world.gen.FlatChunkGenerator //public static final Codec<FlatChunkGenerator> field_236069_d_ = FlatGenerationSettings.field_236932_a_.fieldOf("settings").xmap(FlatChunkGenerator::new, FlatChunkGenerator::func_236073_g_).codec(); return null; } @Override public ChunkGenerator func_230349_a_(long p_230349_1_) { return this; } @Override public void generateSurface(WorldGenRegion worldGenRegion, IChunk chunk) { overworldChunkGenerator.generateSurface(worldGenRegion, chunk); } @Override public void func_230352_b_(IWorld world, StructureManager structureManager, IChunk chunk) { overworldChunkGenerator.func_230352_b_(world, structureManager, chunk); } @Override public int getHeight(int x, int z, Heightmap.Type heightmapType) { return overworldChunkGenerator.getHeight(x, z, heightmapType); } @Override public IBlockReader func_230348_a_(int p_230348_1_, int p_230348_2_) { return overworldChunkGenerator.func_230348_a_(p_230348_1_, p_230348_2_); } } 6. Okay so now with the ChunkGenerator not erroring, I have to figure out how to replace my old WorldProvider (TUDDimensionUpsideDown.java below). This is going to brutal because WorldProvider is gone and I have no clue where it went. Dimension (as mentioned in note 1) is final. This may be the stopping point, short of some hacky fixes and I am pretty opposed to that. If you are reading this and can guide me, please help lol. My initial thought is maybe somehow I can link my class to the datapack. Maybe I can register my ChunkGenerator as a GeneratorType as referenced by the [dimension_name].jsons? //EXAMPLE: (currently does NOT replicate the overworld perfectly. Can't find vanilla datapacks) { "type": "theupsidedown:theupsidedown", "generator": { "type": "minecraft:noise", //This line maybe? Certainly WILL require registry, maybe use of that codec function I cant figure out. "seed": 0, "settings": "minecraft:overworld", "biome_source": { "type": "minecraft:vanilla_layered", "seed": 0 } } } 7. Unfortunately, this appears to be the end of the line. There is no way to make a dimension without the json, data driven ones, which means I cannot register my custom ChunkGenerator at this time. Please see my feature request if you need such a feature too. TUDAtmosphereHandler.java TUDChunkGenerator.java TUDDimensionUpsideDown.java
    • February 18
    • 6 replies
  14. SubliminallySublime

    Do FluidEvents work in 1.7.10? Is there an alternative to BlockEvent.NeighborNotifyEvent to detect fluid spreading?

    SubliminallySublime replied to SubliminallySublime's topic in Modder Support

    Maybe you misunderstand. I have it up to date, but as someone who enjoys jumping between versions since the mods are more important than the game, I hate when they aren't available across versions. I am only trying not to be hypocritical with my own mods. Having been around since the beginning I am fully aware of how it works. As 1.7.10 is undeniably the most modded version, I figured someone would be able to help. Sorry I asked.
    • January 11, 2018
    • 4 replies
  15. SubliminallySublime

    Do FluidEvents work in 1.7.10? Is there an alternative to BlockEvent.NeighborNotifyEvent to detect fluid spreading?

    SubliminallySublime replied to SubliminallySublime's topic in Modder Support

    Because the version already exists. I'm just trying to update it. My regular crew decided 1.7.10+ still is not ready. Too many mod authors aren't updating. 1.7.10 may be permanent for us.
    • January 11, 2018
    • 4 replies
  16. SubliminallySublime

    Do FluidEvents work in 1.7.10? Is there an alternative to BlockEvent.NeighborNotifyEvent to detect fluid spreading?

    SubliminallySublime posted a topic in Modder Support

    I am trying to backport my mod to 1.7.10. I have a 1.11.2 version that uses BlockEvent.NeighborNotifyEvent to detect when a fluid spreads. I need to do the same in 1.7.10. I have notice there is a FluidEvent.FluidMotionEvent But it never seems to be fired. Is there anyway to detect when water changes or when there is a physics update on blocks in 1.7.10? To help rule out any problems here is some code: Event listener /**Handles when a water bucket is placed down over lava.**/ @SubscribeEvent(priority = EventPriority.HIGHEST) public void enderObsidianSpawnWaterEventCheck(FluidEvent.FluidMotionEvent event) { System.out.println("EVENT!!!!!!!!!!!!!!!!!"); //Never called at any point I try. } Registering event (inside of init of main mod file) NECEventHandler neceh = new NECEventHandler(); MinecraftForge.EVENT_BUS.register(neceh); FMLCommonHandler.instance().bus().register(neceh);
    • January 11, 2018
    • 4 replies
  • All Activity
  • Home
  • SubliminallySublime
  • Theme

Copyright © 2019 ForgeDevelopment LLC · Ads by Longitude Ads LLC Powered by Invision Community