Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Having problems with orientable blocks.


mateus_craft
 Share

Recommended Posts

I wanna do an block in my mod that places like an furnace.

But after editing the json file, the block is with the black and purple (or pink idk) texture.

Here are my json files :

 

My blockstate json file :

http://pastebin.com/Jbhnb9rn

 

My block model json :

http://pastebin.com/cM000ztD

 

My item model json :

http://pastebin.com/gYmfxwxj

 

Here is the block class :

http://pastebin.com/Udc81FV5

Link to comment
Share on other sites

Show how you register your block and it's model and the full paths to your json files.

Here is how my blocks class :

package com.mateus.Morestuff.init;

import net.minecraft.block.Block;
import net.minecraft.block.BlockCrops;
import net.minecraft.block.BlockPotato;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.item.Item;
import net.minecraft.item.ItemBlock;
import net.minecraftforge.fml.common.registry.GameRegistry;

import com.mateus.Morestuff.blocks.AlfaceCrops;
import com.mateus.Morestuff.blocks.Cortador;
import com.mateus.Morestuff.blocks.Lampa;



public class MBlocks {

public static Block cortador;

public static void init() {
	cortador = new Cortador();
}

public static void register(){
	registerBlock(cortador);
}

private static void registerBlock(Block block){
	GameRegistry.register(block);
	ItemBlock item = new ItemBlock(block);
	item.setRegistryName(block.getRegistryName());
	GameRegistry.register(item);
}

public static void registerRenders(){
	registerRender(cortador);
}

public static void registerRender(Block block){
	Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(Item.getItemFromBlock(block), 0, new ModelResourceLocation(block.getRegistryName(), "inventory"));
}

}

And the place where i register the unlocalizedname and registryname :

public static enum MateusBlocks {
	CORTADOR("cortador", "Cortador");

	private String registryName;
	private String unlocalizedName;
	MateusBlocks(String unlocalizedName, String registryName) {
	this.unlocalizedName = unlocalizedName;
	this.registryName = registryName;
}
  
public String getUnlocalizedName() {
	return unlocalizedName;
}
public String getRegistryName() {
	return registryName;
}
}

The block model ? didnt i showed it ,

well here is itagain

{
    "__comment": "Model generated using MrCrayfish's Model Creator (http://mrcrayfish.com/modelcreator/)",
    "textures": {
        "0": "modii:blocks/cortador",
        "1": "modii:blocks/cortador_lado"
    },
    "display": {
        "gui": {
            "rotation": [ 30, 225, 0 ],
            "translation": [ 0, 0, 0],
            "scale":[ 0.625, 0.625, 0.625 ]
        },
        "ground": {
            "rotation": [ 0, 0, 0 ],
            "translation": [ 0, 3, 0],
            "scale":[ 0.25, 0.25, 0.25 ]
        },
        "fixed": {
            "rotation": [ 0, 0, 0 ],
            "translation": [ 0, 0, 0],
            "scale":[ 0.5, 0.5, 0.5 ]
        },
        "thirdperson_righthand": {
            "rotation": [ 75, 45, 0 ],
            "translation": [ 0, 2.5, 0],
            "scale": [ 0.375, 0.375, 0.375 ]
        },
        "firstperson_righthand": {
            "rotation": [ 0, 45, 0 ],
            "translation": [ 0, 0, 0 ],
            "scale": [ 0.40, 0.40, 0.40 ]
        },
        "firstperson_lefthand": {
            "rotation": [ 0, 225, 0 ],
            "translation": [ 0, 0, 0 ],
            "scale": [ 0.40, 0.40, 0.40 ]
        }
    },
    "elements": [
        {
            "name": "Cube",
            "from": [ 0.0, 0.0, 0.0 ], 
            "to": [ 16.0, 16.0, 16.0 ], 
            "faces": {
                "north": { "texture": "#0", "uv": [ 0.0, 0.0, 16.0, 16.0 ] },
                "east": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 16.0 ] },
                "south": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 16.0 ] },
                "west": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 16.0 ] },
                "up": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 16.0 ] },
                "down": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 16.0 ] }
            }
        }
    ]
}

my model location :

assets/modii/models/block/cortador.json

