Everything posted by FantaLaTone
-
[SOLVED] [1.19] I got some errors while porting my 1.18 mod to 1.19
Are you sure about this cause it messed so many things now
-
[SOLVED] [1.19] I got some errors while porting my 1.18 mod to 1.19
I got new problems private static RegistryObject<T extends AbstractContainerMenu> MenuType<T> registerMenu(String registryname, IContainerFactory<?> containerFactory) { return REGISTRY.register(registryname, () -> new MenuType<T>(containerFactory)); } this is the error message i get: D:\Fiverr Tasks\adree411\src\main\java\com\masterquentus\hexcraft\world\HexcraftMenus.java:37: error: <identifier> expected private static RegistryObject<T extends AbstractContainerMenu> MenuType<T> registerMenu(String registryname, IContainerFactory<?> containerFactory) {
-
[SOLVED] [1.19] I got some errors while porting my 1.18 mod to 1.19
D:\Fiverr Tasks\adree411\src\main\java\com\masterquentus\hexcraft\world\HexcraftMenus.java:37: error: <identifier> expected private static RegistryObject<<T extends AbstractContainerMenu> MenuType<T>> registerMenu(String registryname, IContainerFactory<T> containerFactory) { ^ D:\Fiverr Tasks\adree411\src\main\java\com\masterquentus\hexcraft\world\HexcraftMenus.java:37: error: <identifier> expected private static RegistryObject<<T extends AbstractContainerMenu> MenuType<T>> registerMenu(String registryname, IContainerFactory<T> containerFactory) { ^ D:\Fiverr Tasks\adree411\src\main\java\com\masterquentus\hexcraft\world\HexcraftMenus.java:37: error: <identifier> expected private static RegistryObject<<T extends AbstractContainerMenu> MenuType<T>> registerMenu(String registryname, IContainerFactory<T> containerFactory) { ^ D:\Fiverr Tasks\adree411\src\main\java\com\masterquentus\hexcraft\world\HexcraftMenus.java:37: error: <identifier> expected private static RegistryObject<<T extends AbstractContainerMenu> MenuType<T>> registerMenu(String registryname, IContainerFactory<T> containerFactory) { ^ D:\Fiverr Tasks\adree411\src\main\java\com\masterquentus\hexcraft\world\HexcraftMenus.java:37: error: invalid method declaration; return type required private static RegistryObject<<T extends AbstractContainerMenu> MenuType<T>> registerMenu(String registryname, IContainerFactory<T> containerFactory) { ^
-
[SOLVED] [1.19] I got some errors while porting my 1.18 mod to 1.19
Can you check out this
-
[SOLVED] [1.19] I got some errors while porting my 1.18 mod to 1.19
I changed the some of codes and errors has changed but I still get errors new code: private static final DeferredRegister<Container> REGISTRY = DeferredRegister.create(ForgeRegistries.CONTAINERS, Hexcraft.MOD_ID); public static final MenuType<Crate_WhiteOakGUIMenu> WHITE_OAK_CRATE_GUI = registerMenu("white_oak_crate_gui", (id, inv, extraData) -> new Crate_WhiteOakGUIMenu(id, inv, extraData)); public static final MenuType<Crate_HellbarkGUIMenu> HELLBARK_CRATE_GUI = registerMenu("hellbark_crate_gui", (id, inv, extraData) -> new Crate_HellbarkGUIMenu(id, inv, extraData)); public static final MenuType<Crate_BloodOakGUIMenu> BLOOD_OAK_CRATE_GUI = registerMenu("blood_oak_crate_gui", (id, inv, extraData) -> new Crate_BloodOakGUIMenu(id, inv, extraData)); // public static final MenuType<EbonyCrateGUIMenu> EBONY_CRATE_GUI = register("ebony_crate_gui", // (id, inv, extraData) -> new EbonyCrateGUIMenu(id, inv, extraData)); private static RegistryObject<<T extends AbstractContainerMenu> MenuType<T>> registerMenu(String registryname, IContainerFactory<T> containerFactory) { return REGISTRY.register(registryname, () -> new MenuType<T>(containerFactory)); } public static void register(IEventBus eventBus) { event.register(eventBus); }
-
[SOLVED] [1.19] I got some errors while porting my 1.18 mod to 1.19
I am using DeferredRegister right now but I've made some changes but it still don't work can you just tell me replace this with this? I tried everything on documents but no help
-
[SOLVED] [1.19] I got some errors while porting my 1.18 mod to 1.19
Hello, I am currently porting my 1.18 mod into 1.19 but while porting ModContainers I got some errors and I tried everything but I couldn't solve those problems. private static final DeferredRegister REGISTRY = DeferredRegister.create(ForgeRegistries.CONTAINERS, Hexcraft.MOD_ID); public static final MenuType<Crate_WhiteOakGUIMenu> WHITE_OAK_CRATE_GUI = register("white_oak_crate_gui", (id, inv, extraData) -> new Crate_WhiteOakGUIMenu(id, inv, extraData)); public static final MenuType<Crate_HellbarkGUIMenu> HELLBARK_CRATE_GUI = register("hellbark_crate_gui", (id, inv, extraData) -> new Crate_HellbarkGUIMenu(id, inv, extraData)); public static final MenuType<Crate_BloodOakGUIMenu> BLOOD_OAK_CRATE_GUI = register("blood_oak_crate_gui", (id, inv, extraData) -> new Crate_BloodOakGUIMenu(id, inv, extraData)); // public static final MenuType<EbonyCrateGUIMenu> EBONY_CRATE_GUI = register("ebony_crate_gui", // (id, inv, extraData) -> new EbonyCrateGUIMenu(id, inv, extraData)); private static <T extends AbstractContainerMenu> MenuType<T> register(String registryname, IContainerFactory<T> containerFactory) { MenuType<T> menuType = new MenuType<T>(containerFactory); menuType.setRegistryName(registryname); // NO SET REGISTRY NAME REGISTRY.register(menuType); // NO REGISTER return menuType; } @SubscribeEvent public static void registerContainers(RegisterEvent event) { event.getRegistry().registerAll(REGISTRY.toArray(new MenuType[0])); // I DON'T HAVE ANY IDEA }
-
[1.19] Adding Warden's sonic boom attack into a bow
Hello, I have a custom bow class with regular bow's codes. I want to add a mechanic that when you release the bow, bow will shoot sonic booms instead of arrows. I looked into Warden's and sonic boom's class but I couldn't figure out something. I think sonic booms are just behaviours but how I can implement a behaviour into a bow?
-
[1.18.2] Detect entity collision detection with same type entities
Hello, I have an entity type that extends TamableAnimal. I want check for collision detection for the same type of entities. I couldn't find any Override for it. How I can detect collisions?
-
Change entity's AI goals dynamically
I used a cheaper version. I am just removing all goals and adding goals I wanted later. Is this can be a problem?
-
Change entity's AI goals dynamically
Hello I have a mob with simple AI goals. I want to change mob's behaviour depend on users commands. How I can do that?
-
[SOLVED] How I can cancel an entity's InteractionResult event?
I solved the problem by just rearrengin if statements order if (item == ModItems.GRIFFIN_GENDER_TOME.get()) { if (world.isClientSide) { player.sendMessage(new TextComponent("") .append(this.getGender() == 0 ? "§bBoy" : "§dGirl") , player.getUUID()); } return InteractionResult.SUCCESS; }
-
[SOLVED] How I can cancel an entity's InteractionResult event?
What should I return to prevent other codes to processing?
-
[SOLVED] How I can cancel an entity's InteractionResult event?
Hello I have an entity with mobInteraction event. When right clicked it with a specific item mob tells player to mob's gender but when I right clicked with item it tells mob's gender and also process other interactions how I can return after tells player mob's gender? Here's my code : @Override public InteractionResult mobInteract(Player player, InteractionHand hand) { ItemStack itemstack = player.getItemInHand(hand); Item item = itemstack.getItem(); Level world = player.level; if (world.isClientSide) { if (item == ModItems.GRIFFIN_GENDER_TOME.get()) { player.sendMessage(new TextComponent("") .append(this.getGender() == 0 ? "§bBoy" : "§dGirl") , player.getUUID()); return InteractionResult.SUCCESS; // RETURN AFTER THIS BUT IT'S NOT WORKING } } if (item == Items.PORKCHOP || item == Items.BEEF && !isTame()) { if (this.level.isClientSide) { return InteractionResult.CONSUME; } else { if (!player.getAbilities().instabuild) { itemstack.shrink(1); } if (!ForgeEventFactory.onAnimalTame(this, player) && this.random.nextInt(8) == 0) { if (!this.level.isClientSide) { super.tame(player); this.navigation.recomputePath(); this.setTarget(null); this.level.broadcastEntityEvent(this, (byte)7); setSitting(true); } } return InteractionResult.SUCCESS; } } if(isTame() && !this.level.isClientSide && hand == InteractionHand.MAIN_HAND) { setSitting(!isSitting()); return InteractionResult.SUCCESS; } if (itemstack.getItem() == Items.PORKCHOP || itemstack.getItem() == Items.BEEF) { return InteractionResult.PASS; } return super.mobInteract(player, hand); }
-
How to make a tamable entity rideable?
thanks I will try using AbstractHorse first
-
How to make a tamable entity rideable?
Hi, I have an entity that extends TamableAnimal and I want it to be rideable how I can do that?
-
I am getting the same error all the time after I changed my build.gradle
I am getting the same error everytime I tried to run client after I changed my gradle Error : Unable to make field private static final java.util.Map java.lang.ProcessEnvironment.theCaseInsensitiveEnvironment accessible: module java.base does not "opens java.lang" to unnamed module @48140564 build.gradle : buildscript { repositories { maven { url = 'https://maven.minecraftforge.net/' } mavenCentral() } dependencies { classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '3.+', changing: true } } apply plugin: 'net.minecraftforge.gradle' apply plugin: 'eclipse' apply plugin: 'maven-publish' version = '1.0' group = 'com.yourname.modid' // http://maven.apache.org/guides/mini/guide-naming-conventions.html archivesBaseName = 'modid' sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8' // Need this here so eclipse task generates correctly. println('Java: ' + System.getProperty('java.version') + ' JVM: ' + System.getProperty('java.vm.version') + '(' + System.getProperty('java.vendor') + ') Arch: ' + System.getProperty('os.arch')) repositories { maven { url 'https://dl.cloudsmith.io/public/geckolib3/geckolib/maven/' } } minecraft { mappings channel: 'snapshot', version: '20200514-1.15.1' runs { client { workingDirectory project.file('run') property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP' property 'forge.logging.console.level', 'debug' mods { examplemod { source sourceSets.main } } } server { workingDirectory project.file('run') property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP' property 'forge.logging.console.level', 'debug' mods { examplemod { source sourceSets.main } } } data { workingDirectory project.file('run') property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP' property 'forge.logging.console.level', 'debug' args '--mod', 'examplemod', '--all', '--output', file('src/generated/resources/') mods { examplemod { source sourceSets.main } } } } } dependencies { minecraft 'net.minecraftforge:forge:1.15.2-31.2.57' compile fg.deobf('software.bernie.geckolib:geckolib-forge-1.15.2:3.0.46') } jar { manifest { attributes([ "Specification-Title": "examplemod", "Specification-Vendor": "examplemodsareus", "Specification-Version": "1", // We are version 1 of ourselves "Implementation-Title": project.name, "Implementation-Version": "${version}", "Implementation-Vendor" :"examplemodsareus", "Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ") ]) } } jar.finalizedBy('reobfJar') publishing { publications { mavenJava(MavenPublication) { artifact jar } } repositories { maven { url "file:///${project.projectDir}/mcmodsrepo" } } }
-
How to add bossbar to the mobs
I am making a mod using Forge for Minecraft 1.15.2. I made a simple mob so far. Now I want to add a bossbar to it but I don't know how to do it. Also I couldn't find any helpful topic or video about bossbars. Any advice or help? Here's my current code : package com.fantalatone.buggytheclown.entities; import net.minecraft.entity.AgeableEntity; import net.minecraft.entity.EntityType; import net.minecraft.entity.MobEntity; import net.minecraft.entity.SharedMonsterAttributes; import net.minecraft.entity.ai.attributes.AttributeMap; import net.minecraft.entity.ai.attributes.AttributeMap; import net.minecraft.entity.ai.goal.*; import net.minecraft.entity.effect.LightningBoltEntity; import net.minecraft.entity.monster.IMob; import net.minecraft.entity.monster.MonsterEntity; import net.minecraft.entity.passive.AnimalEntity; import net.minecraft.world.World; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; public class Buggy extends MonsterEntity implements IMob { private double health = 0.0d; public Buggy(EntityType<? extends MonsterEntity> type, World worldIn) { super(type, worldIn); } @Override protected void registerAttributes() { super.registerAttributes(); this.getAttribute(SharedMonsterAttributes.MAX_HEALTH).setBaseValue(120D); this.getAttribute(SharedMonsterAttributes.MOVEMENT_SPEED).setBaseValue(0.5D); this.getAttribute(SharedMonsterAttributes.KNOCKBACK_RESISTANCE).setBaseValue(0.2D); this.getAttribute(SharedMonsterAttributes.ATTACK_DAMAGE).setBaseValue(8D); } @Override protected void registerGoals() { super.registerGoals(); this.goalSelector.addGoal(0, new SwimGoal(this)); this.goalSelector.addGoal(1, new PanicGoal(this, 1D)); this.goalSelector.addGoal(2, new LookRandomlyGoal(this)); this.goalSelector.addGoal(1, new WaterAvoidingRandomWalkingGoal(this, 1D)); } @Override protected void updateAITasks() { super.updateAITasks(); } @Override public void livingTick() { super.livingTick(); if (!this.world.isRemote) { health = this.getHealth(); } } @Override public void onStruckByLightning(LightningBoltEntity lightningBolt) { this.setGlowing(true); } }
IPS spam blocked by CleanTalk.