This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.multicoder.mcpaintball.capability; | |
import net.minecraft.nbt.CompoundTag; | |
import net.minecraft.nbt.ListTag; | |
import net.minecraft.nbt.Tag; | |
import org.multicoder.mcpaintball.util.Teams; | |
import java.util.ArrayList; | |
import java.util.Arrays; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
property 'mixin.env.remapRefMap', 'true' | |
property 'mixin.env.refMapRemappingFile', "${projectDir}/build/createSrgToMcp/output.srg" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Your Package Here | |
import net.minecraft.world.entity.EntityType; | |
import net.minecraft.world.entity.MobCategory; | |
import net.minecraftforge.registries.DeferredRegister; | |
import net.minecraftforge.registries.ForgeRegistries; | |
import net.minecraftforge.registries.RegistryObject; | |
//Import Your Custom Arrow Here | |
//Import Your Main Mod Class Here |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Your package here | |
import net.minecraft.client.renderer.entity.ArrowRenderer; | |
import net.minecraft.client.renderer.entity.EntityRendererProvider; | |
import net.minecraft.resources.ResourceLocation; | |
import net.minecraftforge.api.distmarker.Dist; | |
import net.minecraftforge.api.distmarker.OnlyIn; | |
// Import your mod arrow here | |
@OnlyIn(Dist.CLIENT) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Your package | |
import net.minecraft.server.level.ServerLevel; | |
import net.minecraft.world.entity.Entity; | |
import net.minecraft.world.entity.EntityType; | |
import net.minecraft.world.entity.LivingEntity; | |
import net.minecraft.world.entity.projectile.AbstractArrow; | |
import net.minecraft.world.item.ItemStack; | |
import net.minecraft.world.level.Level; | |
import net.minecraft.world.level.block.Block; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.multicoder.mcpaintball.capability; | |
import net.minecraft.nbt.CompoundTag; | |
public class PlayerTeamCapability | |
{ | |
private int Team; | |
private int Points; | |
public int GetTeam(){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@SubscribeEvent | |
public static void onPlayerCloned(PlayerEvent.Clone event) | |
{ | |
MCPaintball.LOG.info("Player Clone"); | |
if(event.isWasDeath()) | |
{ | |
MCPaintball.LOG.info("Is Death"); | |
MCPaintball.LOG.info(event.getOriginal().getCapability(PlayerTeamCapabilityProvider.CAPABILITY).isPresent()); | |
event.getOriginal().getCapability(PlayerTeamCapabilityProvider.CAPABILITY).ifPresent(oldStore -> | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.multicoder.mcpaintball; | |
import net.minecraft.world.entity.EntityType; | |
import net.minecraftforge.client.event.EntityRenderersEvent; | |
import net.minecraftforge.event.CreativeModeTabEvent; | |
import net.minecraftforge.eventbus.api.IEventBus; | |
import net.minecraftforge.fml.ModLoadingContext; | |
import net.minecraftforge.fml.common.Mod; | |
import net.minecraftforge.fml.config.ModConfig; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@SubscribeEvent | |
public static void onEntityHurt(LivingHurtEvent event){ | |
Entity E = event.getEntity(); | |
if(E instanceof Cow && event.getSource().isProjectile()) | |
{ | |
event.setCanceled(true); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.multicoder.mcpaintball.entity.renderer; | |
import net.minecraft.client.renderer.entity.EntityRenderer; | |
import net.minecraft.client.renderer.entity.EntityRendererProvider; | |
import net.minecraft.resources.ResourceLocation; | |
import org.multicoder.mcpaintball.entity.RedGrenade; | |
public class RedGrenadeRenderer extends EntityRenderer<RedGrenade> | |
{ | |
public static final ResourceLocation TEXTURE = new ResourceLocation("mcpaintball:textures/item/utility/grenades/red.png"); |