my blockstate location :

assets/modii/blockstates/Cortador.json

Link to comment
Share on other sites

BlockState

{
    "parent": "block/orientable",
    "textures": {
        "top": "modii:blocks/cortador_lado",
        "side": "modii:blocks/cortador_lado",
        "front": "modii:blocks/cortador"
    }
}

Class

package com.mateus.Morestuff.blocks;

import javax.annotation.Nullable;

import com.google.common.base.Predicate;
import com.mateus.Morestuff.IdDoMod;
import com.mateus.Morestuff.init.MTabs;

import net.minecraft.block.Block;
import net.minecraft.block.BlockDirectional;
import net.minecraft.block.BlockHorizontal;
import net.minecraft.block.material.Material;
import net.minecraft.block.properties.IProperty;
import net.minecraft.block.properties.PropertyDirection;
import net.minecraft.block.state.BlockStateContainer;
import net.minecraft.block.state.IBlockState;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.Mirror;
import net.minecraft.util.Rotation;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;

public class Cortador extends Block {

public Cortador() {
	super(Material.ANVIL);
	setUnlocalizedName(IdDoMod.MateusBlocks.CORTADOR.getUnlocalizedName());
	setRegistryName(IdDoMod.MateusBlocks.CORTADOR.getRegistryName());
	setCreativeTab(MTabs.tabMateus);
}
}

Link to comment
Share on other sites

That's a model file, not a blockstates file.

