Не работают текстуры и имена объектов одного класса

Версия Minecraft
1.7.10
62
0
Проблема, скорее всего, простая, но у меня не получается решить её. В общем... Я создал кастомное растение. Класс его блока, вроде, работает отлично. Но! Работает только с одним объектом. Когда я пытаюсь создать несколько экземпляров этого класса, у всех, кроме первого, не работают текстуры. Вот код:

Java:
package com.RainbowCraft;

import java.util.ArrayList;
import java.util.Random;

import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;
import net.minecraft.block.Block;
import net.minecraft.block.BlockCrops;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import net.minecraftforge.client.event.RenderPlayerEvent;

public class DarkRainbowPlants extends BlockCrops{
    
    /**
     * Level of this plant
     */
    int level;
    
    /**
     * Seeds of this plant
     */
    Item seeds;

    public DarkRainbowPlants(int level, String name){
        this.level = level;
        this.setBlockTextureName("DarkRainbowPlant");
        this.setBlockName("DarkRainbowPlant_lvl_" + level);
        this.setLightLevel((float) level);
        GameRegistry.registerBlock(this, name);
        LanguageRegistry.addName(this, "Dark Rainbow Plant lvl " + level);

    }
    
    public void func_149853_b(World world, Random rand, int int1, int int2, int int3){
        
    }

    public void Seeds(Item seeds, Block plant){
        this.seeds = seeds;
    }
    
    public ArrayList<ItemStack> getDrops(World world, int x, int y, int z, int metadata, int fortune){
        ArrayList<ItemStack> res = new ArrayList<ItemStack>();
        res.add(new ItemStack(seeds, 1));
        if (metadata == 7){
            res.add(new ItemStack(RainbowCraftMain.DarkRainbowIngot, level));
        }
        return res;
    }
    
    protected boolean canPlaceBlockOn(Block block)
    {
        return block == RainbowCraftMain.ImprovedFlowerPot;
    }
}

Также есть проблема с семенами. Там не работают названия. Ошибка, наверно, глупая, но с созданием каждого следующего объекта все предыдущие переименовываются под его имя. Код дальше.

Java:
package com.RainbowCraft;

import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;
import net.minecraft.block.Block;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemSeeds;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;

public class DarkRainbowSeeds extends ItemSeeds {
    
    private Block plant;

    /** BlockID of the block the seeds can be planted on. */
    private Block soilBlockID;

    public DarkRainbowSeeds(Block plant, String name, int level) {
        super(plant, RainbowCraftMain.ImprovedFlowerPot);
        this.plant = plant;
        this.soilBlockID = RainbowCraftMain.ImprovedFlowerPot;
        this.setTextureName("DarkRainbowSeed");
        this.setUnlocalizedName("DarkRainbowSeed");
        GameRegistry.registerItem(this, name);
        LanguageRegistry.addName(this, "Dark Rainbow Seed lvl " + level);
        this.setCreativeTab(RainbowCraftMain.RainbowCraftTab);
        ((DarkRainbowPlants) plant).Seeds(this, plant);

    }

    public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int i4, float f1, float f2, float f3)
    {
        if (i4 != 1)
        {
            return false;
        }
        else if (player.canPlayerEdit(x, y, z, i4, stack) && player.canPlayerEdit(x, y + 1, z, i4, stack))
        {
            if (world.getBlock(x, y, z) == this.soilBlockID && world.isAirBlock(x, y + 1, z))
            {
                world.setBlock(x, y + 1, z, this.plant);
                --stack.stackSize;
                return true;
            }
            else
            {
                return false;
            }
        }
        else
        {
            return false;
        }
    }
}
 
62
0
Ладно, имя я исправил, спасибо (я сам впервые за два дня додумался похимичить с setUnlocalizedName, и только потом прочитал ответ xD Но всё же спасибо, это сработало бы). А насчёт LanguageRegistry... Без него разве не будет имя по типу "item.rainbowчтототам.ещёбуквы"?
 
