-
Posts
852 -
Joined
-
Last visited
Converted
-
Gender
Male
-
Location
Germany
-
Personal Text
Founder and Developer of the Primeval Forest Mod.
Recent Profile Visitors
178177 profile views
Bektor's Achievements
Dragon Slayer (6/8)
13
Reputation
-
[1.12.2][SOLVED] Register Biomes and add types crashes
Bektor replied to Bektor's topic in Modder Support
Ah, ok. Thx. -
Hi, whenever I'm trying to register my biomes and later call BiomeDictionary.addTypes I'm getting the following problem: Caused by: java.lang.IllegalArgumentException: Cannot add types to unregistered biome null @ObjectHolder(Constants.MOD_ID) public class ModBiomes { public static final BiomeDeepForest deepForest = null; @Mod.EventBusSubscriber(modid = Constants.MOD_ID) public static class RegistrationHandler { @SubscribeEvent public static void registerBiomes(final RegistryEvent.Register<Biome> event) { final IForgeRegistry<Biome> registry = event.getRegistry(); System.out.println("Registering biomes..."); // this line is called registry.register(new BiomeDeepForest().setRegistryName(Constants.MOD_ID, ModWorldGen.BIOME_NAME)); } } // Called at the end of FMLInitializationEvent public static void initBiomeManagerAndDictionary() { System.out.println("Init Biome Manager and Dictionary..."); // this line is called BiomeManager.addBiome(BiomeType.WARM, new BiomeEntry(deepForest, 10)); BiomeManager.addSpawnBiome(deepForest); BiomeDictionary.addTypes(deepForest, // Exception occurs here! BiomeDictionary.Type.FOREST, BiomeDictionary.Type.DENSE); } } Crash log:
-
[1.12.2] [SOLVED] GUI Renders only one color of texture
Bektor replied to Bektor's topic in Modder Support
Thx, this solved the problem. -
[1.12.2] [SOLVED] GUI Renders only one color of texture
Bektor replied to Bektor's topic in Modder Support
How can I draw a texture with 30x30px? I'm also wondering how I could scale this texture, for example when the UI element is smaller than the texture, but the full texture should be drawn within this smaller UI element. -
[1.12.2] [SOLVED] GUI Renders only one color of texture
Bektor replied to Bektor's topic in Modder Support
It is rendering a white texture just fine (as a white texture), a black texture is rendered just fine, a red texture is rendered just fine. But now matter what colors the texture has, the question mark will not be drawn (tested with black and transparent background, red and white question marks). My class just extends GuiButton and doesn't overwrite anything else except for this method. -
Hi there, I'm having the problem that my GUI only renders one color of my texture. @Override public void drawButton(Minecraft mc, int mouseX, int mouseY, float partialTicks) { if(this.enabled && this.visible) { GlStateManager.color(1.f, 1.f, 1.f, 1.f); ResourceLocation BUTTON_ICON = new ResourceLocation(Constants.MOD_ID, "textures/gui/icon_test.png"); mc.getTextureManager().bindTexture(BUTTON_ICON); this.drawTexturedModalRect(this.x, this.y, 0, 0, 30, 30); this.drawCenteredString(mc.fontRenderer, this.displayString, this.x + 40, this.y + (this.height - 8) / 2, 0xFFFFFF); } } This piece of code only ever results into a blank texture beeing drawn instead of the (for test purposes) question mark within it beeing drawn. The texture is 32 by 32 px large. Chaning the background of the test texture from black to transparent makes it impossible to see anything of the texture at all. Thx in advance. Bektor
-
[1.12.2] [SOLVED] ConcurrentModificationException
Bektor replied to Bektor's topic in Modder Support
Ok, thx. -
Hi there, I've got a small problem: I got back to my old source code and wanted to finish the GUI, thought for some reason I'm running into a ConcurrentModificationException at the starting line of the for-loop. --> Code is located at the beginning of initGui() this.buttonList.clear(); this.categories = new ArrayList<>(JustAnotherEnergyAPI.getAllCategories()); this.categories.sort(Comparator .comparingInt((LexiconCategory c) -> c.getModID().equals(Constants.MOD_ID) ? 0 : 1) .thenComparing(Comparator.comparing(LexiconCategory::getModID)) .thenComparing(Comparator.comparing(LexiconCategory::getPriority)) ); for(LexiconCategory category : this.categories) { // TODO: limit number of categories per page this.categories.add(category); this.buttonList.add(new GuiButtonCategory(category.getPriority(), this.left + 20, this.top + 20, this.guiWidth, 30, category.getUnlocalisedName())); } Thx in advance. Bektor
-
Well: Crafting a bed might need wool, but you might also use stone. Different recipe, same result.
-
But what about custom items? I'm also wondering if it is possible to define multiply recipes for the same item and how this should be done?
-
So what exaclty is a factory in Forge and how does it work?
-
Hi there, I've got a few questions regarding recipes in Forge 1.12.2: What 'types' does forge come with besides the normal minecraft:shaped_recipe and minecraft:smelting stuff. How can one register his own type. How can I create a recipe which returns multiply different items, for example an emtpy bucket and an apple (in this case a full bucket was provided) or an apple and a dirt block. Thx in advance. Bektor EDIT: see here
-
Hi, I'm wondering what things I can test with JUnit 5 of my mod as I know that Minecraft is a bit limited in terms of what can be tested and what can't. Thx in advance. Bektor
-
Hi, I'm wondering how I can change mod mappings in order to convert some changed block names over to the new names as I'm currently refactoring my complete src code like every few months and don't want to re-create my entire test world again. Thx in advance. Bektor
-
Hi there, I want to know wether it is possible to use the new plugins { id 'java' id 'eclipse' id 'idea' } syntax for the net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT plugin, as it seems to be that there are multiply different types of plugins with different requirements for this syntax: https://docs.gradle.org/current/userguide/plugins.html I don't know when this new sytanx was added, but I'm currently upgrading to Gradle 4.6 because of it's native JUnit 5 support. Thx in advance. Bektor