Oh sorry  :-[ they have almost the same names so i messed it up

but here it is

"variants": {
        "facing=north": { "model": "modii:cortador" }
        "facing=south": { "model": "modii:cortador", "y": 180 },
        "facing=west":  { "model": "modii:cortador", "y": 270 },
        "facing=east":  { "model": "modii:cortador", "y": 90 }
    }

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share



  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • I did and it still crashes, same crash too.
    • I'll just send the crash report, I personally have no idea what I'm looking at. Someone help [20Oct2021 09:32:39.664] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher running: args [--gameDir, ., --launchTarget, fmlserver, --fml.forgeVersion, 36.2.0, --fml.mcpVersion, 20210115.111550, --fml.mcVersion, 1.16.5, --fml.forgeGroup, net.minecraftforge] [20Oct2021 09:32:39.668] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher 8.0.9+86+master.3cf110c starting: java version 1.8.0_302 by Oracle Corporation [20Oct2021 09:32:39.921] [main/INFO] [net.minecraftforge.fml.loading.FixSSL/CORE]: Added Lets Encrypt root certificates as additional trust [20Oct2021 09:32:39.969] [main/INFO] [mixin/]: SpongePowered MIXIN Subsystem Version=0.8.2 Source=file:/home/container/libraries/org/spongepowered/mixin/0.8.2/mixin-0.8.2.jar Service=ModLauncher Env=SERVER [20Oct2021 09:32:41.561] [main/INFO] [mixin/]: Successfully loaded Mixin Connector [com.performant.coremod.mixin.Connector] [20Oct2021 09:32:41.565] [main/INFO] [cpw.mods.modlauncher.LaunchServiceHandler/MODLAUNCHER]: Launching target 'fmlserver' with arguments [--gameDir, .] [20Oct2021 09:32:41.619] [main/INFO] [com.performant.coremod.Performant/]: Performant configs loaded [20Oct2021 09:32:42.113] [main/INFO] [com.performant.coremod.Performant/]: Not enabling mixin forcom.performant.coremod.mixin.forge.BasicEventHooksMixin as config disables it. [20Oct2021 09:32:42.138] [main/INFO] [com.performant.coremod.Performant/]: Not enabling mixin forcom.performant.coremod.mixin.entity.LivingEntityUpdateEventMixin as config disables it. [20Oct2021 09:32:42.210] [main/WARN] [mixin/]: @Mixin target net/minecraft/world/server/ChunkManager$EntityTracker is public in performant.mixins.json:world.chunk.ChunkManagerEntityTrackMixin and should be specified in value [20Oct2021 09:32:47.988] [main/ERROR] [mixin/]: Critical injection failure: LVT in net/minecraft/world/gen/FlatGenerationSettings::func_236942_c_()Lnet/minecraft/world/biome/Biome; has incompatible changes at opcode 106 in callback net/minecraft/world/gen/FlatGenerationSettings::addCrashDetails. Expected: [Lnet/minecraft/world/biome/Biome;, Lnet/minecraft/world/biome/BiomeGenerationSettings;, Lnet/minecraft/world/biome/BiomeGenerationSettings$Builder;, Ljava/util/Iterator;, Ljava/util/Map$Entry;]    Found: [Lnet/minecraft/world/biome/Biome;, Lnet/minecraft/world/biome/BiomeGenerationSettings;, Lnet/minecraft/world/biome/BiomeGenerationSettings$Builder;, Ljava/util/Map;, Ljava/util/Iterator;] [20Oct2021 09:32:47.990] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException [20Oct2021 09:32:47.990] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]:     at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:39) [20Oct2021 09:32:47.990] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]:     at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) [20Oct2021 09:32:47.990] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]:     at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) [20Oct2021 09:32:47.990] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]:     at cpw.mods.modlauncher.Launcher.run(Launcher.java:82) [20Oct2021 09:32:47.990] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]:     at cpw.mods.modlauncher.Launcher.main(Launcher.java:66) [20Oct2021 09:32:47.990] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]:     at net.minecraftforge.server.ServerMain$Runner.runLauncher(ServerMain.java:63) [20Oct2021 09:32:47.990] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]:     at net.minecraftforge.server.ServerMain$Runner.access$100(ServerMain.java:60) [20Oct2021 09:32:47.991] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]:     at net.minecraftforge.server.ServerMain.main(ServerMain.java:57) [20Oct2021 09:32:47.991] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1061]: Caused by: java.lang.reflect.InvocationTargetException [20Oct2021 09:32:47.991] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1061]:     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [20Oct2021 09:32:47.991] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1061]:     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [20Oct2021 09:32:47.991] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1061]:     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [20Oct2021 09:32:47.991] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1061]:     at java.lang.reflect.Method.invoke(Method.java:498) [20Oct2021 09:32:47.992] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1061]:     at net.minecraftforge.fml.loading.FMLServerLaunchProvider.lambda$launchService$0(FMLServerLaunchProvider.java:51) [20Oct2021 09:32:47.992] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1061]:     at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [20Oct2021 09:32:47.992] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1061]:     ... 7 more [20Oct2021 09:32:47.992] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:644]: Caused by: org.spongepowered.asm.mixin.transformer.throwables.MixinTransformerError: An unexpected critical error was encountered [20Oct2021 09:32:47.992] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:644]:     at org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:363) [20Oct2021 09:32:47.992] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:644]:     at org.spongepowered.asm.mixin.transformer.MixinTransformer.transformClass(MixinTransformer.java:223) [20Oct2021 09:32:47.992] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:644]:     at org.spongepowered.asm.mixin.transformer.MixinTransformationHandler.processClass(MixinTransformationHandler.java:121) [20Oct2021 09:32:47.993] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:644]:     at org.spongepowered.asm.launch.MixinLaunchPlugin.processClass(MixinLaunchPlugin.java:131) [20Oct2021 09:32:47.993] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:644]:     at cpw.mods.modlauncher.serviceapi.ILaunchPluginService.processClassWithFlags(ILaunchPluginService.java:154) [20Oct2021 09:32:47.993] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:644]:     at cpw.mods.modlauncher.LaunchPluginHandler.offerClassNodeToPlugins(LaunchPluginHandler.java:85) [20Oct2021 09:32:47.993] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:644]:     at cpw.mods.modlauncher.ClassTransformer.transform(ClassTransformer.java:120) [20Oct2021 09:32:47.993] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:644]:     at cpw.mods.modlauncher.TransformingClassLoader$DelegatedClassLoader.findClass(TransformingClassLoader.java:265) [20Oct2021 09:32:47.993] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:644]:     at cpw.mods.modlauncher.TransformingClassLoader.loadClass(TransformingClassLoader.java:136) [20Oct2021 09:32:47.993] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:644]:     at cpw.mods.modlauncher.TransformingClassLoader.loadClass(TransformingClassLoader.java:98) [20Oct2021 09:32:47.993] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:644]:     at java.lang.ClassLoader.loadClass(ClassLoader.java:351) [20Oct2021 09:32:47.993] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:644]:     at net.minecraft.world.gen.FlatChunkGenerator.<clinit>(SourceFile:21) [20Oct2021 09:32:47.994] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:644]:     at net.minecraft.world.gen.ChunkGenerator.<clinit>(SourceFile:54) [20Oct2021 09:32:47.994] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:644]:     at net.minecraft.util.registry.Registry.func_243579_h(Registry.java:294) [20Oct2021 09:32:47.994] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:644]:     at net.minecraft.util.registry.Registry.lambda$static$51(Registry.java:466) [20Oct2021 09:32:47.994] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:644]:     at java.util.LinkedHashMap.forEach(LinkedHashMap.java:684) [20Oct2021 09:32:47.994] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:644]:     at net.minecraft.util.registry.Registry.<clinit>(Registry.java:465) [20Oct2021 09:32:47.994] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:644]:     at net.minecraft.util.registry.Bootstrap.func_151354_b(Bootstrap.java:38) [20Oct2021 09:32:47.994] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:644]:     at net.minecraft.server.Main.main(Main.java:92) [20Oct2021 09:32:47.994] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:644]:     ... 13 more [20Oct2021 09:32:47.995] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:668]: Caused by: org.spongepowered.asm.mixin.injection.throwables.InjectionError: LVT in net/minecraft/world/gen/FlatGenerationSettings::func_236942_c_()Lnet/minecraft/world/biome/Biome; has incompatible changes at opcode 106 in callback net/minecraft/world/gen/FlatGenerationSettings::addCrashDetails. Expected: [Lnet/minecraft/world/biome/Biome;, Lnet/minecraft/world/biome/BiomeGenerationSettings;, Lnet/minecraft/world/biome/BiomeGenerationSettings$Builder;, Ljava/util/Iterator;, Ljava/util/Map$Entry;]    Found: [Lnet/minecraft/world/biome/Biome;, Lnet/minecraft/world/biome/BiomeGenerationSettings;, Lnet/minecraft/world/biome/BiomeGenerationSettings$Builder;, Ljava/util/Map;, Ljava/util/Iterator;] [20Oct2021 09:32:47.995] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:668]:     at org.spongepowered.asm.mixin.injection.callback.CallbackInjector.inject(CallbackInjector.java:487) [20Oct2021 09:32:47.995] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:668]:     at org.spongepowered.asm.mixin.injection.callback.CallbackInjector.inject(CallbackInjector.java:437) [20Oct2021 09:32:47.995] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:668]:     at org.spongepowered.asm.mixin.injection.code.Injector.inject(Injector.java:264) [20Oct2021 09:32:47.995] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:668]:     at org.spongepowered.asm.mixin.injection.struct.InjectionInfo.inject(InjectionInfo.java:385) [20Oct2021 09:32:47.995] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:668]:     at org.spongepowered.asm.mixin.transformer.MixinTargetContext.applyInjections(MixinTargetContext.java:1284) [20Oct2021 09:32:47.995] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:668]:     at org.spongepowered.asm.mixin.transformer.MixinApplicatorStandard.applyInjections(MixinApplicatorStandard.java:1042) [20Oct2021 09:32:47.995] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:668]:     at org.spongepowered.asm.mixin.transformer.MixinApplicatorStandard.applyMixin(MixinApplicatorStandard.java:395) [20Oct2021 09:32:47.996] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:668]:     at org.spongepowered.asm.mixin.transformer.MixinApplicatorStandard.apply(MixinApplicatorStandard.java:320) [20Oct2021 09:32:47.996] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:668]:     at org.spongepowered.asm.mixin.transformer.TargetClassContext.applyMixins(TargetClassContext.java:345) [20Oct2021 09:32:47.996] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:668]:     at org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:569) [20Oct2021 09:32:47.996] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:668]:     at org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:351) [20Oct2021 09:32:47.996] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:668]:     ... 31 more  
  • Topics

  • Who's Online (See full list)

×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.