62
0
Ааа, так ты про это... Хм, туплю я сегодня... Это оно?
Java:
[19:10:54] [main/INFO] [GradleStart]: Extra: []

[19:10:54] [main/INFO] [GradleStart]: Running with arguments: [--userProperties, {}, --assetsDir, C:/Users/Alexander/.gradle/caches/minecraft/assets, --assetIndex, 1.7.10, --accessToken, {REDACTED}, --version, 1.7.10, --tweakClass, cpw.mods.fml.common.launcher.FMLTweaker, --tweakClass, net.minecraftforge.gradle.tweakers.CoremodTweaker]

[19:10:54] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLTweaker

[19:10:54] [main/INFO] [LaunchWrapper]: Using primary tweak class name cpw.mods.fml.common.launcher.FMLTweaker

[19:10:54] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.CoremodTweaker

[19:10:54] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLTweaker

[19:10:54] [main/INFO] [FML]: Forge Mod Loader version 7.99.36.1558 for Minecraft 1.7.10 loading

[19:10:54] [main/INFO] [FML]: Java is Java HotSpot(TM) 64-Bit Server VM, version 1.8.0_201, running on Windows 8.1:amd64:6.3, installed at C:\Program Files\Java\jre1.8.0_201

[19:10:54] [main/INFO] [FML]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation

[19:10:54] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.CoremodTweaker

[19:10:54] [main/INFO] [GradleStart]: Injecting location in coremod cpw.mods.fml.relauncher.FMLCorePlugin

[19:10:54] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.classloading.FMLForgePlugin

[19:10:54] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker

[19:10:54] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLDeobfTweaker

[19:10:54] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.AccessTransformerTweaker

[19:10:54] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker

[19:10:54] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker

[19:10:54] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper

[19:10:55] [main/ERROR] [FML]: The binary patch set is missing. Either you are in a development environment, or things are not going to work!

[19:11:00] [main/ERROR] [FML]: FML appears to be missing any signature data. This is not a good thing

[19:11:00] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper

[19:11:00] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLDeobfTweaker

[19:11:01] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.AccessTransformerTweaker

[19:11:01] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.TerminalTweaker

[19:11:01] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.TerminalTweaker

[19:11:01] [main/INFO] [LaunchWrapper]: Launching wrapped minecraft {net.minecraft.client.main.Main}

[19:11:03] [main/INFO]: Setting user: Player18

[19:11:07] [Client thread/INFO]: LWJGL Version: 2.9.1

[19:11:09] [Client thread/INFO] [STDOUT]: [cpw.mods.fml.client.SplashProgress:start:188]: ---- Minecraft Crash Report ----

// There are four lights!



Time: 11.11.19 19:11

Description: Loading screen debug info



This is just a prompt for computer specs to be printed. THIS IS NOT A ERROR





A detailed walkthrough of the error, its code path and all known details is as follows:

---------------------------------------------------------------------------------------



-- System Details --

Details:

    Minecraft Version: 1.7.10

    Operating System: Windows 8.1 (amd64) version 6.3

    Java Version: 1.8.0_201, Oracle Corporation

    Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation

    Memory: 777429256 bytes (741 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 MB)

    JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M

    AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used

    IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0

    FML:

    GL info: ' Vendor: 'NVIDIA Corporation' Version: '4.4.0 NVIDIA 344.91' Renderer: 'GeForce 800A/PCIe/SSE2'

[19:11:09] [Client thread/INFO] [MinecraftForge]: Attempting early MinecraftForge initialization

[19:11:10] [Client thread/INFO] [FML]: MinecraftForge v10.13.4.1558 Initialized

[19:11:10] [Client thread/INFO] [FML]: Replaced 183 ore recipies

[19:11:11] [Client thread/INFO] [MinecraftForge]: Completed early MinecraftForge initialization

