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

BentiGorlich

Members
  • Posts

    34
  • Joined

  • Last visited

Converted

  • Location
    Germany

Recent Profile Visitors

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

BentiGorlich's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. I think I found it: [21:16:52] [Render thread/INFO]: Environment: authHost='https://authserver.mojang.com', accountsHost='https://api.mojang.com', sessionHost='https://sessionserver.mojang.com', servicesHost='https://api.minecraftservices.com', name='PROD' [21:16:53] [Render thread/INFO]: Setting user: ---- [21:16:53] [Render thread/INFO]: Backend library: LWJGL version 3.2.2 build 10 [21:16:54] [Render thread/INFO]: Narrator library for x64 successfully loaded [21:16:55] [Render thread/INFO]: Reloading ResourceManager: Default [21:16:59] [Render thread/INFO]: OpenAL initialized. [21:16:59] [Render thread/INFO]: Sound engine started [21:16:59] [Render thread/INFO]: Created: 1024x1024x4 minecraft:textures/atlas/blocks.png-atlas [21:16:59] [Render thread/INFO]: Created: 256x128x4 minecraft:textures/atlas/signs.png-atlas [21:16:59] [Render thread/INFO]: Created: 1024x512x4 minecraft:textures/atlas/banner_patterns.png-atlas [21:16:59] [Render thread/INFO]: Created: 1024x512x4 minecraft:textures/atlas/shield_patterns.png-atlas [21:16:59] [Render thread/INFO]: Created: 256x256x4 minecraft:textures/atlas/chest.png-atlas [21:16:59] [Render thread/INFO]: Created: 512x256x4 minecraft:textures/atlas/beds.png-atlas [21:16:59] [Render thread/INFO]: Created: 512x256x4 minecraft:textures/atlas/shulker_boxes.png-atlas [21:17:01] [Render thread/INFO]: Created: 256x256x0 minecraft:textures/atlas/particles.png-atlas [21:17:01] [Render thread/INFO]: Created: 256x256x0 minecraft:textures/atlas/paintings.png-atlas [21:17:01] [Render thread/INFO]: Created: 256x128x0 minecraft:textures/atlas/mob_effects.png-atlas [21:17:06] [Render thread/INFO]: Stopping! And there was a debug.log: And there is a launcher_log.txt:
  2. Hi everyone, I use the Curse Forge app for overwatch and I created a plain 1.17.1 forge 37.1.0 profile. It crashes immediately when I click "play" in the minecraft launcher. I just installed Java 16 and set minecraft to use it in the curse forge app settings. I don't have any mods installed and my log looks like this: [12:36:42] [main/INFO]: ModLauncher running: args [--username, MrKatuffel, --version, forge-37.1.0, --gameDir, C:\Users\Benni\Documents\Minecraft\Instances\1.17.1, --assetsDir, C:\Users\Benni\Documents\Minecraft\Install\assets, --assetIndex, 1.17, --uuid, 2021e6cbc7bc4d2a81effa163cfd62d9, --accessToken, ????????, --userType, mojang, --versionType, release, --width, 1024, --height, 768, --launchTarget, forgeclient, --fml.forgeVersion, 37.1.0, --fml.mcVersion, 1.17.1, --fml.forgeGroup, net.minecraftforge, --fml.mcpVersion, 20210706.113038] [12:36:42] [main/INFO]: ModLauncher 9.0.7+91+master.8569cdf starting: java version 16.0.1 by Microsoft [12:36:42] [main/INFO]: SpongePowered MIXIN Subsystem Version=0.8.4 Source=union:/C:/Users/Benni/Documents/Minecraft/Install/libraries/org/spongepowered/mixin/0.8.4/mixin-0.8.4.jar%2318! Service=ModLauncher Env=CLIENT [12:36:43] [main/INFO]: Found mod file fmlcore-1.17.1-37.1.0.jar of type LIBRARY with locator net.minecraftforge.fml.loading.moddiscovery.MinecraftLocator@6cc0bcf6 [12:36:43] [main/INFO]: Found mod file javafmllanguage-1.17.1-37.1.0.jar of type LANGPROVIDER with locator net.minecraftforge.fml.loading.moddiscovery.MinecraftLocator@6cc0bcf6 [12:36:43] [main/INFO]: Found mod file mclanguage-1.17.1-37.1.0.jar of type LANGPROVIDER with locator net.minecraftforge.fml.loading.moddiscovery.MinecraftLocator@6cc0bcf6 [12:36:43] [main/INFO]: Found mod file client-1.17.1-20210706.113038-srg.jar of type MOD with locator net.minecraftforge.fml.loading.moddiscovery.MinecraftLocator@6cc0bcf6 [12:36:43] [main/INFO]: Found mod file forge-1.17.1-37.1.0-universal.jar of type MOD with locator net.minecraftforge.fml.loading.moddiscovery.MinecraftLocator@6cc0bcf6 So I can see it is indeed using Java 16. The error message of the minecraft launcher is just: So that isn't helping. Anyone have any ideas?
  3. Any further advice would be appreciated
  4. I have the problem, that nothing is happening. I have the loader and the model in the blockstate.json: (if I remove the model property it just renders as the default black/pink block) { "variants": { "": { "loader": "gates:gate_placer_loader", "model": "gates:block/gate_placer" } } } But my GatePlacerModel class is never called. ModelLoader: public class GatePlacerModelLoader implements IModelLoader<GatePlacerModelConfiguration> { public static GatePlacerModelLoader INSTANCE = new GatePlacerModelLoader(); @Override public void onResourceManagerReload(IResourceManager resourceManager) { // TODO Auto-generated method stub } @Override public GatePlacerModelConfiguration read(JsonDeserializationContext deserializationContext, JsonObject modelContents) { return new GatePlacerModelConfiguration(); } } ModelConfiguration: public class GatePlacerModelConfiguration implements IModelGeometry<GatePlacerModelConfiguration> { @Override public IBakedModel bake(IModelConfiguration owner, ModelBakery bakery, Function spriteGetter, IModelTransform modelTransform, ItemOverrideList overrides, ResourceLocation modelLocation) { return new GatePlacerModel(overrides); } @Override public Collection getTextures(IModelConfiguration owner, Function modelGetter, Set missingTextureErrors) { Set<RenderMaterial> texs = Sets.newHashSet(); if (owner.isTexturePresent("base")) texs.add(owner.resolveTexture("base")); if (owner.isTexturePresent("all")) texs.add(owner.resolveTexture("all")); return texs; } } Model: public class GatePlacerModel extends BakedModel { public GatePlacerModel(ItemOverrideList overrides) { super(false, false, false, null, overrides, null, null); // TODO Auto-generated constructor stub } @Override public List<BakedQuad> getQuads(BlockState state, Direction side, Random rand, IModelData extraData) { if(extraData.hasProperty(GatePlacerTileEntity.MIMICED_BLOCKSTATE_PROPERTY)) { BlockState mimiced = extraData.getData(GatePlacerTileEntity.MIMICED_BLOCKSTATE_PROPERTY); IBakedModel mimicedModel = Minecraft.getInstance().getBlockRendererDispatcher().getModelForState(mimiced); return mimicedModel.getQuads(mimiced, side, rand, extraData); } else { return super.getQuads(state, side, rand, extraData); } } } Inside of my block i have this method: @Override public ActionResultType onBlockActivated(BlockState state, World worldIn, BlockPos pos, PlayerEntity player, Hand handIn, BlockRayTraceResult hit) { ItemStack activeStack = player.getHeldItem(handIn); if(activeStack.getItem() instanceof BlockItem) { Block block = ((BlockItem)activeStack.getItem()).getBlock(); ((GatePlacerTileEntity)worldIn.getTileEntity(pos)).setMimicedBlockState(block.getDefaultState()); // notify for block update, so the new mimiced block is synced in the tileentity class worldIn.notifyBlockUpdate(pos, state, state.with(MIMICED, Boolean.valueOf(true)), 2); return ActionResultType.SUCCESS; } return ActionResultType.FAIL; } Am I doing something wrong?
  5. Ok so I have run into a problem again. How do I get the model of the mimiced block from its blockstate? To clarify: where do I register my created model so that my block is rendered by it?
  6. Ok, so that was the part I missed before. Thank you, I will try that
  7. Done In your model you need to delegate the methods (the most important one is probably just getQuads) to the other model. Which "other model" you use depends on the model data (it has the mimiced block state in it). By delegating to the other model here, your block will appear as if it had that other model. Which class do you mean with "model"? I do not have a method called `getQuads()` in the GatePlacerModelLoader class, the GatePlacerModelConfiguration class, the GatePlacerBlock class, or the GatePlacerTileEntity class. So do I have to make another class class GatePlacerModel? and where would I register it, so it renders my block? Its given to you as the IModelData in your IBakedModel. This is the same model data you returned from your tile entity. In the GatePlacerModelConfiguration class I have to return a `IBakedModel` in the bake method. How do I build it? And where would I have a method for using the baked model?
  8. So I started looking into it. Sadly forge only has examples with the bucket item that are helpful, so I could not get the gist of it. I have these 2 classes now: public class GatePlacerModelLoader implements IModelLoader<GatePlacerModelConfiguration> { public static GatePlacerModelLoader INSTANCE = new GatePlacerModelLoader(); @Override public void onResourceManagerReload(IResourceManager resourceManager) { // TODO Auto-generated method stub } @Override public GatePlacerModelConfiguration read(JsonDeserializationContext deserializationContext, JsonObject modelContents) { // TODO Auto-generated method stub return null; } } public class GatePlacerModelConfiguration implements IModelGeometry<GatePlacerModelConfiguration> { @Override public IBakedModel bake(IModelConfiguration owner, ModelBakery bakery, Function spriteGetter, IModelTransform modelTransform, ItemOverrideList overrides, ResourceLocation modelLocation) { return null; } @Override public Collection getTextures(IModelConfiguration owner, Function modelGetter, Set missingTextureErrors) { // TODO Auto-generated method stub return null; } } And I register the loader like so: public void init(FMLServerStartingEvent event) { ModelLoaderRegistry.registerLoader(new ResourceLocation(MODID, "gate_placer"), GatePlacerModelLoader.INSTANCE); } My problem is, that I couldn't find a reference to how these are called for rendering - how to tell them which block they should render through my render model - how do I get the blockstate of the mimiced block (I can't get the normal block state eigher...)
  9. Ok thanks, I tried to do it, but I ran into an issue. I want to overlay a texture when eigher sidetype is input or output: getVariantBuilder(BlockInit.gate_or).forAllStates(state -> { Builder<?> configuredModel = ConfiguredModel.builder(); if(state.get(RedstoneGate.POWERED)) configuredModel.modelFile(models().singleTexture("gate_or", mcLoc("block/gate_or"), "gate_or", mcLoc("block/gate_or"))); else configuredModel.modelFile(models().singleTexture("gate_or", mcLoc("block/gate_or"), "gate_or", mcLoc("block/gate_or"))); if(state.get(RedstoneGate.EAST_SIDETYPE) == SideType.Input) { } else if(state.get(RedstoneGate.EAST_SIDETYPE) == SideType.Output) { } if(state.get(RedstoneGate.SOUTH_SIDETYPE) == SideType.Input) { } else if(state.get(RedstoneGate.SOUTH_SIDETYPE) == SideType.Output) { } if(state.get(RedstoneGate.WEST_SIDETYPE) == SideType.Input) { } else if(state.get(RedstoneGate.WEST_SIDETYPE) == SideType.Output) { } if(state.get(RedstoneGate.NORTH_SIDETYPE) == SideType.Input) { } else if(state.get(RedstoneGate.NORTH_SIDETYPE) == SideType.Output) { } return configuredModel.build(); }); I don't really understand what I have to call for that. I do have the idea, that it would be possibile to do it just in a json, becuase Ender IO does it in 1.12.2 in their BlockMachineBase.json: https://github.com/SleepyTrousers/EnderIO/blob/master/enderio-base/src/main/resources/assets/enderio/blockstates/block_machine_base.json But I don't know how to work with these submodels and overlays. My take on this looks like this: { "forge_marker": 1, "defaults": { "model": "gates:block/gate_or" }, "variants": { "facing": { "north": {}, "south": {"y": 180}, "west": {"y": 270}, "east": {"y": 90} }, "powered": { "true": { "model": "gates:block/gate_or" }, "false": { "model": "gates:block/gate_or" } }, "north_sidetype": { "i": { "textures": { "overlay":"gates:blocks/iOverlay" }, "submodel": { "model":"gates:block/gate_or" } }, "o": { "textures": { "overlay":"gates:blocks/oOverlay" }, "submodel": { "model":"gates:block/gate_or" } }, "n": {} }, "east_sidetype": { "i": { "textures": { "overlay":"gates:blocks/iOverlay" }, "submodel": { "model":"gates:block/gate_or", "y": 90 } }, "o": { "textures": { "overlay":"gates:blocks/oOverlay" }, "submodel": { "model":"gates:block/gate_or", "y": 90 } }, "n": {} }, "south_sidetype": { "i": { "textures": { "overlay":"gates:blocks/iOverlay" }, "submodel": { "model":"gates:block/gate_or", "y": 180 } }, "o": { "textures": { "overlay":"gates:blocks/oOverlay" }, "submodel": { "model":"gates:block/gate_or", "y": 180 } }, "n": {} }, "west_sidetype": { "i": { "textures": { "overlay":"gates:blocks/iOverlay" }, "submodel": { "model":"gates:block/gate_or", "y": 270 } }, "o": { "textures": { "overlay":"gates:blocks/oOverlay" }, "submodel": { "model":"gates:block/gate_or", "y": 270 } }, "n": {} } } } But it doesn't work. The log file just says "missing model for variant:" for every variant there is and at the end: "in resourcepack: 'Mod Resources': Missing model, expected to find a string" And I don't know how would deal with submodels in the BlockStateProvider class
  10. Hello Modders, I have a block with 5 state properties: public static final SideTypeProperty NORTH_SIDETYPE = SideTypeProperty.create("north_sidetype", SideType.None, SideType.Input, SideType.Output); public static final SideTypeProperty EAST_SIDETYPE = SideTypeProperty.create("east_sidetype", SideType.None, SideType.Input, SideType.Output); public static final SideTypeProperty SOUTH_SIDETYPE = SideTypeProperty.create("south_sidetype", SideType.None, SideType.Input, SideType.Output); public static final SideTypeProperty WEST_SIDETYPE = SideTypeProperty.create("west_sidetype", SideType.None, SideType.Input, SideType.Output); protected RedstoneGate() { super(Properties.create(Material.MISCELLANEOUS).zeroHardnessAndResistance().sound(SoundType.WOOD)); this.setDefaultState(this.stateContainer.getBaseState() .with(HORIZONTAL_FACING, Direction.NORTH) .with(POWERED, Boolean.valueOf(false)) .with(NORTH_SIDETYPE, SideType.None) .with(EAST_SIDETYPE, SideType.Input) .with(SOUTH_SIDETYPE, SideType.Output) .with(WEST_SIDETYPE, SideType.Input)); } At first I made the mistake to note every combination down. This of course was an insane task and I would have to do it for 5 other blocks as well. So the question is how to write an advanced json file that is not insanely long. I tried it with the multipart style, but the debug log says, that it didn't work. Here it is: { "multipart": [ { "apply": { "model": "gates:block/gate_or" }}, { "when": {"facing":"east"}, "apply": { "y": 90 } }, { "when": {"facing":"south"}, "apply": { "y": 180 } }, { "when": {"facing":"west"}, "apply": { "y": 270 } }, { "when": {"facing":"west"}, "apply": { "y": 270 } }, { "when": {"north_sidetype":"i"}, "apply": { "textures": { "overlay":"gates:blocks/iOverlay" }, "submodel": { "overlay": { "model":"gates:overlay" } } } }, { "when": {"north_sidetype":"o"}, "apply": { "textures": { "overlay":"gates:blocks/oOverlay" }, "submodel": { "overlay": { "model":"gates:overlay" } } } }, { "when": {"east_sidetype":"i"}, "apply": { "textures": { "overlay":"gates:blocks/iOverlay" }, "submodel": { "overlay": { "model":"gates:overlay" } } } }, { "when": {"east_sidetype":"o"}, "apply": { "textures": { "overlay":"gates:blocks/oOverlay" }, "submodel": { "overlay": { "model":"gates:overlay" } } } }, { "when": {"south_sidetype":"i"}, "apply": { "textures": { "overlay":"gates:blocks/iOverlay" }, "submodel": { "overlay": { "model":"gates:overlay" } } } }, { "when": {"south_sidetype":"o"}, "apply": { "textures": { "overlay":"gates:blocks/oOverlay" }, "submodel": { "overlay": { "model":"gates:overlay" } } } }, { "when": {"west_sidetype":"i"}, "apply": { "textures": { "overlay":"gates:blocks/iOverlay" }, "submodel": { "overlay": { "model":"gates:overlay" } } } }, { "when": {"west_sidetype":"o"}, "apply": { "textures": { "overlay":"gates:blocks/oOverlay" }, "submodel": { "overlay": { "model":"gates:overlay" } } } } ] } Any idea how to do it? Thanks in advance
  11. Yeah you were right, I could have found that by mysqlf, sorry. Done I don't know how to do that. The only time i really synced something to a client was through a open gui call, how would i send something to sync that up in the `onBlockActivated` method? Can you give me a class to refer to? I really don't know which class I would have to extend for that, nor where to register it I really appreciate your help
  12. It would be ok if there was the limitation that it could only look like other cubes and not like a torch for example. Thats why I thought, that shouldn't be that hard, just replace the texture from it with the texture from the right clicked block. how do I get an IModelData object from a BlockState? BlockRendererDispatcher#getModelForState is not static, how would I get an instance of that?
×
×
  • Create New...

Important Information

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