Jump to content

VirtCraft

Members
  • Posts

    18
  • Joined

  • Last visited

Converted

  • Gender
    Male
  • Location
    Switzerland

Recent Profile Visitors

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

VirtCraft's Achievements

Tree Puncher

Tree Puncher (2/8)

1

Reputation

  1. Thank you for the Reply. I now pretty much followed the mbe15 from MinecraftByExample. Since it is not a chessboard and it should only change texture I changed the ChessboardFinalisedModel#getQuads method to this: @Override public List<BakedQuad> getQuads(@Nullable BlockState state, @Nullable Direction side, Random rand) { ResourceLocation textureRL = new ResourceLocation("minecraft:block/diamond_block"); AtlasTexture blocksStitchedTextures = ModelLoader.instance().getSpriteMap().getAtlasTexture(AtlasTexture.LOCATION_BLOCKS_TEXTURE); TextureAtlasSprite texture = blocksStitchedTextures.getSprite(textureRL); ArrayList<BakedQuad> quads = new ArrayList<>(); for (BakedQuad quad : baseModel.getQuads(state, side, rand)) { quads.add(new BakedQuad(quad.getVertexData(), quad.getTintIndex(), quad.getFace(), texture, quad.shouldApplyDiffuseLighting())); } return quads; } In my opinion, this should change the texture of every quad into a diamondblock texture. I am sure this method is called but the texture is just being the one declared in the json model. When I remove the one in the json model file, the texture becomes the default pink-black quads texture. I couldn't find something in the internet with the same problem so I am coming back to this Post. Thanks in advance! Regards
  2. I have an Item that has about 8 different models. To switch between those models on runtime, I used an Item Property Override, which also works just fine. But I now want to be able to also switch between a few different textures, that would be applied to the prevously selected model, allowing for many different model/texture combinations. The problem is, that I don't know how I can apply only a texture in an Item Property Override. I know that I could write a model for every single model / texture combination, but there will probably be around 100 different combinations. Doing all these models would be a pretty tedious task, and wouldn't be really efficient. Does anyone know a solution to this problem? Regards
  3. I have the following problem: I want to add new swordlike item to the game. Of course I add variants for the vanilla tool tier materials, but I also want to create variants for other materials added by other mods (e.g. Copper). So is there a way that I can check whether the tag "forge:ingots/copper" contains any items, before I register the corresponding item with the tool tier copper? I thought I could solve this with tags, because I don't want the variants to be mod specific, only material specific.
  4. Yeah, but the problem is that I want a clean way to get the attackdamage a player would deal, without having to mess with enchantmentmodifiers and so on.
  5. I am trying to make a throwable weapon like a dagger or so. The entity spawning and rendering works, but when the weapon collides with an entity it should deal as much damage as a melee attack would have dealt. This should consider all enchantments applied to the itemstack and all potioneffects of the player.
  6. That solution comes pretty near to what I am looking for. The problem is though, that I want the player to attack an entity with a specific item, not necessarily the current held one. Is there an other similar method to do that?
  7. I had the exact same problem in 1.15. My Problem was, that the entity was not synced with the client correctly. My Solution was to override the ThrowableEntity#createSpawnPacket method in the Entity class, and call return NetworkHooks.getEntitySpawningPacket(this); inside that method. Maybe that helps.
  8. My question is simple: Is there a way to get the attack damage, when an item is used to attack a certain entity?
  9. My TileEntityRenderer: Here I bind the Renderer to the actual now working TileEntity: Which is called here: And In case of Need, here is my TileEntity: The TileEntity works perfectly. If I place an Item into the TileEntity, it is being rendered as expected. But when I then rejoin into the world it is not rendered anymore until I remove and replace the Item into the TileEnity. Because the Renderer works sometimes I suppose that there is nothing wrong with registering the TileEntityRenderer.
  10. As I was implementing a TileEntityRenderer into my Mod, I noticed that after I rejoined the world I was testing on that the Renderer wasn't rendering anymore. Does anyone know what I missed? Thanks in advance!
  11. As I was making a TileEntity for my minecraft mod, I encountered the following problem: The TileEntity was just working fine, but the client threw an error on the write() method: [19:43:55] [Server thread/ERROR] [minecraft/Chunk]: A TileEntity type ch.virt.wandsforge.tileentity.TileWandPedestal has thrown an exception trying to write state. It will not persist, Report this to the mod author java.lang.RuntimeException: class ch.virt.wandsforge.tileentity.TileWandPedestal is missing a mapping! This is a bug! at net.minecraft.tileentity.TileEntity.writeInternal(TileEntity.java:64) ~[?:?] {re:classloading} at net.minecraft.tileentity.TileEntity.write(TileEntity.java:58) ~[?:?] {re:classloading} at ch.virt.wandsforge.tileentity.TileWandPedestal.write(TileWandPedestal.java:34) ~[?:?] {re:classloading} at net.minecraft.world.chunk.Chunk.func_223134_j(Chunk.java:426) ~[?:?] {re:classloading} at net.minecraft.world.chunk.storage.ChunkSerializer.write(ChunkSerializer.java:286) ~[?:?] {re:classloading} at net.minecraft.world.server.ChunkManager.func_219229_a(ChunkManager.java:685) ~[?:?] {re:classloading} at net.minecraft.world.server.ChunkManager.lambda$save$9(ChunkManager.java:355) ~[?:?] {re:classloading} at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184) [?:1.8.0_221] {} at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175) [?:1.8.0_221] {} at java.util.Iterator.forEachRemaining(Iterator.java:116) [?:1.8.0_221] {} at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801) [?:1.8.0_221] {} at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482) [?:1.8.0_221] {} at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472) [?:1.8.0_221] {} at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151) [?:1.8.0_221] {} at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174) [?:1.8.0_221] {} at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) [?:1.8.0_221] {} at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418) [?:1.8.0_221] {} at net.minecraft.world.server.ChunkManager.save(ChunkManager.java:352) [?:?] {re:classloading} at net.minecraft.world.server.ServerChunkProvider.save(SourceFile:324) [?:?] {re:classloading,pl:accesstransformer:B} at net.minecraft.world.server.ServerWorld.save(ServerWorld.java:754) [?:?] {re:classloading} at net.minecraft.server.MinecraftServer.save(MinecraftServer.java:526) [?:?] {re:classloading,pl:accesstransformer:B} at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:109) [?:?] {re:classloading,pl:runtimedistcleaner:A} at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:635) [?:?] {re:classloading,pl:accesstransformer:B} at java.lang.Thread.run(Thread.java:748) [?:1.8.0_221] {} [19:43:55] [Server thread/DEBUG] [ne.mi.fm.FMLWorldPersistenceHook/WP]: Gathering id map for writing to world save TestWorld After a bit of research, I found out, that there must be something wrong with registering the TileEntity, so here is my Class where I initialize my TileEntities: @ObjectHolder(WandsMain.MODID) @Mod.EventBusSubscriber(modid = WandsMain.MODID, bus = Mod.EventBusSubscriber.Bus.MOD) public class TileInit { public static final TileEntityType<TileWandPedestal> WAND_PEDESTAL_TALL = (TileEntityType<TileWandPedestal>) TileEntityType.Builder.create(() -> new TileWandPedestal(true), BlockInit.WAND_PEDESTAL_TALL).build(null).setRegistryName("wand_pedestal_tall"); @SubscribeEvent public void registerTileType(final RegistryEvent.Register<TileEntityType<?>> e){ e.getRegistry().register(WAND_PEDESTAL_TALL); } public static void bindRenderers(){ ClientRegistry.bindTileEntityRenderer(WAND_PEDESTAL_TALL, (Function<TileEntityRendererDispatcher, TileEntityRenderer<TileWandPedestal>>) tileEntityRendererDispatcher -> new RendererWandPedestal(tileEntityRendererDispatcher)); } } Does anyone know what could be wrong? Thanks in advance!
  12. I have a problem with creating a custom axe. I know there is a other Error (ArrayIndexOutOfBoundsException). But I looked at those posts and edited my code and solved that issue. But there is an other Error (ExceptionInInitializerError). Here is my Crash-Report Here is my Class that I am using to create the axe: Here I create the axe: public static ItemAxeNormal RubyAxe = new ItemAxeNormal(MaterialRuby, "ruby_axe"); And here I register the axe: public static void registerModItems(){ registerItem(RubyAxe); } public static void registerModItemModels(){ registerItemModel(RubyAxe); } public static void registerItem(Item item){ GameRegistry.register(item); } Thanks for help!
  13. Here I call the method "Cut" from the CutManager in the Container-Class: Here I call the method "CountTicksForKitchenboard" in my Events-Class: And here I call the "addCut" method in my Main-Class (for adding a Cut to the list) and register the Events-Class and the GuiHandler Here I open the Container in a Block: And there is my GuiHandler: Thanks for Help
  14. ^ My ContainerClass ^ My GuiClass ^ My Manager-Class (This class adds the Items in the slots) Thanks for Help!
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.