[19:11:11] [Client thread/INFO] [FML]: Found 0 mods from the command line. Injecting into mod discoverer

[19:11:11] [Client thread/INFO] [FML]: Searching C:\Users\Alexander\Desktop\MC2\eclipse\mods for mods

[19:11:12] [Client thread/INFO] [RainbowCraft_ID]: Mod RainbowCraft_ID is missing the required element 'name'. Substituting RainbowCraft_ID

[19:11:29] [Client thread/INFO] [FML]: Forge Mod Loader has identified 4 mods to load

[19:11:30] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, RainbowCraft_ID] at CLIENT

[19:11:30] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, RainbowCraft_ID] at SERVER

[19:11:31] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:RainbowCraft_ID

[19:11:31] [Client thread/INFO] [FML]: Processing ObjectHolder annotations

[19:11:31] [Client thread/INFO] [FML]: Found 341 ObjectHolder annotations

[19:11:31] [Client thread/INFO] [FML]: Identifying ItemStackHolder annotations

[19:11:31] [Client thread/INFO] [FML]: Found 0 ItemStackHolder annotations

[19:11:31] [Client thread/INFO] [FML]: Configured a dormant chunk cache size of 0

[19:11:31] [Client thread/INFO] [FML]: Applying holder lookups

[19:11:31] [Client thread/INFO] [FML]: Holder lookups applied

[19:11:31] [Client thread/INFO] [FML]: Injecting itemstacks

[19:11:31] [Client thread/INFO] [FML]: Itemstack injection complete

[19:11:32] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]:

[19:11:32] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Starting up SoundSystem...

