-
Posts
16 -
Joined
-
Last visited
Everything posted by Vat1n
-
Problem when installing Forge 1.17.1 (client side) [Mac]
Vat1n replied to Vat1n's topic in Support & Bug Reports
Good news, I successfully installed 1.17.1 Forge. Actually, the solution was really easy, I had to : Go to the .../minecraft/versions ; Remove the 1.17.1 and 1.17.1-forge-37.1.1 directories ; launch the Forge Installer and finally launch the Minecraft Launcher. It was that simple. The jars were indeed badly wrote. Thanks a lot for the help warjort ! ๐ -
Problem when installing Forge 1.17.1 (client side) [Mac]
Vat1n replied to Vat1n's topic in Support & Bug Reports
Here is a WeTransfert link to download the log : https://we.tl/t-AWzbAhj4Yu Or an alternative to WeTransfert (MCLO GS, used by Aternos) : https://mclo.gs/8Mwsbzf Also, I've have added something at the end of my post, just after you answered : Maybe it can help to understand my issue. Concerning zlib, I know it's a file zip/unziper, but is it installed by default on Mac (Mojave for my case) or do we have to install it ? -
Hello. [I am on Mac 10.14.6, x64 processor] I have downloaded the file forge-1.17.1-37.1.1-installer.jar from the Forge site for 1.17.1 I launch the jar file ; The "Install client" choice is already checked ; I click on "OK" (the directory for the forge is correct -> Users/.../Library/Application Support/minecraft) The installation starts, but it produces an error at around 60%-> Failed to run processor: java.io.EOFException: Unexpected end of ZLIB input streamjava.io.EOFException:Unexpected end of ZLIB Here is the part of the log when the issue comes: java.io.EOFException: Unexpected end of ZLIB input stream at java.base/java.util.zip.InflaterInputStream.fill(InflaterInputStream.java:244) at java.base/java.util.zip.InflaterInputStream.read(InflaterInputStream.java:158) at java.base/java.util.zip.ZipInputStream.read(ZipInputStream.java:196) at java.base/java.io.FilterInputStream.read(FilterInputStream.java:106) at net.minecraftforge.jarsplitter.ConsoleTool.copy(ConsoleTool.java:149) at net.minecraftforge.jarsplitter.ConsoleTool.main(ConsoleTool.java:122) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:568) at net.minecraftforge.installer.actions.PostProcessors.process(PostProcessors.java:226) at net.minecraftforge.installer.actions.ClientInstall.run(ClientInstall.java:144) at net.minecraftforge.installer.InstallerPanel.run(InstallerPanel.java:423) at net.minecraftforge.installer.SimpleInstaller.launchGui(SimpleInstaller.java:175) at net.minecraftforge.installer.SimpleInstaller.main(SimpleInstaller.java:147) Failed to run processor: java.io.EOFException:Unexpected end of ZLIB input stream See log for more details. I saw some threads about the same error, but I didn't find the solution to my problem. Hypotheses : - My Java is outdated -> I don't think it's true since I've installed the JDK 17. When I type java -version in the Mac terminal, it gives me this : java version "17.0.9" 2023-10-17 LTS Java(TM) SE Runtime Environment (build 17.0.9+11-LTS-201) Java HotSpot(TM) 64-Bit Server VM (build 17.0.9+11-LTS-201, mixed mode, sharing) - Either my Java is "corrupted" or my Forge Installer is -> I've tried to reinstall the Forge Installer, and it seems fine. For the Java, I haven't done it yet since it's longer to reinstall and I don't know if it's enough to just uninstall first and install after - There is an issue in the minecraft files, or something lacking. I don't know what to do. N.B. : I tried to install Forge for 1.16.5 and 1.20 -> it was successful ! I'm surprised that 1.20 works, maybe there is an issue with Java 16. I'm telling that because 1.18+ need Java 17 and 1.12-1.16 need Java 8-> see https://minecraft.fandom.com/wiki/Tutorials/Update_Java#Why_update? If anyone could help me to solve that problem, I would be grateful ๐
-
Hello, In Minecraft, we know that some entities try to avoid others like the villagers who fear the zombies or the creepers who fear the cats. I discovered this mecanic in the registerGoals method. For example : ##From the registerGoals() method from Creeper.java this.goalSelector.addGoal(3, new AvoidEntityGoal<>(this, Ocelot.class, 6.0F, 1.0D, 1.2D)); this.goalSelector.addGoal(3, new AvoidEntityGoal<>(this, Cat.class, 6.0F, 1.0D, 1.2D)); However, I want to make the creeper to be scared of another entity I've created (called Cubos). I don't know how should I implement another goal in the registerGoals(). Is it useful to use the Access Transformers ?
-
Hello, I recently made an entity called "Cubos" which can be powered when hit by lightning bolt like creepers. I want it to be faster when powered. I know I have to deal with Attributes and AttributeModifier but I don't exactly know how. Is it correct to use the method "tick()" in the Cubos file ? package fr.vat1n.vatmod.entity.common; import ... public class Cubos extends Animal implements PowerableMob { private static final EntityDataAccessor<Boolean> DATA_IS_POWERED = SynchedEntityData.defineId(Cubos.class, EntityDataSerializers.BOOLEAN); public Cubos(EntityType<? extends Animal> entityType, Level level){ super(entityType,level); } protected void defineSynchedData() { super.defineSynchedData(); this.entityData.define(DATA_IS_POWERED, false); } public void addAdditionalSaveData(CompoundTag pCompound) { super.addAdditionalSaveData(pCompound); if (this.entityData.get(DATA_IS_POWERED)) { pCompound.putBoolean("powered", true); } } public void readAdditionalSaveData(CompoundTag pCompound) { super.readAdditionalSaveData(pCompound); this.entityData.set(DATA_IS_POWERED, pCompound.getBoolean("powered")); } @Nullable @Override public AgeableMob getBreedOffspring(ServerLevel level, AgeableMob mob) { return ModEntities.CUBOS.get().create(level); } @Override protected void registerGoals() { this.goalSelector.addGoal(0, new FloatGoal(this)); this.goalSelector.addGoal(1, new PanicGoal(this, 1.5D)); this.goalSelector.addGoal(2, new BreedGoal(this, 1.0D)); this.goalSelector.addGoal(3, new TemptGoal(this, 1.25D, Ingredient.of(ModItems.SIWATOR_AXE.get()), false)); } public static AttributeSupplier.Builder createAttributes() { return Mob.createMobAttributes().add(Attributes.MAX_HEALTH, 10.0D).add(Attributes.MOVEMENT_SPEED, (double)0.2F); } public void thunderHit(ServerLevel pLevel, LightningBolt pLightning) { super.thunderHit(pLevel, pLightning); this.entityData.set(DATA_IS_POWERED, true); } @Override public boolean isPowered() { return this.entityData.get(DATA_IS_POWERED); } @Override public void tick() { super.tick(); if(this.entityData.get(DATA_IS_POWERED)){ //HOW TO CHANGE THE ATTRIBUTES ? } } }
-
Hello, I was wondering how could I create a field around a new entity I called "Cubos" (it looks like a cube walking with two wooden legs. I know that the charged creeper (or "Wither" when it has only half his health points left) uses the file CreeperPowerLayer extending EnergySwirlLayer. Here is the file I created "CubosPowerLayer" : package fr.vat1n.vatmod.client.renderer.layers; import fr.vat1n.vatmod.client.renderer.model.CubosModel; import fr.vat1n.vatmod.entity.common.Cubos; import net.minecraft.client.model.EntityModel; import net.minecraft.client.model.geom.EntityModelSet; import net.minecraft.client.model.geom.ModelLayers; import net.minecraft.client.renderer.entity.RenderLayerParent; import net.minecraft.client.renderer.entity.layers.EnergySwirlLayer; import net.minecraft.resources.ResourceLocation; public class CubosPowerLayer extends EnergySwirlLayer<Cubos, CubosModel<Cubos>> { private static final ResourceLocation POWER_LOCATION = new ResourceLocation("textures/entity/creeper/creeper_armor.png"); private final CubosModel<Cubos> model; public CubosPowerLayer(RenderLayerParent<Cubos, CubosModel<Cubos>> renderLayerParent, EntityModelSet entityModelSet) { super(renderLayerParent); this.model = new CubosModel<>(entityModelSet.bakeLayer(ModelLayers.CREEPER_ARMOR)); } protected float xOffset(float xOffset) { return xOffset * 0.01F; } protected ResourceLocation getTextureLocation() { return POWER_LOCATION; } protected EntityModel<Cubos> model() { return this.model; } } As you can see, in the constructor, I use the bakeLayer method for the CREEPER_ARMOR since I don't know how and where to create the same for the cubos. And here is the CubosRenderer : package fr.vat1n.vatmod.client.renderer; import fr.vat1n.vatmod.VatMod; import fr.vat1n.vatmod.client.renderer.layers.CubosPowerLayer; import fr.vat1n.vatmod.client.renderer.model.CubosModel; import fr.vat1n.vatmod.entity.common.Cubos; import net.minecraft.client.renderer.entity.EntityRendererProvider; import net.minecraft.client.renderer.entity.MobRenderer; import net.minecraft.resources.ResourceLocation; public class CubosRenderer extends MobRenderer<Cubos, CubosModel<Cubos>> { private static final ResourceLocation TEXTURE = new ResourceLocation(VatMod.MOD_ID, "textures/entities/cubos.png"); public CubosRenderer(EntityRendererProvider.Context context) { super(context, new CubosModel<>(context.bakeLayer(CubosModel.LAYER_LOCATION)), 0.5F); this.addLayer(new CubosPowerLayer(this, context.getModelSet())); } @Override public ResourceLocation getTextureLocation(Cubos pEntity) { return TEXTURE; } } Finally, here is the CubosModel : package fr.vat1n.vatmod.client.renderer.model; import com.google.common.collect.ImmutableList; import com.mojang.blaze3d.vertex.PoseStack; import com.mojang.blaze3d.vertex.VertexConsumer; import fr.vat1n.vatmod.VatMod; import fr.vat1n.vatmod.entity.common.Cubos; import net.minecraft.client.model.AgeableListModel; import net.minecraft.client.model.geom.ModelLayerLocation; import net.minecraft.client.model.geom.ModelPart; import net.minecraft.client.model.geom.PartPose; import net.minecraft.client.model.geom.builders.*; import net.minecraft.resources.ResourceLocation; import net.minecraft.util.Mth; public class CubosModel<Type extends Cubos> extends AgeableListModel<Type> { public static final ModelLayerLocation LAYER_LOCATION = new ModelLayerLocation(new ResourceLocation(VatMod.MOD_ID, "cubos"), "main"); private final ModelPart legL; private final ModelPart legR; private final ModelPart head; private final ModelPart root; public CubosModel(ModelPart root) { this.root = root; this.legL = root.getChild("legL"); this.legR = root.getChild("legR"); this.head = root.getChild("head"); } public static LayerDefinition createBodyLayer() { MeshDefinition meshdefinition = new MeshDefinition(); PartDefinition partdefinition = meshdefinition.getRoot(); partdefinition.addOrReplaceChild("head", CubeListBuilder.create().texOffs(0, 0).addBox(-6.0F, -6.0F, -6.0F, 12.0F, 12.0F, 12.0F, new CubeDeformation(0.0F)), PartPose.offset(0.0F, 16.0F, 0.0F)); partdefinition.addOrReplaceChild("legL", CubeListBuilder.create().texOffs(0, 24).addBox(6.0F, 0.0F, -1.0F, 2.0F, 9.0F, 2.0F, new CubeDeformation(0.0F)), PartPose.offset(0.0F, 15.0F, 0.0F)); partdefinition.addOrReplaceChild("legR", CubeListBuilder.create().texOffs(8, 24).addBox(-8.0F, 0.0F, -1.0F, 2.0F, 9.0F, 2.0F, new CubeDeformation(0.0F)), PartPose.offset(0.0F, 15.0F, 0.0F)); return LayerDefinition.create(meshdefinition, 64, 64); } @Override public void setupAnim(Type entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch) { this.head.xRot = headPitch * ((float)Math.PI / 180F); this.legR.xRot = Mth.cos(limbSwing * 0.6662F) * 1.4F * limbSwingAmount; this.legL.xRot = Mth.cos(limbSwing * 0.6662F + (float)Math.PI) * 1.4F * limbSwingAmount; } @Override public void renderToBuffer(PoseStack poseStack, VertexConsumer vertexConsumer, int packedLight, int packedOverlay, float red, float green, float blue, float alpha) { this.root.render(poseStack, vertexConsumer, packedLight, packedOverlay, red, green, blue, alpha); } @Override protected Iterable<ModelPart> headParts() { return ImmutableList.of(this.head); } @Override protected Iterable<ModelPart> bodyParts() { return null; } } My problem is that the game can't find the "legL" part in the CubosModel : "Caused by: java.util.NoSuchElementException: Can't find part legL" However, when I delete the line "this.addLayer(new CubosPowerLayer(this, context.getModelSet()));" in the CubosRenderer constructor, the problem disappears. Perhaps the issue comes from the fact I chose the CREEPER_ARMOR which isn't suitable. I have checked the ModelLayers and LayerDefinitions which contain CREEPER_ARMOR but I can't solve the issue
-
Need to know the meaning of the function "getInputVector"
Vat1n replied to Vat1n's topic in Modder Support
Thank you for your answer. I understand now : Imagine you want to move diagonally (in relation to the axes X and Z), you have to set X movement and Z movement. Then we'll have to deal with Pythagorean theorem or something like that in order to get the correct value for the diagonal movement ๐ -
Sorry, I thought that "tristan le plus bg" was french because of the name
-
Hello. I was searching the signification of the method getInputVector(). I've found it in Entity.java private static Vec3 getInputVector(Vec3 pRelative, float pMotionScaler, float pFacing) { double d0 = pRelative.lengthSqr(); if (d0 < 1.0E-7D) { return Vec3.ZERO; } else { Vec3 vec3 = (d0 > 1.0D ? pRelative.normalize() : pRelative).scale((double)pMotionScaler); float f = Mth.sin(pFacing * ((float)Math.PI / 180F)); float f1 = Mth.cos(pFacing * ((float)Math.PI / 180F)); return new Vec3(vec3.x * (double)f1 - vec3.z * (double)f, vec3.y, vec3.z * (double)f1 + vec3.x * (double)f); } } Here is another function which uses the getInputVector : public void moveRelative(float pAmount, Vec3 pRelative) { Vec3 vec3 = getInputVector(pRelative, pAmount, this.getYRot()); this.setDeltaMovement(this.getDeltaMovement().add(vec3)); } Could someone explain me what is the goal of this method please ?
-
Hello, Recently, I asked myself the following question : "What is the maximal distance you can reach with a bow?" Imagine you shoot with a bow from X:0 in the X positive axis. With the perfect angle, what could be the longest distance X? So, I asking you which files should I check in order to calculate the longest X. Would it be better to search in the files about the Minecraft physics?
-
[1.18.2] How to store some variables to vanilla items
Vat1n replied to Vat1n's topic in Modder Support
Thank you Luis_ST -
Search the YouTube channel "Kaupenjoe". He does videos for 1.18/1.19
-
Good morning, Firstly, I wanted to implement a new function to the nether_star so it give me an approximation of ln(2) in maths. Therefore, I coded a common event which detects the right click. However, I don't know how or where to store the variable "n" (int) and "result" (double) such that I get a better and better approximation when I click. Currently, when I right click on a nether_star, it shows me alternatively "1.0", "0.0", "1.0" ... whereas it should tends to 0.6931 Theoricaly, the code should do 1/1 -1/2 +1/3 -1/4 + ... I sure that the problem comes from the static variables Here is my code if it can help. Vat1n @Mod.EventBusSubscriber(modid = MyMod.MODID, bus = Bus.FORGE) public class CommonEvents { static int n = 1; static double result = 0; @SubscribeEvent public static void getApproxOfLnTwo(PlayerInteractEvent.RightClickItem event){ if(!event.getPlayer().level.isClientSide){ if (event.getPlayer().getMainHandItem().getItem() == Items.NETHER_STAR) { for (int i = 0; i < n; i++) { if(n%2 == 0){result = result - (1.0 / (double) n);} else{result = result + (1.0 / (double) n);} } event.getPlayer().sendMessage(new TextComponent("The result is : " + result), Util.NIL_UUID); n++; } } } }
-
Hello, I'm a newbie in the Minecraft modding but I know the Java's basics. I use Intellij IDEA. The mod is intended for 1.18.2 I'm making a sort of Aether Mod (in order to train). Currently, I am creating a block which can become indestructible when I apply some Luminite powder (a new crystal transformed into powder). This block is called Urzil and it will be used in the dungeon where it is, by default, indestructible. My question is how should I proceed to code that ? Should I look the Redstone-Lamp-Block JavaClass and "copy" the code or should I search through the tons of Minecraft code until I find the good method per example ? I have created an abstract JavaClass called "ChargeableBlocks" (in a folder named "Common") which contains the Urzil feature. As a matter of fact, I planned to create other ones for more dungeons. Then, I will place the UrzilClass in the same folder I watched some video (TurtyWurty and Kaupenjoe) but I understand nothing that can help me. I haven't coded the Luminite Powder yet. The code below is incomplete but you can look at. It's the ChargeableBlock JavaClass If someone can help (or correct) me please. I'm lost N.B. : Please read the text before deleting it, diesieben07. You are able to answer my problem in all cases ! At worst , tell me only where should I go to get the informations -Vat1n- package fr.vat.mymod.common.block; import net.minecraft.core.BlockPos; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.entity.player.Player; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.StateDefinition; import net.minecraft.world.level.block.state.properties.BooleanProperty; import net.minecraft.world.phys.BlockHitResult; public abstract class ChargeableBlocks extends Block { public static final BooleanProperty CHARGED = BooleanProperty.create("charged"); public ChargeableBlocks(BlockBehaviour.Properties properties) { super(properties); this.registerDefaultState(this.defaultBlockState().setValue(CHARGED, Boolean.valueOf(false))); } @Override protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> pBuilder) { pBuilder.add(CHARGED); } @Override public InteractionResult use(BlockState pState, Level pLevel, BlockPos pPos, Player pPlayer, InteractionHand pHand, BlockHitResult pHit) { } }
-
Hello, I'm a newbie in the Minecraft modding but I know the Java's basics. I use Intellij IDEA. The mod is intended for 1.17.x I'm making a sort of Aether Mod (in order to train). Currently, I am creating a block which can become indestructible when I apply some Luminite powder (a new crystal transformed into powder). This block is called Urzil and it will be used in the dungeon where it is, by default, indestructible. My question is how should I proceed to code that ? Should I look the Redstone-Lamp-Block JavaClass and "copy" the code or should I search through the tons of Minecraft code until I find the good method per example ? I have created an abstract JavaClass called "ChargeableBlocks" (in a folder named "Common") which contains the Urzil feature. As a matter of fact, I planned to create other ones for more dungeons. Then, I will place the UrzilClass in the same folder I watched some video (TurtyWurty and Kaupenjoe) but I understand nothing that can help me. The part of ChargeableBlock's JavaClass below is obviously incomplete. I haven't coded the Luminite Powder yet. If someone can help (or correct) me please. I'm lost -Vat1n- package fr.vat.mymod.common.block; import net.minecraft.core.BlockPos; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.entity.player.Player; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.StateDefinition; import net.minecraft.world.level.block.state.properties.BooleanProperty; import net.minecraft.world.phys.BlockHitResult; public abstract class ChargeableBlocks extends Block { public static final BooleanProperty CHARGED = BooleanProperty.create("charged"); public ChargeableBlocks(BlockBehaviour.Properties properties) { super(properties); this.registerDefaultState(this.defaultBlockState().setValue(CHARGED, Boolean.valueOf(false))); } @Override protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> pBuilder) { pBuilder.add(CHARGED); } @Override public InteractionResult use(BlockState pState, Level pLevel, BlockPos pPos, Player pPlayer, InteractionHand pHand, BlockHitResult pHit) { } }