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

_HungTeen_

Members
  • Content Count

    9
  • Joined

  • Last visited

Community Reputation

1 Neutral

About _HungTeen_

  • Rank
    Tree Puncher

Recent Profile Visitors

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

  1. I am making a music disc Item named [Zombie On Your Lawn]. I can correctly use the disc Item to right click JuckBox, and it can play the right music. But When i leave the JuckBox Block for about 200 blocks away, the music is still playing.(normally, when player about 30 blocks away, the music will stop playing). Here is the code in ItemRegister. public static final RegistryObject<Item> ZOMBIE_ON_YOUR_LAWN = ITEMS.register("zombie_on_your_lawn", () -> {return new MusicDiscItem(0, () -> { return SoundRegister.ZOMBIE_ON_YOUR_LAWN.get(); }, new Item.Prope
  2. Thx for reply. I try it before, but still the same error. I even copy a trigger code from twilightforest, also failed. Idk if it is because i miss some important register.
  3. I am making a new Criterion trigger called SunAmountTrigger. First I create SunAmountTrigger class like the default did : https://github.com/HungTeen/pvzmod/blob/dev/src/main/java/com/hungteen/pvz/advancement/SunAmountTrigger.java And then I register it in AdvancementHandler : https://github.com/HungTeen/pvzmod/blob/dev/src/main/java/com/hungteen/pvz/advancement/AdvancementHandler.java Here is the json file of the custom advancement : https://github.com/HungTeen/pvzmod/blob/dev/src/main/resources/data/pvz/advancements/sunny_days.json But When I run mc, I didn't see the adva
  4. You can focus on the defualt code about how to correctly add structure. I will show you default desert_pyramid. one is addStructure this.addStructure(Feature.DESERT_PYRAMID.withConfiguration(IFeatureConfig.NO_FEATURE_CONFIG)); another is addFeature biomeIn.addFeature(GenerationStage.Decoration.SURFACE_STRUCTURES, Feature.DESERT_PYRAMID.withConfiguration(IFeatureConfig.NO_FEATURE_CONFIG).withPlacement(Placement.NOPE.configure(IPlacementConfig.NO_PLACEMENT_CONFIG))); So what you need to do is add "addFeature" method. I think addStructure means the biome can spawn the
  5. Ok,my bad . Its still a small mistake like last time. I forgot to break in switch 😅 Can I delete this topic?
  6. I am making a WorldEventData class to save my world event set. private HashSet<Events> events = new HashSet<>(Events.values().length); When I add event to the set ,it seems ok. public void addEvent(Events ev) { events.add(ev); // System.out.println(events.contains(ev)); this.markDirty(); } If I use code below to check wheather it add correctly,it output nothing (means the event did't add correctly) @SuppressWarnings("resource") @SubscribeEvent public static void onPlayerRightClick(RightClickItem ev){ // System.out.println(ev.getWorld().getDayTime());
  7. ok,finally i know the problem. Im just so stupid ! public DaveVillaComponent(TemplateManager manager, ResourceLocation res,BlockPos pos, Rotation rotation) { super(IStructurePieceType.SHIPWRECK, 0); this.templatePosition = pos; this.rotation = rotation; this.res=res; // this.midPos=blockpos; this.setUpTemplate(manager); } I just forgot to change the IStrucurePieceType.SHIPWRECK which I copy from default code.
  8. I am making a structure with 4 template pieces . Sometimes it gen properly like this. But mostly,it gen like this. here is the code https://github.com/HungTeen/pvzmod/tree/dev/src/main/java/com/hungteen/pvz/structure/davevilla and this picture maybe helpful.It shows the place of structure block. I have troubled a whole day. hope you guys will help me out. Thanks !
  9. public class EntityConeHead extends MultiPartEntityPart{ private EntityNormalZombie zombie; public EntityConeHead(EntityNormalZombie zombie, String partName, float width, float height) { super(zombie, partName, width, height); this.zombie=zombie; this.setExist(); } @Override public boolean attackEntityFrom(DamageSource source, float amount) { //System.out.println(this.world.isRemote+" "+source.damageType+" "+amount); return super.attackEntityFrom(source, amount); } public void setExist() { if(this.parent instanceof EntityZombieBase) { if(((EntityZombieBase) this.pa
×
×
  • Create New...

Important Information

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