[19:11:32] [Thread-8/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Initializing LWJGL OpenAL

[19:11:32] [Thread-8/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]:     (The LWJGL binding of OpenAL.  For more information, see LWJGL - Lightweight Java Game Library)

[19:11:32] [Thread-8/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: OpenAL initialized.

[19:11:32] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]:

[19:11:32] [Sound Library Loader/INFO]: Sound engine started

[19:11:38] [Client thread/INFO]: Created: 16x16 textures/blocks-atlas

[19:11:38] [Client thread/INFO]: Created: 16x16 textures/items-atlas

[19:11:38] [Client thread/INFO] [FML]: Injecting itemstacks

[19:11:38] [Client thread/INFO] [FML]: Itemstack injection complete

[19:11:38] [Client thread/INFO] [FML]: Forge Mod Loader has successfully loaded 4 mods

[19:11:38] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:RainbowCraft_ID

[19:11:40] [Client thread/INFO]: Created: 512x256 textures/blocks-atlas

[19:11:40] [Client thread/INFO]: Created: 256x256 textures/items-atlas

[19:11:40] [Client thread/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]:

[19:11:40] [Client thread/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: SoundSystem shutting down...

[19:11:41] [Client thread/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:importantMessage:90]:     Author: Paul Lamb, www.paulscode.com

[19:11:41] [Client thread/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]:

[19:11:41] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]:

[19:11:41] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Starting up SoundSystem...

[19:11:41] [Thread-10/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Initializing LWJGL OpenAL

[19:11:41] [Thread-10/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]:     (The LWJGL binding of OpenAL.  For more information, see LWJGL - Lightweight Java Game Library)

[19:11:41] [Thread-10/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: OpenAL initialized.

[19:11:41] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]:

[19:11:41] [Sound Library Loader/INFO]: Sound engine started

[19:12:27] [Server thread/INFO]: Starting integrated minecraft server version 1.7.10

[19:12:27] [Server thread/INFO]: Generating keypair

[19:12:27] [Server thread/INFO] [FML]: Injecting existing block and item data into this server instance

[19:12:27] [Server thread/INFO] [FML]: Applying holder lookups

[19:12:27] [Server thread/INFO] [FML]: Holder lookups applied

[19:12:28] [Server thread/INFO] [FML]: Loading dimension 0 (TestWorld2) (net.minecraft.server.integrated.IntegratedServer@7b3269fb)

[19:12:28] [Server thread/INFO] [FML]: Loading dimension 1 (TestWorld2) (net.minecraft.server.integrated.IntegratedServer@7b3269fb)

[19:12:28] [Server thread/INFO] [FML]: Loading dimension -1 (TestWorld2) (net.minecraft.server.integrated.IntegratedServer@7b3269fb)

[19:12:28] [Server thread/INFO]: Preparing start region for level 0

[19:12:29] [Server thread/INFO]: Preparing spawn area: 1%

[19:12:30] [Server thread/INFO]: Preparing spawn area: 62%

[19:12:31] [Server thread/INFO]: Changing view distance to 5, from 10

[19:12:32] [Netty Client IO #0/INFO] [FML]: Server protocol version 2

[19:12:32] [Netty IO #1/INFO] [FML]: Client protocol version 2

[19:12:32] [Netty IO #1/INFO] [FML]: Client attempting to join with 4 mods : [email protected],RainbowCraft_ID@Version 0.1,[email protected],[email protected]

[19:12:32] [Netty IO #1/INFO] [FML]: Attempting connection with missing mods [] at CLIENT

[19:12:32] [Netty Client IO #0/INFO] [FML]: Attempting connection with missing mods [] at SERVER

[19:12:32] [Client thread/INFO] [FML]: [Client thread] Client side modded connection established

[19:12:32] [Server thread/INFO] [FML]: [Server thread] Server side modded connection established

[19:12:32] [Server thread/INFO]: Player18[local:E:c1328cc6] logged in with entity id 270 at (-549.0278243533721, 4.0, 23.426541770542514)

[19:12:33] [Server thread/INFO]: Player18 присоединился к игре

[19:12:37] [Server thread/WARN]: Can't keep up! Did the system time change, or is the server overloaded? Running 3251ms behind, skipping 65 tick(s)

[19:12:45] [Server thread/INFO]: Saving and pausing game...

[19:12:45] [Server thread/INFO]: Saving chunks for level 'TestWorld2'/Overworld

[19:12:45] [Server thread/INFO]: Saving chunks for level 'TestWorld2'/Nether

[19:12:45] [Server thread/INFO]: Saving chunks for level 'TestWorld2'/The End

[19:12:46] [Server thread/INFO]: Stopping server

[19:12:46] [Server thread/INFO]: Saving players

[19:12:46] [Server thread/INFO]: Saving worlds

[19:12:46] [Server thread/INFO]: Saving chunks for level 'TestWorld2'/Overworld

[19:12:46] [Server thread/INFO]: Saving chunks for level 'TestWorld2'/Nether

[19:12:46] [Server thread/INFO]: Saving chunks for level 'TestWorld2'/The End

[19:12:46] [Server thread/INFO] [FML]: Unloading dimension 0

[19:12:46] [Server thread/INFO] [FML]: Unloading dimension -1

[19:12:46] [Server thread/INFO] [FML]: Unloading dimension 1

[19:12:46] [Server thread/INFO] [FML]: Applying holder lookups

[19:12:46] [Server thread/INFO] [FML]: Holder lookups applied

[19:12:47] [Client thread/INFO]: Stopping!

[19:12:47] [Client thread/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]:

[19:12:47] [Client thread/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: SoundSystem shutting down...

[19:12:47] [Client thread/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:importantMessage:90]:     Author: Paul Lamb, www.paulscode.com

[19:12:47] [Client thread/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]:

Java HotSpot(TM) 64-Bit Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release
 
Последнее редактирование модератором:
62
0
Здесь даже проблема не в текстуре. Текстура работает отлично. Здесь что-то не так с самим блоком (или семенами).
Немного подробнее о том, как выглядит текстура (в центре) и как она должна выглядеть (росток слева).
1573737970484.png
 
1,038
57
229
Сверху