Jump to content

kreezxil

Members
  • Posts

    120
  • Joined

  • Last visited

Converted

  • Gender
    Male
  • URL
    http://www.kreezcraft.com
  • Location
    A small crater somewhere on the 3rd Rock from the Sun
  • Personal Text
    20% off 1st month Minecraft server subscription at https://www.akliz.net/kreezxil using promo code kreezxil

Recent Profile Visitors

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

kreezxil's Achievements

Creeper Killer

Creeper Killer (4/8)

4

Reputation

  1. 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/
  2. 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.
  3. 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.
  4. 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.
  5. 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.
  6. 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; } }
  7. 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?
  8. 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.
  9. 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.
  10. 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.
  11. Is there an easier way to do what I did?
  12. 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?
  13. 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
  14. 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.
  15. Here ya go. https://gist.github.com/a52ec71c7cc694aa1578cfd15a62d62c
×
×
  • Create New...

Important Information

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