2
1
Fork 1
mirror of https://github.com/ACGaming/Spackenmobs synced 2024-05-19 20:04:10 +02:00

License and misc stuff

This commit is contained in:
ACGaming 2020-09-20 13:36:36 +02:00
parent 27a61a7542
commit c290b17c5b
7 changed files with 61 additions and 16 deletions

13
LICENSE.md Normal file
View file

@ -0,0 +1,13 @@
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2004 Sam Hocevar
14 rue de Plaisance, 75014 Paris, France
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. You just DO WHAT THE FUCK YOU WANT TO.

View file

@ -12,7 +12,7 @@ apply plugin: 'net.minecraftforge.gradle.forge'
version = "RC4"
group = "com.acgaming.spackenmobs" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
group = "mod.acgaming.spackenmobs" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "Spackenmobs-1.12.2"
sourceCompatibility = targetCompatibility = '1.8' // Need this here so eclipse task generates correctly.

View file

@ -1,7 +1,10 @@
package mod.acgaming.spackenmobs;
import mod.acgaming.spackenmobs.events.TauntDrachenlordEvent;
import mod.acgaming.spackenmobs.misc.ModEntities;
import mod.acgaming.spackenmobs.misc.ModKeybinds;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.Mod.EventHandler;
import net.minecraftforge.fml.common.Mod.Instance;
@ -38,7 +41,8 @@ public class Spackenmobs
@EventHandler
public void init(FMLInitializationEvent event)
{
MinecraftForge.EVENT_BUS.register(new TauntDrachenlordEvent());
ModKeybinds.init();
}
@EventHandler

View file

@ -2,10 +2,7 @@ package mod.acgaming.spackenmobs.entities;
import mod.acgaming.spackenmobs.misc.ModSoundEvents;
import net.minecraft.entity.monster.EntityCreeper;
import net.minecraft.init.Items;
import net.minecraft.init.SoundEvents;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.DamageSource;
import net.minecraft.util.SoundEvent;
import net.minecraft.world.World;

View file

@ -173,7 +173,7 @@ public class EntityDrachenlord extends EntityZombie
}
}
private void becomeAngryAt(Entity p_70835_1_)
public void becomeAngryAt(Entity p_70835_1_)
{
this.angerLevel = 400 + this.rand.nextInt(400);
this.randomSoundDelay = this.rand.nextInt(40);

View file

@ -1,32 +1,48 @@
package mod.acgaming.spackenmobs.events;
import mod.acgaming.spackenmobs.entities.EntityDrachenlord;
import mod.acgaming.spackenmobs.misc.ModKeybinds;
import mod.acgaming.spackenmobs.misc.ModSoundEvents;
import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.DamageSource;
import net.minecraft.util.EntityDamageSourceIndirect;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.RayTraceResult;
import net.minecraft.world.World;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.common.gameevent.InputEvent;
import net.minecraftforge.fml.common.gameevent.InputEvent.KeyInputEvent;
import net.minecraftforge.fml.common.gameevent.TickEvent;
import org.lwjgl.input.Keyboard;
import java.util.List;
public class TauntDrachenlordEvent
{
public static AxisAlignedBB getBoundingBox(double x, double y, double z, int hRadius, int vRadius)
private void PigmanAggro(World worldIn, BlockPos pos, EntityPlayer player)
{
return new AxisAlignedBB(x - hRadius, y - vRadius, z - hRadius, x + hRadius, y + vRadius, z + hRadius);
}
float radius = 64;
public static void makeAngry(EntityPlayer player, EntityDrachenlord drache)
{
drache.attackEntityFrom(DamageSource.causePlayerDamage(player), 0);
BlockPos corner1 = new BlockPos(pos.getX() - radius, pos.getY() - radius, pos.getZ() - radius);
BlockPos corner2 = new BlockPos(pos.getX() + radius, pos.getY() + radius, pos.getZ() + radius);
AxisAlignedBB AABB_radius = new AxisAlignedBB(corner1, corner2);
List<EntityDrachenlord> drachenlords = worldIn.getEntitiesWithinAABB(EntityDrachenlord.class, AABB_radius);
for (EntityDrachenlord drachenlord : drachenlords)
{
DamageSource damageSource = new EntityDamageSourceIndirect("generic", player, player);
drachenlord.becomeAngryAt(player);
}
}
@SubscribeEvent
public void onKeyPress(KeyInputEvent event, EntityDrachenlord drache, EntityPlayer player)
public void onKeyInput(KeyInputEvent event)
{
final int aggroRange = 64;
if (Keyboard.isKeyDown(Keyboard.KEY_J))
if (ModKeybinds.taunt.isPressed())
{
}
}
}

View file

@ -0,0 +1,15 @@
package mod.acgaming.spackenmobs.misc;
import net.minecraft.client.settings.KeyBinding;
import net.minecraftforge.fml.client.registry.ClientRegistry;
import org.lwjgl.input.Keyboard;
public class ModKeybinds
{
public static KeyBinding taunt;
public static void init()
{
taunt = new KeyBinding("key.taunt", Keyboard.KEY_J, "key.categories.spackenmobs");
ClientRegistry.registerKeyBinding(taunt);
}
}