
Alex Sim
Members-
Posts
46 -
Joined
-
Last visited
Everything posted by Alex Sim
-
I found two issues with the new fluid system: 1) I can't assign any texture to it which does not belong to a registered block or item: that means I have to register a block/item that uses my _flow texture and another one that uses my _still texture in order to apply custom textures to the fluid 2) Sometimes, if I quit the game right in front of a custom fluid and then reload the game and world, it will show the missing texture for an instant
-
I'm trying to create a system to register custom Entity data on-the-fly for already existing Entities (including vanilla Entities); for every data object i keep a normal HashMap that maps Class<Entity> -> DataParameter, and i keep a global WeakHashMap that maps UUID -> WeakReference<EntityDataManager> (as I noticed the Entity instance may change for one entity). However I noticed sometimes (not always) the map does not clear out, even if I change world and run System.gc(), while sometimes it does
-
Default blockstates, block/item models and model patterns
Alex Sim replied to Alex Sim's topic in Suggestions
Any documentation / example source code? -
Default blockstates, block/item models and model patterns
Alex Sim replied to Alex Sim's topic in Suggestions
Having to make 3 json files for each block is only part of the problem: having 30+ files in a directory that all do the same thing gets kinda messy and unmanageable; but whatever, I'll keep adding json files until this strikes you as an OK idea I guess -
I don't know whether this has been asked before or whether this is possible or not, but it would be a nice feature for forge blocks without a blockstate to fallback to a signle-state blockstate with block/REGISTRY_NAME.json as default model, and blocks with no blockstate AND model to default to 'block/cube_all' as model and block/REGISTRY_NAME.png as texture Same goes for items, with BlockItems defaulting to their correspective block's model, and normal items defaulting to 'item/generated' model with item/REGISTRY_NAME.png as texture Also a more complicated addition would be having reusable models (EG: that provide textures as '${name}_top', '${name}_sides' and '${name}_bottom')
-
[1.12 to 1.14] Make custom mobs spawn only at night (custom biome)
Alex Sim replied to Alex Sim's topic in Modder Support
Thank you, that worked -
[1.12 to 1.14] Make custom mobs spawn only at night (custom biome)
Alex Sim replied to Alex Sim's topic in Modder Support
Thank you, but the register function is private inside EntitySpawnPlacementRegistry, isn't there any forge registry to handle this, or do I have to use reflection? -
Hello, I'm having trouble getting a custom mob spawn at night in my custom biome. Adding a spawn for a vanilla Zombie will automatically make it spawn only at night, addSpawn(EntityClassification.MONSTER, Biome.SpawnListEntry(EntityType.ZOMBIE, 100, 5, 8)) but doing the same with my custom entity, which extends the ZombieEntity class and has EntityClassification.MONSTER classification will still make it spawn during the day
-
I was trying to create a customized ocean biome but i wanted my block to show up instead of sand; I just copypasted the normal OceanBiome class but used this config SurfaceBuilderConfig(MyMod.Blocks.MYGRASS.defaultState, MyMod.Blocks.MYDIRT.defaultState, MyMod.Blocks.MYSAND.defaultState) apparently the underWaterMaterial parameter (third one) is completely ignored and the biome still uses vanilla sand as default
-
[1.12 to 1.14.4] Separate logic for different block states
Alex Sim replied to Alex Sim's topic in Modder Support
Oh well, atleast I did not mess this one up, thanks Draco -
[1.12 to 1.14.4] Separate logic for different block states
Alex Sim replied to Alex Sim's topic in Modder Support
I've got another small issue, I don't know if that's just me messing it up again or an unimplemented/changed feature, but on 1.14.4 I'm not able to override textures inside a blockstate file, it just uses the model-associated texture (if present) or not-found texture otherwise Here's an example of my blockstate { "forge_marker": 1, "variants": { "examplestate": { "true": { "textures": { "side": "greenapple_glacia:blocks/test_bedrock", "end": "greenapple_glacia:blocks/test_bedrock" }, "model": "greenapple_glacia:block/glacia_column_mono" }, "false": { "textures": { "side": "greenapple_glacia:blocks/test_stone", "end": "greenapple_glacia:blocks/test_stone" }, "model": "greenapple_glacia:block/glacia_column_top" } } } } But I have many tried different ways with the same result -
[1.12 to 1.14.4] Separate logic for different block states
Alex Sim replied to Alex Sim's topic in Modder Support
ERR json ?, I need to sleep -
[1.12 to 1.14.4] Separate logic for different block states
Alex Sim replied to Alex Sim's topic in Modder Support
I'm dumb, I was trying to do something like this: { "forge_marker": 1, "variants": { "facing" : { "north" : {"y": 0}, "south" : {"y": 180}, "west" : {"y": 270}, "east" : {"y": 90} }, "overworld" : { "true" : {"model": "greenapple_glacia:block/glacial_berry_overworld"}, "false" : {"model": "greenapple_glacia:block/glacial_berry"} } } } But with normal syntax ("facing=north" : {...} ...) This makes this XML JSON blockstates sytem not suck as much Also thanks for answering again -
[1.12 to 1.14.4] Separate logic for different block states
Alex Sim posted a topic in Modder Support
Hello, I used to make mods for minecraft 1.7.10 and I'm getting back into it. I haven't failed to notice the new XML JSON system (wannabe MVC compliant) sucks... a lot. Haven't quite figured it out yet though, so my question is, can I separate what each blockstate for a single block does (ex: `facing` changes the rotation and `overworld` changes the base model) without having to write all combinations of states? Example where i write all states combinations: { "forge_marker": 1, "defaults" : { "model": "greenapple_glacia:block/glacial_berry" }, "variants": { "facing=north,overworld=false" : {"y": 0}, "facing=south,overworld=false": {"y": 180 }, "facing=west,overworld=false": {"y": 270 }, "facing=east,overworld=false": {"y": 90 }, "facing=north,overworld=true" : {"model": "greenapple_glacia:block/glacial_berry_overworld", "y": 0}, "facing=south,overworld=true": {"model": "greenapple_glacia:block/glacial_berry_overworld", "y": 180 }, "facing=west,overworld=true": {"model": "greenapple_glacia:block/glacial_berry_overworld", "y": 270 }, "facing=east,overworld=true": {"model": "greenapple_glacia:block/glacial_berry_overworld", "y": 90 } } } ^ that is as much as i was able to trim it I mean, if I used 4 states with 4 possible values each, I would have to write 4^4 = 256 stetes (?!) -
Just don't use kotlin-reflect then (It is marked as Stable Incremental Release (SIR)), the other components i mentioned are marked as Fully Stable (FS), which, according to the Kotlin documentation website, guarantees future incremental releases to be backwards compatible. Also, Kotlin doesn't seem that bloaty to me
-
I know, unusual request, but Kotlin is now, more than ever, the go-to JVM language for many programmers, and this would allow modders to use the provided libraries without each of them having to include it in their mods. By runtime I mean kotlin-stdlib, kotlin-reflect, kotlin-coroutines, kotlin-stdlib-common, kotlin-stdlib-jdk7 and kotlin-stdlib-jdk8 (possibly updated to the latest version) BTW: I am able to make mods in Kotlin without using Forgelin (using just the kotlin libraries), I just use the @JvmStatic annotation on the functions inside my RegistryEvents object and it works like a charm; EG: @Mod.EventBusSubscriber(bus = Mod.EventBusSubscriber.Bus.MOD) object RegistryEvents { @JvmStatic @SubscribeEvent fun onBlocksRegistry(event: RegistryEvent.Register<Block>) { //Do some stuff here } @JvmStatic @SubscribeEvent fun onItemsRegistry(event: RegistryEvent.Register<Item>) { //Do some stuff here } }
-
Hello everyone, I wanted to try making a mod using Kotlin, but Forgelin is completely trash: I couldn't get it to work on the latest Minecraft version. Instead I opted to include the full Kotlin runtime in my Jar using johnregelman's shadow Gradle plugin (relocating it to com.my.package.embedded.kotlin so it doesn't conflict with any other mod doing the same thing) I tried including it using the ContainedDeps manifest attribute (and yes, I put the Jars in META-INF/libraries), but it did not work, so this was my only option