-
Posts
120 -
Joined
-
Last visited
Everything posted by kreezxil
-
We really need the "read the docs" link for 1.13.2 updated to reflect this as it still tells us to setup the environment in the old way. https://mcforge.readthedocs.io/en/1.13.x/
-
When 1.12 came out and all the way up to before 1.12.2 b2640 version of forge the lang file for english for example has been en_us.lang. But since then starting at least at b2640 it has gone back to mix case and is now wanting en_US.lang. personally, I don't see why we don't make forge simply not care about the case of files. So that there should literally be no difference between En_uS.lANg and en_US.lanG and en_us.lang. readability should be up to the developer not someone's idea of what code files should look like. I think that forge should ignore case altogether anyways. I wouldn't want to have some block, let's call it blockBooger.java be distinguishable from blockBOOGER.java. That certainly would cause a coding nightmare. Just ignore the casing, thus forcing the developer to create a new file for his new booger block, like maybe it would be called blockGooeyBogger.java. More descriptive and forge can ignore the case. But anyways, someone please check the latest forge builds, it is asking for mixed case lang files.
-
how to allocate more ram to customized jvm arguments
kreezxil replied to Derpyninja476's topic in Support & Bug Reports
Using the standard mc launcher to make your private modpack will make maintaining and distributing more difficult than it needs to be. You may have already noticed that. I strongly suggest using the TwitchApp as it is the easiest. You don't have to publish the pack on Curse either. Just share the export and tell your friends how to set the ram. As a softer alternative I'd go with MultiMC which leans back towards difficult to maintain. -
If all you want to do is that, you'll need to look at data packs, however, that won't be available until 1.13. There are at least 2 other options. 1. Code a new item/block with the new name and tell your new recipe to return that new item/block. 2. Install crafttweaker into your pack and use the Zenscript to change the name of the item that will be returned. I strongly suggest option #1 as this option can lead to unforeseen issues. Unforeseen to you, the rest of us already know what will happen.
-
how to allocate more ram to customized jvm arguments
kreezxil replied to Derpyninja476's topic in Support & Bug Reports
Considering that you are posting on a Forge forum... There are at least 3 current Launchers you could possibly be using. The majority of mods are on CurseForge, so it is even more likely that you using the TwitchApp for the modpack. Sadly the TwictchApp ignores the modpack developers suggestion on the recommend ram setting and this is therefore a common problem with Twitch packs. Not an issue with MultiMC as that one grabs at least 4Gb by default. On the Twitchapp, the following instructions are for my World of Dragons mod pack and will work for any other mod pack on TwitchApp as well. click on view profile Click the 3 dots button now click profile options uncheck Use System Settings Move the memory slider as far to the right as you feel comfortable. I have a 32GB systems so I moved it all the way to the right. The minimum to run the pack is 3.5GB, 6 to 8GB is a good average. remember to click ok to finalize the changes and then start the pack. -
Button click, lever turn, pressure plate click etc event
kreezxil replied to Raycoms's topic in Modder Support
I've managed to cancel everything except the pressure plate and that's because pressure plates aren't left or right clicked. I'm still searching for a way to do the pressure plates. Here's what I've done. There is likely a lot of stuff in there you don't need. I'm making the No Op Spawn Protection mod for 1.11.2, 1.12, and 1.12.1. I discovered that the spawnprotection bit in server.properties for dedicated servers is ignored when there is no one set to op when the world is first created. Not only is it ignored it is disabled. Adding an op later on will not fix it. You have to wipe your world to get the spawn protection. So I made this to give that and it was quite small with that release, then I realized I can't stop there that I need to add more capability. The following works for everything but the pressure plate. Full source @ https://github.com/kreezxil/spawnprotection @SubscribeEvent public static PlayerInteractEvent escapingSpawn(PlayerInteractEvent event) { EntityPlayer player = event.getEntityPlayer(); World world = player.getEntityWorld(); MinecraftServer server = player.getServer(); int px,pz,wx,wz; int worldId = world.provider.getDimension(); /* * Actually it's not the player I need the check but the block with which they are * interacting. Previously this was player.getPosition().getX() etc just so you know * * What the javadoc says is that event's getPos, will return the position of the thing being acted * upon. And should there be no thing, then the player becomes the thing. * * Therefore it should be a more accurate representation of any player trying to much around * within the protected area. * * -- Kreezxil 15 Aug, 2017 */ px = event.getPos().getX(); pz = event.getPos().getZ(); wx = world.getSpawnPoint().getX(); wz = world.getSpawnPoint().getZ(); IBlockState block = world.getBlockState(event.getPos()); //player.sendMessage(new TextComponentString("Block is "+block.toString())); //needed to get doors PropertyBool OPEN = PropertyBool.create("open"); //if the dimension that the player is in not configured for true, this will exit //and allow them to edit the dimension spawn. switch(worldId) { //overWorld case 0: if(!Config.overWorld) { return null; } break; //Nether case -1: if(!Config.theNether) { return null; } break; //The End case 1: if(!Config.theEnd) { return null; } break; //Some other dimensions definitely return null default: return null; } if(px > wx + Config.spawnProtection || pz > wz + Config.spawnProtection || px < wx - Config.spawnProtection || pz < wz - Config.spawnProtection) { return event; } else { //is the player in creative or an operator? if(player.isCreative()) { return null; } //is it a real server? if(server !=null && !server.isSinglePlayer()) { if(server.getPlayerList().getOppedPlayers().getGameProfileFromName(player.getName())!=null) { //player is op return null; } } if(event.isCancelable()) { if(block != null && block != player) { if((block instanceof BlockLever || block instanceof BlockButton) && Config.allowCircuits) { //button, lever, pressure plate return null; } if(block.hasComparatorInputOverride() && Config.allowContainers) { //containers return null; } if(block.getProperties().containsKey(OPEN) && Config.allowDoors) { //door, trapdoor return null; } } event.setCanceled(true); } return null; } } -
Can it be done? I want to create objects that emit different colored light. Right now we have only one light type that I can see, I'll call it torch-light for simplicity. It's the same as sun-light in comparison. I see that we have multiple shades of it as the sun goes down and comes up. The shades can be seen as you move towards a light source and away from it in dark areas. I would like to have the light be a different hue tho. 16 of them, well black wouldn't be a color, so at least 15. Is it possible to do easily? Can it be achieved with a trick (shortcut)? or will it require dark java magic like ASM or CoreModding?
-
Being the newb that I am; while I do understand how to remove recipes now as evidenced by the code snippet. What I don't understand is how to no-op the wooden and stone button advancements. I see the words and stuff. but what I really need is a function fragment with the code in it.
-
I use the following for windows. java -XX:-UseGCOverheadLimit -Dfml.debugClassPatchManager=true -Dfml.debugRegistryEntries=true ^ -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:-UseAdaptiveSizePolicy ^ -Xmn128M -Xms1G -Xss1M -XX:MaxPermSize=256M ^ -Djava.net.preferIPv4Stack=true -Dfml.queryResult=confirm ^ -jar forge-version.jar nogui Try that first, if you need more ram for your server increase 1G to the highest you are willing to spare. My megapacks on Curse have no problems running in 3G environments. -Xms3G is the setting. On Java 8 and higher -XX:MaxPermSize=### can be omitted. But if included Java will ignore it for you. The other stuff is for memory management and better error reports.
-
Look at my github link that I provided. Note that above the class for the file containing this snipped it says @EventBusSubscriber. That's what tells Forge to come to the file and load up the subscriber events, ie these routines don't go in the init, preinit, or postinit. So feel free to copy my registrar.java and use it as you please. You'll probably end up with a class that looks like: package com.mod.awesomeyour; import net.minecraft.block.Block; import net.minecraft.item.Item; import net.minecraft.item.crafting.IRecipe; import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.event.ModelRegistryEvent; import net.minecraftforge.event.RegistryEvent; import net.minecraftforge.event.RegistryEvent.Register; import net.minecraftforge.fml.common.Mod.EventBusSubscriber; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import net.minecraftforge.registries.IForgeRegistryModifiable; @EventBusSubscriber public class Registrar { @SubscribeEvent public static void registerRecipes(RegistryEvent.Register<IRecipe> event) { ResourceLocation theButton = new ResourceLocation("minecraft:wooden_button"); IForgeRegistryModifiable modRegistry = (IForgeRegistryModifiable) event.getRegistry(); modRegistry.remove(theButton); } } that's all you need to remove the wooden button, extrapolate as necessary.
-
Is there an easier way to do what I did?
-
I tried to override the wooden_button.json advancement by using: { "criteria": { "impossible": { "trigger": "minecraft:impossible" } } } and placing it in the path: .../morebeautifulbuttons/advancements/recipes/redstone/ but I get the error: [Server thread/ERROR]: Parsing error loading built-in advancement minecraft:recipes/redstone/wooden_button com.google.gson.JsonSyntaxException: Unknown recipe 'minecraft:wooden_button' at net.minecraft.advancements.AdvancementRewards$Deserializer.deserialize(AdvancementRewards.java:204) ~[AdvancementRewards$Deserializer.class:?] at net.minecraft.advancements.AdvancementRewards$Deserializer.deserialize(AdvancementRewards.java:180) ~[AdvancementRewards$Deserializer.class:?] at com.google.gson.internal.bind.TreeTypeAdapter.read(TreeTypeAdapter.java:69) ~[TreeTypeAdapter.class:?] at com.google.gson.Gson.fromJson(Gson.java:887) ~[Gson.class:?] at com.google.gson.Gson.fromJson(Gson.java:952) ~[Gson.class:?] at com.google.gson.internal.bind.TreeTypeAdapter$GsonContextImpl.deserialize(TreeTypeAdapter.java:162) ~[TreeTypeAdapter$GsonContextImpl.class:?] at net.minecraft.util.JsonUtils.deserializeClass(JsonUtils.java:359) ~[JsonUtils.class:?] at net.minecraft.util.JsonUtils.deserializeClass(JsonUtils.java:381) ~[JsonUtils.class:?] at net.minecraft.advancements.Advancement$Builder.deserialize(Advancement.java:243) ~[Advancement$Builder.class:?] at net.minecraft.advancements.AdvancementManager$1.deserialize(AdvancementManager.java:50) ~[AdvancementManager$1.class:?] at net.minecraft.advancements.AdvancementManager$1.deserialize(AdvancementManager.java:46) ~[AdvancementManager$1.class:?] at com.google.gson.internal.bind.TreeTypeAdapter.read(TreeTypeAdapter.java:69) ~[TreeTypeAdapter.class:?] at net.minecraft.util.JsonUtils.gsonDeserialize(JsonUtils.java:435) ~[JsonUtils.class:?] at net.minecraft.util.JsonUtils.fromJson(JsonUtils.java:485) ~[JsonUtils.class:?] at net.minecraft.advancements.AdvancementManager.loadBuiltInAdvancements(AdvancementManager.java:185) [AdvancementManager.class:?] at net.minecraft.advancements.AdvancementManager.reload(AdvancementManager.java:69) [AdvancementManager.class:?] at net.minecraft.advancements.AdvancementManager.<init>(AdvancementManager.java:61) [AdvancementManager.class:?] at net.minecraft.world.WorldServer.init(WorldServer.java:161) [WorldServer.class:?] at net.minecraft.server.integrated.IntegratedServer.loadAllWorlds(IntegratedServer.java:123) [IntegratedServer.class:?] at net.minecraft.server.integrated.IntegratedServer.init(IntegratedServer.java:160) [IntegratedServer.class:?] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:549) [MinecraftServer.class:?] at java.lang.Thread.run(Unknown Source) [?:1.8.0_131] Source at: https://github.com/kreezxil/More-Beautiful-Buttons What do I need to do?
-
This didn't work for me until I removed the recipe first. Unless by registering you mean in code and not via JSON. My solution: @SubscribeEvent public static void registerRecipes(RegistryEvent.Register<IRecipe> event) { ResourceLocation theButton = new ResourceLocation("minecraft:wooden_button"); IForgeRegistryModifiable modRegistry = (IForgeRegistryModifiable) event.getRegistry(); modRegistry.remove(theButton); } from https://github.com/kreezxil/More-Beautiful-Buttons/blob/master/src/main/java/com/kreezcraft/morebeautifulbuttons/init/Registrar.java#L43-L49
-
This thread is very helpful as long as you read the opening post and then only the replies from diesieben07. However, because the majority of us are absolute java newbs, it's the truth, the advice given is lost on us. With some help from TheDragon team and MMD team on Discord I was able to finally understand what had to be done and where it had to be done. To remove a wooden button, which was my goal for my mod More Beautiful Buttons (1.12), I used [https://github.com/kreezxil/More-Beautiful-Buttons/blob/master/src/main/java/com/kreezcraft/morebeautifulbuttons/init/Registrar.java#L43-L49]: @SubscribeEvent public static void registerRecipes(RegistryEvent.Register<IRecipe> event) { ResourceLocation theButton = new ResourceLocation("minecraft:wooden_button"); IForgeRegistryModifiable modRegistry = (IForgeRegistryModifiable) event.getRegistry(); modRegistry.remove(theButton); } This segment of code goes in your EventBus handler. You tell Forge which class is this type of handler with @EventBusSubscriber being placed above the class name. @EventBusSubscriber public class Registrar { You can use this to remove any recipe from any place vanilla or other mods.
-
1.11.2 ID Shifting aka World Corruption when removing mods
kreezxil replied to kreezxil's topic in General Discussion
Here ya go. https://gist.github.com/a52ec71c7cc694aa1578cfd15a62d62c -
I've heard through the grapevine from a little birdy (firebelle) that ID shifting is not supposed to occur from 1.8 on. However, every time I remove a mod in any branch of Forge from 1.8 to 1.11.2 the world associated with the pack experiences what I call ID SHIFTING. Where blocks that might've been logs are now machines or some other block from some other mod in the pack. I can agree with the little birdy that this should not be happening because we went to actual names as IDs but then I also know that those names are mapped to internal actual ID numbers. So if you delete a mod, all of the associated ID slots associated with are now empty and Forge then to conserve precious memory compacts the ID map essentially reallocation those IDs to other mods that came below the one that was removed, thus causing what I call the ID SHIFT or world corruption as others might call it. Is the the bird on the grapevine correct? If so, how do I tell Forge to stop compacting so that ID SHIFT doesn't occur? Other than not removing a mod is there any other way to protect against it with MCediting or some such.
-
I have a dedicated server running build 2310. If you are opped there are 14 pages of help commands. If you are not opped there are only 2 pages. This for my Colonial Expansion modpack but I think it's a general problem in all of my 1.11.2 packs. I need my players to have access to at a minimum the Minecolonies commands, it's config is set correctly. minecolonies config: https://gist.github.com/712c350d646c78d641e08d37ed09a0b0 mods in my pack: https://gist.github.com/8b2e498c59c237d070a46c3f5f47d5b9 Other than helpfixer I have nothing that explicitly operates on the help system. I have reached out to the helpfixer author at https://github.com/matthewprenger/HelpFixer/issues/12 Without making all of my players operators what are suggestions might I try? Currently as I am aware there are no active permission enabling systems available for 1.11.2. If there is that would be a great boon and a link would be most appreciated.
-
Proof of concept mod compiler (Now with GUI!)
kreezxil replied to tuxie's topic in General Discussion
I really like this idea and sincerely hope you keep working on it. For all the naysayers, disbelievers, and what have yous, sheesh, even the car you take for granted started with a wheel and an idea. Don't shit on his idea just because all you see is a door handle. Most people who would even bother to post a proof a concept would simply post a bunch of words describing a grandiose idea, this guy went and produced a working program. Good job! -
I see that the ModelBakery changed so that the method "addVariantName" no longer exists. I've poking around the code and available resources and I am not sure what to use in place of the "addVariantName" method. From what I can tell, what used to be a simple one-liner is now going to be at least 10 additional lines. But I'm still unsure as to where to go. What are the suggestions and is there a new resource for discovering how to do these things in 1.10.2? My code style is reminiscent of BedrockMiner's from http://BedrockMiner.jimdo.com as I used his tutorials to initially create the mod. However, he states on his front page that he is no longer continuing the tutorial project and so 1.8 is the highest he has gone before giving up on it (I hope temporarily). The function with my code that is no longer valid For context this comes from my BlockRenderRegister.java
-
I have the Compressed Blocks mod at https://github.com/kreezxil/Compressed-Blocks-by-Kreezxil/tree/1.8.8 and in my new Compressed Red Sand block, I'm having an issue trying to get it to drop a vanilla red sand block from my tier 0 Compressed Red Sand block. This is not an issue with my other blocks as they are not dropping vanilla meta state blocks. Problem at line 142 of https://github.com/kreezxil/Compressed-Blocks-by-Kreezxil/blob/1.8.8/src/main/java/com/kreezxil/compressedblocks/blocks/compressed/RedSand.java. This problem also exists my 1.8 build of the mod. Any help would be greatly appreciated.
-
I'm doing the Compressed Blocks mod and just recently had this issue but didn't need to report it. Your variants file needs to look something like this: { "variants": { "tier=normal": { "model": "kreezxilscompressedblocks:CompressedCobblestone" }, "tier=double": { "model": "kreezxilscompressedblocks:DoubleCompressedCobblestone" }, "tier=triple": { "model": "kreezxilscompressedblocks:TripleCompressedCobblestone" }, "tier=quadruple": { "model": "kreezxilscompressedblocks:QuadrupleCompressedCobblestone" }, "tier=quintuple": { "model": "kreezxilscompressedblocks:QuintupleCompressedCobblestone" }, "tier=sextuple": { "model": "kreezxilscompressedblocks:SextupleCompressedCobblestone" }, "tier=septuple": { "model": "kreezxilscompressedblocks:SeptupleCompressedCobblestone" }, "tier=octuple": { "model": "kreezxilscompressedblocks:OctupleCompressedCobblestone" } } } notes: tier is the name of my property and the part after the equals is the lowercased value of the 2nd parameter in the Enum definition. Hopefully the rest is self-explanatory.