Everything posted by Discult
-
Render Blocks
in your scorched_earth.json item model you need to change blocks to block. reason is you are trying to get the block model in models/block but you have it directing to models/blocks
-
setEntityBoundingBox not working...
Hello i am trying to make a bounding box that is 0.5 width, 1.5 height and 1 length. but when i do setEntityBounding box it doest work sets it to the default size bounding box. only thing i can do that works is setSize but that makes the width and length the same size. how can i fix this.
-
[1.12.2] collidedHorizontally not working
Can you supply the full code for this entity
-
@Config Not Working
right so i didn't register it in the client proxy cause of the @EventBusSub and i made the method static but for some reason it is still not displaying the config button
-
@Config Not Working
Yes i do have a @mod annotated class. what is meant by instance base event subscriber. above the class where my events are in i have a @EventBusSubscriber(modid = Reference.MODID, value = Side.CLIENT) and i have EVENT_BUS.register in my init on my clientproxy
-
@Config Not Working
no i have not and i willdo that shortly
-
[1.12.2] collidedHorizontally not working
oh lol don't know what happened there what i said was from the look of it setBesideClimbableBlock would assume blocks such as ladders/vines etc i would first check them blocks and see if there is a method that makes the block climbable.
-
[1.12.2] collidedHorizontally not working
haven't really looked but if you see the
-
@Config Not Working
Hello so i tried creating a @Config using forges testing one and well it is not loading and i am wondering why the config it self is loading just not the gui. Here is my code. Config: i have this in my init event in the main class: ConfigManager.sync(Reference.MODID, Config.Type.INSTANCE); And this event: @SubscribeEvent public void onConfigChangedEvent(ConfigChangedEvent.OnConfigChangedEvent event) { if (event.getModID().equals(Reference.MODID)) { ConfigManager.sync(Reference.MODID, Config.Type.INSTANCE); } }
-
My mod only works ClientSide...
read up on @SideOnly if you dont understand this but add the sideonly annotation to the registerEntityRenders() method and see if that fixes it. run a test server in the IDE
-
Make a certain block not visable if option is selected
interesting what would the best way to check if a block is visable and then update/rebuild the chunk?
-
My mod only works ClientSide...
you need to make sure renders are done client side only. this line of code is an example of something that needs to be client only || RenderingRegistry.registerEntityRenderingHandler(EntityZombieKnight.class, new IRenderFactory<EntityZombieKnight>()
-
[SOLVED] [1.12.2] Overriding BlockSkull makes my item drop 3x in survival but normally in creative
so wait let me get this right you want it to break only if in contact with water and this works in creative but when in survival you can break it and it drops 3x or when broke with water it drops 3x?
-
Make a certain block not visable if option is selected
For me it is i am just simple building a mod that will hold a bunch of testing stuff to reference back to if i ever need a function and one things i was thinking of was what if i want to make a item that can only be visible if a certain condition is met e.g. if players inventory contains a special lens or something
-
Send Message from Server to Client without Client-side Mod
what code you using to send the message?
-
Compiled mod lacks textures
Does the assets folder inside yourMod.jar have textures inside it? P.S. you dont need the sources jar that is only for say you want to allow people to download and use your mod as a (api) or libary you can also give sources to allow them to see the CODE.
-
1.12.2 onArmorTick Server Crash
The method cannot be found on the server wherever you are calling this method try setting it to be @SideOnly(Side.CLIENT) and see if that fixes. some src code would be nice so we can check you code
-
Make a certain block not visable if option is selected
I seen a server do this and i was wondering if it could be done forge side as well what i am wondering is if there is a way to get a block e.g. fern and set it to not be visible if option is selected but it to be dynamic meaning it can be done without having to restart world/client
-
[1.12.2]Rendering a different mob depending on distance?
That worked perfect thank you
-
How do i make a moving texture?
look at how minecraft does its water texture and go from there you will have to do it manually or i think MrCryFish has a program that can do it also look for his website.
-
[1.12.2]Rendering a different mob depending on distance?
Hello i am wondering what would be the best way to approach a system that loads a model but when the entity is e.g. 20 blocks away it would load a different model.
-
GuiConfig Not working 1.12.2
fixed that and how does a @config work do i still need to make GuiFactory?
-
Render a Json Block Model in a FastTESR
Hello i am wondering how i would achieve this. i heard some things about baking the model and stuff so i am wondering if it is IModel or IBakedModel and how i would bake the json model to these.
-
RenderBlock base on distance
Hello i am wondering if there is a method or way to only render a block if it is e.g. 20 blocks from the player.
-
GuiConfig Not working 1.12.2
Can anyone Help me i cant figure out why my gui config wont work when i click on mods and select my mod. Here is the code of anyone is interested. Config Handler: package com.saoteam.swordartonline.config; import java.io.File; import java.util.ArrayList; import java.util.List; import com.saoteam.swordartonline.main.Reference; import net.minecraft.client.resources.I18n; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.common.config.Configuration; import net.minecraftforge.common.config.Property; import net.minecraftforge.fml.client.event.ConfigChangedEvent; import net.minecraftforge.fml.common.Loader; import net.minecraftforge.fml.common.eventhandler.EventPriority; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; public class ConfigHandler { private static Configuration config = null; public static final String CATEGORY_GAME = "game"; public static int mobQuality; public static void preInit() { File configFile = new File(Loader.instance().getConfigDir(), "SAOMod.config"); config = new Configuration(configFile); syncFromFiles(); } public static Configuration getConfig() { return config; } public static void clientPreInit() { MinecraftForge.EVENT_BUS.register(new ConfigEventHandler()); } public static void syncFromFiles() { syncConfig(true, true); } public static void syncFromGUI() { syncConfig(false, true); } public static void syncFromFields() { syncConfig(false, false); } private static void syncConfig(boolean loadFromConfigFIle, boolean readFieldsFromConfig) { if(loadFromConfigFIle) config.load(); Property propertyMobQuality = config.get(CATEGORY_GAME, "mob_quality", 1); propertyMobQuality.setLanguageKey("gui.config.game.mob_quality"); propertyMobQuality.setComment(I18n.format("gui.config.game.mob_quality.comment")); propertyMobQuality.setMinValue(0); propertyMobQuality.setMaxValue(2); List<String> propertyOrderGame = new ArrayList<String>(); propertyOrderGame.add(propertyMobQuality.getName()); config.setCategoryPropertyOrder(CATEGORY_GAME, propertyOrderGame); if(readFieldsFromConfig) { mobQuality = propertyMobQuality.getInt(); } propertyMobQuality.set(mobQuality); if(config.hasChanged()) { config.save(); } } public static class ConfigEventHandler { @SubscribeEvent(priority = EventPriority.LOWEST) public void onEvent(ConfigChangedEvent.OnConfigChangedEvent event) { if(event.getModID().equals(Reference.MODID)) { syncFromGUI(); } } } } GuiFactory: package com.saoteam.swordartonline.client.gui; import java.util.ArrayList; import java.util.List; import java.util.Set; import com.saoteam.swordartonline.config.ConfigHandler; import com.saoteam.swordartonline.main.Reference; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiScreen; import net.minecraft.client.resources.I18n; import net.minecraftforge.common.config.ConfigElement; import net.minecraftforge.common.config.Configuration; import net.minecraftforge.fml.client.IModGuiFactory; import net.minecraftforge.fml.client.config.GuiConfig; import net.minecraftforge.fml.client.config.GuiConfigEntries; import net.minecraftforge.fml.client.config.GuiConfigEntries.CategoryEntry; import net.minecraftforge.fml.client.config.IConfigElement; import net.minecraftforge.fml.client.config.DummyConfigElement.DummyCategoryElement; public class ConfigGuiFactory implements IModGuiFactory { @Override public void initialize(Minecraft minecraftInstance) { // TODO Auto-generated method stub } @Override public boolean hasConfigGui() { return true; } @Override public GuiScreen createConfigGui(GuiScreen parentScreen) { return new SAOConfigGui(parentScreen); } @Override public Set<RuntimeOptionCategoryElement> runtimeGuiCategories() { return null; } public static class SAOConfigGui extends GuiConfig { public SAOConfigGui(GuiScreen parent) { super(parent, getConfigElements(), Reference.MODID, false, false, I18n.format("gui.config.main_title")); } private static List<IConfigElement> getConfigElements() { List<IConfigElement> list = new ArrayList<IConfigElement>(); list.add(new DummyCategoryElement(I18n.format("gui.config.category.game"), "gui.config.category.game", CategoryEntryGame.class)); return list; } } public static class CategoryEntryGame extends CategoryEntry { public CategoryEntryGame(GuiConfig owningScreen, GuiConfigEntries owningEntryList, IConfigElement configElement) { super(owningScreen, owningEntryList, configElement); } @Override protected GuiScreen buildChildScreen() { Configuration config = ConfigHandler.getConfig(); ConfigElement categoryGame = new ConfigElement(config.getCategory(ConfigHandler.CATEGORY_GAME)); List<IConfigElement> propertiesOnScreen = categoryGame.getChildElements(); String windowTitle = I18n.format("gui.config.category.game"); return new GuiConfig(owningScreen, propertiesOnScreen, owningScreen.modID, this.configElement.requiresWorldRestart() || this.owningScreen.allRequireWorldRestart, this.configElement.requiresMcRestart() || this.owningScreen.allRequireMcRestart, windowTitle); } } } Main Class and client proxy: @Mod(modid = Reference.MODID, name = Reference.NAME, version = Reference.VERSION, guiFactory = Reference.GUIFACTORY) public class SwordArtOnline { @SidedProxy(clientSide = Reference.CLIENTPROXY, serverSide = Reference.COMMONPROXY) public static CommonProxy PROXY; @Mod.Instance(Reference.MODID) public static SwordArtOnline INSTANCE; public static Logger LOGGER = LogManager.getLogger(Reference.NAME); @EventHandler public void preInit(FMLPreInitializationEvent event) { PROXY.preInit(); ConfigHandler.preInit(); } //In Reference Class public static final String GUIFACTORY = "com.saoteam.swordartonline.client.gui.ConfigGuiFactory"; //ClientProxy @Override public void preInit() { super.preInit(); SAOGuis.registerGuis(); ConfigHandler.clientPreInit(); }
IPS spam blocked by CleanTalk.